H3C S12500R Ethernet Switch Router Series Config Examples-Release 36xx-6W100

HomeSupportSwitchesS12500R SeriesConfigure & DeployConfiguration ExamplesH3C S12500R Ethernet Switch Router Series Config Examples-Release 36xx-6W100
Table of Contents
Related Documents
08-VLAN Tagging Configuration Examples
Title Size Download
08-VLAN Tagging Configuration Examples 409.74 KB

 

H3C S12500R Switch Router Series

VLAN Tagging Configuration Examples

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 



Introduction

This document provides examples for using VLAN tagging features to extend customer VLANs (CVLANs) across an Ethernet service provider network.

VLAN tagging features enable service providers to separate or aggregate customer traffic in the service provider network. The following are available VLAN tagging operations:

·     Adding a layer of service provider VLAN (SVLAN) tag.

·     Modifying the SVLAN tag, CVLAN tag, or both.

To add an SVLAN tag, use one of the following VLAN tagging features:

·     One-to-two VLAN mapping—Adds different SVLANs for traffic with different CVLAN tags.

To modify VLAN tags, use one of the following VLAN tagging features:

·     One-to-one VLAN mapping—Replaces one VLAN tag with another.

·     Many-to-one VLAN mapping—Replaces multiple VLAN tags with the same VLAN tag.

·     Two-to-two VLAN mapping—Replaces the SVLAN ID, CVLAN ID, or both IDs for an incoming double-tagged frame.

The devices in the service provider network learn MAC addresses of CVLANs into the MAC address table of the SVLAN.

Prerequisites

The configuration examples in this document were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.

This document assumes that you have basic knowledge of VLAN mapping.

General configuration restrictions and guidelines

EVB and the VLAN tagging features are mutually exclusive. Do not use EVB with any VLAN tagging features on a port.

Example: Configuring one-to-two VLAN mapping

Network configuration

As shown in Figure 1:

·     Customer A and Customer B each have two branches that require Layer 2 connectivity over the service provider network.

·     Both customers have three types of traffic. For each customer, the service provider assigns one SVLAN by traffic type.

Configure one-to-two VLAN mapping on each customer-side port of PE A and PE B to meet the following requirements:

·     The service provider adds an SVLAN tag to packets from customer networks based on the traffic type, as described in Table 1 and Figure 2.

·     The SVLAN tag uses the same 802.1p priority as the CVLAN tag.

Figure 1 Network diagram

 

Table 1 VLAN mapping table

Traffic type

CVLANs

SVLAN

Customer A

 

 

Video

31 to 40

1003

Voice

21 to 30

1002

Data

10 to 20

1001

Customer B

 

 

Storage

36 to 40

2003

Voice

26 to 35

2002

Data

15 to 25

2001

 

Figure 2 Required traffic pattern in the service provider network

 

Analysis

To support multiple SVLANs and send traffic to the customer networks with the SVLAN tag removed, perform the following tasks on the customer-side ports:

1.     Configure the link type of the ports as hybrid.

2.     Assign the ports to the SVLANs as untagged VLAN members.

For the SVLAN tag to use the same 802.1p priority as the CVLAN tag, configure the customer-side port to use the 802.1p priority in incoming packets for priority mapping.

Software versions used

This configuration example was created and verified on R3606.

Restrictions and guidelines

When you configure ports on the forwarding path of double-tagged packets across the service provider network, follow these restrictions and guidelines:

·     Set the MTU to a minimum of 1504 bytes for each port.

·     Configure all ports to allow double-tagged packets to pass through without removing the SVLAN tag.

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring PE A

1.     Create CVLANs and SVLANs:

# Create CVLANs 10 to 40.

<PE_A> system-view

[PE_A] vlan 10 to 40

# Create SVLANs 1001 through 1003 and SVLANs 2001 through 2003.

[PE_A] vlan 1001 to 1003

[PE_A] vlan 2001 to 2003

# Configure HundredGigE 1/0/1 and HundredGigE 1/0/3 to operate in bridge mode.

[PE_A] interface range hundredgige1/0/1 to hundredgige1/0/3

[PE_A-if-Range] port link-mode bridge

[PE_A-if-Range] quit

2.     Configure the customer-side port HundredGigE 1/0/1:

# Configure the port as a hybrid port.

[PE_A] interface hundredgige 1/0/1

[PE_A-HundredGigE1/0/1] port link-type hybrid

# Assign the port to CVLANs 10 through 40 as a tagged VLAN member.

[PE_A-HundredGigE1/0/1] port hybrid vlan 10 to 40 tagged

# Assign the port to SVLANs 1001 through 1003 as an untagged VLAN member.

[PE_A-HundredGigE1/0/1] port hybrid vlan 1001 to 1003 untagged

# Remove the port from VLAN 1.

[PE_A-HundredGigE1/0/1] undo port hybrid vlan 1

# Configure one-to-two VLAN mapping to add SVLAN tag 1001 to traffic from VLANs 10 through 20.

[PE_A-HundredGigE1/0/1] vlan mapping nest range 10 to 20 nested-vlan 1001

# Configure one-to-two VLAN mapping to add SVLAN tag 1002 to traffic from VLANs 21 through 30.

