PRINCIPLE:
MR. SIR ILYAS SAIB
it park online timergara
Cisco Switch command
Contents
VLAN (virtual local area network)................................................................................................................................................................................ 2
Show VLAN.................................................................................................................................................................................................................. 3
How to make more VLAN in one time.......................................................................................................................................................................... 3
how to add many members in one time in VLAN........................................................................................................................................................3
How to make VLAN directly......................................................................................................................................................................................... 4
VLAN and Trunking...................................................................................................................................................................................................... 4
Show interface trunk................................................................................................................................................................................................... 6
native VLAN................................................................................................................................................................................................................. 6
Inter VLAN routing....................................................................................................................................................................................................... 6
STP (spanning tree protocol)....................................................................................................................................................................................... 9
EtherChannel............................................................................................................................................................................................................. 14
Show spanning tree................................................................................................................................................................................................... 17
Show EtherChannel................................................................................................................................................................................................... 17
Show EtherChannel summery.................................................................................................................................................................................... 17
VTP............................................................................................................................................................................................................................. 17
Port security............................................................................................................................................................................................................... 20
VLAN (virtual local area network)
Vlan concept.
1. Broad casting
In switch for the first-time broad cast the message we in (VLAN) limit broadcast the message.
b/c it’s burden on link.
Main (maqsad) to reduce the burden on link.
2. Communication HR to HR and IT to IT and SALE to SALE concepts.
i.e., we have an organization in have 3 department
HR and IT and SALE department.
In VLAN we limit this department, that HR department communication with HR and IT communication with IT
and HR department communication with HR.
Conclusion.
In VLAN we divide the switch virtually in 3 part this division called VLAN
3. How many VLAN in switch
We have total (0-4095) mean 4096 VLAN.
1. (0 and 4095) reserve for something.
2. (1- 1001) general VLAN
3. (1) by default, all interfaces in VLAN 1
4. (1002,1003,1004,1005) reserve for old technology. (1002) FFDI and (1003) token ring and (1004) FFDI ring and (1005)
TRNET reserve.
5. (1006-4094) extended VLAN. We use but VLAN says extend VLAN.
Starting VLAN configuration.
For the first time we create the VLAN
STEP 1
1) VLAN ?
2) Will show you VLAN number. Select any number.
3) VLAN 10
4) Name HR
5) Exit
On this process we will makes a lot of VLAN
Step 2
Now we will add deferent department in deferent VLAN
1) Interface fast ethernet 0/1
2) Switchport mode access
3) Switch port access VLAN 10
Now interface fast Ethernet 0/1 member of VLAN 10
Note on this process will make VLANS and adding the department interfaces.
Show VLAN
Will show you all VLAN.
How to make more VLAN in one time
VLAN 40-50 OR
VLAN 40-50,55,65,77, in b/w number will skip is will i.e. (50-55,55-65,65-77)
Conclusion I make 10 VLAN in one time
Note but this command is not supported in cisco packet racer.
how to add many members in one time in VLAN
When we add more then one interface then will write range command
1. Interface range fast Ethernet 0/13-14. to unlimited select OR
With this command from 0 interface to 14 interface all add.
Interface range fast ethernet 0/13, fast ether net 0/14
With this command only 13 and 14 interface add.
2. Switchport mode access
3. Switchport access VLAN 10.
How to make VLAN directly
Now we have no VLAN
1. Interface fast Ethernet 0/1
2. Switch port mode access
3. Switch port access VLAN 50 (will give the message VLAN 50 is not present but I make and interface fa 0/1 add)
Note in before we have no VLAN but after this configuration VLAN 50 create, and interface fast ethernet 0/1
add.
VLAN and Trunking
Tunking is a protocol or configuration on which we communicate two VLAN’S same of same department with each
other. OR
When we configure a cable thus cable convert to trunk cable thus process called trunking.
Without trunk cable don’t communicate two VLAN’S with each other.
And trunk cable is not the number of anyone VLAN’s but leads every vlans traffic.
And it’s not important to add trunk in same interface of cable.
Encapsulate concept
When any traffic goes from vlan 1 to vlan 2 . where put tag of this vlan. Thus tag Is in the form of encapsulate.
After reached of this vlan 1 traffic to valn 2 then thus tag is convert to de-encapsulate form.
Encapsulation type.
1. (ILS)
Inter link switch
Cisco priority
Only work on cisco devices.
Don’t use b/c only work on cisco devices.
2. 1Q. OR DOT.1Q OR 802. 1Q (ALL SAME)
Configuration
Industrial standard
Made (IEEE) institute of electrical electronic engineer.
IEEE is a organization thus organization which one protocol made This organization
protocol industrial standard . mean work on all devices like cisco , juniper, Hawaii.
Trunking configuration.
i.e. we have this one topolog of two different VLAN’S
Switch 1
1. Interface fast ethernet 0/5 (b/w two switch cables)
If interface different not importance
2. Switch port mode TRUNK
Now trunk formed.
OR
1. Interface fast ethernet 0/5
2. Switchport trunk encapsulation dot1q
3. Switch port mode trunk
Switch 2
1. Interface fast ethernet 0/5
2. Switch port mode TRUNK
now trunk formed.
Then write show interface trunk. will show us trunk interface.
OR
1. Interface fast ethernet 0/5
2. Switchport trunk encapsulation dot1q
3. Switch port mode trunk
Show interface trunk
show us trunk
native VLAN
untage traffic
Inter VLAN routing
Concept
to communicate two different VALAN with each other.
inter VLAN routing must be layer 3 device MLS (multi later switch) or Router
Inter VLAN configuration
inter VLAN routing must be layer 3 device MLS (multi later switch) or Router.
On router configuration.
b/w Router and switch connect with trunk.
Step 1
1. before inter vlan routing basic configuration don.
2. Trunking configuration is will.
Step 2
i.e. we have two VLAN’S (1) 10 and (2) 20
Between router and switch select trunk cable must.
1. Interface fast ethernet 0/0
2. No shutdown
3. Ex then again select 0/0 interface.
4. Interface fast ethernet 0/0? (0-419) sub interface will crate
5. Interface fast ethernet 0/0.10 (.10 is VLAN)
6. Encapsulation dot1q 10 (10 is VLAN)
7. Ip add [Link] [Link]
8. No shutdown
Step 3.
Again, select router this one interface 0/0
1. Select trunk cable fast ethernet 0/0
2. No shutdown
3. Exit. then again select 0/0 interface.
4. Interface fast ethernet 0/0.20 (20 VLAN)
5. Encapsulate dot1 20 (20 VLAN)
6. Ip add [Link] [Link]
7. No shutdown
8. Ex
Note
after inter vlan routing assign gateway and Ip to all PC’S
Show ip interface brief.
will show you sub interface is created.
On MLS configuration.
MLS multi-layer switch
NOTE
After inter VLAN configuration on MLS will must apply (IP routing) command b/c to MLS start router
support.
Without this command this configuration don’t work on MLS.
Step 1
1. Basic configuration of VLAN
2. Trunk configuration.
Step 2
i.e., we have two VLAN 10 AND 20
1. interface V 10
2. IP add [Link] [Link]
3. No shutdown
Step 3
1. Interface V 20
2. Ip add [Link] [Link]
3. No shutdown
After this apply this IP 10 and 20 to 10 and 20 VLAN PC’S
NOTE
After inter VLAN configuration on MLS will must apply (IP routing) command b/c to MLS start router
support.
Without this command this configuration don’t work on MLS.
Show ip interface brief show us sub interfaces created.
STP (spanning tree protocol)
STP avoid loop b/w switches.
Avoid loop on later 2.
When in switches making loop then switches one switches down his link.
Note buy those switches in from cisco which support STP
By default, STP his configure on switches.
Type
1. PVST (per VLAN Spanning tree)
2. RPVAST (rapid per VLAN spanning tree)
Both are same but
PVST is slow
RPVST is fast.
PVST (per VLAN spanning tree)
More VLAN’S create concept
When we create more VLAN’s on switches. Thus, switches his
For every VLAN’s in STP selection his selected his own root-bridge.
Thus, selections called PVST.
STP election
In STP selection doing STP loop avoiding all process.
In STP selection doing one root bridge selection.
In also STP selection doing link states process i.e., down, forward,
When for the first time we connect any other devices they’re orange in color b/c.
They’re doing learning and listing b/c they’re find out the connecting device is creating loop or not.
If creating loop then link down.
If don’t creating loop then link leads up state.
15 second listening time
15 second learning time
It’s mean 30 second is totally time for link decision.
Why switch doing listing and learning
B/c when for the first time we will connect any device with switch it’s perform/updates (mean send
BPDU) us to confirm the connecting devices is switches or other devices.
If switch or other device then STP Election perform then link goes to downstate if
If the connected device is PC mean end device, then STP election perform and link goes to up state.
Root bridge switch/ root switch
When we have 50 routers in these 50 routers select one router root bridge and other 49 non-root-
bridge
This decision doing in STP selection.
BPDU (bridging protocol data unit)
When we have connected 3 routers.
When one router sends about STP information/updates thus we don’t say information/updates we
say BPDU.
Bridge ID
When we connect switches thus switches STP election doing link decision.
Thus, decision doing on the base of bridge ID.
Bridge ID his 3.
1. Priority
Those switches his priority his low this will root bridge. but
thus, priority is same in all cisco switches then
doing decision on the base of mac-address
by default, cisco switch priority (32768)
VLAN no is also add with priority
it’s changeable value
2. Mac-address
thus mac-add is not same.
Then this one switches his Mac-add low
This one switch will root bridge.
3. cost of link
high link low cost
low link his cost
link cost means link speed
then
then the selected root bridge all ports will designated ports.
Designated port
his send best BPDU called designated port.
Root port
those port his receive best BPDU.
Root port all root port. Selectable designated port OR also root port.
When root bridge sed his BPDU thus called best BPDU.
When select the root bridge. Then non root bridge not send BPDU.
When root-bridge send his BPDU thus BPDU called best BPDU.
LINK DOWN state selection how doing.
i.e., we have 3 switches
if R2 have router bridge.
When Thus root bridge sends on both designated port BPDU.
Then b/w S-1 and S-2 doing elections of link down state.
b/w S-1 and S-2 which one switches mac-add low this one switch link state goes down
state.
NOW will don’t create loop b/c one link doing down state.
STP practical
# “show spanning tree” command
will show us
1. root ID
root bridge totally roots information present
which one switch “this bridge is the root” shown it’s mean this is root
bridge switch.
2. bridge ID
bridge ID totally switch itself information.
3. link all states
link all states like
BPDU ports
Root ports
Block state port
Priority value changing
With priority value high root bridge will changed.
Select switch
1. Spanning-tree VLAN-1 priority 1
2. Will give some value select from them
3. Spanning-tree VLAN-1 priority 4096
4. Now this one switch root bridge.
PORT FAST link Creating
Note
Port fast link only create for PC not for other devices i.e., router, etc.
after creating port fast link then will didn’t connect another device only pc will connect.
b/c will directly create loop if connect another device instead of pc.
When we create post fast link create on switch. Then we connect pc then this one link will directly go
to up state. Not doing learning and listening.
Port fast link will directly go to up state.
Port fast link Configuration
Interface fast ether 0/5 or select another link
Spanning-tree?
Spanning-tree port fast
Enter
Ex
EtherChannel
Def to logical bundle cables shown to switch one cable called EtherChannel.
When for the first we will connect 4 or more than 4 cables b/w two switch.
Switch will 1 link keep up state (forward) and other 3 link will keep down state. So
For this we will doing EtherChannel concept.
Type
1. Layer 1
2. Layer 2
Layer 1 EtherChannel
Ether channel work on two protocols.
1. PAGP (port aggregation protocol)
2. LACP (link aggregation control protocol)
1. PAGP (port aggregation protocol)
Work only on cisco device
At-a-time support 8 cables.
Have 2 mode
1. Desirable
2. Auto
If one switch port desirable other switch port desirable EtherChannel will doing work i.e.
i. D----------D----------will be doing work
ii. D----------A-----------will doing work
iii. A----------A-----------will didn’t work
2. LACP (link aggregation control protocol)
Industrial standard means (work all industrial network devices)
support 16 cables but
At-a-time support 8 cables other 8 keep stand by. if this 8 down then other 8 up
Have 2 mode
1. Active
2. Passive if
if one switch port active other switch port Active EtherChannel will doing work i.e.
i. A----------A------------will be doing work
ii. A----------P-------------will be doing work
iii. P----------P-------------will be doing work
EtherChannel configuration
Shown spanning tree
1. will show us 1 link up
2. 3 link down
3. Also Shown in diagram
step 1
switch 1
1. Interface range fast ethernet 0/1-4
2. shutdown
3. Channel-group?
4. Channel-group 1 mode desirable
OR
1. Channel-protocol PAGP
2. Channel-group?
3. Channel-group 2 mod desirable
Note both switch group no keep same if didn’t keep same then EtherChannel will didn’t work
Switch 2
1. Interface range fast ethernet 0/1-4
2. Shutdown
3. Channel-group?
4. Channel-group 1 mode desirable
OR
4. Channel-protocol PAGP
5. Channel-group?
6. Channel-group 2 mod desirable
Step 2
Switch 1
1. Interface range fast ethernet 0/1-4
2. No shutdown
Switch 2
1. Interface range fast ethernet 0/1-4
2. No shutdown
EtherChannel configuration completed
1. Show spanning tree
Will show us all cables is converted to one cable
2. Show EtherChannel
Show us EtherChannel
3. Show EtherChannel summery
Show us EtherChannel all summery
Show spanning tree
Will show us all cables is converted to one cable
Show EtherChannel
Show us EtherChannel
Show EtherChannel summery
Show us EtherChannel all summery
VTP
VLAN trunking protocol.
Not recommended in real life.
B/c insecure
Cisco priority (made by cisco only work on cisco devices)
VTP USE
I.e., we have cisco switches we run VTP on these switches.
Now if we have added VLAN or removing or any modification one switch on these 50 switch this
modification will automatically apply in 49 switches.
Thus, concept called VTP
How to find VTP enable OR not
Show VTP status
Will show us VTP enable or not
Two things important in VTP status
1. VTP domain name
If this domain name present it’s mean VTP enable.
If didn’t present it’s mean didn’t VTP didn’t enable
2. Configuration revision NO.
With add/removing/others changing this revision no will changing over all
switch, it’s mean VTP enable
If didn’t changing its mean some problem/error/mistake in VTP.
With add/removing/VLAN name change the [Link] mean leads forward.
VTP operational mode.
VTP have three modes
1. Server mode.
2. Client mode.
3. Transparent mode
1. Server mode
In server mode have full authority on switch.
2. Client mode
Not make any VLAN/delete/modifying
But any changing doing other switches thus changing will apply itself.
Mean other switch changes accept but didn’t doing itself changing.
3. Transparent mode.
In transparent mode switch any changing not sharing with other switches.
Other switches changing will travel over this one switch but not store itself.
NOTE when you change any switch mode to transparent the revision no will come to 0 from any no.
VTP CONFIGURATION
Before VTP must
1. Trunk all switch
2. Domain name (same all switch)
3. Password (to secure VTP) but it’s optional.
Step 1
trunk all port
1. interface fa /
2. switch port trunk encapsulation dot1q
3. switch port mode trunk
4. EX
5. WR
Step 2
Define domain name
1. VTP domain name CCNA
Will give you message VTP domain name from null to CCNA
# Show VTP status
Will show us configuration revision no
And also changed VTP domain name
Step 3
Define password
Note
thus, one password run same overall switch
when we configure password then those switches don’t know password, they didn’t members
of VTP with us.
1. VTP password CCNA123
VTP operational mode configuration
How VTP switches mode change
1. Server mode
by default, switches are server mode in VTP.
2. client mode
VTP mode client
3. Transferent mode
VTP mode Transferent
Port security
Port security have 3 options
1. Shutdown option
2. Protect option
3. Restrict option
1. Shutdown option.
Step 1
Select interface
1. Interface fast eth 0/0
Switch port from dynamic to access
2. Switch mode access
3. Switchport port-security
4. Switchport port-security maximum 1
Maximum 1 mean only (1) person come on this port
5, switchport port security mad-acc or sticky
Switchport port-security mac-address mean mac-add of this one device.
Sticky mean those which come for first time reserve for this one or allow
5. Switchport port security violation shutdown
Violation shutdown mean if unknown device come the port shutdown.
NOTE
1. After connect unknown device will wait to 30 second after 30 second will generate msg the
link is down
2. In packet racer for first time will show green. but after send packet after sending the link will
administratively shutdown will RED.
3. After reserve device again plug the link will also down for them. Then will go to this one
interface and apply some command.
Shutdown
No shutdown
Then will generate the MSG the state is up.
After 30 second interface from orange to green.
2. Protect option
In protect the port have up but communication no doing.
Don’t come to your switch the msg that other device connects.
Step 1
Step 1
• Select interface
1. Interface fast eth 0/0
• Switch port from dynamic to access
2. Switch mode access
3. Switchport port-security
4. Switchport port-security maximum 1
• Maximum 1 mean only (1) person come on this port
5. switchport port security mad-acc or sticky
• Switchport port-security mac-address mean mac-add of this one device.
• Sticky mean those which come for first time reserve for this one or allow
6. Switchport port security violation protect.
• Violation shutdown mean if unknown device come the port shutdown.
3. Restrict option
• Select interface
1. Interface fast eth 0/0
• Switch port from dynamic to access
2. Switch mode access
3. Switchport port-security
4. Switchport port-security maximum 1
• Maximum 1 mean only (1) person come on this port
5, switchport port security mad-acc or sticky
• Switchport port-security mac-address mean mac-add of this one device.
• Sticky mean those which come for first time reserve for this one or allow
6. Switchport port security violation restrict.
• Violation shutdown mean if unknown device come the port shutdown.