H3C Technologies H3C S12500 Series Switches User Manual
Page 218

205
# Enable DHCP relay on the VLAN interface, select a DHCP server group, and enable address
check on the relay agent.
[ProviderA-Vlan-interface100] dhcp select relay
[ProviderA-Vlan-interface100] dhcp relay server-select 1
[ProviderA-Vlan-interface100] dhcp relay address-check enable
# Assign an IP address to the VLAN interface.
[ProviderA-Vlan-interface100] ip address 192.168.1.1 24
[ProviderA-Vlan-interface100] quit
# Configure GigabitEthernet 3/0/1 as a trunk port and assign it to VLAN 100.
[ProviderA] interface GigabitEthernet 3/0/1
[ProviderA-GigabitEthernet3/0/1] port link-type trunk
[ProviderA-GigabitEthernet3/0/1] port trunk permit vlan 100
[ProviderA-GigabitEthernet3/0/1] quit
# Assign an IP address to the interface connecting to the DHCP server.
[ProviderA] interface vlan-interface 10
[ProviderA-Vlan-interface10] ip address 10.1.1.1 24
[ProviderA-Vlan-interface10] quit
# Configure a static route to the DHCP server.
[ProviderA] ip route-static 10.2.1.1 24 10.1.1.1
2.
Configure DHCP server Provider B:
# Assign an IP address to the DHCP server.
[ProviderB] interface vlan-interface 20
[ProviderB-Vlan-interface20] ip address 10.2.1.1 24
[ProviderB-Vlan-interface20] quit
# Enable DHCP.
[ProviderB] dhcp enable
# Configure an IP address pool on the DHCP server.
[ProviderB] dhcp server ip-pool 1
[ProviderB-dhcp-pool-1] network 192.168.1.0 24
[ProviderB-dhcp-pool-1] gateway-list 192.168.1.1
[ProviderB-dhcp-pool-1] quit
# Configure a static route to VLAN-interface 100.
[ProviderB] ip route-static 192.168.1.1 24 10.1.1.1
3.
Configure Switch A:
# Enable QinQ on uplink port GigabitEthernet 2/0/1 and configure it as a trunk port.
[SwitchA] interface GigabitEthernet 2/0/1
[SwitchA-GigabitEthernet2/0/1] port link-type trunk
# Assign trunk port GigabitEthernet 2/0/1 to VLAN 100.
[SwitchA-GigabitEthernet2/0/1] port trunk permit vlan 100
[SwitchA-GigabitEthernet2/0/1] quit
# Enable QinQ on downlink port GigabitEthernet 2/0/2.
[SwitchA] interface GigabitEthernet 2/0/2
[SwitchA-GigabitEthernet2/0/2] qinq enable