eNSP-VLAN 划分 --access端口和trunk端口实验
作者:互联网
eNSP-VLAN 划分 --access端口和trunk端口实验
交换机1配置
<Huawei>system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname sw1 [sw1]vlan batch 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. [sw1]interface GigabitEthernet 0/0/1 [sw1-GigabitEthernet0/0/1]port link-type access [sw1-GigabitEthernet0/0/1]port default vlan 10 [sw1]interface GigabitEthernet 0/0/2 [sw1-GigabitEthernet0/0/2]port link-type access [sw1-GigabitEthernet0/0/2]port default vlan 20 [sw1]interface GigabitEthernet 0/0/3 [sw1-GigabitEthernet0/0/3]port link-type trunk [sw1-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20 [sw1]display vlan The total number of vlans is : 3 --------------------------------------------------------------------- U: Up; D: Down; TG: Tagged; UT: Untagged; MP: Vlan-mapping; ST: Vlan-stacking; #: ProtocolTransparent-vlan; *: Management-vlan; --------------------------------------------------------------------- VID Type Ports --------------------------------------------------------------------- 1 common UT:GE0/0/3(U) GE0/0/4(D) GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D) GE0/0/9(D) GE0/0/10(D) GE0/0/11(D) GE0/0/12(D) GE0/0/13(D) GE0/0/14(D) GE0/0/15(D) GE0/0/16(D) GE0/0/17(D) GE0/0/18(D) GE0/0/19(D) GE0/0/20(D) GE0/0/21(D) GE0/0/22(D) GE0/0/23(D) GE0/0/24(D) 10 common UT:GE0/0/1(D) TG:GE0/0/3(U) 20 common UT:GE0/0/2(D) TG:GE0/0/3(U) VID Status Property MAC-LRN Statistics Description --------------------------------------------------------------------- 1 enable default enable disable VLAN 0001 10 enable default enable disable VLAN 0010 20 enable default enable disable VLAN 0020 [sw1]display port vlan active T=TAG U=UNTAG --------------------------------------------------------------------- Port Link Type PVID VLAN List --------------------------------------------------------------------- GE0/0/1 access 10 U: 10 GE0/0/2 access 20 U: 20 GE0/0/3 trunk 1 U: 1 T: 10 20 GE0/0/4 hybrid 1 U: 1
交换机2配置
<Huawei>system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname sw2 [sw2]vlan batch 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. [sw2]interface GigabitEthernet 0/0/1 [sw2-GigabitEthernet0/0/1]port link-type trunk [sw2-GigabitEthernet0/0/1]port trunk allow-pass 10 20 [sw2]interface GigabitEthernet 0/0/2 [sw2-GigabitEthernet0/0/2]port link-type access [sw2-GigabitEthernet0/0/2]port default vlan 20 [sw2]interface GigabitEthernet 0/0/3 [sw2-GigabitEthernet0/0/3]port link-type access [sw2-GigabitEthernet0/0/3]port default vlan 10 [sw2]dis port vlan active T=TAG U=UNTAG --------------------------------------------------------------------- Port Link Type PVID VLAN List --------------------------------------------------------------------- GE0/0/1 trunk 1 U: 1 T: 10 20 GE0/0/2 access 20 U: 20 GE0/0/3 access 10 U: 10
PC3 ping PC5的ip可以ping通
PC3的基础配置,注意要配置网关(同理PC5也要配置网关)
标签:10,GE0,eNSP,GigabitEthernet0,VLAN,端口,sw1,20,port 来源: https://www.cnblogs.com/yhq1314/p/13050237.html