ip routing 啟用IP路由功能
no ip routing 關閉IP路由功能
ip source routing IP源路由,如果依靠IP源地址做確認的服務將產生問題並且會被非法入侵
路由器的ip routing是缺省啟用的,關閉ip routing是為了把路由器當做一台主機來用,所以此時要配上ip default-gateway ,就象在自己的PC上設置缺省 網關一樣。
有時候會在三層交換機上使用,打開三層交換機的路由功能!
(1)配置三層交換機啟動路由功能:ip routing
(2)配置VLAN IP地址: interface vlan vlan-id
Ip address ip-address subnet-mask
No shutdown
(3)配置接口為三層模式: no switchport
(4)配置DHCP中繼轉發: int vlan vlan-id
Ip helper-address Dhcpserver-address
(5)配置靜態路由: ip route targetnet-address netmask nexthop-address
(6)配置RIP協議: router rip
Network netaddress
(7)查看FIB表: show ip cef
(8)查看鄰接關系表: show adjacency detail
(9)查看路由表: show ip route