[PE_A-HundredGigE1/0/1] vlan mapping nest range 21 to 30 nested-vlan 1002

# Configure one-to-two VLAN mapping to add SVLAN tag 1003 to traffic from VLANs 31 through 40.

[PE_A-HundredGigE1/0/1] vlan mapping nest range 31 to 40 nested-vlan 1003

# Configure the port to use the 802.1p priority in incoming packets for priority mapping.

[PE_A-HundredGigE1/0/1] qos trust dot1p

[PE_A-HundredGigE1/0/1] quit

3.     Configure the customer-side port HundredGigE 1/0/2:

# Configure the port as a hybrid port.

[PE_A] interface hundredgige 1/0/2

[PE_A-HundredGigE1/0/2] port link-type hybrid

# Assign the port to CVLANs 15 through 40 as a tagged VLAN member.

[PE_A-HundredGigE1/0/2] port hybrid vlan 15 to 40 tagged

# Assign the port to SVLANs 2001 through 2003 as an untagged VLAN member.

[PE_A-HundredGigE1/0/2] port hybrid vlan 2001 to 2003 untagged

# Remove the port from VLAN 1.

[PE_A-HundredGigE1/0/2] undo port hybrid vlan 1

# Configure one-to-two VLAN mapping to add SVLAN tag 2001 to traffic from VLANs 15 through 25.

[PE_A-HundredGigE1/0/2] vlan mapping nest range 15 to 25 nested-vlan 2001

# Configure one-to-two VLAN mapping to add SVLAN tag 2002 to traffic from VLANs 26 through 35.

[PE_A-HundredGigE1/0/2] vlan mapping nest range 26 to 35 nested-vlan 2002

# Configure one-to-two VLAN mapping to add SVLAN tag 2003 to traffic from VLANs 36 through 40.

[PE_A-HundredGigE1/0/2] vlan mapping nest range 36 to 40 nested-vlan 2003

# Configure the port to use the 802.1p priority in incoming packets for priority mapping.

[PE_A-HundredGigE1/0/2] qos trust dot1p

[PE_A-HundredGigE1/0/2] quit

4.     Configure the service provider-side port HundredGigE 1/0/3:

# Configure the port as a trunk port.

[PE_A] interface hundredgige 1/0/3

[PE_A-HundredGigE1/0/3] port link-type trunk

# Remove the port from VLAN 1.

[PE_A-HundredGigE1/0/3] undo port trunk permit vlan 1

# Assign the port to SVLANs 1001 through 1003 and SVLANs 2001 through 2003.

[PE_A-HundredGigE1/0/3] port trunk permit vlan 1001 to 1003 2001 to 2003

[PE_A-HundredGigE1/0/3] quit

Configuring PE B

1.     Create CVLANs and SVLANs:

# Create CVLANs 10 to 40.

<PE_B> system-view

[PE_B] vlan 10 to 40

# Create SVLANs 1001 through 1003 and SVLANs 2001 through 2003.

[PE_B] vlan 1001 to 1003

[PE_B] vlan 2001 to 2003

# Configure HundredGigE 1/0/1 and HundredGigE 1/0/3 to operate in bridge mode.

[PE_B] interface range hundredgige1/0/1 to hundredgige1/0/3

[PE_B-if-Range] port link-mode bridge

[PE_B-if-Range] quit

2.     Configure the customer-side port HundredGigE 1/0/1:

# Configure the port as a hybrid port.

[PE_B] interface hundredgige 1/0/1

[PE_B-HundredGigE1/0/1] port link-type hybrid

# Assign the port to CVLANs 15 through 40 as a tagged VLAN member.

[PE_B-HundredGigE1/0/1] port hybrid vlan 15 to 40 tagged

# Assign the port to SVLANs 2001 through 2003 as an untagged VLAN member.

[PE_B-HundredGigE1/0/1] port hybrid vlan 2001 to 2003 untagged

# Remove the port from VLAN 1.

[PE_B-HundredGigE1/0/1] undo port hybrid vlan 1

# Configure one-to-two VLAN mapping to add SVLAN tag 2001 to traffic from VLANs 15 through 25.

[PE_B-HundredGigE1/0/1] vlan mapping nest range 15 to 25 nested-vlan 2001

# Configure one-to-two VLAN mapping to add SVLAN tag 2002 to traffic from VLANs 26 through 35.

[PE_B-HundredGigE1/0/1] vlan mapping nest range 26 to 35 nested-vlan 2002

# Configure one-to-two VLAN mapping to add SVLAN tag 2003 to traffic from VLANs 36 through 40.

[PE_B-HundredGigE1/0/1] vlan mapping nest range 36 to 40 nested-vlan 2003

# Configure the port to use the 802.1p priority in incoming packets for priority mapping.

[PE_B-HundredGigE1/0/1] qos trust dot1p

[PE_B-HundredGigE1/0/1] quit

3.     Configure the customer-side port HundredGigE 1/0/2:

# Configure the port as a hybrid port.

[PE_B] interface hundredgige 1/0/2

[PE_B-HundredGigE1/0/2] port link-type hybrid

# Assign the port to CVLANs 10 through 40 as a tagged VLAN member.

