本文主要是介绍大概是第三天配置静态综合小实验,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
要求如图,需要划分14个子网,故掩码的网络位是28位
(我是这么划分的…)
接下来配置
AR1
sys
[Huawei]sysname r1(改个名)
[r1]int loo 0
[r1-LoopBack0]ip add 192.168.1.1 28
[r1-LoopBack0]q
[r1]int loo1
[r1-LoopBack1]ip add 192.168.1.17 28
[r1-LoopBack1]q
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.33 28
[r1-GigabitEthernet0/0/0]q
[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.97 28
AR2
[Huawei]sysname r2
[r2]int loo0
[r2-LoopBack0]ip add 192.168.1.49 28
[r2-LoopBack0]q
[r2]int loo1
[r2-LoopBack1]ip add 192.168.1.65 28
[r2-LoopBack1]q
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.34 28
[r2-GigabitEthernet0/0/0]q
[r2]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.81 28
AR3
[Huawei]sysname r3
[r3]int loo0
[r3-LoopBack0]ip add 192.168.1.113 28
[r3-LoopBack0]q
[r3]int loo1
[r3-LoopBack1]ip add 192.168.1.129 28
[r3-LoopBack1]q
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.98 28
[r3-GigabitEthernet0/0/0]q
[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.145 28
AR4
sys
[Huawei]sys r4
[r4
[r4]int loo0
[r4-LoopBack0]ip add 192.168.1.161 28
[r4-LoopBack0]q
[r4]int loo1
[r4-LoopBack1]ip add 192.168.1.177 28
[r4-LoopBack1]q
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.82 28
[r4-GigabitEthernet0/0/0]q
[r4]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.146 28
[r4-GigabitEthernet0/0/1]q
[r4]int g 0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.193 28
[r4-GigabitEthernet0/0/2]q
[r4]int g 4/0/0
[r4-GigabitEthernet4/0/0]ip add 192.168.1.209 28
[r4-GigabitEthernet4/0/0]
AR5
[Huawei]sys r5
[r5]int loo0
[r5-LoopBack0]ip add 5.5.5.1 24
[r5-LoopBack0]q
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.194 28
[r5-GigabitEthernet0/0/0]q
[r5]int g 0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.1.210 28
(别问我为什么不截图,因为错误有点多,不美观)
接下来配置路由
AR1
[r1]ip route-static 192.168.1.48 28 192.168.1.34
[r1]ip route-static 192.168.1.64 28 192.168.1.34
[r1]ip route-static 192.168.1.160 28 192.168.1.34
[r1]ip route-static 192.168.1.176 28 192.168.1.34
[r1]ip route-static 192.168.1.112 28 192.168.1.98
[r1]ip route-static 192.168.1.128 28 192.168.1.98
[r1]ip route-static 192.168.1.176 28 192.168.1.98
[r1]ip route-static 192.168.1.160 28 192.168.1.9
[r1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.34
[r1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.98
AR2
[r2]ip route-static 192.168.1.0 28 192.168.1.33
[r2]ip route-static 192.168.1.16 28 192.168.1.3
[r2]ip route-static 192.168.1.112 28 192.168.1.33
[r2]ip route-static 192.168.1.128 28 192.168.1.33
[r2]ip route-static 192.168.1.128 28 192.168.1.82
[r2]ip route-static 192.168.1.112 28 192.168.1.82
[r2]ip route-static 192.168.1.176 28 192.168.1.82
[r2]ip route-static 192.168.1.160 28 192.168.1.8
[r2]ip route-static 0.0.0.0 0.0.0.0 192.168.1.82
AR3
[r3]ip ro
[r3]ip route
[r3]ip route-static 192.168.1.0 28 192.168.1.97
[r3]ip route-static 192.168.1.16 28 192.168.1.97
[r3]ip route-static 192.168.1.48 28 192.168.1.97
[r3]ip route-static 192.168.1.64 28 192.168.1.97
[r3]ip route-static 192.168.1.64 28 192.168.1.146
[r3]ip route-static 192.168.1.48 28 192.168.1.146
[r3]ip route-static 192.168.1.160 28 192.168.1.146
[r3]ip route-static 192.168.1.176 28 192.168.1.146
[r3]ip route-static 0.0.0.0 0.0.0.0 192.168.1.146
AR4
[r4]ip rou
[r4]ip route
[r4]ip route-static 192.168.1.0 28 192.168.1.81
[r4]ip route-static 192.168.1.16 28 192.168.1.8
[r4]ip route-static 192.168.1.48 28 192.168.1.81
[r4]ip route-static 192.168.1.64 28 192.168.1.81
[r4]ip route-static 192.168.1.0 28 192.168.1.145
[r4]ip route-static 192.168.1.16 28 192.168.1.145
[r4]ip route-static 192.168.1.112 28 192.168.1.145
[r4]ip route-static 192.168.1.128 28 192.168.1.145
[r4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.194
[r4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.210 pr
[r4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.210 preference 61
[r4]
AR5
[r5]ip ro
[r5]ip route
[r5]ip route-static 192.168.1.0 24 192.168.1.193
[r5]ip route-static 192.168.1.0 24 192.168.1.209 pr
[r5]ip route-static 192.168.1.0 24 192.168.1.209 preference 61
[r5]
然后为了防止路由黑洞,在AR4 上设置一个空接口路由
[r4]ip route-static 192.168.1.0 24 N
[r4]ip route-static 192.168.1.0 24 NULL 0
[r4]
接下来测试一下
AR5路由器ping192.168.1.1,通了
但是,AR1 ping 5.5.5.1 ping不通!!!
经我测试,其他所有路由都能互相ping同!
只有AR1 ping不通AR5!(AR5能ping通AR1)
只有单向通是我没有想到的!
有没有知道怎么解决的大神?可以在评论中指出我哪里错了
这篇关于大概是第三天配置静态综合小实验的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!