日志标签:静态路由

静态路由&默认路由试验笔记

分类:思科技术日期:2011-06-23 - 21:10:40评论:9条作者:老谢

静态路由&默认路由试验笔记

R1:192.168.1.1 255.255.255.0 fa 0/0

R2:192.168.2.1 255.255.255.0 fa 0/0

R2:192.168.3.1 255.255.255.0 fa 1/0

R3:192.168.4.1 255.255.255.0 fa 0/0

 
R1(config)#ip route 192.168.2.0 255.255.255.0 fastEthernet 0/0
R1(config)#ip route 192.168.3.0 255.255.255.0 fastEthernet 0/0
R1(config)#ip route 192.168.4.0 255.255.255.0 fastEthernet 0/0
R2(config)#ip route 192.168.1.0 255.255.255.0 fastEthernet 0/0
R2(config)#ip route 192.168.4.0 255.255.255.0 fastEthernet 1/0
R3(config)#ip route 192.168.3.0 255.255.255.0 fastEthernet 0/0
R3(config)#ip route 192.168.1.0 255.255.255.0 fastEthernet 0/0
R3(config)#ip route 192.168.2.0 255.255.255.0 fastEthernet 0/0

此时R1 ping 192.168.2.1、192.168.3.1、192.168.4.1,均可正常通信

删除R1和R2上的静态路由,配置默认路由

 
R1(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet 0/0
R3(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet 0/0

此时R1 ping 192.168.2.1、192.168.3.1、192.168.4.1,此时也均可正常通信