< Home

Example for configuring VXLAN for a Virtual Network in Centralized Gateway Mode (BGP EVPN Mode)

Networking Requirements

An enterprise has constructed a mature campus network but does not have a dedicated data center network. All the servers of the enterprise are scattered in different departments and do not support centralized placement. The enterprise wants to construct a virtual data center network over the existing campus network to meet the following requirements:
  • Servers scattered in different departments form a virtual network, realizing resource integration and flexible service deployment.
  • A lot of VMs are deployed on servers. VMs in the same network segment achieve Layer 2 interconnection while VMs in different network segments achieve Layer 3 interconnection.
As shown in Figure 1, enterprise servers are deployed at different positions. Server1 and Server3 are in one network segment while Server2 and Server4 are in another network segment. Virtual extensible LAN (VXLAN) tunnels need to be used for Layer 2 interconnection between servers in the same network segment and for Layer 3 interconnection between servers in different network segments.
Figure 1 Configuring VXLAN for a virtual network in centralized gateway mode (BGP EVPN)

This example uses the S6730-S, S6730S-S, S5732-H, S5731-S, S5731S-S, S5731S-H, S6730-H, S6730S-H, S5731-H, S5720-HI, S5730-HI, or S6720-HI as an example to describe the configuration.

Data Preparation

Table 1 Configuring BGP EVPN-related data

Device

EVPN Instance

RD Value

BD

VNI

Router ID

Peer IP

VTEP1

evpn10:
  • IRT:10:1
  • ERT:10:1

1:10

10

10

10.1.1.1

10.2.2.2; 10.3.3.3

evpn20:
  • IRT:20:1
  • ERT:20:1

1:20

20

20

10.1.1.1

10.2.2.2; 10.3.3.3

VTEP2

evpn10:
  • IRT:10:1
  • ERT:10:1

2:10

10

10

10.2.2.2

10.1.1.1; 10.3.3.3

evpn20:
  • IRT:20:1
  • ERT:20:1

2:20

20

20

10.2.2.2

10.1.1.1; 10.3.3.3

VTEP3

evpn10:
  • IRT:10:1
  • ERT:10:1

3:10

10

10

10.3.3.3

10.2.2.2; 10.1.1.1

evpn20:
  • IRT:20:1
  • ERT:20:1

3:20

20

20

10.3.3.3

10.2.2.2; 10.1.1.1

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure a routing protocol on VTEP1, VTEP2, and VTEP3 to ensure Layer 3 interconnection.
  2. Configure a deployment mode for the VXLAN access service on VTEP2 and VTEP3, and configure a VLAN on Switch1 and Switch2.
  3. Configure an EVPN instance on VTEP1, VTEP2, and VTEP3, and bind the instance to a bridge domain (BD).
  4. Configure a BGP EVPN peer relationship among VTEP1, VTEP2, and VTEP3.
  5. Configure the destination address of the VXLAN tunnel on VTEP1, VTEP2, and VTEP3.
  6. Configure a Layer 3 VXLAN gateway on VTEP1.

Layer 3 interconnection of the campus network is the basis of the virtual network. If Layer 3 interconnection has been implemented on the existing campus network, ignore step 1.