[PE_B-HundredGigE1/0/2] port hybrid vlan 10 to 40 tagged

# Assign the port to SVLANs 1001 through 1003 as an untagged VLAN member.

[PE_B-HundredGigE1/0/2] port hybrid vlan 1001 to 1003 untagged

# Remove the port from VLAN 1.

[PE_B-HundredGigE1/0/2] undo port hybrid vlan 1

# Configure one-to-two VLAN mapping to add SVLAN tag 1001 to traffic from VLANs 10 through 20.

[PE_B-HundredGigE1/0/2] vlan mapping nest range 10 to 20 nested-vlan 1001

# Configure one-to-two VLAN mapping to add SVLAN tag 1002 to traffic from VLANs 21 through 30.

[PE_B-HundredGigE1/0/2] vlan mapping nest range 21 to 30 nested-vlan 1002

# Configure one-to-two VLAN mapping to add SVLAN tag 1003 to traffic from VLANs 31 through 40.

[PE_B-HundredGigE1/0/2] vlan mapping nest range 31 to 40 nested-vlan 1003

# Configure the port to use the 802.1p priority in incoming packets for priority mapping.

[PE_B-HundredGigE1/0/2] qos trust dot1p

[PE_B-HundredGigE1/0/2] quit

4.     Configure the service provider-side port HundredGigE 1/0/3:

# Configure the port as a trunk port.

[PE_B] interface hundredgige 1/0/3

[PE_B-HundredGigE1/0/3] port link-type trunk

# Remove the port from VLAN 1.

[PE_B-HundredGigE1/0/3] undo port trunk permit vlan 1

# Assign the port to SVLANs 1001 through 1003 and SVLANs 2001 through 2003.

[PE_B-HundredGigE1/0/3] port trunk permit vlan 1001 to 1003 2001 to 2003

[PE_B-HundredGigE1/0/3] quit

Configuring devices between PE A and PE B

# Set the MTU to a minimum of 1504 bytes for each port on the path of double-tagged packets. (Details not shown.)

# Configure all ports on the forwarding path to allow packets from VLANs 1001 through 1003 and VLANs 2001 through 2003 to pass through without removing the SVLAN tag. (Details not shown.)

Verifying the configuration

1.     Verify VLAN mapping information:

# Verify VLAN mapping information on PE A.

[PE_A] display vlan mapping

Interface HundredGigE1/0/1:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  10-20         N/A           1001                     10-20

  21-30         N/A           1002                     21-30

  31-40         N/A           1003                     31-40

Interface HundredGigE1/0/2:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  15-25         N/A           2001                     15-25

  26-35         N/A           2002                     26-35

  36-40         N/A           2003                     36-40

# Verify VLAN mapping information on PE B.

[PE_B] display vlan mapping

Interface HundredGigE1/0/1:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  15-25         N/A           2001                     15-25

  26-35         N/A           2002                     26-35

  36-40         N/A           2003                     36-40

Interface HundredGigE1/0/2:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  10-20         N/A           1001                     10-20

  21-30         N/A           1002                     21-30

  31-40         N/A           1003                     31-40

2.     Verify that PCs of the same customer in a CVLAN can ping each other across the service provider network. (Details not shown.)

3.     Verify that PCs of different customers in a CVLAN cannot communicate at Layer 2. The ARP tables on one customer's PCs do not contain entries for MAC addresses of the other customer's PCs. (Details not shown.)

Configuration files

·     PE A:

#

vlan 10 to 40

#

vlan 1001 to 1003

#

vlan 2001 to 2003

#

interface HundredGigE1/0/1

 port link-type hybrid

 undo port hybrid vlan 1

 port hybrid vlan 10 to 40 tagged

 port hybrid vlan 1001 to 1003 untagged

 vlan mapping nest range 10 to 20 nested-vlan 1001

 vlan mapping nest range 21 to 30 nested-vlan 1002

 vlan mapping nest range 31 to 40 nested-vlan 1003

 qos trust dot1p

#

interface HundredGigE1/0/2

 port link-type hybrid

 undo port hybrid vlan 1

 port hybrid vlan 15 to 40 tagged

 port hybrid vlan 2001 to 2003 untagged

 vlan mapping nest range 15 to 25 nested-vlan 2001

 vlan mapping nest range 26 to 35 nested-vlan 2002

 vlan mapping nest range 36 to 40 nested-vlan 2003

 qos trust dot1p

#

interface HundredGigE1/0/3

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 1001 to 1003 2001 to 2003

#

·     PE B:

#

vlan 10 to 40

#

vlan 1001 to 1003

#

vlan 2001 to 2003

#

interface HundredGigE1/0/1

 port link-type hybrid

 undo port hybrid vlan 1

 port hybrid vlan 15 to 40 tagged

 port hybrid vlan 2001 to 2003 untagged

 vlan mapping nest range 15 to 25 nested-vlan 2001

 vlan mapping nest range 26 to 35 nested-vlan 2002

 vlan mapping nest range 36 to 40 nested-vlan 2003

 qos trust dot1p

#

