JNCIS - SWITCH - 2 - Virtual Networks
JNCIS - SWITCH - 2 - Virtual Networks
PORTS IN JUNOS
DEFAULT VLAN
All switch ports not specifically assigned to a user-defined VLAN belong to default VLAN
{master:0}[edit]
root# set vlans default vlan-id 100
{master:0}
root> show vlans
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*,
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,
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
creating VLANs:
[edit]
set vlans v10 vlan-id 10
set vlans v20 vlan-id 20
{master:0}[edit]
user@Switch-1# show vlans
v10 {
vlan-id 10;
}
v20 {
vlan-id 20;
}
[edit]
set interfaces ge-0/0/6 unit 0 family ethernet-switching port-mode access
set interfaces ge-0/0/6 unit 0 family ethernet-switching vlan members v10
{maste:0}[edit]
user@Switch-1# show interfaces ge-0/0/6
unit 0 {
family ethernet-switching {
port-mode access;
vlan {
members v10;
}
}
Same task accomplished.
}
Configuration should be
done in one place to
The same configuration (assigning port to VLAN) can be accomplished under [edit vlans]:
preserve consistency.
{master:0}[edit vlans]
user@Switch-1# show
v10 {
vlan-id 10;
interface {
ge-0/0/8.0;
}
}
v20 {
vlan-id 20;
interface {
ge-0/0/9.0;
}
}
{master:0}[edit]
user@Switch-1# show interfaces ge-0/0/7
unit 0 {
family ethernet-switching {
port-mode trunk;
vlan {
members [ v10 v20 ];
}
}
}
{master:0}[edit vlans]
user@Switch-1# show
v10 {
vlan-id 10;
interface {
ge-0/0/12.0;
}
}
v20 {
vlan-id 20;
interface {
ge-0/0/12.0;
}
}
access port accepts both tagged (voice) and untagged (data) frames
[edit ethernet-switching-options]
show
voip {
interface (access-ports | interface-name) {
vlan (vlan-name | vid);
forwarding-class CLASS;
}
}
[edit ethernet-switching-options]
show
voip {
interface ge-0/0/6.0 {
vlan voice;
forwarding-class assured-forwarding;
}
}
[edit]
show
interfaces ge-0/0/6 {
unit 0 {
family ethernet-switching {
port-mode access;
vlan {
members data;
}
}
}
}
[edit]
show
interfaces ge-0/0/12 {
unit 0 {
family ethernet-switching {
port-mode trunk;
vlan {
members [ data voice ];
}
}
}
}
MONITORING VOICE VLAN
Trunk ports only send tagged traffic by default. If there is a need to forward also untagged traffic: native-vlan-id
[edit interfaces]
show ge-0/0/12
unit 0 {
family ethernet-switching {
port-mode trunk;
vlans {
members [ v14 v15 ];
}
native-vlan-id default;
}
}
RVI – ROUTED VLAN INTERFACE
routed VLAN interface (RVI) is a logical L3 interface defined that facilitates inter-VLAN routing
[edit]
show interfaces vlan
unit 14 {
family inet {
address 172.23.14.1/24;
}
}
unit 15 {
family inet {
address 172.23.15.1/24;
}
}
unit 16 {
family inet {
address 172.23.16.1/24;
}
}
[edit]
show vlans
v14 {
vlan-id 14;
interface {
ge-0/0/6.0;
ge-0/0/7.0;
}
l3-interface vlan.14; < RVI is associated with vlan
}
v15 {
vlan-id 15;
interface {
ge-0/0/8.0;
ge-0/0/9.0;
}
l3-interface vlan.15; < RVI is associated with vlan
}
v16 {
vlan-id 16;
interface {
ge-0/0/10.0;
ge-0/0/11.0;
}
l3-interface vlan.16; < RVI is associated with vlan
}
RVI must be associated with a VLAN and that VLAN must have at least one operational Layer 2 interface before the RVI becomes
operational