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