VirtualLocalAreaNetworks Juniper
VirtualLocalAreaNetworks Juniper
LY
N
O
SE
U
AL
N
R
TE
IN
Virtual Local Area Networks
LY
N
O
SE
U
AL
VLAN Defined
N
A virtual LAN (VLAN) is a collection of network nodes that are logically grouped together to form
separate broadcast domains. A VLAN has the same general attributes as a physical LAN, but it allows
R
all nodes for a particular VLAN to be grouped together, regardless of physical location. One
advantage of using VLANs is design flexibility. VLANs allow individual users to be grouped based on
TE
business needs. Connectivity within a VLAN is established and maintained through software
configuration, which makes VLANs such a dynamic and flexible option in today’s networking
environments.
IN
LY
N
O
SE
U
AL
Layer 2 interfaces can be assigned to operate in either access or trunk mode. By default, all installed
switch ports on an EX Series switch are configured as access ports. These same switch ports are
R
associated with the default VLAN, which is an untagged VLAN. We discuss the port modes and
default VLAN in more detail on subsequent slides in this material.
TE
IN
LY
N
O
SE
U
AL
Access Ports
N
As shown in the illustration on the slide, access ports typically connect to end-user devices such as
computers, IP phones, and printers. Access ports typically belong to a single VLAN and send and
R
receive untagged Ethernet frames. We will discuss the voice VLAN, which is an exception to this
operational norm, in a later section in this material. All installed switch ports default to access mode
TE
LY
N
O
SE
U
AL
Trunk Ports
N
A trunk port typically connects to another switch or to an edge router. Interfaces configured for trunk
mode handle traffic for multiple VLANs, multiplexing the traffic for all configured VLANs over the
R
same physical connection, and separating the traffic by tagging it with the appropriate VLAN ID.
Trunk ports can also carry untagged traffic when configured with the native-vlan-id statement.
TE
LY
N
O
SE
U
AL
This and the next two slides illustrate the basic steps involved in sending traffic through a switched
network where both access and trunk ports are used. On this slide we see that User A is sending
R
traffic toward User C through Switch-1 and Switch-2. As the traffic arrives at Switch-1, the frames are
untagged. In this example we assume that both Switch-1 and Switch-2 already have the MAC
TE
LY
N
O
SE
U
AL
Switch-1 examines the source and destination MAC addresses and performs a lookup in its bridge
table to determine how the frames should be handled. Switch-1 finds a matching entry for the
R
destination MAC address in its bridge table, tags each Ethernet frame with VLAN-ID 10, and forwards
the tagged frames out the appropriate egress interface; the trunk port connected to Switch-2 in this
TE
case.
IN
LY
N
O
SE
U
AL
Once Switch-2 receives the frames, it examines the source and destination MAC addresses and
performs a lookup in its bridge table to determine how the frames should be forwarded. Switch-2
R
finds a matching entry for the destination MAC address, removes the tag from each Ethernet frame,
and forwards the untagged frames out the appropriate egress interface; the access port connected
TE
LY
N
O
SE
U
AL
Default VLAN
N
The factory-default configuration associates all installed interfaces with the default VLAN. In this
sample output shown on the slide we can see that the default VLAN does not use an 802.1Q tag.
R
Because all installed interfaces are pre-configured for Layer 2 operations and are associated with
the default VLAN, you can simply insert an EX Series switch in basic single-broadcast domain
TE
environments without much or any configuration. If multiple broadcast domains are required within a
single switch, you must define additional VLANs.
Continued on next page.
IN
{master:0}[edit]
root# commit and-quit
configuration check succeedscommit complete
Exiting configuration mode
{master:0}
root> show vlans
LY
Name Tag Interfaces
default 100
ge-0/0/0.0, ge-0/0/1.0, ge-0/0/2.0, ge-0/0/3.0,
ge-0/0/4.0, ge-0/0/5.0, ge-0/0/6.0*, ge-0/0/7.0*,
ge-0/0/8.0*, ge-0/0/9.0*, ge-0/0/10.0*, ge-0/0/11.0*,
N
ge-0/0/12.0*, ge-0/0/13.0*, ge-0/0/14.0*, ge-0/0/15.0*,
ge-0/0/16.0, ge-0/0/17.0, ge-0/0/18.0, ge-0/0/19.0,
O
ge-0/0/20.0, ge-0/0/21.0, ge-0/0/22.0, ge-0/0/23.0,
xe-0/1/0.0
SE
U
AL
N
R
TE
IN
LY
N
O
SE
U
AL
N
LY
N
O
SE
U
AL
Configuring VLANs
N
This slide shows the required VLAN definitions for our case study. Note that additional configuration
options are available under the [edit vlans] hierarchy level:
R
{master:0}[edit]
user@Switch-1# set vlans v10 ?
TE
Possible completions:
<[Enter]> Execute this command
+ apply-groups Groups from which to inherit configuration data
+ apply-groups-except Don't inherit configuration data from these groups
IN
LY
N
O
SE
U
AL
The sample configuration shown on the slide illustrates one method you can use to associate an
interface with a VLAN. Note that the illustrated method is the same method used by the J-Web user
R
interface. Because Layer 2 interfaces default to access mode, including the port-mode access
statement is not strictly required. You can also associate interfaces with VLANs under the [edit
TE
vlan-id 10;
interface {
ge-0/0/8.0;
}
}
v20 {
vlan-id 20;
interface {
ge-0/0/9.0;
}
}
Both methods accomplish the same task. We recommend you use a consistent method when
associating interfaces with VLANs to avoid configuration errors and confusion.
LY
N
O
SE
U
AL
This slide shows the configuration required for the trunk ports on Switch-1 and Switch-2. Here you
can see the trunk port-mode option in use and both of the defined VLANs assigned to this
R
interface.
Optionally, you can use the keyword all to associate all configured VLANs with a given trunk port.
TE
The following example accomplishes the same goal as the configuration shown on the slide:
{master:0}[edit interfaces ge-0/0/12]
user@Switch-1# show
unit 0 {
IN
family ethernet-switching {
port-mode trunk;
vlan {
members all;
}
}
}
Continued on next page.
LY
vlan-id 20;
interface {
ge-0/0/12.0;
}
}
N
Because Layer 2 interfaces default to the access port-mode, you must specify the trunk port-mode
option for trunk interfaces regardless of the configuration method you choose. If you omit the
O
port-mode trunk statement or attempt to associate an access interface with multiple standard
VLANs, you will see the following error when attempting to activate the configuration:
{master:0}[edit interfaces ge-0/0/12]
user@Switch-1# show
unit 0 {
family ethernet-switching {
vlan {
members [ v10 v20 ];
SE
U
}
}
}
AL
LY
N
O
SE
U
AL
You can use the show vlans command to verify VLAN assignments and other details. Optionally
you can filter the output or increase the amount of detail generated by adding options to the show
R
vlans command. The available options are shown in the following output:
{master:0}
TE
LY
N
O
SE
U
AL
What If ...?
N
This slide presents a common implementation scenario where two end-user devices, an IP phone
and a PC, are connected to a single switch port. In this implementation, it is typically recommended
R
to separate the data and voice traffic so that differing levels of service can be provided by network
devices, such as switches and routes, throughout the network.
TE
The next several slides introduce the voice VLAN configuration option, which can be used to address
this exact situation.
IN
LY
N
O
SE
U
AL
Voice VLAN
N
Typically, network administrators choose to treat VoIP traffic differently from user data traffic. To
treat these types of traffic differently, you must be able to separate common user data traffic from
R
voice traffic. The voice VLAN feature is used for this purpose. The voice VLAN enables a single access
port to accept untagged data traffic as well as tagged voice traffic and associate each type of traffic
TE
with distinct and separate VLANs. By doing this, a network’s class-of-service (CoS) implementation
can treat voice traffic differently, generally with a higher priority than common user data traffic. CoS
is outside the scope of this material.
You can use LLDP-MED to dynamically provide the voice VLAN ID and 802.1p values to the attached
IN
IP phones. This dynamic method associates each IP phone with the appropriate voice VLAN and
assigns the necessary 802.1p values, which are used by CoS, to differentiate service for voice traffic
within a network. Note that LLDP-MED is not strictly necessary to associate the voice VLAN ID and
802.1p values with an IP phone. With most vendors, you can manually assign these values to the IP
phone directly without the use of LLDP-MED. LLDP-MED is outside the scope of this material.
LY
N
O
SE
U
AL
This slide illustrates the basic hierarchy structure along with the available configuration options
associated with the voice VLAN feature.
R
TE
IN
LY
N
O
SE
U
AL
This slide provides a more complete configuration example based on our sample topology which is
also shown on this slide.
R
TE
IN
LY
N
O
SE
U
AL
This slide illustrates the expected output based on our sample configuration shown on the previous
slide. Here you can see that the access port (ge-0/0/6.0) is associated with the data and voice
R
VLANs.
TE
IN
LY
N
O
SE
U
AL
What If ...?
N
The default behavior on EX Series switches for trunk ports is to only send and receive tagged traffic.
This means that you cannot assign an untagged VLAN, such as the default VLAN, to a trunk port. The
R
vlan {
members [ v14 v15 default ];
}
}
}
{master:0}[edit]
user@Switch-1# commit
error: Trunk interface ge-0/0/12.0 should not have a vlan default with tag value 0
error: configuration check-out failed
So, what can you do if you needed to pass untagged Layer 2 traffic through trunk ports? You must
use the native-vlan-id configuration option. We cover the native-vlan-id option
throughout the remainder of this section.
LY
N
O
SE
U
AL
As previously mentioned, a trunk port typically connects one switch to another switch or to an edge
router. Interfaces configured for trunk mode handle traffic for multiple VLANs, multiplexing the traffic
R
for all configured VLANs over the same physical connection, and separating the traffic by tagging it
with the appropriate VLAN ID. Trunk ports can also carry untagged traffic when configured with the
TE
native-vlan-id configuration option. This option must be enabled on all trunk ports expected to
pass untagged traffic. Note that in some vendor’s implementation, the native VLAN (also referred to
as the default VLAN) is tagged (typically with VLAN-ID 1).
IN
LY
N
O
SE
U
AL
A Configuration Example
N
This slide provides a configuration example using the native-vlan-id option for the trunk ports
that connect Switch-1 and Switch-2. With this configuration, the ge-0/0/12 interfaces are configured
R
as a trunk ports and are able to carry tagged traffic for the v14 and v15 VLANs as well as untagged
traffic for the default VLAN.
TE
IN
LY
N
O
SE
U
AL
This slide shows the current VLAN assignments on Switch-1. Although not shown on the slide,
Switch-2 has a similar set of VLAN assignments. In this sample output we see that the access port
R
(ge-0/0/10.0) and the trunk port (ge-0/0/12.0) are now associated with the default VLAN. With
this setup in place, host-a1 and host-a2, should now be able to communicate through the switched
TE
network.
IN
LY
N
O
SE
U
AL
What Is an RVI?
N
A routed VLAN interface (RVI) is a logical Layer 3 VLAN interface used to route traffic between VLANs.
The Layer 3 vlan interface functions as the gateway IP address for end-user devices on the subnet
R
associated with the corresponding VLAN. Note that proper routing information must exist on the
end-user devices, which typically comes in the form of a default gateway.
TE
The following slides provide a configuration and monitoring example for an RVI.
IN
LY
N
O
SE
U
AL
Implementing RVIs
N
As indicated on the slide, RVIs are typically implemented in either the aggregation layer or the access
layer, depending on the network design and implementation. All EX Series switches support RVIs as
R
well as other Layer 3 routing operations. Check your platform specific documentation for support
details.
TE
IN
LY
N
O
SE
U
AL
The slide displays the topology and objectives for our case study.
R
TE
IN
LY
N
O
SE
U
AL
Configuring RVIs
N
The slide shows the RVI configuration required on Switch-1. The vlan.14, vlan.15 and vlan.16 RVIs
function as gateways for VLANs v14, v15, and v16 respectively. Although not shown in this example,
R
the access interfaces on Switch-1 that connect to the three VLANs must also be properly configured
to permit communications.
TE
IN
LY
N
O
SE
U
AL
This slide shows the association previously defined RVIs with their respective VLANs. This
association allows the referenced RVIs to provide Layer 3 services to end-user devices participating
R
on the three VLANs displayed on the slide. Inter-VLAN routing cannot occur without this RVI to VLAN
association. As mentioned on the slide, an RVI must be associated with a VLAN and that VLAN must
TE
have at least one operational Layer 2 interface before the RVI becomes operational.
IN
LY
N
O
SE
U
AL
This slide illustrates the commands and a sample output showing the desired interface state for the
RVIs and the Layer 2 interfaces associated with the VLANs defined on the previous slide.
R
TE
IN
LY
N
O
SE
U
AL
This slide shows the command used to verify the proper routing information is present on Switch-1
as well as the command used to test reachability between VLANs.
R
TE
IN