Вы находитесь на странице: 1из 8

VLAN Configuration

SW# Show VLAN

Trunk ports Conf

VTP will not work if the port is not trunk

Bonus Command

* Show run fastethernet 0/1

. By default switch ports are set dynamic desireable mode which means that switch will
dynamically set the mode of a port based on the device which is plugged in.

. Dyamic mode is not very good practise

.sw#(config) Switchport mode trunk


.sw#(config) Switchport mode access

Note An interface whose encapsulation is auto can not be set to trunk mode.Higher level
switches support both ISL and 802.q.
sw(config-if)# switchport trunk encapsulation dot1q
sw(config-if)# switchport trunk encapsulation isl
sw(config-if)# switchport trunk encapsulation negotiate

Security Check
After setting trunk set rest of the ports to access mode.
* interface range fastethernet 0/0 - 0/12
sw#(config) Switchport mode access

VTP Configuration

sw# show VTP status

By default Operating mode is Server.

sw# vtp domain name


sw# vtp domain Password
sw# vtp mode client,server,transparent

*VLAN creation ,modifcation can not be allowed on client mode

Administritive mode can be set to dynamic ,Trunk or Access

Operatonal mode can be Trunk or Access


Configure VLAN

sw(config)#vlan 10
sw(config-vlan)#name sales

Assigning ports to VLAN

Sw(config)#interface fa 0/2
Sw(config-if)#switchport access vlan 10

Three methods to Route b/w VLAN

(1) Separate port for each VLAN

Here router interfaces depanding upon the VLAN are set to act as a gateway for each
VLAN

(2) Router on a Stick


Here one interface is subdivided into subinterfaces (interface must be FastEthernet)

Creating Sub interace


R(config)#interface fa 0/0.20
R(config-sub) encapsulation dot1q 20 (where 20 is the VLAN number sub interface is
assigned to)

One router must be act as a stick router.

(3) Layer 3 Switching

Here switch act as router.

Sw(config)#ip routing
This is the layer 3 command
SPANNING TREE PROTOCOL

Some Good Switching practices

Layered Approach easy to manage.


Provide redundancy.
Etherchannel can provide more Bandwidth on key links.

Three layeres

1) Access(connect end devices)


2) Distribution(Access switches have redundant link to Distribution layer switches)
3) Core (Distribution switches have redundant link to Core layer switches)

Spanning Tree Protocol

Redundancy Chaos:

1. Redundancy is good but packets can loop for ever in redundant network if SPT
protocol is not applied properly.
2. TTL (time to live) is a layer 3 technology and switches are not able to subtract
time from packet.
3. STP puts a tree on a redundant links.

4. Every switch sends a probe (BPDUS) to find a redundant link.


5. One switch is elected as a Root bridge.
6. Every switch calculates a best path to that root bridge.

Understanding BPDUS and Elections.

Root Bridge is selected based on the Bridge ID which is the combination of Priority
number and Mac address.

By default OLD switch in a network is a Root bridge.

Three types of Ports

1. Root port(port that is used to reach a Root Bridge based on the link cost,Root
bridge does not a root port)
2. Designated port(Forwarding port every switch has at least one designated port)
3. Blocking ports(Else is the blocking port i-e where the tree fell)

HOW Best Path is Selected

Elect Root Bridge

Calculate Path cost


10Mbps 100
100Mbps 19
1Gb 4
Configuring Basic STP
sw1#sh spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.4A1E.ED05
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00E0.8F85.4C12
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Fa0/11 Desg FWD 19 128.3 Shr
Fa0/12 Root FWD 19 128.3 Shr
Fa0/1 Desg FWD 19 128.3 Shr

Manually assigning Root Bridge

Sw1(config)# spanning-tree vlan (number) root primary(dynamically assign lower


priority)
Sw1(config)# spanning-tree vlan (number) root priority (priority in the increament of
4096)

Enhancement to STP

Port states of a Switch

Listining :15 seconds time BPDUS send/Receive

Learning: 15 seconds time switches learn Mac address to put in a CAM table

Forwarding : Happy state i-e when the switch can forward traffic.

Blocking: when switch interface goes down switch wait for 20 seconds to put the blocking
interface to up state.

All these delays can cause a much problem in modern networks.

Cisco Enhancement
Per VLAN STP

1) By default switches run PVST i-e separate root bridge for each VLAN
2) You need to manually configured Root Bridge for each VLAN.
3) This can be handy for load balancing
Command to Put Root Bridge for Every VLAN in a Network
Sw(config)#spanning-tree vlan 1,2,3,4.. root priority

Solution
*sw(config)#portfast

Should only be used on a access ports otherwise STP would be disable.

Solution

Rapid spanning tree

a) Fairly new standard


b) Pro active that it remembers its blocked link as backup(that is it doesnot have to
rediscover the link when the primary link goes down unlike STP)
c) For RSTP to work all the switches in the network must have a RSTP support
implemented in the switches.
d) RSTP is backward compatible

Three ports

Root Port
Designated port
Alternated Port

Sw(config)# spannig-tree mode rspid-pvst

Port fast must be enable in order for RSPT to work better

Sw(config)# interface fast Ethernet 0/2


Spanning-tree port fast

Routing Porotocols

Distance Vector vs Link State

Distance Vector

Easy to configure
Not many Features
Rip,IGRP

Link State

Difficult to configure required lot of knowledge


Feature Rich
OSPF,IS-IS
Hybrid
The best of both worlds
Cisco Propierty
EIGRP

Distance Vector Routing Protocols

Send Entire Routing Table as an Update.

In their simplicity DV routing protocols have Looping issues. These looping causes the
Hop count to increase indefinitely called Count down to infinity.

Loop Prevention Mechanism

Maximum Distance: Route is unreachable when the maximum distance is 16hops.

Route poisoning: If the link goes down immediate set its Hop Count to 16.

Triggered Update: If the link goes down immediately send the update ignore all the timers.

Split Horizon: Never send an update to an interface about the route that is received from
that interface.

Hold Down Timers:If the link goes down Router will not believe for any update regarding
the down link for x amount of time.

Link State Routing Protocols

Send updates to neighbors rather than broadcast .Use Hello protocols


After initial Routing table exchanges router sends small event based update.
Currently two LS protocols:
OSPF
IS-IS

Advantages of LS Routing Protocols

Faster convergences

No Loop

Force you to design Network correctly

Dis advantages of LS Routing Protocols

Consume more router resources

Requuired a solid network design

Technical Complexity
Routing Protocol

OSPF Concepts

Route summarization
To make the routing table small
To advertise a single route for the bunch of routes to the neighbouring Routers.

OSPF Area Design and Terms

Area

When the network is big and it is continuously expending than it is better to divide the
whole network into groups(based on the subnets) these groups are called areas.

The routers that have route to more than 1 area are called Area border Router(ABR)

Route summarizations is applied on ABR.

All areas must connect area 0

All the routers with in an area must have same Topology Table(Road Map) but different
routing Tables.

Goal is to localize the updates with in an area

Requires a Hierarchal Design

Autonomous System Boundary Router(ASBR)


Connects to different system of Network
Only ABR and ASBR can do summarization

Understanding OSPF neighbor relation ship

OSPF exchang routes by using hello protocols.

Contains all sorts of Information

Rouer ID
Area ID*
Network mask*
Hello and dead Timers*
Neighbours *
Router priority
DR/BDR IP address
Authentication password*

* Must match fields.