diff --git a/A. 第一阶段/拓扑练习/0822_VLAN聚合.md b/A. 第一阶段/拓扑练习/0822_VLAN聚合.md index ad10217..f4ae86e 100644 --- a/A. 第一阶段/拓扑练习/0822_VLAN聚合.md +++ b/A. 第一阶段/拓扑练习/0822_VLAN聚合.md @@ -16,13 +16,12 @@ [SW2]port-group 1 [SW2-port-group-1]group-member g0/0/2 g0/0/3 [SW2-port-group-1]port link-type access - [SW2-port-group-1]port def v 10 - [SW2-port-group-1]q + [SW2-port-group-1]port default vlan 10 + [SW2-port-group-1]quit [SW2]int g0/0/1 [SW2-GigabitEthernet0/0/1]port link-type trunk - [SW2-GigabitEthernet0/0/1]p t a v all - [SW2-GigabitEthernet0/0/1]q - [SW2]q + [SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all + [SW2-GigabitEthernet0/0/1]return save ``` @@ -32,17 +31,16 @@ u t m sys [Huawei]sys SW3 - [SW3]v b 10 20 30 + [SW3]vlan batch 10 20 30 [SW3]port-group 1 [SW3-port-group-1]group-member g0/0/2 g0/0/3 [SW3-port-group-1]port link-type access - [SW3-port-group-1]port def v 20 - [SW3-port-group-1]q + [SW3-port-group-1]port default vlan 20 + [SW3-port-group-1]quit [SW3]int g0/0/1 - [SW3-GigabitEthernet0/0/1]port link-type trunk - [SW3-GigabitEthernet0/0/1]p t a v all - [SW3-GigabitEthernet0/0/1]q - [SW3]q + [SW3-GigabitEthernet0/0/1]port link-type trunk + [SW3-GigabitEthernet0/0/1]port trunk allow-pass vlan all + [SW3-GigabitEthernet0/0/1]return save ``` @@ -52,18 +50,16 @@ u t m sys [Huawei]sys SW4 - [SW4]v b 10 20 30 + [SW4]vlan batch 10 20 30 [SW4]port-group 1 [SW4-port-group-1]group-member g0/0/2 g0/0/3 [SW4-port-group-1]port link-type access - [SW4-port-group-1]port def v 30 - [SW4-port-group-1]q + [SW4-port-group-1]port default vlan 30 + [SW4-port-group-1]quit [SW4]int g0/0/1 - [SW4-GigabitEthernet0/0/1]port l - [SW4-GigabitEthernet0/0/1]port link-t t - [SW4-GigabitEthernet0/0/1]p t a v all - [SW4-GigabitEthernet0/0/1]q - [SW4]q + [SW4-GigabitEthernet0/0/1]port link-type trunk + [SW4-GigabitEthernet0/0/1]port trunk allow-pass vlan all + [SW4-GigabitEthernet0/0/1]return save ``` @@ -74,19 +70,21 @@ ``` u t m sys - [Huawei]sy SW1 - [SW1]v b 10 20 30 100 + [Huawei]sys SW1 + [SW1]vlan batch 10 20 30 100 [SW1]vlan 100 [SW1-vlan100]aggregate-vlan [SW1-vlan100]access-vlan 10 20 30 - [SW1-vlan100]q + [SW1-vlan100]quit [SW1]int vlanif 100 [SW1-Vlanif100]ip a 192.168.100.254 24 [SW1-Vlanif100]arp-proxy inter-sub-vlan-proxy enable - [SW1-Vlanif100]q + [SW1-Vlanif100]quit [SW1]port-group group-member g0/0/1 to g0/0/3 [SW1-port-group]port link-type trunk - [SW1-port-group]port t a v 10 20 30 + [SW1-port-group]port trunk allow-pass vlan 10 20 30 + [SW1-port-group]return + save ``` ### 四、测试 diff --git a/A. 第一阶段/拓扑练习/0822_虚拟VLAN+路由.md b/A. 第一阶段/拓扑练习/0822_虚拟VLAN+路由.md index 518d223..3cfc166 100644 --- a/A. 第一阶段/拓扑练习/0822_虚拟VLAN+路由.md +++ b/A. 第一阶段/拓扑练习/0822_虚拟VLAN+路由.md @@ -9,37 +9,144 @@ - **SW2** ``` - + u t m + sys + [Huawei]sys SW2 + [SW2]vlan batch 10 20 + [SW2]int g0/0/1 + [SW2-GigabitEthernet0/0/1]port link-type access + [SW2-GigabitEthernet0/0/1]port default vlan 10 + [SW2-GigabitEthernet0/0/1]int g0/0/2 + [SW2-GigabitEthernet0/0/2]port link-type access + [SW2-GigabitEthernet0/0/2]port default vlan 20 + [SW2-GigabitEthernet0/0/2]int g0/0/3 + [SW2-GigabitEthernet0/0/3]port link-type trunk + [SW2-GigabitEthernet0/0/3]port trunk allow-pass vlan all + [SW2-GigabitEthernet0/0/3]return + save ``` - **SW3** ``` - + u t m + sys + [Huawei]sys SW3 + [SW3]vlan batch 30 40 + [SW3]int g0/0/1 + [SW3-GigabitEthernet0/0/1]port link-type access + [SW3-GigabitEthernet0/0/1]port default vlan 30 + [SW3-GigabitEthernet0/0/1]int g0/0/2 + [SW3-GigabitEthernet0/0/2]port link-type access + [SW3-GigabitEthernet0/0/2]port default vlan 40 + [SW3-GigabitEthernet0/0/2]int g0/0/3 + [SW3-GigabitEthernet0/0/3]port link-type trunk + [SW3-GigabitEthernet0/0/3]port trunk allow-pass vlan all + [SW3-GigabitEthernet0/0/3]return + save ``` -### 三、配置右侧路由 - -- **AR1** - - ``` - - ``` - -### 四、配置左侧三层交换机 +### 三、配置左侧三层交换机 - **SW1** ``` - + u t m + sys + [Huawei]sys SW1 + [SW1]vlan batch 10 20 30 40 + [SW1]port-group 1 + [SW1-port-group-1]group-member g0/0/1 g0/0/2 + [SW1-port-group-1]port link-type trunk + [SW1-port-group-1]port trunk allow-pass vlan all + [SW1-port-group-1]quit + [SW1]int vlanif 10 + [SW1-Vlanif10]ip a 192.168.10.254 24 + [SW1-Vlanif10]int vlanif 20 + [SW1-Vlanif20]ip a 192.168.20.254 24 + [SW1-Vlanif20]int vlanif 30 + [SW1-Vlanif30]ip a 192.168.30.254 24 + [SW1-Vlanif30]int vlanif 40 + [SW1-Vlanif40]ip a 192.168.40.254 24 + [SW1-Vlanif40]return + save ``` -### 五、测试 +### 四、测试左侧虚拟VLAN连通性 - **PING** ``` + PC1>ping 192.168.40.1 + Ping 192.168.40.1: 32 data bytes, Press Ctrl_C to break + From 192.168.40.1: bytes=32 seq=1 ttl=127 time=125 ms + From 192.168.40.1: bytes=32 seq=2 ttl=127 time=78 ms + From 192.168.40.1: bytes=32 seq=3 ttl=127 time=79 ms + From 192.168.40.1: bytes=32 seq=4 ttl=127 time=93 ms + From 192.168.40.1: bytes=32 seq=5 ttl=127 time=78 ms + + --- 192.168.40.1 ping statistics --- + 5 packet(s) transmitted + 5 packet(s) received + 0.00% packet loss + round-trip min/avg/max = 78/90/125 ms ``` - \ No newline at end of file +### 五、配置虚拟VLAN与路由连通 + +- **AR1** + + ``` + u t m + sys + [Huawei]sys AR1 + [AR1]int g0/0/0 + [AR1-GigabitEthernet0/0/0]ip a 192.168.60.254 24 + [AR1-GigabitEthernet0/0/0]int g0/0/1 + [AR1-GigabitEthernet0/0/1]ip a 192.168.50.2 24 + [AR1-GigabitEthernet0/0/1]quit + [AR1]ip route-static 0.0.0.0 0 192.168.50.1 + [AR1]quit + save + ``` + +- **SW1** + + ``` + u t m + sys + [SW1]vlan 50 + [SW1-vlan50]quit + [SW1]int g0/0/10 + [SW1-GigabitEthernet0/0/10]port link-type access + [SW1-GigabitEthernet0/0/10]port default vlan 50 + [SW1-GigabitEthernet0/0/10]quit + [SW1]int vlanif 50 + [SW1-Vlanif50]ip a 192.168.50.1 24 + [SW1-Vlanif50]quit + [SW1]ip route-static 192.168.60.0 24 192.168.50.2 + [SW1]quit + save + ``` + +### 六、跨路由连通性测试 + +- **PING** + + ``` + PC1>ping 192.168.60.1 + + Ping 192.168.60.1: 32 data bytes, Press Ctrl_C to break + Request timeout! + From 192.168.60.1: bytes=32 seq=2 ttl=126 time=94 ms + From 192.168.60.1: bytes=32 seq=3 ttl=126 time=110 ms + From 192.168.60.1: bytes=32 seq=4 ttl=126 time=62 ms + From 192.168.60.1: bytes=32 seq=5 ttl=126 time=125 ms + + --- 192.168.60.1 ping statistics --- + 5 packet(s) transmitted + 4 packet(s) received + 20.00% packet loss + round-trip min/avg/max = 0/97/125 ms + ``` \ No newline at end of file