Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Configuring a Layer 3 VLAN Interface 

...

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

Note
  • 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.


Code Block
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
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# set vlan-interface interface vlan-2 vif vlan-2 address 192.168.1.1 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan-3 vif vlan-3 address 192.168.2.1 prefix-length 24
admin@XorPlus# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# run show vlan-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# 

...