日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

网络实验实例

發布時間:2024/2/28 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 网络实验实例 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

網絡實驗實例

  • 實驗題
    • 需求:全網互通
  • 思路:
    • LSW7
    • LSW8
    • LSW5
    • LSW6
    • R5
    • R6
  • 正常情況下通信結果:
  • 斷開路由器之間G口后的通信測試

實驗題

需求:全網互通

思路:

  • 雙側單臂路由
  • MSTP多實例生成樹,選擇指定的Vlan通過主端口,避免環路產生
  • 靜態路由
  • 優先級的選擇

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 #創建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 #創建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 #創建trunk模式,允許所有vlan通過 [Huawei-Ethernet0/0/4]q [Huawei]stp mo mstp #stp模式設置mstp [Huawei]stp re #進入mstp [Huawei-mst-region]reg huawei #設置區域名: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 # return

LSW6

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 # return

R5

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 #靜態路由配置 [Huawei]ip route-static 192.168.40.0 24 12.1.1.3 #靜態路由配置 [Huawei]ip route-static 2.2.2.2 32 12.1.1.3 #靜態路由配置 [Huawei]ip route-static 2.2.2.2 32 21.1.1.3 pre 62 #調整優先級 [Huawei]ip route-static 192.168.40.0 24 21.1.1.3 pre 62 #調整優先級 [Huawei]ip route-static 192.168.30.0 24 21.1.1.3 pre 62 #調整優先級 [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 shut

R6

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

總結

以上是生活随笔為你收集整理的网络实验实例的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。