首页 技术 正文
技术 2022年11月8日
0 收藏 723 点赞 1,329 浏览 1569 个字

Cisco路由配置基础

刚刚接触cisco路由配置,下面是学习的笔记,感觉命令还是多敲才能熟悉一、 所处状态各类

  1. router>
    1. 用户处于用户命令状态,可以查看网络和主机
  2. router#
    1. 用户处于特权模式,可以查看状态,还可以看到和更改路由器的设置内容
  3. router(config)#
    1. 全局配置状态,可以设置路由的全局参数
  4. router(config-if)#;router(config-line)#;router(config-router)#…..
    1. 处于局部配置状态,可以设置路由的局部参数

二、配置端口ip

  1. 命令
    1. en
    2. config t   //全局模式
    3. interface f0/0
    4. ip address 192.168.1.1 255.255.255.0 //设置端口ip
    5. no shu   //生效
    6. exit
    7. interface f0/1
    8. ip address 192.168.10.1 255.255.255.0
    9. no shu
    10. exit
    11. end
    12. disable

三、配置静态路由

  1. 命令
    1. en
    2. config t   //全局模式
    3. ip route 192.168.100.0 255.255.255.0 192.168.10.2    //到192.168.100.0/24通过192.168.10.2接口
    4. end
    5. show ip route //可以看到前面标明S,即为静态路由

四、配置动态路由(RIP)

  1. 命令
    1. en
    2. config t   //全局模式
    3. no route rip      //禁止rip协议
    4. route rip
    5. network 192.168.1.0      //network参数为路由的两个端口对应的网络地址
    6. network 192.168.10.0
    7. exit
    8. end
    9. disable

五、配置DHCP

  1. 命令
    1. en
    2. config t   //全局模式
    3. ip dhcp excluded-address 192.168.1.1   //需要排除的ip地址
    4. ip dhcp pool gr-dhcp-pool   //ip地址池名
    5. default-server   192.168.1.1  //指定dhcp服务器
    6. network  192.168.1.0 255.255.255.0   //配置网络
    7. dns-server 61.177.7.1   //配置dns服务器
    8. exit
    9. end
    10. disable
  2. 可以通过 ip helper-address指定 DHCP中继代理
    1. interface FastEthernet0/1
    2. ip address 192.168.1.1 255.255.255.0
    3. ip helper-address 192.168.10.2                 \\配置DHCP中继代理,DHCP

六、配置NAT         

  1. 命令
    1. en
    2. config t   //全局模式
    3. interface f0/0
    4. ip address 192.168.1.1 255.255.255.0
    5. ip nat inside   //内部端口
    6. no shu
    7. exit
    8. interface f0/1
    9. ip address 192.168.10.1 255.255.255.0
    10. ip nat outside   //外部端口
    11. no shu
    12. exit
    13. access-list 1 permit any   //设置一个可访问列表
    14. ip nat pool gr-nat-pool  192.168.10.3 192.168.10.254 netmask 255.255.255.0  //设置分配池
    15. ip nat inside resource list 1 pool gr-nat-pool overload
    16. show ip nat traslations
    17. clear ip nat traslation *

七、其它

    1. sh running-config    //显示当前运行配置
    2. sh startup-config     //显示开机配置
    3. sh ip route             //显示路由
    4. sh nat traslations    //显示nat当前情况
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,488
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,903
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,736
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,487
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,127
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,289