静态路由配置
原创
©著作权归作者所有:来自51CTO博客作者qq63a17a25c2b1c的原创作品,请联系作者获取转载授权,否则将追究法律责任
静态路由
- 实验目的
- 实验拓扑
- ip配置
- 实验步骤
- 配置路由器端口
- 配置静态路由
- 实验结果
实验目的
·了解静态路由
·掌握IPv4 默认静态路由配置
·怎样通过指定下一跳地址配置IPv4 静态路由
实验拓扑
ip配置
设备主机
| 接口
| IP地址
| 子网掩码
| 默认网关
|
PC0
| | 172.16.1.194
| 255.255.255.240
| 172.16.1.193
|
PC1
| | 172.16.1.130
| 255.255.255.192
| 172.16.1.129
|
PC2
| | 172.16.1.2
| 255.255.255.128
| 172.16.1.1
|
PC3
| | 172.16.0.2
| 255.255.255.0
| 172.16.0.1
|
R1
| F0/0
| 172.16.1.193
| 255.255.255.240
| ip route 0.0.0.0 0.0.0.0 172.16.1.210
|
R1
| S0/0/0
| 172.16.1.209
| 255.255.255.252
| Rate 9600
|
R2
| F0/0
| 172.16.1.129
| 255.255.255.192
| ip route 172.16.1.192 255.255.255.240 172.16.1.209 ip route 172.16.1.0 255.255.255.128 172.16.1.214 ip route 172.16.0.0 255.255.255.0 172.16.1.214 ip route 172.16.1.216 255.255.255.252 172.16.1.214
|
R2
| F0/1
| 172.16.1.213
| 255.255.255.252
| |
R2
| S0/0/0
| 172.16.1.210
| 255.255.255.252
| |
R3
| F0/0
| 172.16.1.1
| 255.255.255.128
| ip route 172.16.1.128 255.255.255.128 172.16.1.213 ip route 172.16.1.192 255.255.255.240 172.16.1.213 ip route 172.16.1.208 255.255.255.252 172.16.1.213 ip route 172.16.0.0 255.255.255.0 172.16.1.218
|
R3
| F0/1
| 172.16.1.214
| 255.255.255.252
| |
R3
| S0/0/1
| 172.16.1.217
| 255.255.255.252
| Rate 9600
|
R4
| F0/0
| 172.16.0.1
| 255.255.255.0
| ip route 0.0.0.0 0.0.0.0 172.16.2.22 ip route 0.0.0.0 0.0.0.0 172.16.2.25 ip route 0.0.0.0 0.0.0.0 172.16.1.217 ip route 0.0.0.0 0.0.0.0 Serial0/0/0
|
R4
| S0/0/0
| 172.16.1.218
| 255.255.255.252
| |
实验步骤
配置路由器端口
R1(config)#interface F0/0
R1(config-if)#ip address 172.16.1.193 255.255.255.240
R1(config-if)#no shutdown
R1(config)#interface S0/0/0
R1(config-if)#ip address 172.16.1.209 255.255.255.252
R1(config-if)#clock rate 9600
R1(config-if)#no shutdown
R1(config-if)#
R2(config)#interface F0/0
R2(config-if)#ip address 172.16.1.129 255.255.255.192
R2(config-if)#no shutdown
R2(config-if)#interface F0/1
R2(config-if)#ip address 172.16.1.213 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#interface s0/0/0
R2(config-if)#ip address 172.16.1.210 255.255.255.252
R2(config-if)#no shutdown
R3(config)#interface F0/0
R3(config-if)#ip address 172.16.1.1 255.255.255.128
R3(config-if)#no shutdown
R3(config-if)#interface F0/1
R3(config-if)#ip address 172.16.1.214 255.255.255.252
R3(config-if)#no shutdown
R3(config)#interface s0/0/1
R3(config-if)#ip address 172.16.1.217 255.255.255.252
R3(config-if)#clock rate 9600
R3(config-if)#no shutdown
R4(config)#interface F0/0
R4(config-if)#ip address 172.16.0.1 255.255.255.0
R4(config-if)#no shutdown
R4(config)#interface s0/0/0
R4(config-if)#ip address 172.16.1.218 255.255.255.252
R4(config-if)#no shutdown
配置静态路由
R1(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.210
R1(config)#
R2(config)#ip route 172.16.1.192 255.255.255.240 172.16.1.209
R2(config)#ip route 172.16.1.0 255.255.255.128 172.16.1.214
R2(config)#ip route 172.16.1.216 255.255.255.252 172.16.1.214
R2(config)#ip route 172.16.0.0 255.255.255.0 172.16.1.214
R3(config)#ip route 172.16.1.128 255.255.255.128 172.16.1.213
R3(config)#ip route 172.16.1.192 255.255.255.240 172.16.1.213
R3(config)#ip route 172.16.1.208 255.255.255.252 172.16.1.213
R3(config)#ip route 172.16.0.0 255.255.255.0 172.16.1.218
R3(config)#
R4(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.217
实验结果