interface HundredGigE1/0/2

 port link-type hybrid

 undo port hybrid vlan 1

 port hybrid vlan 10 to 40 tagged

 port hybrid vlan 1001 to 1003 untagged

 vlan mapping nest range 10 to 20 nested-vlan 1001

 vlan mapping nest range 21 to 30 nested-vlan 1002

 vlan mapping nest range 31 to 40 nested-vlan 1003

 qos trust dot1p

#

interface HundredGigE1/0/3

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 1001 to 1003 2001 to 2003

#

Example: Configuring one-to-one and many-to-one VLAN mapping

Network configuration

As shown in Figure 3:

·     Each household subscribes to PC, VoD, and VoIP services, and obtains the IP address through DHCP.

·     On the home gateways, PC, VoD, and VoIP service traffic is assigned to VLANs 1, 2, and 3, respectively.

To isolate traffic of the same service type from different households, configure one-to-one VLAN mapping on the wiring-closet switches. This feature assigns one VLAN to each type of traffic from each household.

To save VLAN resources, configure many-to-one VLAN mapping on the campus switch (Switch C). This feature transmits the same type of traffic from different households in one VLAN. Use VLANs 501, 502, and 503 for PC, VoD, and VoIP traffic, respectively.

Table 2 VLAN mapping scheme for each service

Service

VLANs on home gateways

VLANs on wiring-closet switches (Switch A and Switch B)

VLANs on campus switch (Switch C)

PC

VLAN 1

VLANs 101, 102, 103, 104

VLAN 501

VoD

VLAN 2

VLANs 201, 202, 203, 204

VLAN 502

VoIP

VLAN 3

VLANs 301, 302, 303, 304

VLAN 503

 

Figure 3 Network diagram

 

Software versions used

This configuration example was created and verified on R3606.

Restrictions and guidelines

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Switch A

# Create the original VLANs 2 and 3. (VLAN 1 is the system default VLAN and already exists.)

<SwitchA> system-view

[SwitchA] vlan 2 to 3

# Create the translated VLANs 101 through 102, 201 through 202, and 301 through 302.

[SwitchA] vlan 101 to 102

[SwitchA] vlan 201 to 202

[SwitchA] vlan 301 to 302

# Configure HundredGigE 1/0/1 and HundredGigE 1/0/3 to operate in bridge mode.

[SwitchA] interface range hundredgige1/0/1 to hundredgige1/0/3

[SwitchA-if-Range] port link-mode bridge

[SwitchA-if-Range] quit

# Configure the customer-side port HundredGigE 1/0/1 as a trunk port.

[SwitchA] interface hundredgige 1/0/1

[SwitchA-HundredGigE1/0/1] port link-type trunk

# Assign HundredGigE 1/0/1 to the original VLANs and translated VLANs.

[SwitchA-HundredGigE1/0/1] port trunk permit vlan 1 2 3 101 201 301

# Configure one-to-one VLAN mapping on HundredGigE 1/0/1 to map VLANs 1, 2, and 3 to VLANs 101, 201, and 301, respectively.

[SwitchA-HundredGigE1/0/1] vlan mapping 1 translated-vlan 101

[SwitchA-HundredGigE1/0/1] vlan mapping 2 translated-vlan 201

[SwitchA-HundredGigE1/0/1] vlan mapping 3 translated-vlan 301

[SwitchA-HundredGigE1/0/1] quit

# Configure the customer-side port HundredGigE 1/0/2 as a trunk port.

[SwitchA] interface hundredgige 1/0/2

[SwitchA-HundredGigE1/0/2] port link-type trunk

# Assign HundredGigE 1/0/2 to the original VLANs and translated VLANs.

[SwitchA-HundredGigE1/0/2] port trunk permit vlan 1 2 3 102 202 302

# Configure one-to-one VLAN mapping on HundredGigE 1/0/2 to map VLANs 1, 2, and 3 to VLANs 102, 202, and 302, respectively.

[SwitchA-HundredGigE1/0/2] vlan mapping 1 translated-vlan 102

[SwitchA-HundredGigE1/0/2] vlan mapping 2 translated-vlan 202

[SwitchA-HundredGigE1/0/2] vlan mapping 3 translated-vlan 302

[SwitchA-HundredGigE1/0/2] quit

# Configure the network-side port HundredGigE 1/0/3 as a trunk port.

[SwitchA] interface hundredgige 1/0/3

[SwitchA-HundredGigE1/0/3] port link-type trunk

# Assign HundredGigE 1/0/3 to the translated VLANs.

[SwitchA-HundredGigE1/0/3] undo port trunk permit vlan 1

[SwitchA-HundredGigE1/0/3] port trunk permit vlan 101 201 301 102 202 302

[SwitchA-HundredGigE1/0/3] quit

Configuring Switch B

# Configure Switch B in the same way Switch A is configured. (Details not shown.)

Configuring Switch C

1.     Configure basic settings required for many-to-one VLAN mapping:

# Enable DHCP snooping.

<SwitchC> system-view

[SwitchC] dhcp snooping enable

# Create the original VLANs 101 through 104, 201 through 204, and 301 through 304, and enable ARP detection for these VLANs.

[SwitchC] vlan 101

[SwitchC-vlan101] arp detection enable

[SwitchC-vlan101] vlan 201

[SwitchC-vlan201] arp detection enable

[SwitchC-vlan201] vlan 301

[SwitchC-vlan301] arp detection enable

[SwitchC-vlan301] vlan 102

[SwitchC-vlan102] arp detection enable

[SwitchC-vlan102] vlan 202

[SwitchC-vlan202] arp detection enable

[SwitchC-vlan202] vlan 302

[SwitchC-vlan302] arp detection enable

[SwitchC-vlan302] vlan 103

[SwitchC-vlan103] arp detection enable

[SwitchC-vlan103] vlan 203

[SwitchC-vlan203] arp detection enable

[SwitchC-vlan203] vlan 303

[SwitchC-vlan303] arp detection enable

[SwitchC-vlan303] vlan 104

[SwitchC-vlan104] arp detection enable

[SwitchC-vlan104] vlan 204

[SwitchC-vlan204] arp detection enable

[SwitchC-vlan204] vlan 304

[SwitchC-vlan304] arp detection enable

# Create the translated VLANs 501 through 503, and enable ARP detection for these VLANs.

[SwitchC-vlan304] vlan 501

[SwitchC-vlan501] arp detection enable

[SwitchC-vlan501] vlan 502

[SwitchC-vlan502] arp detection enable

[SwitchC-vlan502] vlan 503

[SwitchC-vlan503] arp detection enable

[SwitchC-vlan503] quit

# Configure HundredGigE 1/0/1 and HundredGigE 1/0/3 to operate in bridge mode.

[SwitchC] interface range hundredgige1/0/1 to hundredgige1/0/3

[SwitchC-if-Range] port link-mode bridge

[SwitchC-if-Range] quit

2.     Configure the customer-side port HundredGigE 1/0/1:

# Configure the port as a trunk port.

[SwitchC] interface hundredgige 1/0/1

[SwitchC-HundredGigE1/0/1] port link-type trunk

# Assign the port to the original VLANs and translated VLANs.

[SwitchC-HundredGigE1/0/1] undo port trunk permit vlan 1

[SwitchC-HundredGigE1/0/1] port trunk permit vlan 101 102 201 202 301 302 501 to 503

# Configure the user-side many-to-one VLAN mapping to map VLANs for PC, VoD, and VoIP traffic to VLANs 501, 502, and 503, respectively.

[SwitchC-HundredGigE1/0/1] vlan mapping uni range 101 to 102 translated-vlan 501

[SwitchC-HundredGigE1/0/1] vlan mapping uni range 201 to 202 translated-vlan 502

[SwitchC-HundredGigE1/0/1] vlan mapping uni range 301 to 302 translated-vlan 503

# Enable DHCP snooping entry recording.

[SwitchC-HundredGigE1/0/1] dhcp snooping binding record

[SwitchC-HundredGigE1/0/1] quit

3.     Configure the customer-side port HundredGigE 1/0/2:

# Configure the port as a trunk port.

[SwitchC] interface hundredgige 1/0/2

[SwitchC-HundredGigE1/0/2] port link-type trunk

# Assign the port to the original VLANs and translated VLANs.

[SwitchC-HundredGigE1/0/2] undo port trunk permit vlan 1

[SwitchC-HundredGigE1/0/2] port trunk permit vlan 103 104 203 204 303 304 501 to 503

# Configure the user-side many-to-one VLAN mapping to map VLANs for PC, VoD, and VoIP traffic to VLANs 501, 502, and 503, respectively.

[SwitchC-HundredGigE1/0/2] vlan mapping uni range 103 to 104 translated-vlan 501

[SwitchC-HundredGigE1/0/2] vlan mapping uni range 203 to 204 translated-vlan 502

[SwitchC-HundredGigE1/0/2] vlan mapping uni range 303 to 304 translated-vlan 503

# Enable DHCP snooping entry recording.

[SwitchC-HundredGigE1/0/2] dhcp snooping binding record

[SwitchC-HundredGigE1/0/2] quit

4.     Configure the network-side port HundredGigE 1/0/3:

# Enable the network-side VLAN mapping function on the port.

[SwitchC] interface hundredgige 1/0/3

[SwitchC-HundredGigE1/0/3] vlan mapping nni

# Configure the port as a trunk port.

[SwitchC-HundredGigE1/0/3] port link-type trunk

# Assign the port to the translated VLANs 501 through 503.

[SwitchC-HundredGigE1/0/3] undo port trunk permit vlan 1

[SwitchC-HundredGigE1/0/3] port trunk permit vlan 501 to 503

# Configure the port as a DHCP snooping trusted and ARP trusted port.

[SwitchC-HundredGigE1/0/3] dhcp snooping trust

[SwitchC-HundredGigE1/0/3] arp detection trust

[SwitchC-HundredGigE1/0/3] quit

Configuring Switch D

# Create the translated VLANs 501 through 503.

<SwitchD> system-view

[SwitchD] vlan 501 to 503

# Configure HundredGigE 1/0/1 to operate in bridge mode.

[SwitchD] interface Hundredgige1/0/1

[SwitchD-Hundredgige1/0/1] port link-mode bridge

[SwitchD-Hundredgige1/0/1] quit

