How to configure inter vlan routing in juniper switches.

Inter VLAN Routing in Juniper Switches:

Usually in an enterprise network or data center, we connect a switch to host or end user, which allows host to communicate each other with a single LAN.With the help of this host share common resources such as printers file servers, access servers and various applications to operatte business.It also enables wireless devices to connect to the LAN through wireless access points(WAPs).
The default configuration create a single VLAN and all traffic on the switch is a part of broadcast domain. If we create separate network segments, it reduces the load of a single broadcast domain as well as span of broadcast domain allows you to group related users and network resources without being limited by physical cabling or by the location of a network device in the building or on the LAN.

So, when we want to divide a large broadcast domain into smaller broadcast domain, we need to create VLAN. and to communicate various broadcast domains we need router for several vlan communications such as traffic engineering.

Juniper switches uses a routed VLAN interface(RVI) to perform routing functions, using it to rote data to other Layer 3 interfaces.


This configuration example creates two IP subnets, one for v100 VLAN and the second for the v200 VLAN. The switch bridges traffic within a VLAN. For traffic passing between two VLANs, the switch routes the traffic using a Layer 3 routing interface on which you have configured the address of the IP subnet.
  1. Create the VLAN by assigning it a name and a VLAN ID:
    [edit]
    user@switch# set vlans v100 vlan-id 100
    user@switch# set vlans v200 vlan-id 200

  2.    Assign an interface to the VLAN by specifying the logical interface (with the unit statement) and specifying the VLAN name as the member:<
    [edit]
    user@switch# set interfaces ge-0/0/16 unit 0 family ethernet-switching vlan members v100
    user@switch# set interfaces ge-0/0/17 unit 0 family ethernet-switching vlan members v100
    user@switch# set interfaces ge-0/0/18 unit 0 family ethernet-switching vlan members v200
    user@switch# set interfaces ge-0/0/19 unit 0 family ethernet-switching vlan members v200

  3.  Create the subnet for the VLAN’s broadcast domain:
    [edit]
    user@switch# set interfaces vlan unit 100 family inet address 192.0.0.1/24
    user@switch# set interfaces vlan unit 200 family inet address 192.0.2.1/24

  4. Layer 3 interfaces on trunk ports allow the interface to transfer traffic between multiple VLANs. Within a VLAN, traffic is bridged, while across VLANs, traffic is routed. Bind a Layer 3 interface with the VLAN:
    [edit]
    user@switch# set vlans v100 l3-interface vlan.100
    user@switch# set vlans v200 l3-interface vlan.200

Verification :
  • Issue "show interfaces vlan terse", "show vlan" or "show vlans brief" commands to display the configuration settings.  Samples output is shown below.
    user@switch> show interfaces vlan terse

    Interface               Admin Link Proto    Local                 Remote
    vlan                    up    up 
    vlan.100                up    up   inet     192.0.0.1/24
    vlan.200                up    up   inet     192.0.2.1/24


    [edit interfaces]
    user@switch# show vlan

    interfaces {
    vlan {
           unit 100 {
                family inet {
                      address 192.0.0.1/24;
                }
           unit 200 {
                family inet {
                      address 192.0.2.1/24;
                }



    user@switch> show vlans brief
    -------------------------------------------------------
    Name           Tag     Address             Ports
                                           Active/Total
    -------------------------------------------------------
    default        None    ---------           1/29
    v100           100     192.0.0.1/24        2/2
    v110           110     192.0.2.1/24        2/2

  • Confirm traffic is being switched between the VLANs.  The "show ethernet-switching table" Lists all the VLANs and their corresponding interface association in the switch's switching table:
    user@switch> show ethernet-switching table

    Ethernet-switching table: 8 entries, 4 learned

    VLAN           MAC address        Type         Age Interfaces
    default        *                  Flood        - All-members
    v100           *                  Flood        - All-members
    v100           00:19:e2:50:a4:a0  Static       - Router
    v200           *                  Flood        - All-members
    v200           00:19:e2:50:a4:a0  Static       - Router

  • List the Layer 3 routes in the switch's routing table to verify that routed VLANs interfaces are distributed
    user@switch> show route        

    inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    0.0.0.0/0         *[Static/5] 03:33:45
                                > to 172.30.36.1 via me0.0
    192.0.0.0/24      *[Direct/0] 03:35:42
                                > via vlan.100
    192.0.0.1/32      *[Local/0] 03:35:58
                                  Local via vlan.1
    192.0.2.0/24      *[Direct/0] 03:35:45
                                > via vlan.200

Comments