H3C S3600 Series EPON OLT Switches Operation Manual-Release 3103-6W100

14-VLAN Mapping Configuration

Chapters Download  (168.15 KB)

14-VLAN Mapping Configuration


VLAN Mapping Configuration

When configuring VLAN mapping, go to these sections for information you are interested in:

l          VLAN Mapping Overview

l          Configuring One-to-One VLAN Mapping

l          VLAN Mapping Configuration Examples

VLAN Mapping Overview

VLAN mapping maps the customer VLANs (CVLANs) to service-provider VLANs (SVLANs). Through One-to-one VLAN mapping, you can map the CVLAN ID in the VLAN tag to the SVLAN ID.

The following sections present the scenario to which one-to-one VLAN mapping applies.

One-to-One VLAN Mapping

Figure 1-1 Scenario for one-to-one VLAN mapping

 

One-to-one VLAN mapping is mainly applied in networking environments as shown in Figure 1-1. In such a network, different VLANs are used for transmitting different services (PC, IPTV, and VoIP for example) of a home user. Furthermore, to differentiate home users that are using the same service, you need to perform one-to-one VLAN mapping to map the service traffic to different VLANs by user on the corridor switches.

Basic Concepts of VLAN Mapping

Before you configure VLAN mappings, be aware of the following concepts, which will be used throughout this document.

l          Uplink traffic: Traffic transmitted from a home user network to a distribution network or from a user network to an SP network.

l          Downlink traffic: Traffic transmitted from a distribution network to a home user network or from an SP network to a user network.

l          Uplink port: A port transmitting uplink traffic and receiving downlink traffic.

l          Downlink port: A port transmitting downlink traffic and receiving uplink traffic.

l          Uplink policy: A QoS policy containing VLAN mappings for uplink traffic.

l          Downlink policy: A QoS policy containing VLAN mappings for downlink traffic.

How VLAN Mapping Is Implemented

This section describes how one-to-one VLAN mapping is implemented on your device.

On the downlink port

For uplink traffic

For downlink traffic

Do…

Based on…

Do…

Based on…

Replace the customer VLAN (CVLAN) with the service provider VLAN (SVLAN)

Uplink policy in the inbound direction

Replace the SVLAN with the original CVLAN

Downlink policy in the outbound direction

 

For information about QoS policies, refer to QoS Configuration.

 

Configuring One-to-One VLAN Mapping

Perform one-to-one VLAN mapping on the corridor switches shown in Figure 1-1 to use VLANs to isolate different services of different users.

Configuring One-to-One VLAN Mapping

Configuration prerequisites

The CVLAN-to-SVLAN mappings have been planned.

Configuration procedure

Follow these steps to configure a one-to-one VLAN mapping:

To do...

Use the command...

Remarks

Enter system view

system-view

Create a CVLAN and a SVLAN

Create a VLAN

vlan vlan-id

Required

By default, only the default VLAN (VLAN 1) exists.

Repeat these steps for all CVLANs and SVLANs involved in VLAN mapping.

Exit to system view

quit

Configure an uplink policy to map the CVLAN to the SVLAN

Refer to Table 1-1

Required

Configure a downlink policy to map the SVLAN to the original CVLAN

Refer to Table 1-2

Required

Enter interface view of the downlink port

interface interface-type interface-number

Set the link type of the downlink port to hybrid

port link-type hybrid

Required

By default, the link type of an OLT port is hybrid and cannot be changed to access or trunk.

Configure the downlink port to permit the specified CVLANs and SVLANs or all VLANs to pass through

port hybrid vlan vlan-id-list tagged

Required

By default, a hybrid port permits only VLAN 1 to pass through.

Enable basic QinQ on the port

qing enable

Required

Apply the uplink policy to the inbound direction of the downlink port

qos apply policy policy-name inbound

Required

Apply the downlink policy to the outbound direction of the downlink port

qos apply policy policy-name outbound

Required

Exit to system view

quit

Enter the interface view of the uplink port

interface interface-type interface-number

Set the link type of the uplink port to trunk

port link-type trunk

Required

Configure the uplink port to permit the specified SVLANs to pass through

port trunk permit vlan { vlan-id-list | all }

Required

By default, a trunk port permits only VLAN 1 to pass through.

 

Use the qinq enable command to enable basic QinQ on a port. For details, see QinQ Commands in the manual.

 

Table 1-1 Configuring an uplink policy

To do...

Use the command...

Remarks

Enter system view

system-view

Create a class and enter class view

traffic classifier tcl-name [ operator { and | or } ]

Required

Specify the CVLAN for the VLAN mapping

if-match customer-vlan-id vlan-id-value

Required

Exit to system view

quit

Create a traffic behavior and enter traffic behavior view

traffic behavior behavior-name

Required

Specify the SVLAN for the VLAN mapping

remark service-vlan-id vlan-id-value

Required

Exit to system view

quit

Create a QoS policy and enter QoS policy view

qos policy policy-name

Required

Map the CVLAN to the SVLAN by associating the traffic class with the traffic behavior

classifier tcl-name behavior behavior-name

Required

Exit to system view

quit

 

Table 1-2 Configuring a downlink policy

To do...

Use the command...

Remarks

Enter system view

system-view

Create a class and enter class view

traffic classifier tcl-name [ operator { and | or } ]

Required

Specify the SVLAN for the VLAN mapping

if-match service-vlan-id vlan-id-value

Required

Exit to system view

quit

Create a traffic behavior and enter traffic behavior view

traffic behavior behavior-name

Required

Specify the CVLAN for the VLAN mapping

remark customer-vlan-id vlan-id-value

Required

Exit to system view

quit

Create a QoS policy and enter QoS policy view

qos policy policy-name

Required

Map the SVLAN to the CVLAN by associating the traffic class with the traffic behavior

classifier tcl-name behavior behavior-name

Required

Exit to system view

quit

 

VLAN Mapping Configuration Examples

One-to-One VLAN Mapping Configuration Example

Network requirements

In such a network, different VLANs are used for transmitting different services of a home user. To differentiate home users that are using the same service, you need to perform one-to-one VLAN mapping to map the service traffic to different VLANs by user on the corridor switches.

Figure 1-2 Network diagram for one-to-one VLAN mapping configuration

 

Configuration procedure

1)        Configuration on Switch A

# Create the CVLANs and the SVLANs.

<SwitchA> system-view

[SwitchA] vlan 2 to 3

[SwitchA] vlan 101 to 102

[SwitchA] vlan 201 to 202

[SwitchA] vlan 301 to 302

# Configure uplink policies to map the CVLANs to the SVLANs.

[SwitchA] traffic classifier c1

[SwitchA-classifier-c1] if-match customer-vlan-id 1

[SwitchA-classifier-c1] traffic classifier c2

[SwitchA-classifier-c2] if-match customer-vlan-id 2

[SwitchA-classifier-c2] traffic classifier c3

[SwitchA-classifier-c3] if-match customer-vlan-id 3

[SwitchA-classifier-c3] quit

[SwitchA] traffic behavior b1

[SwitchA-behavior-b1] remark service-vlan-id 101

[SwitchA-behavior-b1] traffic behavior b2

[SwitchA-behavior-b2] remark service-vlan-id 201

[SwitchA-behavior-b2] traffic behavior b3

[SwitchA-behavior-b3] remark service-vlan-id 301

[SwitchA-behavior-b3] traffic behavior b4

[SwitchA-behavior-b4] remark service-vlan-id 102

[SwitchA-behavior-b4] traffic behavior b5

[SwitchA-behavior-b5] remark service-vlan-id 202

[SwitchA-behavior-b5] traffic behavior b6

[SwitchA-behavior-b6] remark service-vlan-id 302

[SwitchA-behavior-b6] quit

[SwitchA] qos policy p1

[SwitchA-policy-p1] classifier c1 behavior b1

[SwitchA-policy-p1] classifier c2 behavior b2

[SwitchA-policy-p1] classifier c3 behavior b3

[SwitchA-policy-p1] quit

[SwitchA] qos policy p2

[SwitchA-policy-p2] classifier c1 behavior b4

[SwitchA-policy-p2] classifier c2 behavior b5

[SwitchA-policy-p2] classifier c3 behavior b6

[SwitchA-policy-p2] quit

# Configure downlink policies to map the SVLANs to the original CVLANs.

[SwitchA] traffic classifier c11

[SwitchA-classifier-c11] if-match service-vlan-id 101

[SwitchA-classifier-c11] traffic classifier c22

[SwitchA-classifier-c22] if-match service-vlan-id 201

[SwitchA-classifier-c22] traffic classifier c33

[SwitchA-classifier-c33] if-match service-vlan-id 301

[SwitchA-classifier-c33] traffic classifier c44