# Configure HundredGigE 1/0/1 as a trunk port.

[SwitchD] interface hundredgige 1/0/1

[SwitchD-HundredGigE1/0/1] port link-type trunk

# Assign HundredGigE 1/0/1 to the translated VLANs 501 through 503.

[SwitchD-HundredGigE1/0/1] port trunk permit vlan 501 to 503

[SwitchD-HundredGigE1/0/1] quit

Verifying the configuration

# Verify VLAN mapping information on the wiring-closet switches, for example, Switch A.

[SwitchA] display vlan mapping

Interface HundredGigE1/0/1:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  1             N/A           101                      N/A

  2             N/A           201                      N/A

  3             N/A           301                      N/A

Interface HundredGigE1/0/2:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  1             N/A           102                      N/A

  2             N/A           202                      N/A

  3             N/A           302                      N/A

# Verify VLAN mapping information on Switch C.

[SwitchC] display vlan mapping

Interface HundredGigE1/0/1:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  101-102       N/A           501                      N/A

  201-202       N/A           502                      N/A

  301-302       N/A           503                      N/A

Interface HundredGigE1/0/2:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  103-104       N/A           501                      N/A

  203-204       N/A           502                      N/A

  303-304       N/A           503                      N/A

Configuration files

·     Switch A:

#

vlan 1

#

vlan 2 to 3

#

vlan 101 to 102

#

vlan 201 to 202

#

vlan 301 to 302

#

interface HundredGigE1/0/1

 port link-type trunk

 port trunk permit vlan 1 to 3 101 201 301

 vlan mapping 1 translated-vlan 101

 vlan mapping 2 translated-vlan 201

 vlan mapping 3 translated-vlan 301

#

interface HundredGigE1/0/2

 port link-type trunk

 port trunk permit vlan 1 to 3 102 202 302

 vlan mapping 1 translated-vlan 102

 vlan mapping 2 translated-vlan 202

 vlan mapping 3 translated-vlan 302

#

interface HundredGigE1/0/3

 port link-type trunk

 port trunk permit vlan 1 101 to 102 201 to 202 301 to 302

#

·     Switch B:

#

vlan 1

#

vlan 2 to 3

#

vlan 103 to 104

#

vlan 203 to 204

#

vlan 303 to 304

#

interface HundredGigE1/0/1

 port link-type trunk

 port trunk permit vlan 1 to 3 103 203 303

 vlan mapping 1 translated-vlan 103

 vlan mapping 2 translated-vlan 203

 vlan mapping 3 translated-vlan 303

#

interface HundredGigE1/0/2

 port link-type trunk

 port trunk permit vlan 1 to 3 104 204 304

 vlan mapping 1 translated-vlan 104

 vlan mapping 2 translated-vlan 204

 vlan mapping 3 translated-vlan 304

#

interface HundredGigE1/0/3

 port link-type trunk

 port trunk permit vlan 1 103 to 104 203 to 204 303 to 304

#

·     Switch C:

#

 dhcp snooping enable

#

vlan 101

 arp detection enable

#

vlan 102

 arp detection enable

#

vlan 103

 arp detection enable

#

vlan 104

 arp detection enable

#

vlan 201

 arp detection enable

#

vlan 202

 arp detection enable

#

vlan 203

 arp detection enable

#

vlan 204

 arp detection enable

#

vlan 301

 arp detection enable

#

vlan 302

 arp detection enable

#

vlan 303

 arp detection enable

#

vlan 304

 arp detection enable

#

vlan 501

 arp detection enable

#

vlan 502

 arp detection enable

#

vlan 503

 arp detection enable

#

interface HundredGigE1/0/1

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 101 to 102 201 to 202 301 to 302 501 to 503

 vlan mapping uni range 101 to 102 translated-vlan 501

 vlan mapping uni range 201 to 202 translated-vlan 502

 vlan mapping uni range 301 to 302 translated-vlan 503

 dhcp snooping binding record

#

interface HundredGigE1/0/2

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 103 to 104 203 to 204 303 to 304 501 to 503

 vlan mapping uni range 103 to 104 translated-vlan 501

 vlan mapping uni range 203 to 204 translated-vlan 502

 vlan mapping uni range 303 to 304 translated-vlan 503

 dhcp snooping binding record

#

interface HundredGigE1/0/3

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 501 to 503

 vlan mapping nni

 arp detection trust

 dhcp snooping trust

#

·     Switch D:

#

vlan 501 to 503

#

interface HundredGigE1/0/1

 port link-type trunk

 port trunk permit vlan 1 501 to 503

#

Example: Configuring two-to-two VLAN mapping

Network configuration

As shown in Figure 4:

·     A company assigns its branch sites (Site 1 and Site 2) to VLAN 10, and the headquarters provides services in VLAN 30.

·     Service provider A uses SVLAN 100 to transmit VLAN 10 traffic for the branch sites.

·     Service provider B uses SVLAN 200 to transmit VLAN 30 traffic for the headquarters.

Configure two-to-two VLAN mapping to permit the two branch sites to access VLAN 30 of the headquarters without changing their VLAN assignment.

Figure 4 Network diagram

 

Software versions used

