Layer 3 VLAN Interface Configuration

Configuring a Layer 3 VLAN Interface 

The Layer 3 interface is a VLAN interface. Use the following configuration sequence:

  1. Create a VLAN using the set vlans vlan-id command.
  2. Associate an L3 interface with the VLAN using the set vlans vlan-id l3-interface command.
  3. Configure the IP address and prefix length for the virtual interface using the set l3-interface vlan-interface address prefix-length command.

  • When all the interfaces in a VLAN are link-down, the VLAN interface will be link-down. The VLAN interface will be link-up only when at least one of the member interfaces is link-up.
  • Enable IP routing function before using this feature, for details please refer to Configuring IP Routing.
admin@XorPlus# set vlans vlan-id 2
admin@XorPlus# set vlans vlan-id 3
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 3
admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2
admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3
admin@XorPlus# commit
Commit OK.
Save done.
admin@XorPlus# set l3-interface vlan-interface vlan-2 address 192.168.1.1 prefix-length 24
admin@XorPlus# set l3-interface vlan-interface vlan-3 address 192.168.2.1 prefix-length 24
admin@XorPlus# commit
Commit OK.
Save done.
admin@XorPlus# run show l3-interface
vlan-2 Hwaddr C8:0A:A9:9E:14:9F, Vlan:2, State:DOWN 
Inet addr: 192.168.1.1/24
fe80::ca0a:a9ff:fe9e:149f/64
Traffic statistics:
IPv4 Input Packets............................0
IPv4 Forwarding Packets.......................0
IPv6 Input Packets............................0
IPv6 Forwarding Packets.......................0 
vlan-3 Hwaddr C8:0A:A9:9E:14:9F, Vlan:3, State:UP 
Inet addr: 192.168.2.1/24
fe80::ca0a:a9ff:fe9e:149f/64
Traffic statistics:
IPv4 Input Packets............................0
IPv4 Forwarding Packets.......................0
IPv6 Input Packets............................0
IPv6 Forwarding Packets.......................0 
admin@XorPlus# 

Configuring the MTU

  • When the MTU value is less than 1280 bytes, it will affect the normal functioning of IPv6. Therefore, set the MTU value of the VLAN interface to be greater than or equal to 1280 bytes for IPv6 to function normally.

  • When modifying the MTU from a value less than 1280 bytes to a value greater than or equal to 1280 bytes, you need to restart the switch to resume the normal functioning of IPv6.

admin@Xorplus# set l3-interface vlan-interface vlan-2 mtu 2000
admin@XorPlus# commit
Commit OK.
Save done.

Configuring the Rate Limiting

L3 VLAN interface rate limit is applied to packets delivered out from the CPU, controlling shock of large flow on CPU, releasing the burden on CPU.

admin@Xorplus# set l3-interface vlan-interface vlan200 rate-limit 1024
admin@XorPlus# commit
Commit OK.
Save done.

Configuring 31-bit Prefixes IPv4 Address

PicOS supports configuring 31-bit prefixes on IPv4 point-to-point links. The point-to-point link has only two endpoints and broadcast support is not required. Two addresses in the subnet with 31-bit address prefix (the address with host ID all 0 and the address with host ID all 1) are allocated to the point-to-point hosts. For more details, refer to RFC 3021.

The following example commands configure the 31-bit prefixes IPv4 addresses 192.168.100.4 and 192.168.100.5 respectively on two switches for the point-to-point connected L3 interfaces.

#On Switch 1
admin@Switch1# set l3-interface vlan-interface vlan10 address 192.168.100.4 prefix-length 31
admin@Switch1# commit


#On Switch 2
admin@Switch2# set l3-interface vlan-interface vlan10 address 192.168.100.5 prefix-length 31
admin@Switch2# commit


Copyright © 2024 Pica8 Inc. All Rights Reserved.