[SwitchA-classifier-c44] if-match service-vlan-id 102

[SwitchA-classifier-c44] traffic classifier c55

[SwitchA-classifier-c55] if-match service-vlan-id 202

[SwitchA-classifier-c55] traffic classifier c66

[SwitchA-classifier-c66] if-match service-vlan-id 302

[SwitchA-classifier-c66] quit

[SwitchA] traffic behavior b11

[SwitchA-behavior-b11] remark customer-vlan-id 1

[SwitchA-behavior-b11] traffic behavior b22

[SwitchA-behavior-b22] remark customer-vlan-id 2

[SwitchA-behavior-b22] traffic behavior b33

[SwitchA-behavior-b33] remark customer-vlan-id 3

 [SwitchA-behavior-b33] quit

[SwitchA] qos policy p11

[SwitchA-policy-p11] classifier c11 behavior b11

[SwitchA-policy-p11] classifier c22 behavior b22

[SwitchA-policy-p11] classifier c33 behavior b33

[SwitchA-policy-p11] quit

[SwitchA] qos policy p22

[SwitchA-policy-p22] classifier c44 behavior b11

[SwitchA-policy-p22] classifier c55 behavior b22

[SwitchA-policy-p22] classifier c66 behavior b33

[SwitchA-policy-p22] quit

# Configure OLT 1/0/1 to permit frames of the specified CVLANs and SLVANs to pass through.

[SwitchA] interface olt 1/0/1

[SwitchA-Olt1/0/1] port hybrid vlan 1 2 3 101 201 301 tagged

# Enable basic QinQ on OLT 1/0/1.

[SwitchA-Olt1/0/1] qinq enable

# Apply the uplink policy p1 to the inbound direction of OLT 1/0/1.

[SwitchA-Olt1/0/1] qos apply policy p1 inbound

# Apply the downlink policy p11 to the outbound direction of OLT 1/0/1.

[SwitchA-Olt1/0/1] qos apply policy p11 outbound

[SwitchA-Olt1/0/1] quit

# Configure OLT 1/0/2 to permit frames of the specified CVLANs and SVLANs to pass through.

[SwitchA] interface olt 1/0/2

[SwitchA-Olt1/0/2] port hybrid vlan 1 2 3 102 202 302 tagged

# Enable basic QinQ on OLT 1/0/2.

[SwitchA-Olt1/0/2] qinq enable

# Apply the uplink policy p2 to the inbound direction of OLT 1/0/2.

[SwitchA-Olt1/0/2] qos apply policy p2 inbound

# Apply the downlink policy p22 to the outbound direction of OLT 1/0/2.

[SwitchA-Olt1/0/2] qos apply policy p22 outbound

[SwitchA-Olt1/0/2] quit

# Configure GigabitEthernet 1/1/1 to permit frames of the specified SVLANs to pass through.

[SwitchA] interface gigabitethernet 1/1/1

[SwitchA-GigabitEthernet1/1/1] port link-type trunk

[SwitchA-GigabitEthernet1/1/1] port trunk permit vlan 101 201 301 102 202 302

2)        Configuration on Switch B

# Create the CVLANs and the SVLANs.

<SwitchB> system-view

[SwitchB] vlan 2 to 3

[SwitchB] vlan 111 to 112

[SwitchB] vlan 211 to 212

[SwitchB] vlan 311 to 312

# Configure uplink policies to map the CVLANs to the SVLANs.

[SwitchB] traffic classifier c1

[SwitchB-classifier-c1] if-match customer-vlan-id 1

[SwitchB-classifier-c1] traffic classifier c2

[SwitchB-classifier-c2] if-match customer-vlan-id 2

[SwitchB-classifier-c2] traffic classifier c3

[SwitchB-classifier-c3] if-match customer-vlan-id 3

 [SwitchB-classifier-c3] quit

[SwitchB] traffic behavior b1

[SwitchB-behavior-b1] remark service-vlan-id 111

[SwitchB-behavior-b1] traffic behavior b2

[SwitchB-behavior-b2] remark service-vlan-id 211

[SwitchB-behavior-b2] traffic behavior b3

[SwitchB-behavior-b3] remark service-vlan-id 311

[SwitchB-behavior-b3] traffic behavior b4

[SwitchB-behavior-b4] remark service-vlan-id 112

[SwitchB-behavior-b4] traffic behavior b5

[SwitchB-behavior-b5] remark service-vlan-id 212

