一 实验需求
静态路由实验,建立拓扑pc1>>R1>>R2>>R3>>pc2,使pc1与pc2能相互通信。
二 实验拓扑
![](https://img-blog.csdnimg.cn/img_convert/684dbd48a225840f0696c1a658456898.png)
三 ip地址规划
设备 | 接口 | ip地址 |
AR1 | G0/0/0 | 192.168.10.254/24 |
G0/0/1 | 12.1.1.1/24 | |
AR2 | G0/0/0 | 12.1.1.2/24 |
G0/0/1 | 23.1.1.2/24 | |
AR3 | G0/0/0 | 23.1.1.3/24 |
G0/0/1 | 192.168.20.254/24 | |
PC1 | 192.168.10.1/24 | |
PC2 | 192.168.20.254 |
配置ip地址的实例:
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip ad
[r1-GigabitEthernet0/0/0]ip address 23.1.1.3 24
四 实验配置
R1:
[r1]ip route-static 192.168.20.0 255.255.255.0 12.1.1.2
R2:
[R2]ip route-static 192.168.10.0 255.255.255.0 12.1.1.1
[R2]ip route-static 192.168.20.0 255.255.255.0 23.1.1.3
R3:
[R3]ip route-static 192.168.10.0 255.255.255.0 23.1.1.2
PC1:
![](https://img-blog.csdnimg.cn/img_convert/d324eb16d6eb94c1df13975bb30e1a0c.png)
PC2:
![](https://img-blog.csdnimg.cn/img_convert/a2e7c76764160a2b7977adf139bba83e.png)
五 实验效果展示
ping测试:
![](https://img-blog.csdnimg.cn/img_convert/efbfcbc2ba73c8098f1f85e67ee425aa.png)
实验成功:pc1和pc2可以通过静态路由协议进行通信
附:路由表展示:
AR1:
![](https://img-blog.csdnimg.cn/img_convert/bdc9419c3a8fbf17780125f44c835296.png)
AR2:
![](https://img-blog.csdnimg.cn/img_convert/fbef46e33856103e37a3fa417bd829d7.png)
AR3:
![](https://img-blog.csdnimg.cn/img_convert/46f79ca0969aa3840eba09501d172648.png)
注:以上所示的路由表是实验成功的关键