学习啦>学习电脑>网络知识>路由器>路由器知识大全>

cisco路由器配置命令

时间: 权威878 分享

  cisco路由器是全世界领先的设备,而且配置cisco路由器的方法多数都是利用命令,下面学习啦小编为大家整理了一些cisco路由器配置命令,希望对您有所帮助!

  cisco路由器配置命令知识

  所处状态各类

  router>

  用户处于用户命令状态,可以查看网络和主机

  router#

  用户处于特权模式,可以查看状态,还可以看到和更改路由器的设置内容

  router(config)#

  全局配置状态,可以设置路由的全局参数

  router(config-if)#;router(config-line)#;router(config-router)#.....

  处于局部配置状态,可以设置路由的局部参数

  配置端口ip

  命令

  en

  config t //全局模式

  interface f0/0

  ip address 192.168.1.1 255.255.255.0 //设置端口ip

  no shu //生效

  exit

  interface f0/1

  ip address 192.168.10.1 255.255.255.0

  no shu

  exit

  end

  disable

  配置静态路由

  命令

  en

  config t //全局模式

  ip route 192.168.100.0 255.255.255.0 192.168.10.2 //到192.168.100.0/24通过192.168.10.2接口

  end

  show ip route //可以看到前面标明S,即为静态路由

  配置动态路由(RIP)

  命令

  en

  config t //全局模式

  no route rip //禁止rip协议

  route rip

  network 192.168.1.0 //network参数为路由的两个端口对应的网络地址

  network 192.168.10.0

  exit

  end

  disable

  配置DHCP

  命令

  en

  config t //全局模式

  ip dhcp excluded-address 192.168.1.1 //需要排除的ip地址

  ip dhcp pool gr-dhcp-pool //ip地址池名

  default-server 192.168.1.1 //指定dhcp服务器

  network 192.168.1.0 255.255.255.0 //配置网络

  dns-server 61.177.7.1 //配置dns服务器

  exit

  end

  disable

  可以通过 ip helper-address指定 DHCP中继代理

  interface FastEthernet0/1

  ip address 192.168.1.1 255.255.255.0

  ip helper-address 192.168.10.2 //配置DHCP中继代理,DHCP

  配置NAT

  命令

  en

  config t //全局模式

  interface f0/0

  ip address 192.168.1.1 255.255.255.0

  ip nat inside //内部端口

  no shu

  exit

  interface f0/1

  ip address 192.168.10.1 255.255.255.0

  ip nat outside //外部端口

  no shu

  exit

  access-list 1 permit any //设置一个可访问列表

  ip nat pool gr-nat-pool 192.168.10.3 192.168.10.254 netmask 255.255.255.0 //设置分配池

  ip nat inside resource list 1 pool gr-nat-pool overload

  show ip nat traslations

  clear ip nat traslation *

  其它

  sh running-config //显示当前运行配置

  sh startup-config //显示开机配置

  sh ip route //显示路由

  sh nat traslations //显示nat当前情况

cisco路由器配置命令的相关文章

1.Cisco路由器配置命令全攻略

2.思科路由器配置命令

3.思科路由器常见的配置命令有哪些

4.CISCO路由器配置命令状态

5.思科路由器基本配置教程

1787688