[SwitchB-behavior-b5] traffic behavior b6

[SwitchB-behavior-b6] remark service-vlan-id 312

[SwitchB-behavior-b6] quit

[SwitchB] qos policy p1

[SwitchB-policy-p1] classifier c1 behavior b1

[SwitchB-policy-p1] classifier c2 behavior b2

[SwitchB-policy-p1] classifier c3 behavior b3

[SwitchB-policy-p1] quit

[SwitchB] qos policy p2

[SwitchB-policy-p2] classifier c1 behavior b4

[SwitchB-policy-p2] classifier c2 behavior b5

[SwitchB-policy-p2] classifier c3 behavior b6

[SwitchB-policy-p2] quit

# Configure downlink policies to map the SVLANs to the original CVLANs.

[SwitchB] traffic classifier c11

[SwitchB-classifier-c11] if-match service-vlan-id 111

[SwitchB-classifier-c11] traffic classifier c22

[SwitchB-classifier-c22] if-match service-vlan-id 211

[SwitchB-classifier-c22] traffic classifier c33

[SwitchB-classifier-c33] if-match service-vlan-id 311

[SwitchB-classifier-c33] traffic classifier c44

[SwitchB-classifier-c44] if-match service-vlan-id 112

[SwitchB-classifier-c44] traffic classifier c55

[SwitchB-classifier-c55] if-match service-vlan-id 212

[SwitchB-classifier-c55] traffic classifier c66

[SwitchB-classifier-c66] if-match service-vlan-id 312

[SwitchB-classifier-c66] quit

[SwitchB] traffic behavior b11

[SwitchB-behavior-b11] remark customer-vlan-id 1

[SwitchB-behavior-b11] traffic behavior b22

[SwitchB-behavior-b22] remark customer-vlan-id 2

[SwitchB-behavior-b22] traffic behavior b33

[SwitchB-behavior-b33] remark customer-vlan-id 3

 [SwitchB-behavior-b33] quit

[SwitchB] qos policy p11

[SwitchB-policy-p11] classifier c11 behavior b11

[SwitchB-policy-p11] classifier c22 behavior b22

[SwitchB-policy-p11] classifier c33 behavior b33

[SwitchB-policy-p11] quit

[SwitchB] qos policy p22

[SwitchB-policy-p22] classifier c44 behavior b11

[SwitchB-policy-p22] classifier c55 behavior b22

[SwitchB-policy-p22] classifier c66 behavior b33

[SwitchB-policy-p22] quit

# Configure OLT 1/0/1 to permit frames of the specified CVLANs and SVLANs to pass through.

[SwitchB] interface olt 1/0/1

[SwitchB-Olt1/0/1] port hybrid vlan 1 2 3 111 211 311 tagged

# Enable basic QinQ on OLT 1/0/1.

[SwitchB-Olt1/0/1] qinq enable

# Apply the uplink policy p1 to the inbound direction of OLT 1/0/1.

[SwitchB-Olt1/0/1] qos apply policy p1 inbound

# Apply the downlink policy p11 to the outbound direction of OLT 1/0/1.

[SwitchB-Olt1/0/1] qos apply policy p11 outbound

[SwitchB-Olt1/0/1] quit

# Configure OLT 1/0/2 to permit frames of the specified CVLANs and SLVANs to pass through.

[SwitchB] interface olt 1/0/2

[SwitchB-Olt1/0/2] port hybrid vlan 1 2 3 112 212 312 tagged

# Enable basic QinQ on OLT 1/0/2.

[SwitchB-Olt1/0/2] qinq enable

# Apply the uplink policy p2 to the inbound direction of OLT 1/0/2.

[SwitchB-Olt1/0/2] qos apply policy p2 inbound

# Apply the downlink policy p22 to the outbound direction of OLT 1/0/2.

[SwitchB-Olt1/0/2] qos apply policy p22 outbound

[SwitchB-Olt1/0/2] quit

# Configure GigabitEthernet 1/1/1 to permit frames of the specified SVLANs to pass through.

[SwitchB] interface gigabitethernet 1/1/1

[SwitchB-GigabitEthernet1/1/1] port link-type trunk

[SwitchB-GigabitEthernet1/1/1] port trunk permit vlan 111 211 311 112 212 312

H3C reserves the right to modify its collaterals without any prior notice. For the latest information of the collaterals, please consult H3C sales or call 400 hotline.