Difference between revisions of "Trunking incoming VLANs on uplink port to all other ports"

From Notes_Wiki
m
m
Line 63: Line 63:
#:</pre>
#:</pre>
#: Intentionally kept second last port (22) out of above configuration to configure it as aggregate ethernet (LACP) later on
#: Intentionally kept second last port (22) out of above configuration to configure it as aggregate ethernet (LACP) later on
 
# Optionally set native interface on host ports:
#:<pre>
#:: interfaces interface-range host-ports native-vlan-id 12
#:</pre>






[[Main Page|Home]] > [[Switch configuration notes]] > [[Trunking incoming VLANs on uplink port to all other ports]]
[[Main Page|Home]] > [[Switch configuration notes]] > [[Trunking incoming VLANs on uplink port to all other ports]]

Revision as of 05:05, 19 May 2022

Home > Switch configuration notes > Trunking incoming VLANs on uplink port to all other ports

If the Juniper switch is being used as ToR (and not L3) and we need to forward all the incoming VLANs from uplink port to hosts ports (Typically for virtualization) then we can use following steps:

  1. Ideally configure RSTP (Assuming same is used by other network devices also)
    set protocols rstp interface all
    https://www.juniper.net/documentation/us/en/software/junos/stp-l2/topics/topic-map/spanning-tree-configuring-rstp.html
  2. Create required VLANs using
    set vlans <vlan-name> vlan-id <vlan-id>
    For example
    set vlans IT-Management vlan-id 12
    set vlans User-Management vlan-id 13
    set vlans VDI-2019-users vlan-id 14
    set vlans VDI-IoT-users vlan-id 15
    set vlans VDI-Graphics-users vlan-id 16
    set vlans VDI-shared vlan-id 18
    set vlans vsan vlan-id 22
    set vlans vmotion vlan-id 23
    set vlans vxrail1 vlan-id 3939
    set vlans vxrail2 vlan-id 4091
  3. Create IP (L3 interface) on one of the VLANs for in-band management using
    set interfaces irb.<sub-interface-no> family inet address <ipv4-ip/subnet>
    set interface irb.<sub-interface-no> family inet mtu 9150
    set vlans <vlan-name> l3-interface irb.<sub-interface-no>
    It is not necessary for irb.subinterface no. to match vlan-id, however making both same makes things simpler / clearer
    Setting MTU to 9150 assuming Jumbo frames are required
    For example
    set interfaces irb.12 family inet address 10.2.12.14/24
    set interface irb.12 family inet mtu 9150
    set vlans IT-Management l3-interface irb.12
  4. Configure gateway based on L3-interface configured:
    set routing-options static route <destination-network/subnet> next-hop <gateway-ip>
    For example:
    set routing-options static route 0.0.0.0/0 next-hop 10.2.12.1
  5. Configure Uplink port with all VLANs trunk:
    set interfaces xe-0/0/23 description "Uplink port"
    set interfaces xe-0/0/23 unit 0 family ethernet-switching interface-mode trunk
    set interfaces xe-0/0/23 unit 0 family ethernet-switching vlan members all
    set interfaces xe-0/0/23 mtu 9216
    Setting mtu to 9216 assuming Jumbo frames are required
    Here assumed port 23 (last port) as uplink port.
  6. Create interface range with other ports
    set interfaces interface-range host-ports member-range xe-0/0/0 to xe-0/0/21
    set interfaces interface-range host-ports mtu 9216
    set interfaces interface-range host-ports unit 0 family ethernet-switching interface-mode trunk
    set interfaces interface-range host-ports unit 0 family ethernet-switching vlan members all
    Intentionally kept second last port (22) out of above configuration to configure it as aggregate ethernet (LACP) later on
  7. Optionally set native interface on host ports:
    interfaces interface-range host-ports native-vlan-id 12


Home > Switch configuration notes > Trunking incoming VLANs on uplink port to all other ports