Layer 3 Logical Interfaces
Understanding Layer 3 Logical Interfaces
A Layer 3 logical interface is a logical division of a physical interface that operates at the network level and therefore can receive and forward 802.1Q VLAN tags. You can use Layer 3 logical interfaces to route traffic among multiple VLANs along a single trunk line that connects a Juniper Networks switch to a Layer 2 switch. Only one physical connection is required between the switches. .
You can also use Layer 3 logical interfaces to provide alternative gateway addresses for smart DHCP relay. The logical tunnel (lt) and virtual loopback tunnel (vt) interfaces are not supported in logical interfaces.
To create Layer 3 logical interfaces on a switch, enable VLAN tagging, partition the physical interface into logical partitions, and bind the VLAN ID to the logical interface.
We recommend that you use the VLAN ID as the logical interface number when you configure the logical interface. QFX Series and EX4600 switches support a maximum of 4089 VLANs, which includes the default VLAN. You can, however, assign a VLAN ID in the range of 1 to 4094, but five of these VLAN IDs are reserved for internal use.
VLAN tagging places the VLAN ID in the frame header, allowing each physical interface to handle multiple VLANs. When you configure multiple VLANs on an interface, you must also enable tagging on that interface. Junos OS on switches supports a subset of the 802.1Q standard for receiving and forwarding routed or bridged Ethernet frames with single VLAN tags and running Virtual Router Redundancy Protocol (VRRP) over 802.1Q-tagged interfaces.
Configuring a Layer 3 Logical Interface
Devices use Layer 3 logical interfaces to divide a physical interface into multiple logical interfaces, each corresponding to a VLAN. Layer 3 logical interfaces route traffic between subnets.
To configure Layer 3 logical interfaces, enable VLAN tagging and partition one or more physical ports into multiple logical interfaces, each corresponding to a VLAN ID.
Before you begin, make sure you set up your VLANs. See Configuring VLANs on Switches.
To configure Layer 3 logical interfaces:
- Enable VLAN tagging:
[edit interfaces interface-name]
user@switch# set vlan-tagging
- Bind each VLAN ID to a logical interface:
[edit interfaces interface-name]
user@switch# set unit logical-unit-number vlan-id vlan-id-number
Verifying That Layer 3 Logical Interfaces Are Working
After configuring Layer 3 logical interfaces, verify that they are set up properly and transmitting data.
- To determine if you have successfully created the logical
interfaces and the links are up:
user@switch> show interfaces interface-name terse
Interface Admin Link Proto Local Remote ge-0/0/0 up up ge-0/0/0.0 up up inet 10.0.0.1/8 ge-0/0/0.1 up up inet 10.0.0.2/8 ge-0/0/0.2 up up inet 10.0.0.3/8 ge-0/0/0.3 up up inet 10.0.0.4/8 ge-0/0/0.4 up up inet 10.0.0.5/8 ge-0/0/0.32767 up up
- Use the ping command from a device on one subnet
to an address on another subnet to determine if packets were transmitted
correctly on the logical interface VLANs:
user@switch> ping ip-address
PING 10.1.1.1 (184.108.40.206): 56 data bytes 64 bytes from 10.1.1.1: icmp_seq=0 ttl=64 time=0.157 ms 64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.238 ms 64 bytes from 10.1.1.1: icmp_seq=2 ttl=64 time=0.255 ms 64 bytes from 10.1.1.1: icmp_seq=3 ttl=64 time=0.128 ms --- 10.1.1.1 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss
The output confirms that the logical interfaces have been created and the links are up.