Procedure

  1. Configure a routing protocol.

    # Configure IP addresses of interfaces on VTEP2. The configurations of VTEP1 and VTEP3 are similar to the configurations of VTEP2, and are not mentioned here. When OSPF is used, the loopback interface addresses of devices must be advertised.

    <HUAWEI> system-view
    [HUAWEI] sysname VTEP2
    [VTEP2] interface loopback 1
    [VTEP2-LoopBack1] ip address 10.2.2.2 32
    [VTEP2-LoopBack1] quit
    [VTEP2] interface gigabitethernet 0/0/1
    [VTEP2-GigabitEthernet0/0/1] undo portswitch
    [VTEP2-GigabitEthernet0/0/1] ip address 192.168.1.1 24
    [VTEP2-GigabitEthernet0/0/1] quit
    [VTEP2] ospf router-id 10.2.2.2
    [VTEP2-ospf-1] area 0
    [VTEP2-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.0
    [VTEP2-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [VTEP2-ospf-1-area-0.0.0.0] quit
    [VTEP2-ospf-1] quit

    # After OSPF is configured, VTEP1, VTEP2, and VTEP3 can learn the loopback interface address of each other and successfully ping each other. The following shows the result when VTEP2 pings VTEP1.

    [VTEP2] ping 10.1.1.1
      PING 10.1.1.1: 56  data bytes, press CTRL_C to break
        Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=240 ms
        Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=5 ms
        Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=5 ms
        Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=14 ms
        Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=5 ms
    
      --- 10.1.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 5/53/240 ms
    

  2. Configure VLAN access on Switch1 and Switch2 and configure the access point for the VXLAN service on VTEP2 and VTEP3.

    # Configure Switch1.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch1
    [Switch1] vlan batch 10 20
    [Switch1] interface gigabitethernet 0/0/2
    [Switch1-GigabitEthernet0/0/2] port link-type access
    [Switch1-GigabitEthernet0/0/2] port default vlan 10
    [Switch1-GigabitEthernet0/0/2] quit
    [Switch1] interface gigabitethernet 0/0/3
    [Switch1-GigabitEthernet0/0/3] port link-type access
    [Switch1-GigabitEthernet0/0/3] port default vlan 20
    [Switch1-GigabitEthernet0/0/3] quit
    [Switch1] interface gigabitethernet 0/0/1
    [Switch1-GigabitEthernet0/0/1] port link-type trunk
    [Switch1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 20
    [Switch1-GigabitEthernet0/0/1] quit

    # Configure Switch2.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch2
    [Switch2] vlan batch 10 20
    [Switch2] interface gigabitethernet 0/0/2
    [Switch2-GigabitEthernet0/0/2] port link-type access
    [Switch2-GigabitEthernet0/0/2] port default vlan 10
    [Switch2-GigabitEthernet0/0/2] quit
    [Switch2] interface gigabitethernet 0/0/3
    [Switch2-GigabitEthernet0/0/3] port link-type access
    [Switch2-GigabitEthernet0/0/3] port default vlan 20
    [Switch2-GigabitEthernet0/0/3] quit
    [Switch2] interface gigabitethernet 0/0/1
    [Switch2-GigabitEthernet0/0/1] port link-type trunk
    [Switch2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 20
    [Switch2-GigabitEthernet0/0/1] quit

    # Configure VTEP2.

    [VTEP2] bridge-domain 10
    [VTEP2-bd10] quit
    [VTEP2] vcmp role silent
    [VTEP2] interface gigabitethernet 0/0/2
    [VTEP2-GigabitEthernet0/0/2] port link-type trunk
    [VTEP2-GigabitEthernet0/0/2] quit
    [VTEP2] interface gigabitethernet 0/0/2.1 mode l2
    [VTEP2-GigabitEthernet0/0/2.1] encapsulation dot1q vid 10
    [VTEP2-GigabitEthernet0/0/2.1] bridge-domain 10
    [VTEP2-GigabitEthernet0/0/2.1] quit
    [VTEP2] bridge-domain 20
    [VTEP2-bd20] quit
    [VTEP2] interface gigabitethernet 0/0/2.2 mode l2
    [VTEP2-GigabitEthernet0/0/2.2] encapsulation dot1q vid 20
    [VTEP2-GigabitEthernet0/0/2.2] bridge-domain 20
    [VTEP2-GigabitEthernet0/0/2.2] quit

    # Configure VTEP3.

    [VTEP3] bridge-domain 10
    [VTEP3-bd10] quit
    [VTEP3] vcmp role silent
    [VTEP3] interface gigabitethernet 0/0/2
    [VTEP3-GigabitEthernet0/0/2] port link-type trunk
    [VTEP3-GigabitEthernet0/0/2] quit
    [VTEP3] interface gigabitethernet 0/0/2.1 mode l2
    [VTEP3-GigabitEthernet0/0/2.1] encapsulation dot1q vid 10
    [VTEP3-GigabitEthernet0/0/2.1] bridge-domain 10
    [VTEP3-GigabitEthernet0/0/2.1] quit
    [VTEP3] bridge-domain 20
    [VTEP3-bd20] quit
    [VTEP3] interface gigabitethernet 0/0/2.2 mode l2
    [VTEP3-GigabitEthernet0/0/2.2] encapsulation dot1q vid 20
    [VTEP3-GigabitEthernet0/0/2.2] bridge-domain 20
    [VTEP3-GigabitEthernet0/0/2.2] quit

  3. Configure an EVPN instance on VTEP1, VTEP2, and VTEP3, and bind the instance to a BD.

    # Configure VTEP1.

    [VTEP1] evpn vpn-instance evpn10 bd-mode
    [VTEP1-evpn-instance-evpn10] route-distinguisher 1:10
    [VTEP1-evpn-instance-evpn10] vpn-target 10:1 both
    [VTEP1-evpn-instance-evpn10] quit
    [VTEP1] bridge-domain 10
    [VTEP1-bd10] vxlan vni 10
    [VTEP1-bd10] evpn binding vpn-instance evpn10
    [VTEP1-bd10] quit 
    [VTEP1] evpn vpn-instance evpn20 bd-mode
    [VTEP1-evpn-instance-evpn20] route-distinguisher 1:20
    [VTEP1-evpn-instance-evpn20] vpn-target 20:1 both
    [VTEP1-evpn-instance-evpn20] quit
    [VTEP1] bridge-domain 20
    [VTEP1-bd20] vxlan vni 20
    [VTEP1-bd20] evpn binding vpn-instance evpn20
    [VTEP1-bd20] quit 

    # Configure VTEP2.

    [VTEP2] evpn vpn-instance evpn10 bd-mode
    [VTEP2-evpn-instance-evpn10] route-distinguisher 2:10
    [VTEP2-evpn-instance-evpn10] vpn-target 10:1 both
    [VTEP2-evpn-instance-evpn10] quit
    [VTEP2] bridge-domain 10
    [VTEP2-bd10] vxlan vni 10
    [VTEP2-bd10] evpn binding vpn-instance evpn10
    [VTEP2-bd10] quit 
    [VTEP2] evpn vpn-instance evpn20 bd-mode
    [VTEP2-evpn-instance-evpn20] route-distinguisher 2:20
    [VTEP2-evpn-instance-evpn20] vpn-target 20:1 both
    [VTEP2-evpn-instance-evpn20] quit
    [VTEP2] bridge-domain 20
    [VTEP2-bd20] vxlan vni 20
    [VTEP2-bd20] evpn binding vpn-instance evpn20
    [VTEP2-bd20] quit 

    # Configure VTEP3.

    [VTEP3] evpn vpn-instance evpn10 bd-mode
    [VTEP3-evpn-instance-evpn10] route-distinguisher 3:10
    [VTEP3-evpn-instance-evpn10] vpn-target 10:1 both
    [VTEP3-evpn-instance-evpn10] quit
    [VTEP3] bridge-domain 10
    [VTEP3-bd10] vxlan vni 10
    [VTEP3-bd10] evpn binding vpn-instance evpn10
    [VTEP3-bd10] quit 
    [VTEP3] evpn vpn-instance evpn20 bd-mode
    [VTEP3-evpn-instance-evpn20] route-distinguisher 3:20
    [VTEP3-evpn-instance-evpn20] vpn-target 20:1 both
    [VTEP3-evpn-instance-evpn20] quit
    [VTEP3] bridge-domain 20
    [VTEP3-bd20] vxlan vni 20
    [VTEP3-bd20] evpn binding vpn-instance evpn20
    [VTEP3-bd20] quit 

  4. Configure a BGP EVPN peer relationship among VTEP1, VTEP2, and VTEP3.

    # Configure VTEP1.

    [VTEP1] bgp 100
    [VTEP1-bgp] router-id 10.1.1.1
    [VTEP1-bgp] peer 10.2.2.2 as-number 100
    [VTEP1-bgp] peer 10.2.2.2 connect-interface LoopBack1
    [VTEP1-bgp] peer 10.3.3.3 as-number 100
    [VTEP1-bgp] peer 10.3.3.3 connect-interface LoopBack1
    [VTEP1-bgp] l2vpn-family evpn
    [VTEP1-bgp-af-evpn] peer 10.2.2.2 enable
    [VTEP1-bgp-af-evpn] peer 10.3.3.3 enable
    [VTEP1-bgp-af-evpn] quit
    [VTEP1-bgp] quit

    # Configure VTEP2.

    [VTEP2] bgp 100
    [VTEP2-bgp] router-id 10.2.2.2
    [VTEP2-bgp] peer 10.1.1.1 as-number 100
    [VTEP2-bgp] peer 10.1.1.1 connect-interface LoopBack1
    [VTEP2-bgp] peer 10.3.3.3 as-number 100
    [VTEP2-bgp] peer 10.3.3.3 connect-interface LoopBack1
    [VTEP2-bgp] l2vpn-family evpn
    [VTEP2-bgp-af-evpn] peer 10.1.1.1 enable
    [VTEP2-bgp-af-evpn] peer 10.3.3.3 enable
    [VTEP2-bgp-af-evpn] quit
    [VTEP2-bgp] quit

    # Configure VTEP3.

    [VTEP3] bgp 100
    [VTEP3-bgp] router-id 10.3.3.3
    [VTEP3-bgp] peer 10.1.1.1 as-number 100
    [VTEP3-bgp] peer 10.1.1.1 connect-interface LoopBack1
    [VTEP3-bgp] peer 10.2.2.2 as-number 100
    [VTEP3-bgp] peer 10.2.2.2 connect-interface LoopBack1
    [VTEP3-bgp] l2vpn-family evpn
    [VTEP3-bgp-af-evpn] peer 10.1.1.1 enable
    [VTEP3-bgp-af-evpn] peer 10.2.2.2 enable
    [VTEP3-bgp-af-evpn] quit
    [VTEP3-bgp] quit

  5. Configure the destination address of the VXLAN tunnel on VTEP1, VTEP2, and VTEP3.

    # Configure VTEP1.

    [VTEP1] interface nve 1
    [VTEP1-Nve1] source 10.1.1.1
    [VTEP1-Nve1] vni 10 head-end peer-list protocol bgp
    [VTEP1-Nve1] vni 20 head-end peer-list protocol bgp
    [VTEP1-Nve1] quit

    # Configure VTEP2.

    [VTEP2] interface nve 1
    [VTEP2-Nve1] source 10.2.2.2
    [VTEP2-Nve1] vni 10 head-end peer-list protocol bgp
    [VTEP2-Nve1] vni 20 head-end peer-list protocol bgp
    [VTEP2-Nve1] quit

    # Configure VTEP3.

    [VTEP3] interface nve 1
    [VTEP3-Nve1] source 10.3.3.3
    [VTEP3-Nve1] vni 10 head-end peer-list protocol bgp
    [VTEP3-Nve1] vni 20 head-end peer-list protocol bgp
    [VTEP3-Nve1] quit

  6. Configure a Layer 3 VXLAN gateway on VTEP1.

    # Configure VTEP1.

    [VTEP1] interface vbdif 10
    [VTEP1-Nve1] ip address 192.168.10.1 24
    [VTEP1-Nve1] quit
    [VTEP1] interface vbdif 20
    [VTEP1-Nve1] ip address 192.168.20.1 24
    [VTEP1-Nve1] quit

  7. Verify configuration results.

    # After the preceding configuration, run the display vxlan vni and display vxlan tunnel commands on VTEP1, VTEP2, and VTEP3. You can view that the VNI state is up and VXLAN tunnel information is displayed. The following shows the result on VTEP2.

    [VTEP2] display vxlan vni
     VNI               BD-ID             State
     -----------------------------------------
     10                10                up
     20                20                up
     -----------------------------------------
     Number of vxlan vni bound to BD is : 2
    
     VNI               VRF-ID
     -----------------------------------------
     -----------------------------------------
     Number of vxlan vni bound to VPN is : 0
    
    [VTEP2] display vxlan tunnel
     Tunnel ID       Source              Destination         State     Type
     ----------------------------------------------------------------------------
     4026531842      10.2.2.2            10.1.1.1            up        l2 dynamic
     4026531841      10.2.2.2            10.3.3.3            up        l2 dynamic
     ----------------------------------------------------------------------------
     Number of vxlan tunnel : 
     Total : 2    Static: 0    L2 dynamic: 2    L3 dynamic: 0

    # After the configuration, users in the same network segment achieve Layer 2 interconnection. The following shows the result when Server1 VM1 pings Server3 VM1.

    C:\Users\VM1>ping 192.168.10.11
    
    Pinging 192.168.10.11 with 32 bytes of data:
    Reply from 192.168.10.11: bytes=32 time=1ms TTL=126
    Reply from 192.168.10.11: bytes=32 time=1ms TTL=126
    Reply from 192.168.10.11: bytes=32 time=1ms TTL=126
    Reply from 192.168.10.11: bytes=32 time=1ms TTL=126
    
    Ping statistics for 192.168.10.11:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 1ms, Maximum = 1ms, Average = 1ms
                                  

    # Users in different network segments achieve Layer 3 interconnection. The following shows the result when Server1 VM1 pings Server4 VM1.

    C:\Users\VM1>ping 192.168.20.11
    
    Pinging 192.168.20.11 with 32 bytes of data:
    Reply from 192.168.20.11: bytes=32 time=1ms TTL=126
    Reply from 192.168.20.11: bytes=32 time=1ms TTL=126
    Reply from 192.168.20.11: bytes=32 time=1ms TTL=126
    Reply from 192.168.20.11: bytes=32 time=1ms TTL=126
    
    Ping statistics for 192.168.20.11:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 1ms, Maximum = 1ms, Average = 1ms
                                  

Configuration Files

  • Configuration file of VTEP1

    #
    sysname VTEP1
    #
    evpn vpn-instance evpn10 bd-mode
     route-distinguisher 1:10
     vpn-target 10:1 export-extcommunity
     vpn-target 10:1 import-extcommunity
    #
    evpn vpn-instance evpn20 bd-mode
     route-distinguisher 1:20
     vpn-target 20:1 export-extcommunity
     vpn-target 20:1 import-extcommunity
    #
    bridge-domain 10
     vxlan vni 10
     evpn binding vpn-instance evpn10
    #
    bridge-domain 20
     vxlan vni 20
     evpn binding vpn-instance evpn20
    #
    interface GigabitEthernet0/0/1
     undo portswitch
     ip address 192.168.1.2 255.255.255.0
    #
    interface GigabitEthernet0/0/2
     undo portswitch
     ip address 192.168.2.1 255.255.255.0
    #
    interface LoopBack1
     ip address 10.1.1.1 255.255.255.255
    #
    interface Vbdif10
     ip address 192.168.10.1 255.255.255.0
    #
    interface Vbdif20
     ip address 192.168.20.1 255.255.255.0
    #
    interface Nve1
     source 10.1.1.1
     vni 10 head-end peer-list protocol bgp
     vni 20 head-end peer-list protocol bgp
    #
    bgp 100
     router-id 10.1.1.1
     peer 10.2.2.2 as-number 100
     peer 10.2.2.2 connect-interface LoopBack1
     peer 10.3.3.3 as-number 100
     peer 10.3.3.3 connect-interface LoopBack1
     #
     ipv4-family unicast
      undo synchronization
      peer 10.2.2.2 enable
      peer 10.3.3.3 enable
     #
     l2vpn-family evpn
      policy vpn-target
      peer 10.2.2.2 enable
      peer 10.3.3.3 enable
    #
    ospf 1 router-id 10.1.1.1
     area 0.0.0.0
      network 10.1.1.1 0.0.0.0
      network 192.168.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
    
  • Configuration file of VTEP2

    #
    sysname VTEP2
    #
    vcmp role silent
    #
    evpn vpn-instance evpn10 bd-mode
     route-distinguisher 2:10
     vpn-target 10:1 export-extcommunity
     vpn-target 10:1 import-extcommunity
    #
    evpn vpn-instance evpn20 bd-mode
     route-distinguisher 2:20
     vpn-target 20:1 export-extcommunity
     vpn-target 20:1 import-extcommunity
    #
    bridge-domain 10
     vxlan vni 10
     evpn binding vpn-instance evpn10
    #
    bridge-domain 20
     vxlan vni 20
     evpn binding vpn-instance evpn20
    #
    interface GigabitEthernet0/0/1
     undo portswitch
     ip address 192.168.1.1 255.255.255.0
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
    #
    interface GigabitEthernet0/0/2.1 mode l2
     encapsulation dot1q vid 10
     bridge-domain 10
    #
    interface GigabitEthernet0/0/2.2 mode l2
     encapsulation dot1q vid 20
     bridge-domain 20
    #
    interface LoopBack1
     ip address 10.2.2.2 255.255.255.255
    #
    interface Nve1
     source 10.2.2.2
     vni 10 head-end peer-list protocol bgp
     vni 20 head-end peer-list protocol bgp
    #
    bgp 100
     router-id 10.2.2.2
     peer 10.1.1.1 as-number 100
     peer 10.1.1.1 connect-interface LoopBack1
     peer 10.3.3.3 as-number 100
     peer 10.3.3.3 connect-interface LoopBack1
     #
     ipv4-family unicast
      undo synchronization
      peer 10.1.1.1 enable
      peer 10.3.3.3 enable
     #
     l2vpn-family evpn
      policy vpn-target
      peer 10.1.1.1 enable
      peer 10.3.3.3 enable
    #
    ospf 1 router-id 10.2.2.2
     area 0.0.0.0
      network 10.2.2.2 0.0.0.0
      network 192.168.1.0 0.0.0.255
    #
    return
    
  • Configuration file of VTEP3

    #
    sysname VTEP3
    #
    vcmp role silent
    #
    evpn vpn-instance evpn10 bd-mode
     route-distinguisher 3:10
     vpn-target 10:1 export-extcommunity
     vpn-target 10:1 import-extcommunity
    #
    evpn vpn-instance evpn20 bd-mode
     route-distinguisher 3:20
     vpn-target 20:1 export-extcommunity
     vpn-target 20:1 import-extcommunity
    #
    bridge-domain 10
     vxlan vni 10
     evpn binding vpn-instance evpn10
    #
    bridge-domain 20
     vxlan vni 20
     evpn binding vpn-instance evpn20
    #
    interface GigabitEthernet0/0/1
     undo portswitch
     ip address 192.168.2.2 255.255.255.0
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
    #
    interface GigabitEthernet0/0/2.1 mode l2
     encapsulation dot1q vid 10
     bridge-domain 10
    #
    interface GigabitEthernet0/0/2.2 mode l2
     encapsulation dot1q vid 20
     bridge-domain 20
    #
    interface LoopBack1
     ip address 10.3.3.3 255.255.255.255
    #
    interface Nve1
     source 10.3.3.3
     vni 10 head-end peer-list protocol bgp
     vni 20 head-end peer-list protocol bgp
    #
    bgp 100
     router-id 10.3.3.3
     peer 10.1.1.1 as-number 100
     peer 10.1.1.1 connect-interface LoopBack1
     peer 10.2.2.2 as-number 100
     peer 10.2.2.2 connect-interface LoopBack1
     #
     ipv4-family unicast
      undo synchronization
      peer 10.1.1.1 enable
      peer 10.2.2.2 enable
     #
     l2vpn-family evpn
      policy vpn-target
      peer 10.1.1.1 enable
      peer 10.2.2.2 enable
    #
    ospf 1 router-id 10.3.3.3
     area 0.0.0.0
      network 10.3.3.3 0.0.0.0
      network 192.168.2.0 0.0.0.255
    #
    return
    
  • Configuration file of Switch1

    #
    sysname Switch1
    #
    vlan batch 10 20
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 10 20
    #
    interface GigabitEthernet0/0/2
     port link-type access
     port default vlan 10
    #
    interface GigabitEthernet0/0/3
     port link-type access
     port default vlan 20
    #
    return
    
  • Configuration file of Switch2

    #
    sysname Switch2
    #
    vlan batch 10 20
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 10 20
    #
    interface GigabitEthernet0/0/2
     port link-type access
     port default vlan 10
    #
    interface GigabitEthernet0/0/3
     port link-type access
     port default vlan 20
    #
    return
    
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >