Ruijie Community
Title: How to configure VLAN Mapping on Ruijie Switch? [Print this page]
Author: zhangqiao@ruiji Time: 2024-11-15 11:20
Title: How to configure VLAN Mapping on Ruijie Switch?
Introduction:
VLAN Mapping Replaces the private network VLAN Tagin user packets with the public network VLAN Tag so that user packets can be transmitted according to the network plan of the public network. After packets are sent back to the user's private network, the VLAN Tag is restored to the original VLAN Tag based on the mapping relationship, so that the packets canreach the destination correctly.
VLAN mapping supports the following mapping relationships:
One-to-one VLAN mapping: Changes the VID of apacket Tag to the VID of another specified Tag.
Multi-to-one VLAN mapping: Changes the VID of theTag of packets from multiple vlans to the VID of the same Tag.
Topology:
Example for One-to-one VLAN mapping
Configuration steps:
Confgure on home gateway
1. Create original vlans for different services in the home gateway.
Ruijie#configure terminal
Enter configuration commands, one per line. Endwith CNTL/Z.
Ruijie(config)#vlan range 10-12
Ruijie(config-vlan-range)#exit
2. Configure the port attributes for connecting PC, IPTV, and VOIP phones. Assume that the ports are Gi 0/0/2, Gi 0/0/3, and Gi 0/0/4 respectively.
Ruijie(config)#interface gigabitEthernet 0/2
Ruijie(config-if-GigabitEthernet 0/2)#switchportaccess vlan 10
Ruijie(config-if-GigabitEthernet 0/2)#exit
Ruijie(config)#interface gigabitEthernet 0/3
Ruijie(config-if-GigabitEthernet 0/3)#switchportaccess vlan 11
Ruijie(config-if-GigabitEthernet 0/3)#exit
Ruijie(config)#interface gigabitEthernet 0/4
Ruijie(config-if-GigabitEthernet 0/4)#switchportaccess vlan 12
Ruijie(config-if-GigabitEthernet 0/4)#exit
3. Configure the Uplink port as the uplink port
Ruijie(config)# interface gigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)#switchportmode uplink
Configure the switch to perform 1:1VLAN mapping of packets on the switch 1:
1. create original vlans and mapped vlans for different services in the home gateway.
Ruijie#configure terminal Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#vlan range 10-12
Ruijie(config-vlan-range)#exit
Ruijie(config)#vlan range 100-102
Ruijie(config-vlan-range)#exit
Ruijie(config)#vlan range 200-202
Ruijie(config-vlan-range)#exit
2. configure a VLAN mapping policy in the 1:1 input/output direction on the downlink port ofthe home gateway.
Ruijie(config)#interface gigabitEthernet 0/20/2
Ruijie(config-if-GigabitEthernet 0/2)#switchportmode uplink
Ruijie(config-if-GigabitEthernet0/2)#vlan-mapping-in vlan 10 remark 100
Ruijie(config-if-GigabitEthernet0/2)#vlan-mapping-in vlan 11 remark 101
Ruijie(config-if-GigabitEthernet0/2)#vlan-mapping-in vlan 12 remark 102
Ruijie(config-if-GigabitEthernet 0/2)#vlan-mapping-outvlan 100 remark 10
Ruijie(config-if-GigabitEthernet0/2)#vlan-mapping-out vlan 101 remark 11
Ruijie(config-if-GigabitEthernet0/2)#vlan-mapping-out vlan 102 remark 12
3. Configure a 1:1 VLAN mapping policy for the downlink port on home gateway 1.
Ruijie(config)#interface gigabitEthernet 0/3
Ruijie(config-if-GigabitEthernet 0/3)#switchportmode uplink
Ruijie(config-if-GigabitEthernet0/3)#vlan-mapping-in vlan 10 remark 200
Ruijie(config-if-GigabitEthernet0/3)#vlan-mapping-in vlan 11 remark 201
Ruijie(config-if-GigabitEthernet0/3)#vlan-mapping-in vlan 12 remark 202
Ruijie(config-if-GigabitEthernet0/3)#vlan-mapping-out vlan 200 remark 10
Ruijie(config-if-GigabitEthernet0/3)#vlan-mapping-out vlan 201 remark 11
Ruijie(config-if-GigabitEthernet0/3)#vlan-mapping-out vlan 202 remark 12
4. Configure the Uplink port as the uplink port
Ruijie(config)# interface gigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)#switchportmode uplink
verification:
Command check on switch 1:
Ruijie#show interfaces vlan-mapping
Welcome to Ruijie Community (https://community.ruijienetworks.com/) |
Powered by Discuz! X3.2 |