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 //设置端口ip

no shu //生效

exit

interface f0/1

ip address

no shu

exit

end

disable

  三、配置静态路由

命令

en

config t //全局模式

ip route //到通过接口

end

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

  四、配置动态路由(RIP)

命令

en

config t //全局模式

no route rip //禁止rip协议

route rip

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

network

exit

end

disable

  五、配置DHCP

命令

en

config t //全局模式

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

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

default-server //指定dhcp服务器

network //配置网络

dns-server //配置dns服务器

exit

end

disable

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

interface FastEthernet0/1

ip address

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

  六、配置NAT

命令

en

config t //全局模式

interface f0/0

ip address

ip nat inside //内部端口

no shu

exit

interface f0/1

ip address

ip nat outside //外部端口

no shu

exit

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

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

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

show ip nat traslations

clear ip nat traslation *