<H3C> dis ip int brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP address VPN instance Description
Vlan1 up up 169.254.253.48 -- --
Vlan10 up up 172.18.1.254 -- --
Vlan20 up up 172.18.2.254 -- --
Vlan30 up up 172.18.3.254 -- --
Vlan40 up up 172.18.4.254 -- --
Vlan50 up up 172.18.5.254 -- --
Vlan100 up up 172.18.100.254 -- --
Vlan101 up up 172.18.101.254 -- --
Vlan200 up up 172.18.200.254 -- --
<H3C>dis cu int vlan
#
interface Vlan-interface1
ip address dhcp-alloc
dhcp client identifier ascii 5ca721d0fd30-VLAN0001
#
interface Vlan-interface10
ip address 172.18.1.254 255.255.254.0
packet-filter name vlan10 inbound
dhcp server apply ip-pool vlan10
#
interface Vlan-interface20
ip address 172.18.2.254 255.255.255.0
packet-filter name vlan20 inbound
dhcp server apply ip-pool vlan20
#
interface Vlan-interface30
ip address 172.18.3.254 255.255.255.0
packet-filter name vlan30 inbound
dhcp server apply ip-pool vlan30
#
interface Vlan-interface40
ip address 172.18.4.254 255.255.255.0
dhcp server apply ip-pool vlan40
#
interface Vlan-interface50
ip address 172.18.5.254 255.255.255.0
packet-filter name vlan50 inbound
dhcp server apply ip-pool vlan50
#
interface Vlan-interface100
ip address 172.18.100.254 255.255.255.0
#
interface Vlan-interface101
ip address 172.18.101.254 255.255.255.0
dhcp server apply ip-pool vlan101
#
interface Vlan-interface200
ip address 172.18.200.254 255.255.255.0
#
return
l 配置Switch A:
# 开启全局GVRP。
<H3C> system-view
[H3C] gvrp
GVRP is enabled globally.
# 将以太网端口Ethernet1/0/1配置为Trunk端口,并允许所有VLAN通过。
[H3C] interface Ethernet 1/0/1
[H3C-Ethernet1/0/1] port link-type trunk
[H3C-Ethernet1/0/1] port trunk permit vlan all
# 在Trunk端口上开启GVRP。
[H3C-Ethernet1/0/1] gvrp
GVRP is enabled on port Ethernet1/0/1.
l 配置Switch B:
# 开启全局GVRP。
<H3C> system-view
[H3C] gvrp
GVRP is enabled globally.
# 将以太网端口Ethernet1/0/2配置为Trunk端口,并允许所有VLAN通过。
[H3C] interface Ethernet 1/0/2
[H3C-Ethernet1/0/2] port link-type trunk
[H3C-Ethernet1/0/2] port trunk permit vlan all
# 在Trunk端口上开启GVRP。
[H3C-Ethernet1/0/2] gvrp
GVRP is enabled on port Ethernet1/0/2.