实验需求:
3台路由器上分别连接一个PC端主机,最终实现全网可达
拓扑图例:
实验分析:
要实现全网可达,需要在静态路由表上添加所需要到达的网段
实验步骤:
如图设置PC7,PC8,PC9的IP地址、子网掩码、网关
设置路由器接口的ip地址
display ip routing-table 查看路由表,查看有几个网段能够达到
在AR2上:
ip route-static 192.168.3.0 24 192.168.2.2
ip route-static 192.168.4.0 24 192.168.2.2
ip route-static 192.168.5.0 24 192.168.4.2
在AR3上配置所需要到达的网段
在AR3上:
ip route-static 192.168.1.0 24 192.168.2.1
ip route-static 192.168.5.0 24 192.168.4.2
在AR4上配置所需要到达的网段
在AR4上:
ip route-static 192.168.3.0 24 192.168.4.1
ip route-static 192.168.2.0 24 192.168.4.1
ip route-static 192.168.1.0 24 192.168.2.1
验证:
在PC7上ping PC8与PC9的ip地址
在PC8上ping PC7与PC9的ip
在PC9上ping PC7与PC8的ip地址