This configuration example was created and verified on R3606.

Restrictions and guidelines

Configure two-to-two VLAN mapping on one of the edge devices between the two service provider networks. This example uses Switch C.

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Device A

# Create CVLAN 10 and SVLAN 100.

<DeviceA> system-view

[DeviceA] vlan 10

[DeviceA-vlan10] quit

[DeviceA] vlan 100

[DeviceA-vlan100] quit

# Configure HundredGigE 1/0/1 and HundredGigE 1/0/2 to operate in bridge mode.

[DeviceA] interface range Hundredgige1/0/1 to Hundredgige1/0/2

[DeviceA-if-Range] port link-mode bridge

[DeviceA-if-Range] quit

# Configure a one-to-two VLAN mapping on the customer-side port (HundredGigE 1/0/1) to add SVLAN tag 100 to packets from VLAN 10.

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] vlan mapping nest single 10 nested-vlan 100

# Configure HundredGigE 1/0/1 as a hybrid port.

[DeviceA-HundredGigE1/0/1] port link-type hybrid

# Assign HundredGigE 1/0/1 to VLAN 10 as a tagged member.

[DeviceA-HundredGigE1/0/1] port hybrid vlan 10 tagged

# Assign HundredGigE 1/0/1 to VLAN 100 as an untagged member.

[DeviceA-HundredGigE1/0/1] port hybrid vlan 100 untagged

# Remove HundredGigE 1/0/1 from VLAN 1.

[DeviceA-HundredGigE1/0/1] undo port hybrid vlan 1

[DeviceA-HundredGigE1/0/1] quit

# Configure the network-side port HundredGigE 1/0/2 as a trunk port.

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] port link-type trunk

# Assign HundredGigE 1/0/2 to VLAN 100.

[DeviceA-HundredGigE1/0/2] port trunk permit vlan 100

# Remove HundredGigE 1/0/2 from VLAN 1.

[DeviceA-HundredGigE1/0/2] undo port trunk permit vlan 1

[DeviceA-HundredGigE1/0/2] quit

Configuring Device B

# Create CVLAN 10 and SVLAN 100.

<DeviceB> system-view

[DeviceB] vlan 10

[DeviceB-vlan10] quit

[DeviceB] vlan 100

[DeviceB-vlan100] quit

# Configure HundredGigE 1/0/1 and HundredGigE 1/0/3 to operate in bridge mode.

[DeviceB] interface range Hundredgige1/0/1 to Hundredgige1/0/3

[DeviceB-if-Range] port link-mode bridge

[DeviceB-if-Range] quit

# Configure a one-to-two VLAN mapping on the customer-side port (HundredGigE 1/0/3) to add SVLAN tag 100 to packets from VLAN 10.

[DeviceB] interface hundredgige 1/0/3

[DeviceB-HundredGigE1/0/3] vlan mapping nest single 10 nested-vlan 100

# Configure HundredGigE 1/0/3 as a hybrid port.

[DeviceB] interface hundredgige 1/0/3

[DeviceB-HundredGigE1/0/3] port link-type hybrid

# Assign HundredGigE 1/0/3 to VLAN 10 as a tagged member.

[DeviceB-HundredGigE1/0/3] port hybrid vlan 10 tagged

# Assign HundredGigE 1/0/3 to VLAN 100 as an untagged member.

[DeviceB-HundredGigE1/0/3] port hybrid vlan 100 untagged

# Remove HundredGigE 1/0/3 from VLAN 1.

[DeviceB-HundredGigE1/0/3] undo port hybrid vlan 1

[DeviceB-HundredGigE1/0/3] quit

# Configure HundredGigE 1/0/1 as a trunk port.

[DeviceB] interface hundredgige 1/0/1

[DeviceB-HundredGigE1/0/1] port link-type trunk

# Assign HundredGigE 1/0/1 to VLAN 100.

[DeviceB-HundredGigE1/0/1] port trunk permit vlan 100

# Remove HundredGigE 1/0/1 from VLAN 1.

[DeviceB-HundredGigE1/0/1] undo port trunk permit vlan 1

[DeviceB-HundredGigE1/0/1] quit

# Configure HundredGigE 1/0/2 as a trunk port.

[DeviceB] interface hundredgige 1/0/2

[DeviceB-HundredGigE1/0/2] port link-type trunk

# Assign HundredGigE 1/0/2 to VLAN 100.

[DeviceB-HundredGigE1/0/2] port trunk permit vlan 100

# Remove HundredGigE 1/0/2 from VLAN 1.

[DeviceB-HundredGigE1/0/2] undo port trunk permit vlan 1

[DeviceB-HundredGigE1/0/2] quit

Configuring Device C

# Create SVLANs 100 and 200.

<DeviceC> system-view

[DeviceC] vlan 100

[DeviceC-vlan100] quit

[DeviceC] vlan 200

[DeviceC-vlan200] quit

# Configure HundredGigE 1/0/1 and HundredGigE 1/0/2 to operate in bridge mode.

[DeviceC] interface range Hundredgige1/0/1 to Hundredgige1/0/2

[DeviceC-if-Range] port link-mode bridge

[DeviceC-if-Range] quit

