HCNA-16 GVRP基础配置
1、配配置交换链路类型;S1创建VLAN并划入access接口 <Huawei>system-view [Huawei]sysnames1 [s1]vlan 10 [s1-vlan10]descriptionit [s1-vlan10]vlan20 [s1-vlan20]descriptionhr [s1-vlan20]quit [s1]port-groupgroup-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 [s1-port-group]portlink-type access [s1-port-group]quit [s1]interfaceGigabitEthernet 0/0/1 [s1-GigabitEthernet0/0/1]portdefault vlan 10 [s1-GigabitEthernet0/0/1]quit [s1]interfaceGigabitEthernet 0/0/2 [s1-GigabitEthernet0/0/2]portdefault vlan 20 [s1-GigabitEthernet0/0/2]quit [s1]interfaceGigabitEthernet 0/0/24 [s1-GigabitEthernet0/0/24]undonegotiation auto [s1-GigabitEthernet0/0/24]duplexfull [s1-GigabitEthernet0/0/24]speed1000 [s1-GigabitEthernet0/0/24]portlink-type trunk [s1-GigabitEthernet0/0/24]porttrunk allow-pass vlan all [s1-GigabitEthernet0/0/24]return <s1>save <Huawei>system-view [Huawei]sysnames2 [s2]port-groupgroup-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 [s2-port-group]undonegotiation auto [s2-port-group]duplexfull [s2-port-group]speed1000 [s2-port-group]portlink-type trunk [s2-port-group]porttrunk allow-pass vlan all [s2-port-group]return <s2>save <Huawei>system-view [Huawei]sysnames3 [s3]port-groupgroup-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 [s3-port-group]undonegotiation auto [s3-port-group]duplexfull [s3-port-group]speed1000 [s3-port-group]portlink-type trunk [s3-port-group]porttrunk allow-pass vlan all [s3-port-group]return <s3>save <Huawei>system-view [Huawei]sysnames4 [s4]interfaceGigabitEthernet 0/0/24 [s4-GigabitEthernet0/0/24]undonegotiation auto [s4-GigabitEthernet0/0/24]duplexfull [s4-GigabitEthernet0/0/24]speed1000 [s4-GigabitEthernet0/0/24]portlink-type trunk [s4-GigabitEthernet0/0/24]porttrunk allow-pass vlan all [s4-GigabitEthernet0/0/24]return <s4>save
2、在所有交换机上开启GVRP功能,并在所有交换机两两互连的接口下也开启GVRP功能,默认GVRP注册模式为:Normal。 [s1]gvrp [s1]interfaceGigabitEthernet 0/0/24 [s1-GigabitEthernet0/0/24]gvrp [s1-GigabitEthernet0/0/24]quit [s2]gvrp [s2]port-groupgroup-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 [s2-port-group]gvrp [s2-port-group]quit [s3]gvrp [s3]port-groupgroup-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 [s3-port-group]gvrp [s3-port-group]quit [s4]gvrp [s4]interfaceGigabitEthernet 0/0/24 [s4-GigabitEthernet0/0/24]gvrp [s4-GigabitEthernet0/0/24]quit 查看各交换机现有VLAN信息 [s1]displayvlan
The totalnumber 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(D) GE0/0/4(D) GE0/0/5(D) GE0/0/6(D) …… 10 common UT:GE0/0/1(U) TG:GE0/0/24(D) 20 common UT:GE0/0/2(U) TG:GE0/0/24(D) VID Status Property MAC-LRN StatisticsDescription -------------------------------------------------------------------------------- 1 enable default enable disable VLAN 0001 10 enable default enable disable it 20 enable default enable disable hr [s2]displayvlan The totalnumber 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/1(U) GE0/0/2(U) GE0/0/3(D) 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) …… 10 dynamicTG:GE0/0/1(U) 20 dynamicTG:GE0/0/1(U) VID Status Property MAC-LRN StatisticsDescription -------------------------------------------------------------------------------- 1 enable default enable disable VLAN 0001 10 enable default enable disable VLAN 0010 20 enable default enable disable VLAN 0020 [s3]displayvlan The totalnumber 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/1(U) GE0/0/2(U) GE0/0/3(D) GE0/0/4(D) …… 10 dynamicTG:GE0/0/1(U) 20 dynamicTG:GE0/0/1(U) VID Status Property MAC-LRN StatisticsDescription -------------------------------------------------------------------------------- 1 enable default enable disable VLAN 0001 10 enable default enable disable VLAN 0010 20 enable default enable disable VLAN 0020 [s4]displayvlan The totalnumber 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/1(U) GE0/0/2(U) GE0/0/3(D) GE0/0/4(D) ……. 10 dynamicTG:GE0/0/24(U) 20 dynamicTG:GE0/0/24(U) VID Status Property MAC-LRN StatisticsDescription -------------------------------------------------------------------------------- 1 enable default enable disable VLAN 0001 10 enable default enable disable VLAN 0010 20 enable default enable disable VLAN 0020 目前s2、s3、s4都动态获取到了VLAN10和VLAN20,但是这些交换机都是左侧上联口加入了这两个VLAN,向下连接的端口却未加入到VLAN中,所以这三台交换机只是完成了单向注册。 PC>ping192.168.10.101 Ping192.168.10.101: 32 data bytes, Press Ctrl_C to break From192.168.10.100: Destination host unreachable From192.168.10.100: Destination host unreachable From192.168.10.100: Destination host unreachable From192.168.10.100: Destination host unreachable From192.168.10.100: Destination host unreachable ---192.168.10.101 ping statistics --- 5 packet(s) transmitted 0 packet(s) received 100.00% packet loss 此时PC无法Ping通
3、配置GVRP双向注册 此时只需要在S4上手工创建VLAN10和VLAN20,并把连接PC的端口配置为Access,再把相应VLAN划入端口即可完成双向注册。 [s4]vlan 10 [s4-vlan10]descriptionit [s4-vlan10]vlan20 [s4-vlan20]descriptionhr [s4-vlan20]quit [s4]interfaceGigabitEthernet 0/0/1 [s4-GigabitEthernet0/0/1]portlink-type access [s4-GigabitEthernet0/0/1]portdefault vlan 10 [s4-GigabitEthernet0/0/1]quit [s4]interfaceGigabitEthernet 0/0/2 [s4-GigabitEthernet0/0/2]portlink-type access [s4-GigabitEthernet0/0/2]portdefault vlan 20 [s4-GigabitEthernet0/0/2]quit 此时再看S2和S3动态获取到的VLAN信息 [s2]displayvlan The totalnumber 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/1(U) GE0/0/2(U) GE0/0/3(D) GE0/0/4(D) …… 10 dynamicTG:GE0/0/1(U) GE0/0/2(U) 20 dynamicTG:GE0/0/1(U) GE0/0/2(U) VID Status Property MAC-LRN StatisticsDescription -------------------------------------------------------------------------------- 1 enable default enable disable VLAN 0001 10 enable default enable disable VLAN 0010 20 enable default enable disable VLAN 0020 [s3]displayvlan The totalnumber 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/1(U) GE0/0/2(U) GE0/0/3(D) GE0/0/4(D) …… 10 dynamicTG:GE0/0/1(U) GE0/0/2(U) 20 dynamicTG:GE0/0/1(U) GE0/0/2(U) VID Status Property MAC-LRN StatisticsDescription -------------------------------------------------------------------------------- 1 enable default enable disable VLAN 0001 10 enable default enable disable VLAN 0010 20 enable default enable disable VLAN 0020 PC>ping192.168.10.101 Ping192.168.10.101: 32 data bytes, Press Ctrl_C to break From192.168.10.101: bytes=32 seq=1 ttl=128 time=78 ms From192.168.10.101: bytes=32 seq=2 ttl=128 time=94 ms From192.168.10.101: bytes=32 seq=3 ttl=128 time=125 ms From 192.168.10.101:bytes=32 seq=4 ttl=128 time=79 ms From192.168.10.101: bytes=32 seq=5 ttl=128 time=109 ms ---192.168.10.101 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 78/97/125 ms Ping测试完成。
|