Thursday, February 3, 2011

TO CREATE THE VLAN ON MULTIPLE LAN

Cisco IOS #config t
Cisco IOS(config) #int range GigabitEthernet3/1 - 24
Cisco IOS(config-if) #switchport access vlan7
Cisco IOS(config-if) #end
Cisco IOS # show vlan

Tuesday, February 1, 2011

From configuration mode create the VLAN and add access interface to it:

root> configure
Entering configuration mode

[edit]
root# set vlans vlan-id
root# set interfaces ge-0/0/.0 family ethernet-switching port-mode access vlan members
root# commit




Verify the VLAN and interface:

root# run show vlans
-------------------------------------------------------
Name Tag Adress Ports
Active/Total
-------------------------------------------------------
bar 67 --------- 0/0
default None --------- 3/5
foo 66 --------- 1/1


root# run show ethernet-switching table except :

VLAN MAC address Type Age Interfaces
foo * Flood - ge-0/0/5.0
bar * Flood - ge-0/0/16.0, ge-0/0/15.0
default * Flood - ge-0/0/0.0, ge-0/0/1.0, ge-0/0/2.0


root# run show ethernet-switching interfaces
Interface Index State VLAN members
ge-0/0/0.0 69 UP default
ge-0/0/1.0 70 UP default
ge-0/0/5.0 71 UP foo


root# show ethernet-switching interfaces detail
Interface: ge-0/0/0.0 Index: 69
State: UP
Vlans: default(untagged)

Interface: ge-0/0/1.0 Index: 70
State: UP
Vlans: default(untagged)

Interface: ge-0/0/5.0 Index: 71
State: UP
Vlans: foo(untagged)
Configure the TRUNK and add VLAN that was created in previous steps:

root# set interfaces ge-0/0/.0 family ethernet-switching port-mode trunk [native-vlan-id ] vlan members [ whitespace separated list of vlan names or IDs ]

root# commit
Verify the TRUNK and the VLAN members for this trunk:

root# run show interfaces ge-0/0/.0
Flags: Trunk-Mode <---

root# run show ethernet-switching interfaces
Interface Index State VLAN members
ge-0/0/2.0 71 UP my-vlan, mydefault, pfetest