# Configure HundredGigE 1/0/1 as a trunk port.

[DeviceC] interface hundredgige 1/0/1

[DeviceC-HundredGigE1/0/1] port link-type trunk

# Assign HundredGigE 1/0/1 to VLANs 100 to 200.

[DeviceC-HundredGigE1/0/1] port trunk permit vlan 100 200

# Remove HundredGigE 1/0/1 from VLAN 1.

[DeviceC-HundredGigE1/0/1] undo port trunk permit vlan 1

# Configure a two-to-two VLAN mapping on HundredGigE 1/0/1 to map SVLAN 100 and CVLAN 10 to SVLAN 200 and CVLAN 30.

[DeviceC-HundredGigE1/0/1] vlan mapping tunnel 100 10 translated-vlan 200 30

[DeviceC-HundredGigE1/0/1] quit

# Configure HundredGigE 1/0/2 as a trunk port.

[DeviceC] interface hundredgige 1/0/2

[DeviceC-HundredGigE1/0/2] port link-type trunk

# Assign HundredGigE 1/0/2 to VLAN 200.

[DeviceC-HundredGigE1/0/2] port trunk permit vlan 200

# Remove HundredGigE 1/0/2 from VLAN 1.

[DeviceC-HundredGigE1/0/2] undo port trunk permit vlan 1

[DeviceC-HundredGigE1/0/2] quit

Configuring Device D

# Create CVLAN 30 and SVLAN 200.

<DeviceD> system-view

[DeviceD] vlan 30

[DeviceD-vlan30] quit

[DeviceD] vlan 200

[DeviceD-vlan200] quit

# Configure HundredGigE 1/0/1 and HundredGigE 1/0/2 to operate in bridge mode.

[DeviceD] interface range Hundredgige1/0/1 to Hundredgige1/0/2

[DeviceD-if-Range] port link-mode bridge

[DeviceD-if-Range] quit

# Configure the link type of HundredGigE 1/0/1 as trunk.

[DeviceD] interface hundredgige 1/0/1

[DeviceD-HundredGigE1/0/1] port link-type trunk

# Assign HundredGigE 1/0/1 to VLAN 200.

[DeviceD-HundredGigE1/0/1] port trunk permit vlan 200

# Remove HundredGigE 1/0/1 from VLAN 1.

[DeviceD-HundredGigE1/0/1] undo port trunk permit vlan 1

[DeviceD-HundredGigE1/0/1] quit

# Configure HundredGigE 1/0/2 as a hybrid port.

[DeviceD] interface hundredgige 1/0/2

[DeviceD-HundredGigE1/0/2] port link-type hybrid

# Assign HundredGigE 1/0/2 to VLAN 30 as a tagged member.

[DeviceD-HundredGigE1/0/2] port hybrid vlan 30 tagged

# Assign HundredGigE 1/0/2 to VLAN 200 as an untagged member.

[DeviceD-HundredGigE1/0/2] port hybrid vlan 200 untagged

# Remove HundredGigE 1/0/2 from VLAN 1.

[DeviceD-HundredGigE1/0/2] undo port hybrid vlan 1

[DeviceD-HundredGigE1/0/2] quit

# Configure a one-to-two VLAN mapping on the customer-side port (HundredGigE 1/0/2) to add SVLAN tag 200 to packets from VLAN 30.

[DeviceD] interface hundredgige 1/0/2

[DeviceD-HundredGigE1/0/2] vlan mapping nest single 30 nested-vlan 200

[DeviceD-HundredGigE1/0/2] quit

Verifying the configuration

# Verify VLAN mapping information on Device C.

[DeviceC] display vlan mapping

Interface HundredGigE1/0/1:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  100           10            200                      30

Configuration files

·     Device A:

#

vlan 10

vlan 100

#

interface HundredGigE1/0/1

 port link-type hybrid

 port hybrid vlan 10 tagged

 port hybrid vlan 100 untagged

 vlan mapping nest single 10 nested-vlan 100

#

interface HundredGigE1/0/2

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

·     Device B:

#

vlan 10

vlan 100

#

interface HundredGigE1/0/1

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

#

interface HundredGigE1/0/2

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100

#

interface HundredGigE1/0/3

 port link-type hybrid

 port hybrid vlan 10 tagged

 port hybrid vlan 100 untagged

 vlan mapping nest single 10 nested-vlan 100

·     Device C:

#

vlan 100

#

vlan 200

#

interface HundredGigE1/0/1

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 100 200

 vlan mapping tunnel 100 10 translated-vlan 200 30

#

interface HundredGigE1/0/2

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 200

#

·     Device D:

#

vlan 30

vlan 200

#

interface HundredGigE1/0/1

 port link-type trunk

 undo port trunk permit vlan 1

 port trunk permit vlan 200

#

interface HundredGigE1/0/2

 port link-type hybrid

 port hybrid vlan 30 tagged

 port hybrid vlan 200 untagged

 vlan mapping nest single 30 nested-vlan 200

#

Related documentation

·     H3C S12500R Switch Router Series Layer 2—LAN Switching Command Reference-R3606

·     H3C S12500R Switch Router Series Layer 2—LAN Switching Configuration Guide-R3606

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网