网络实验实例
網絡實驗實例
- 實驗題
- 需求:全網互通
- 思路:
- LSW7
- LSW8
- LSW5
- LSW6
- R5
- R6
- 正常情況下通信結果:
- 斷開路由器之間G口后的通信測試
實驗題
需求:全網互通
思路:
- 雙側單臂路由
- MSTP多實例生成樹,選擇指定的Vlan通過主端口,避免環(huán)路產生
- 靜態(tài)路由
- 優(yōu)先級的選擇
LSW7
The device is running!<Huawei>undo te mo Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]user- con 0 [Huawei-ui-console0]idle- 0 0 #永不超時 [Huawei-ui-console0]q [Huawei]vlan bat 10 20 30 40 #創(chuàng)建vlan Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei]int e0/0/1 [Huawei-Ethernet0/0/1]port link-t acc [Huawei-Ethernet0/0/1]port def vlan 10 #建立vlan10 [Huawei-Ethernet0/0/1]int e0/0/2 [Huawei-Ethernet0/0/2]port link-t acc [Huawei-Ethernet0/0/2]port def vlan 20 #建立vlan20 [Huawei-Ethernet0/0/2]int e0/0/3 [Huawei-Ethernet0/0/3]port link-t tr [Huawei-Ethernet0/0/3]port tr all vlan all #創(chuàng)建trunk模式,允許所有vlan通過 [Huawei-Ethernet0/0/3]int e0/0/4 [Huawei-Ethernet0/0/4]port link-t tr [Huawei-Ethernet0/0/4]port tr all vlan all #創(chuàng)建trunk模式,允許所有vlan通過 [Huawei-Ethernet0/0/4]q [Huawei]stp mo mstp #stp模式設置mstp [Huawei]stp re #進入mstp [Huawei-mst-region]reg huawei #設置區(qū)域名:huawei [Huawei-mst-region]rev 1 #設置版本級別: 1 [Huawei-mst-region]ins 1 vlan 10 20 #設置實例1為vlan 10 20 [Huawei-mst-region]ins 2 vlan 30 40 #設置實例2為vlan 30 40 [Huawei-mst-region]act re #保存設置 Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei-mst-region]dis this # stp region-configurationregion-name huaweirevision-level 1instance 1 vlan 10 20 instance 2 vlan 30 40active region-configuration # return [Huawei-mst-region]LSW8
下面展示一些 內聯代碼片。
The device is running!<Huawei> <Huawei>undo te mo Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]user- con 0 [Huawei-ui-console0]id 0 0 [Huawei-ui-console0]q [Huawei]vlan bat 10 20 30 40 Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei]int e0/0/1 [Huawei-Ethernet0/0/1]port link-t acc [Huawei-Ethernet0/0/1]port def vlan 30 [Huawei-Ethernet0/0/1]int e0/0/2 [Huawei-Ethernet0/0/2]port link-t acc [Huawei-Ethernet0/0/2]port def vlan 40 [Huawei-Ethernet0/0/2]int e0/0/3 [Huawei-Ethernet0/0/3]port link-t tr [Huawei-Ethernet0/0/3]port tr all vlan all [Huawei-Ethernet0/0/3]int e0/0/4 [Huawei-Ethernet0/0/4]port link-t tr [Huawei-Ethernet0/0/4]port tr all vlan all [Huawei-Ethernet0/0/4]q [Huawei]stp mod mstp [Huawei]stp re [Huawei-mst-region]re huawei [Huawei-mst-region]rev 1 [Huawei-mst-region]ins 1 vlan 10 20 [Huawei-mst-region]ins 2 vlan 30 40 [Huawei-mst-region]act re Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei-mst-region]dis this # stp region-configurationregion-name huaweirevision-level 1instance 1 vlan 10 20instance 2 vlan 30 40active region-configuration # return [Huawei-mst-region]LSW5
The device is running!<Huawei>undo te mo Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]user- con 0 [Huawei-ui-console0]id 0 0 [Huawei-ui-console0]q [Huawei]vlan bat 10 20 30 40 Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei]int e0/0/1 [Huawei-Ethernet0/0/1]port link-t tr [Huawei-Ethernet0/0/1]port tr all vlan all [Huawei-Ethernet0/0/1]int e0/0/2 [Huawei-Ethernet0/0/2]port link-t tr [Huawei-Ethernet0/0/2]port tr all vlan all [Huawei-Ethernet0/0/2]int e0/0/3 [Huawei-Ethernet0/0/3]port link-t tr [Huawei-Ethernet0/0/3]port tr all vlan all [Huawei-Ethernet0/0/3]int e0/0/4 [Huawei-Ethernet0/0/4]port link-t tr [Huawei-Ethernet0/0/4]port tr all vlan all [Huawei-Ethernet0/0/4]q [Huawei]stp mo mstp [Huawei]stp re [Huawei-mst-region]re huawei [Huawei-mst-region]rev 1 [Huawei-mst-region]ins 1 vlan 10 20 [Huawei-mst-region]ins 2 vlan 30 40 [Huawei-mst-region]act re Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei-mst-region]q [Huawei]stp ins 1 root pri #設置本交換機為實例1的根 [Huawei]stp ins 2 root sec #設置本交換機為實例2的備選根 [Huawei]dis this # sysname Huawei # vlan batch 10 20 30 40 # stp instance 1 root primary stp instance 2 root secondary # cluster enable ntdp enable ndp enable # drop illegal-mac alarm # returnLSW6
The device is running!<Huawei>undo te mo Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]user- con 0 [Huawei-ui-console0]id 0 0 [Huawei-ui-console0]q [Huawei]vlan bat 10 20 30 40 Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei]int e0/0/1 [Huawei-Ethernet0/0/1]port link-t tr [Huawei-Ethernet0/0/1]port tr all vlan all [Huawei-Ethernet0/0/1]int e0/0/2 [Huawei-Ethernet0/0/2]port link-t tr [Huawei-Ethernet0/0/2]port tr all vlan all [Huawei-Ethernet0/0/2]int e0/0/3 [Huawei-Ethernet0/0/3]port link-t tr [Huawei-Ethernet0/0/3]port tr all vlan all [Huawei-Ethernet0/0/3]int e0/0/4 [Huawei-Ethernet0/0/4]port link-t tr [Huawei-Ethernet0/0/4]port tr all vlan all [Huawei-Ethernet0/0/4]q [Huawei]stp mo mstp [Huawei]stp re [Huawei-mst-region]re huawei [Huawei-mst-region]rev 1 [Huawei-mst-region]ins 1 vlan 10 20 [Huawei-mst-region]ins 2 vlan 30 40 [Huawei-mst-region]act re Info: This operation may take a few seconds. Please wait for a moment...done. [Huawei-mst-region]q [Huawei]stp ins 1 root sec #設置本交換機為實例1的備選根 [Huawei]stp ins 2 root pri #設置本交換機為實例2的根 [Huawei]dis this # sysname Huawei # vlan batch 10 20 30 40 # stp instance 1 root secondary stp instance 2 root primary # cluster enable ntdp enable ndp enable # drop illegal-mac alarm # returnR5
The device is running!<Huawei> <Huawei>undo te mo Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]user- con 0 [Huawei-ui-console0]id 0 0 [Huawei-ui-console0]q [Huawei]int g0/0/0 [Huawei-GigabitEthernet0/0/0]undo shutd Info: Interface GigabitEthernet0/0/0 is not shutdown. [Huawei-GigabitEthernet0/0/0]int g0/0/0.1 [Huawei-GigabitEthernet0/0/0.1]undo shutd Info: Interface GigabitEthernet0/0/0.1 is not shutdown. [Huawei-GigabitEthernet0/0/0.1]vlan-t d 10 d [Huawei-GigabitEthernet0/0/0.1]ip add 192.168.10.1 24 [Huawei-GigabitEthernet0/0/0.1]int g0/0/0.2 [Huawei-GigabitEthernet0/0/0.2]undo shutd Info: Interface GigabitEthernet0/0/0.2 is not shutdown. [Huawei-GigabitEthernet0/0/0.2]vlan-t d 20 d [Huawei-GigabitEthernet0/0/0.2]ip add 192.168.20.1 24 [Huawei-GigabitEthernet0/0/0.2]int g0/0/1 [Huawei-GigabitEthernet0/0/1]undo shutd Info: Interface GigabitEthernet0/0/1 is not shutdown. [Huawei-GigabitEthernet0/0/1]ip add 12.1.1.2 24 [Huawei-GigabitEthernet0/0/1]int e0/0/0 [Huawei-Ethernet0/0/0]undo shutd Info: Interface Ethernet0/0/0 is not shutdown. [Huawei-Ethernet0/0/0]ip add 21.1.1.2 24 [Huawei-Ethernet0/0/0]int loopb0 [Huawei-LoopBack0]ip add 1.1.1.1 32 [Huawei-LoopBack0]q [Huawei]ip route-s [Huawei]ip route-static 192.168.30.0 24 12.1.1.3 #靜態(tài)路由配置 [Huawei]ip route-static 192.168.40.0 24 12.1.1.3 #靜態(tài)路由配置 [Huawei]ip route-static 2.2.2.2 32 12.1.1.3 #靜態(tài)路由配置 [Huawei]ip route-static 2.2.2.2 32 21.1.1.3 pre 62 #調整優(yōu)先級 [Huawei]ip route-static 192.168.40.0 24 21.1.1.3 pre 62 #調整優(yōu)先級 [Huawei]ip route-static 192.168.30.0 24 21.1.1.3 pre 62 #調整優(yōu)先級 [Huawei]dis this # sysname Huawei # ip route-static 2.2.2.2 255.255.255.255 12.1.1.3 ip route-static 2.2.2.2 255.255.255.255 21.1.1.3 preference 62 ip route-static 192.168.30.0 255.255.255.0 12.1.1.3 ip route-static 192.168.30.0 255.255.255.0 21.1.1.3 preference 62 ip route-static 192.168.40.0 255.255.255.0 12.1.1.3 ip route-static 192.168.40.0 255.255.255.0 21.1.1.3 preference 62 # return [Huawei]int g0/0/1 [Huawei-GigabitEthernet0/0/1]shutd [Huawei-GigabitEthernet0/0/1]undo shutR6
The device is running!<Huawei> <Huawei>undo te mo Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]user- con 0 [Huawei-ui-console0]id 0 0 [Huawei-ui-console0]q [Huawei]int g0/0/0 [Huawei-GigabitEthernet0/0/0]undo shutd Info: Interface GigabitEthernet0/0/0 is not shutdown. [Huawei-GigabitEthernet0/0/0]int g0/0/0.1 [Huawei-GigabitEthernet0/0/0.1]undo shutd Info: Interface GigabitEthernet0/0/0.1 is not shutdown. [Huawei-GigabitEthernet0/0/0.1]vlan-t d 30 d [Huawei-GigabitEthernet0/0/0.1]ip add 192.168.30.1 24 [Huawei-GigabitEthernet0/0/0.1]int g0/0/0.2 [Huawei-GigabitEthernet0/0/0.2]undo shutd Info: Interface GigabitEthernet0/0/0.2 is not shutdown. [Huawei-GigabitEthernet0/0/0.2]vlan-t d 40 d [Huawei-GigabitEthernet0/0/0.2]ip add 192.168.40.1 24 [Huawei-GigabitEthernet0/0/0.2]int g0/0/1 [Huawei-GigabitEthernet0/0/1]ip add 12.1.1.3 24 [Huawei-GigabitEthernet0/0/1]int e0/0/0 [Huawei-Ethernet0/0/0]ip add 21.1.1.3 24 [Huawei-Ethernet0/0/0]int loopb 0 [Huawei-LoopBack0]ip add 2.2.2.2 32 [Huawei-LoopBack0]q [Huawei]ip route-static 192.168.30.0 24 12.1.1.3 Error: The next-hop address is invalid. [Huawei]ip route-static 192.168.10.0 24 12.1.1.2 [Huawei]ip route-static 192.168.20.0 24 12.1.1.2 [Huawei]ip route-static 1.1.1.1 32 12.1.1.2 [Huawei]ip route-static 192.168.10.0 24 21.1.1.2 pre 63 [Huawei]ip route-static 192.168.20.0 24 21.1.1.2 pre 63 [Huawei]ip route-static 1.1.1.1 32 21.1.1.2 pre 63 [Huawei]dis this # sysname Huawei # ip route-static 1.1.1.1 255.255.255.255 12.1.1.2 ip route-static 1.1.1.1 255.255.255.255 21.1.1.2 preference 63 ip route-static 192.168.10.0 255.255.255.0 12.1.1.2 ip route-static 192.168.10.0 255.255.255.0 21.1.1.2 preference 63 ip route-static 192.168.20.0 255.255.255.0 12.1.1.2 ip route-static 192.168.20.0 255.255.255.0 21.1.1.2 preference 63 # return [Huawei]正常情況下通信結果:
PC5連通性測試:
PC>ping 192.168.20.20Ping 192.168.20.20: 32 data bytes, Press Ctrl_C to break From 192.168.20.20: bytes=32 seq=1 ttl=127 time=172 ms From 192.168.20.20: bytes=32 seq=2 ttl=127 time=109 ms From 192.168.20.20: bytes=32 seq=3 ttl=127 time=109 ms From 192.168.20.20: bytes=32 seq=4 ttl=127 time=172 ms From 192.168.20.20: bytes=32 seq=5 ttl=127 time=157 ms--- 192.168.20.20 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 109/143/172 msPC>ping 192.168.30.30Ping 192.168.30.30: 32 data bytes, Press Ctrl_C to break From 192.168.30.30: bytes=32 seq=1 ttl=126 time=218 ms From 192.168.30.30: bytes=32 seq=2 ttl=126 time=110 ms From 192.168.30.30: bytes=32 seq=3 ttl=126 time=156 ms From 192.168.30.30: bytes=32 seq=4 ttl=126 time=125 ms From 192.168.30.30: bytes=32 seq=5 ttl=126 time=156 ms--- 192.168.30.30 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 110/153/218 msPC>ping 192.168.40.40Ping 192.168.40.40: 32 data bytes, Press Ctrl_C to break From 192.168.40.40: bytes=32 seq=1 ttl=126 time=235 ms From 192.168.40.40: bytes=32 seq=2 ttl=126 time=140 ms From 192.168.40.40: bytes=32 seq=3 ttl=126 time=125 ms From 192.168.40.40: bytes=32 seq=4 ttl=126 time=141 ms From 192.168.40.40: bytes=32 seq=5 ttl=126 time=109 ms--- 192.168.40.40 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 109/150/235 msPC>ping 2.2.2.2Ping 2.2.2.2: 32 data bytes, Press Ctrl_C to break From 2.2.2.2: bytes=32 seq=1 ttl=254 time=78 ms From 2.2.2.2: bytes=32 seq=2 ttl=254 time=78 ms From 2.2.2.2: bytes=32 seq=3 ttl=254 time=78 ms From 2.2.2.2: bytes=32 seq=4 ttl=254 time=78 ms From 2.2.2.2: bytes=32 seq=5 ttl=254 time=47 ms--- 2.2.2.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 47/71/78 ms斷開路由器之間G口后的通信測試
PC5連通性測試:
PC>ping 192.168.20.20Ping 192.168.20.20: 32 data bytes, Press Ctrl_C to break Request timeout! #緩存時間已過 From 192.168.20.20: bytes=32 seq=2 ttl=127 time=125 ms #重新連接上 From 192.168.20.20: bytes=32 seq=3 ttl=127 time=110 ms #重新連接上 From 192.168.20.20: bytes=32 seq=4 ttl=127 time=109 ms #重新連接上 From 192.168.20.20: bytes=32 seq=5 ttl=127 time=109 ms #重新連接上--- 192.168.20.20 ping statistics ---5 packet(s) transmitted4 packet(s) received20.00% packet lossround-trip min/avg/max = 0/113/125 msPC>ping 192.168.30.30Ping 192.168.30.30: 32 data bytes, Press Ctrl_C to break Request timeout! #緩存時間已過 From 192.168.30.30: bytes=32 seq=2 ttl=126 time=141 ms #重新連接上 From 192.168.30.30: bytes=32 seq=3 ttl=126 time=156 ms #重新連接上 From 192.168.30.30: bytes=32 seq=4 ttl=126 time=125 ms #重新連接上 From 192.168.30.30: bytes=32 seq=5 ttl=126 time=172 ms #重新連接上--- 192.168.30.30 ping statistics ---5 packet(s) transmitted4 packet(s) received20.00% packet lossround-trip min/avg/max = 0/148/172 msPC>ping 192.168.40.40Ping 192.168.40.40: 32 data bytes, Press Ctrl_C to break Request timeout! #緩存時間已過 From 192.168.40.40: bytes=32 seq=2 ttl=126 time=141 ms #重新連接上 From 192.168.40.40: bytes=32 seq=3 ttl=126 time=125 ms #重新連接上 From 192.168.40.40: bytes=32 seq=4 ttl=126 time=156 ms #重新連接上 From 192.168.40.40: bytes=32 seq=5 ttl=126 time=156 ms #重新連接上--- 192.168.40.40 ping statistics ---5 packet(s) transmitted4 packet(s) received20.00% packet lossround-trip min/avg/max = 0/144/156 msPC>ping 2.2.2.2Ping 2.2.2.2: 32 data bytes, Press Ctrl_C to break From 2.2.2.2: bytes=32 seq=1 ttl=254 time=125 ms From 2.2.2.2: bytes=32 seq=2 ttl=254 time=63 ms From 2.2.2.2: bytes=32 seq=3 ttl=254 time=93 ms From 2.2.2.2: bytes=32 seq=4 ttl=254 time=79 ms From 2.2.2.2: bytes=32 seq=5 ttl=254 time=78 ms--- 2.2.2.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 63/87/125 ms總結
- 上一篇: i7 6950x处理器内存支持能力揭秘:
- 下一篇: AMD八通道内存:速度超乎寻常,省时省力