VLANs, Access and Trunking ports Cisco vs JunOS





VLANs Configuration


SW(config)#vlan {vlan-id}


SW(config-vlan)#name {Vlan-Name}


Example:
SW(config)#vlan 10 


SW(config-vlan)#name VLAN-10

VLANs Configuration


root@SW1#set vlans {vlan-name} vlan-id {vlan-id}


Example:
root@SW1#set vlans VLAN-10 vlan-id 61

Access Port Configuration


SW(config)#interface {inteface-name}
SW(config-if)#switch mode access
SW(config-if)#switch access vlan {vlan-no}


Example:
SW(config)#interface {inteface-name}
SW(config-if)#switch mode access
SW(config-if)#switch access vlan 10

Access Port Configuration


root@SW1#set interfaces {interface-name} unit 0 family ethernet-switching port-mode access


root@SW1#set interfaces {interface-name} unit 0 family ethernet-switching vlan members {vlan-name}


Example:
root@SW1#set interfaces unit 0 family ethernet-switching port-mode access


root@SW1#set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN-10

Trunk Port Configuration


SW(config)#interface {inteface-name}


SW(config-if)#switchport trunk encapsulation dot1q


SW(config-if)#switchport mode trunk


Example:
SW(config)#interface gigabitEthernet 0/0


SW(config-if)#switchport trunk encapsulation dot1q


SW(config-if)#switchport mode trunk

Trunk Port Configuration


root@SW1#set interfaces {interface-name} unit 0 family ethernet-switching port-mode trunk


root@SW1#set interfaces {interface-name} unit 0 family ethernet-switching vlan members {vlan-name or all}


Example:
root@SW1#set interfaces unit 0 family ethernet-switching port-mode access


root@SW1#set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members [VLAN-10 VLAN-20]


OR


root@SW1#set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members all

 

 

 

Comments