CCNP Slides Updated May2022
CCNP Slides Updated May2022
CCIE
CCNP
CCNA
CCENT
• CLASS A
• CLASS C
• CLASS D Multicasting
Octet Subnet
Class Range Cisco / Notation
Format Mask
0.0.0.0 to
Class A N.H.H.H 255.0.0.0 /8
127.255.255.255
128.0.0.0 to 255.255.0.0
Class B N.N.H.H /16
191.255.255.255
192.0.0.0 to
Class C N.N.N.H 255.255.255.0 /24
223.255.255.255
224.0.0.0 to
Class D N/A N/A N/A
239.255.255.255
240.0.0.0 to
Class E N/A N/A N/A
255.255.255.255
What is a Router ?
To
Toenable
enableor
ordisable
disableIP
IPRouting
Routing
Router(config)#
Router(config)#[no]
[no]ip
iprouting
routing
E0 E1
192.168.0.0/24 192.168.1.0/24
Types of Routing
• Static Routing
• Dynamic Routing
Static Routing
S1
S0
R1 10.0.1.1/30 10.0.1.2/30 R2
E0 E0
192.168.0.0/24 192.168.1.128/26
Static Default Route
S1
Internet
ISP
B01 201.1.51.42/29 201.1.51.41/29
E0
192.168.0.0/24
Static and Default routing Example
Static and Default Route configuration
B.0 S0 ISP
Internet
E0
S1
192.168.1.0/24 S0
HQ1 HQ2
E0 E0
192.168.2.1/24 192.168.2.2/24
Dynamic Routing Protocol
• Dynamic routing protocols, exchange routing information with the neighbors and build
the routing table automatically
• Administrator need to advertise only the directly connected networks
• Any changes in the network topology are automatically updated
Dynamic Routing Protocol
Dynamic Routing protocol
Distance Vector Routing Link-State Routing Protocol Path Vector Routing Protocol
Protocol
RIPv1 IGRP
• Combining the contiguous address into one and advertising to neighbor Router
• Advantages
• Minimizing the routing table entries
• Less use of resources like memory, processor, bandwidth
• Less number of updates
• There are two type of Summarization
• Auto summary
• Manual summary
Auto Summary
• Subnet at major network boundary will be summarized into class full updates
• A Class full routing protocol does auto summary by default and it cannot be turned off
• Routing protocols like RIPv2, EIGRP, BGPv4 support auto summary
• Link state routing protocol i.e. OSPF and ISIS do not support auto summary
Auto Summary
10.20.0.0/16 S0 172.16.0.0/16
10.0.0.0/8 S0 172.16.0.0/16
10.0.0.0/8 S0 172.16.1.0/24
10.10.0.0/16 S1192.168.20.0/24
192.168.20.0/24 192.168.20.0/24
192.168.20.0/24 172.16.2.0/24
A B S1 C S1 D
10.20.0.0/16 172.16.2.0/24
Networks
Networks Int
Int Networks Int Networks Int Networks Int
10.20.0.0/16
10.20.0.0/16 E0
E0 192.168.20.0/24 S0 172.16.1.0/24 S0 172.16.2.0/24 E0
10.10.0.0/16
10.10.0.0/16 S0
S0 10.10.0.0/16 S1 192.168.20.0/24 S1 172.16.1.0/24 S1
• Open Standard
• Advanced distance-vector routing protocol
• Diffusing update algorithm (DUAL)
• Administrative distance is 90-internal, 170-external
• Classless
• Support FLSM, VLSM, CIDR, Auto and Manual summary
• Metric = composite metric (32 bits)
• - Bandwidth, load, delay, reliability
• Updates are sent as multicast(224.0.0.10) or unicast
EIGRP Features
• Neighbor discovery
• DUAL Algorithm
• Neighbor table
List of directly connected routers running EIGRP in same autonomous system
• Topology Table
List of all routes learned from its directly connected neighbors
• Routing table
List of best paths towards each destination
Components of EIGRP
Neighbor Interface
B S0
C S1 1000 B
1000
Topology Table of Router A
S0
Network NH AD FD
10.0.0.0/8
B 1000 2000 S A
10.0.0.0/8
C 1500 2500
S1
• EIGRP Metric
• = [K1 * BW + ((K2 * BW) / (256 – load)) + K3 * delay]
K1 K2 K3 K4 K5
192.168.2.0/24
• Delay is the sum of all the delays of the links along the paths:
Delay = [delay in tens of microseconds] x 256
• Bandwidth is the lowest bandwidth of the links along the paths:
Bandwidth = [10,000,000 / (bandwidth in kbps)] x 256
Hello Functions
• Neighbor Discovery
• Neighbor Formation
• Keep Alive
Update
• To exchange routing information with neighbor
Query
• Query message is generated when successor is down & Feasible Successor not available
Reply
• Reply Message is sent in response to query message
ACK
• For every Update, Query and Reply router will generate ACK message
Initial Route Discovery
Diffusing Update Algorithm - DUAL
Neighbor Interface
B S0
C S1 1000 B
1000
Topology Table of Router A
S0
Network NH AD FD
10.0.0.0/8
B 1000 2000 S A
10.0.0.0/8
FS
C 1500 2500
S1
Neighbor Interface
B S0
C S1 1000 B
1000
Topology Table of Router A
S0
Network NH AD FD
10.0.0.0/8
B 1000 2000 S A
10.0.0.0/8
C 1500 2500 FS
S
S1
Neighbor Interface
B S0
C S1 1000 B
1000
Topology Table of Router A
S0
Network NH AD FD
10.0.0.0/8
B 1000 2000 S A
10.0.0.0/8
–
2000
C 3000 4500
S1
Neighbor Interface
B S0
C S1 1000 B
1000
Topology Table of Router A
S0
Network NH AD FD
10.0.0.0/8
B 1000 2000 S A
10.0.0.0/8
RQeu
2000
C 3000 4500 S
S1 pelr
yy
Neighbor Interface
B S0
C S1 1000 B
1000
Topology Table of Router A
S0
Network NH AD FD
10.0.0.0/8
B 1000 2000 S A
10.0.0.0/8
Qu
2000
C 3000 4500
S1 er
y
To
Toenable
enableEIGRP
EIGRPas
asthe
theIP
IProuting
routingprotocol.
protocol.
Router(config)#
Router(config)#router
routereigrp
eigrp<AS
<ASNo.>
No.>
Identify
Identifyattached
attachednetworks
networksparticipating
participatingin
inEIGRP.
EIGRP.
Router(config-router)#
Router(config-router)#network
networknetwork-id
network-id [wildcard-mask]
[wildcard-mask]
Defining
Definingthe
theinterface’s
interface’sbandwidth
bandwidthfor
forthe
thepurposes
purposesof
ofMetric
Metriccalculation
calculation
Router(config-if)#
Router(config-if)#bandwidth
bandwidth<kilobits>
<kilobits>
Summarization
• Auto summary
• EIGRP does auto summary at major logical network boundary
• Manual summary
• EIGRP supports manual summary on a per interface basis
• Summary will be continued till the last specific route goes down
• Summary metric will be the best metric from specific route
• Router of the summary route will create a summary route pointing to null interface
Configuring EIGRP Route Summarization
Turns
Turnsoff
offautomatic
automaticsummarization
summarizationfor
forthe
theEIGRP
EIGRPprocess
process
Router(config-router)#
Router(config-router)#no
no auto-summary
auto-summary
Creates
Createsaasummary
summaryaddress
addressthat
thatthis
thisinterface
interfacewill
willgenerate.
generate.
Router(config-if)#
Router(config-if)#ip
ipsummary-address
summary-addresseigrp
eigrp<as-number>
<as-number>
<address>
<address><subnet
<subnetmask>
mask>
Router Authentication
Configuring
ConfiguringRouter
RouterID
ID
Router(config-router)#
Router(config-router)#router-id
router-id <ip
<ipaddress>
address>
L0
192.168.1.1/8
S0 S1
172.16.0.1/16 202.15.32.2/24
E0
10.0.0.1/8
Link-State Data Structure :Network Hierarchy
BR
Area 0
ABR ABR
IR IR IR IR IR IR
Area 2 Area 12
Types of Routers in ospf
• Backbone router- The router which belongs to backbone area is called as Backbone
router
• Internal Router- The router which belongs to regular area is called Internal Router
• ABR-The router which shares two different areas is called Area Border Router
• ASBR- The router which is connected to different protocol is called Autonomous system
boundary router.
Link-State Data Structures
• Neighbor Table
• Also known as the adjacency database
• Contains list of recognized neighbors
• Database Table
• Typically referred to as LSDB
• Contains information about all routers and their attached links in the area or
networks
• Routing Table
• Commonly named as forwarding database
• Contains list of best paths to each destination
OSPF Database
Neighbor Interface
B S0
C S1
10 B
Link State Data base of Router A 1 20
Router Links
S0 20.0.0.0/8
A 5
B 5
A D
C 5
1 S1 1
D 5
10.0.0.0/8 40.0.0.0/8
Routing Table of Router A 15 10
Network Next Hop Cost
C
20.0.0.0/8 B 11
1
30.0.0.0/8 C 16
30.0.0.0/8
40.0.0.0/8 C 26
OSPF Metric calculation
10 Mbps B
100 Mbps
S0 20.0.0.0/8
A D
S1 1
10.0.0.0/8 40.0.0.0/8
10 Mbps 1 Gbps
30.0.0.0/8
OSPF Packet Types
1 Hello
2 Database Description
Hello
A B C
Hello Hello
HELLO
Router ID
Hello and Dead Intervals *
D E Neighbors
Area ID *
Router Priority
DR/BDR IP Address
Authentication Password *
Stub Area Flag *
* Entry must match on
neighboring routers
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establiashing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Establishing bidirectional Communication
Link State Updates
LSAck
LSU
Link State Updates
LSU
Link State Updates
LSAck
LSU
LSAck
LS Data Structures: LSA Operation
LS Update Packet
LSU
Is Entry in Is
LSA link state sequence no. Ignore LSA
database ? Yes the same ? Yes
No No
A Add to database
Is Go
sequence no. to
Send LSAck higher ? Yes A
Flood LSA
Send LSU
with newer
Run SPF to calculate information
new routing table to source
End End
OSPF Network Types
Adjacency Behavior for a Point-to-Point Link
Neighbor
A
A B C
D E
Neighbor Neighbor
A, B, C, E A, B, C, D
BMA
Neighbor
A
LSU
A B C
D E
Neighbor Neighbor
A, B, C, E A, B, C, D
BMA
Neighbor
A
LSU LSU
A B C
D E
Neighbor Neighbor
A, B, C, E A, B, C, D
BMA
Neighbor
A
DR
A B C
P=1 P = 10 P=0
P=1 P=5
BDR
D E
Designated Router and Backup Designated Router
• Neighbors
• DR/BDR DROTHER Full
• DROTHER DR/BDR Full
• DROTHER DROTHER 2 Way
• Updates
• DROTHER DR/BDR 224.0.0.6
• DR DROTHER 224.0.0.5
BMA
Neighbor
A
LSU DR
A B C
P=1 P = 10 P=0
P=1 P=5
BDR
D E
Neighbor Neighbor
B, E FULL A, B, C, D FULL
A, C 2WAY
BMA
Neighbor
A
LSU DR
A B C
P=1 P = 10 P=0
LSU LSU
P=1 P=5
BDR
D E
Neighbor Neighbor
B, E FULL A, B, C, D FULL
A, C 2WAY
NBMA
Point-to-Multipoint
No DR/BDR Manual 30 sec Cisco
Nonbroadcast
• Single-area OSPF is useful in smaller networks. If an area becomes too big, the
following issues must be addressed:
Multiarea OSPF requires a hierarchical network design and the main area is called the backbone area, or
area 0, and all other areas must connect to the backbone area.
Type of OSPF Routers
ASBR
Other AS
OSPF Summarization
Benefits Of Route Summarization
Routing Area 0
Update
10.10.20.0/24
10.10.21.0/24
10.10.22.0/24
Area 2
Area 12
10.10.20.0/24 10.10.21.0/24 10.10.22.0/24
After Route Summarization
Routing Area 0
Summarization Update
10.10.20.0/22
Area 2
Area 12
10.10.20.0/24 10.10.21.0/24 10.10.22.0/24
Types Of LSA
LS Types Name
1 Router LSAs
2 Network LSAs
3 Summary LSAs
4 ASBR Summary
Area 10
Area 0
LSA1
Router ID - A
11.0.0.0/8
A B C D
11.0.0.1/8
LSA Type 2: Network LSA
• One Network (type 2) LSA for each transit broadcast or NBMA network in an area
• Includes Network ID, subnet mask and list of attached routers on that transit link
• Advertised by the DR of the transit network
• Floods within its area only; does not cross ABR
LSA Type 2: Network LSA
Area 10
B D
Area 0
A
LSA2 DR
Router ID - E
E
11.0.0.0/8 C
LSA Type 3: Summary LSA
• Type 3 LSAs are used to flood network information to areas outside the originating area
(inter-area)
• contains network ID and subnet mask
• Advertised by the ABR of originating area
• Regenerated by subsequent ABRs to flood throughout the autonomous system.
• By default, routes are not summarized and there is one type 3 LSA for every subnet
LSA Type 3: Summary LSA
• ASBR Summary (type 4) LSAs are used to advertise Router ID of ASBR to all routers in
other areas present in autonomous system
• They are generated by the ABR of the originating area
• They are regenerated by all subsequent ABRs to flood throughout the autonomous
system
• Type 4 LSAs contain only the router ID of the ASBR
LSA Type 4: Summary LSA
Other AS
• External (type 5) LSAs are used to advertise networks learned from other autonomous
systems
• Type 5 LSAs are advertised and owned by the originating ASBR
• Type 5 LSAs flood throughout the autonomous system
• The advertising router ID (ASBR) is unchanged throughout the autonomous system
• Type 4 LSA is needed to identify ASBR
• By default, routes are not summarized by ASBR
LSA Type 5: External LSA
Other AS
10.0.0.0/8
O E1 E1 external routes
Networks outside of the autonomous system of
O E2 E2 external routes
the router
Cost for External Updates
RIP OSPF
Routing Table Routing Table Routing Table Routing Table
RIP OSPF 64 OSPF 64
R
Update
10.10.0.0 Hop=9 O E1 Update
10.10.0.0 Cost=100 O E1 E1 Update
10.10.0.0 Cost=164 O E1 10.10.0.0 Cost=228
A
R 10.11.0.0 Hop=6 B
O 10.11.0.0 Cost=100 C
O E1 10.11.0.0 Cost=164 D
O E1 10.11.0.0 Cost=228
10.10.0.0
10.11.0.0
RIP OSPF
Routing Table Routing Table Routing Table Routing Table
RIP OSPF 64 OSPF 64
Update
R 10.10.0.0 Hop=9 O E2 Update
10.10.0.0 Cost=100 O E2 E2 Update
10.10.0.0 Cost=100 O E2 10.10.0.0 Cost=100
A
R 10.11.0.0 Hop=6 B
O 10.11.0.0 Cost=100 C
O E2 10.11.0.0 Cost=100 D
O E2 10.11.0.0 Cost=100
10.10.0.0
10.11.0.0
Default Routes in OSPF
Router(config)#ip
Router(config)#iproute
route0.0.0.0
0.0.0.00.0.0.0
0.0.0.0<Exit
<ExitInt/next-hop-IP>
Int/next-hop-IP>
Router(config-router)#
Router(config-router)#default-information
default-informationoriginate
originate
Default Routes in OSPF
Area 10
Static Default Route
default-information
A Internet
originate
B C D
OSPF Virtual Link
Defining Virtual Links
A B C D E
Virtual Link
F
Configuring Virtual Links
Configuring
ConfiguringVirtual
VirtualLink
Link
Router(config-router)#
Router(config-router)#area
area <area-id>
<area-id> virtual-link
virtual-link
<router-id>
<router-id>
OSPF Special Area
Stub and Totally Stubby Area Rules
LSA5
Router ID – F
F
ASBR
Other AS
Stub Area Configuration
Configuring
ConfiguringStub
Stubcommand
commandon
onall
allrouter
routerin
inthe
thearea
area
Router(config-router)#
Router(config-router)#area
area <area-id>
<area-id> stub
stub
Using Totally Stubby Areas
LSA5
Router ID – F
F
ASBR
Other AS
Totally Stubby Configuration
Configuring
Configuringall
allrouters
routersof
ofTotally
TotallyStubby
StubbyArea
Area
Router(config-router)#
Router(config-router)#area
area <area-id>
<area-id> stub
stub
Configuring
ConfiguringArea
AreaBorder
BorderRouter
Routerof
ofTotally
TotallyStubby
StubbyArea
Area
Router(config-router)#
Router(config-router)#area
area <area-id>
<area-id> stub
stub no-summary
no-summary
Not-So-Stubby Areas
LSA5
Router ID – F
F
ASBR
Other AS Other AS
NSSA Area Configuration
Configuring
ConfiguringNSSA
NSSAcommand
commandon onall
allrouter
routerin
inthe
thearea
area
Router(config-router)#
Router(config-router)#area
area <area-id>
<area-id> nssa
nssa
Totally Not-So-Stubby Areas
LSA5
Router ID – F
F
ASBR
Other AS Other AS
Totally NSSA Area Configuration
Configuring
ConfiguringNSSA
NSSAcommand
commandononall
allrouters
routersin
inthe
thearea
area
Router(config-router)#
Router(config-router)#area
area <area-id>
<area-id> nssa
nssa
Configuring
ConfiguringNSSA
NSSAcommand
commandononABR
ABRrouter
routerin
inthe
thearea
area
Router(config-router)#
Router(config-router)#area
area <area-id>
<area-id> nssa
nssa no-summary
no-summary
OSPF Authentication
2) MD-5 Authentication
Routers will accept the routing information from other routers that have been configured with the same
password or authentication information.
OSPF Authentication
2) MD-5 Authentication
Router(conf-if)#ip ospf authentication message-digest
Router(conf-if)# ip ospf message-digest-key key-id md5 ccnp
Route Optimization
Reasons for using Multiple Routing protocols
• Application-specific protocols
• Mismatch between devices (Vendors)
Redistribution
Redistribute
OSPF 5 EIGRP 10
Routing Table Routing Table Routing Table
10.10.0.0
OSPF
O 10.10.0.0 DEIGRP
OSPF
192.168.0.0 192.168.0.0
D EIGRP
192.168.0.0
10.11.0.0
Update
O 10.11.0.0
Update 192.168.1.0
Update
D 192.168.1.0
10.12.0.0 BR
D 192.168.1.0
192.168.2.0
O 10.12.0.0 D 192.168.2.0 D 192.168.2.0
Protocols Metric
RIP Infinite
OSPF 20
IS – IS 0
Redistributing
into RIP
with Hop 6
Protocol RIP
X Routing Table
10.10.0.0 192.168.0.0
R 192.168.0.0 [2]
Routing RIP
10.11.0.0
Update Update
192.168.1.0
R 192.168.1.0 [1]
10.12.0.0 BR 192.168.2.0
R 192.168.2.0 [2]
R 10.10.0.0 [6]
R 10.11.0.0 [6]
R 10.12.0.0 [6]
Configuring
ConfiguringRedistribution
Redistributioninto
intoRIP
RIP
BR(config)#
BR(config)#router
router rip
rip
BR(config-router)#
BR(config-router)#redistribute
redistribute <protocol>
<protocol>
metric
metric <value>
<value>
Redistributing into OSPF
Redistributing
into OSPF 5
with Cost 100
and Subnets
Protocol OSFP 5
X Routing Table
10.10.0.0 192.168.0.0
O 192.168.0.0 [128]
Routing OSPF
10.11.0.0
Update Update
192.168.1.0
O 192.168.1.0 [64]
10.12.0.0 BR 192.168.2.0
O 192.168.2.0 [128]
O E2 10.10.0.0 [100]
O E2 10.11.0.0 [100]
O E2 10.12.0.0 [100]
Configuring
ConfiguringRedistribution
Redistributioninto
intoOSPF
OSPF
BR(config)#
BR(config)#router
router ospf
ospf 55
BR(config-router)#
BR(config-router)#redistribute
redistribute<protocol>
<protocol>
[metric
[metric<value>]
<value>][metric-type
[metric-type 1|2]
1|2]
[subnet]
[subnet]
Redistributing into EIGRP
Redistributing
into EIGRP 10
with BW 2Mbps,
Delay 2000 µs,
Reliblity 100%,
Load 50%,
Protocol MTU 1500 EIGRP 10
X Routing Table
10.10.0.0 192.168.0.0
D 192.168.0.0 [45002100]
Routing EIGRP
10.11.0.0
Update Update
192.168.1.0
D 192.168.1.0 [2100150]
10.12.0.0 BR 192.168.2.0
D 192.168.2.0 [45002100]
D Ex 10.10.0.0 [1200300]
D Ex 10.11.0.0 [1200300]
D Ex 10.12.0.0 [1200300]
Configuring
ConfiguringRedistribution
Redistributioninto
intoEIGRP
EIGRP
BR(config)#
BR(config)#router
router eigrp
eigrp10
10
BR(config-router)#
BR(config-router)#redistribute
redistribute<protocol>
<protocol>
metric
metric <BW
<BWin inKbps>
Kbps> <delay
<delayin
inµs>
µs>
<reliability>
<reliability> <load>
<load> <MTU>
<MTU>
Passive Interface
Passive Interface is the interface which will not send hello packets on the interface
4 Internet
.10.5.0/2
10
10.10.7.0/24 E0 S0
S3
C
S1
S2
10.10.4.0/24
10
/ 24
.1
.0
0.
2
0.
6.
.1
0/
10
24
S0 S0 S0
S1 S1
A 10.10.3.0/24
B D
E0
10.10.1.0/24
Passive Interface Command
Configuring
ConfiguringPassive
PassiveInterface
Interfacein
inrouting
routingprotocol
protocol
Router(config-router)#
Router(config-router)#passive-interface
passive-interface<type>
<type><No.>
<No.>
Passive Interface
4 Internet
.10.5.0/2
10
10.10.7.0/24 E0 S0
S3
C
S1
S2
10.10.4.0/24
10
/ 24
.1
.0
0.
2
0.
6.
.1
0/
10
24
S0 S0 S0
S1 S1
A 10.10.3.0/24
B D
E0 A(config)#router rip
A(config-router)#passive-interface s 1
10.10.1.0/24 C(config)#router rip
C(config-router)#default passive-interface
C(config-router)#no passive-interface s 3
Distribute Lists
B(config-router)#distribute-list 10 out s 0
Configuring
ConfiguringDistribute-list
Distribute-list
B(config-router)#distribute-list 10 out s 1 on
onRouter
RouterBB
Router(config)#
Router(config)# Router
Routereigrp
eigrp100100
B(config)#access-list 10 permit 192.168.2.0 0.0.0.255
Router(config-router)#
Router(config-router)#distribute-list
distribute-list<ACL-No.>
<ACL-No.><in <in//out
out>
>
<int
<inttype>
type><No.>
<No.>
Distribute List
Redistributing
into OSPF 5
Excepts subnet
10.11.0.0/24
Protocol OSPF 5
X Routing Table
10.10.0.0 192.168.0.0
O 192.168.0.0 [128]
Routing OSPF
10.11.0.0
Update Update
192.168.1.0
O 192.168.1.0 [64]
10.12.0.0 BR 192.168.2.0
O 192.168.2.0 [128]
O E2 10.10.0.0 [100]
O E2 10.11.0.0 [100]
O E2 10.12.0.0 [100]
Configuring
ConfiguringDistribute-list
Distribute-liston
onRouter
RouterBB
Router(config)#
Router(config)#Router
Routerospf
ospf55
Router(config-router)#
Router(config-router)#distribute-list
distribute-list<ACL-No.>
<ACL-No.> outout
<protocol>
<protocol>
Route Map
ROUTE Maps
Configure
ConfigureRoute
RouteMap
Map
Router(config)#
Router(config)#Route-map
Route-map<name>
<name>permit/deny
permit/deny<Sequence
<SequenceNo.>
No.>
Defining
Definingthe
thecondition
conditionto
toMatch
Match
Router(config-route-map)#match
Router(config-route-map)#match<condition>
<condition>
Defining
Definingthe
thecondition
conditionto
toSet
Set
Router(config-route-map)#set
Router(config-route-map)#set<condition>
<condition>
Policy Based Routing
POLICY BASED Routing
• It is used for implementing a policy that causes the packet to take a different direction
• Routing table is destination based
• PBR allows source based routing
POLICY BASED Routing
• ADVANTAGES
• Different users can use different paths to reach the destination
• Load sharing
POLICY BASED Routing
Features
• Implemented in the incoming direction of the source interface
• If a match is found in the route map and it is permitted , the packet will be sent
according to the policy
• If a match is found in the route map and it’s not permitted , then it will be forwarded
according to the normal routing table.
• If there is no match th Route-map the packet will be forwarded according to routing
table
Before POLICY BASED ROUTING
192.168.2.0/24
11.0.0.1
K b i
2
51
S1
Internet
A
S0
20
00
Kb
Routing Table
B
S* 0.0.0.0/0 S0
S* 0.0.0.0/0 S1
192.168.1.0/24
POLICY BASED Routing
192.168.2.0/24
Policy
11.0.0.1 192.168.1.0 S0
192.168.2.0 S1
K b i
2
51
S1
Internet
A
S0
20
00
Kb
Routing Table
11.0.0.1 B
S* 0.0.0.0/0 S0
S* 0.0.0.0/0 S1
192.168.1.0/24
Defining Policies For PBR
Configure
ConfigureRoute
RouteMap
Map
Router(config)#
Router(config)#Route-map
Route-map<name>
<name>permit/deny
permit/deny<Sequence
<SequenceNo.>
No.>
Defining
Definingthe
thecondition
conditionto
toMatch
Match
Router(config-route-map)#match
Router(config-route-map)#matchip
ipaddress
address<ACL-No.>
<ACL-No.>
Or
Or
Router(config-route-map)#match
Router(config-route-map)#matchinterface
interface<type>
<type><No.>
<No.>
Defining
Definingthe
thecondition
conditionto
toSet
Set
Router(config-route-map)#set
Router(config-route-map)#setip
ipnext-hop
next-hop<next-hop
<next-hopIP>
IP>
Or
Or
Router(config-route-map)#set
Router(config-route-map)#setinterface
interface<type>
<type><No.>
<No.>
Implementing PBR
Implementation
ImplementationOf
OfPBR
PBR
Router(config-if)#
Router(config-if)#ip
ippolicy
policyroute-map
route-map<name>
<name>
Border Gateway Protocol (BGP)
Autonomous System
AS
Between AS
EGP works
BGP
AS
The IANA is responsible for allocating AS numbers through five Regional Internet Registries (RIRs).
Connection Redundancy
Single-homed Multihomed
Dual-homed Dual-multihomed
When to use BGP
• Open Standard
• Advanced distance vector protocol
• Path vector protocol
• Classless.
• Support FLSM, VLSM, CIDR, auto and manual summary (BGP-4)
• It is an Exterior Gateway protocol
• Designed to scale up for a huge inter-network like the Internet.
• Updates are incremental and triggered.
BGP Features (continued)
AS 2007 AS path :
2019, 799, 2007
11.0.0.0/8 11.0.0.0/8
12.0.0.0/8 12.0.0.0/8
AS p
at
AS2019
11.0 h : 200
7
12.0 .0.0/8 AS799
.0.0
/8
9, 2007
pat h : 79 /8
AS 0.0
11.0. .0/8
0
12.0.
Path Vector
AS path : 200, 2007
11.0.0.0/8
12.0.0.0/8
07 AS805
0
: 2 /8
AS200
ath 0.0 8
S p 0. .0/
A 11. 0.0
.
12
AS 2007 AS path :
11.0.0.0/8 2019, 799, 2007
12.0.0.0/8 11.0.0.0/8
12.0.0.0/8
AS p
at
11.0 h : 200
7
12.0 .0.0/8 AS799 AS2019
.0.0
/8
AS path : 799, 2007
11.0.0.0/8
12.0.0.0/8
Path Vector
• Neighbor table
• List of BGP neighbours
• BGP forwarding table/database
• List of all networks learned from each neighbor.
• Can contain multiple pathways to destination networks
• Database contains BGP attributes for each pathway
• IP routing table
• List of best paths to destination networks
BGP Message Type
OPEN
Keep-Alive
Update
Notification
BGP Neighbors
• BGP neighbors are routers forming a TCP connection for exchanging BGP updates. Also called as
BGP Peers or BGP Speakers.
• Two type of BGP neighbor relationship.
• IBGP ( Internal BGP)
• EBGP (External BGP)
BGP Neighbors
R3 S1
S0
AS 110
S2 S2
IBGP
R2 S0 R5
S0 S1
S1
S0 S1
S1 EBGP S0
EBGP
R4
D
R1 R6
AS 5252 AS 2121
IBGP: Router Forming neighbor relationship within A.S.
IBGP neighbors doesn't need to be directly connected
EBGP: Router Forming neighbor relationship between two different A.S.
EBGP neighbors need to be directly connected – though there may be
exceptions to this
BGP Configuration
Configuring
ConfiguringBGP
BGPRouting
RoutingProtocol
Protocol
Router(config)#
Router(config)#router
router bgp
bgp <AS
<ASno.>
no.>
Configuring
ConfiguringBGP
BGPRouting
RoutingProtocol
Protocol
Router(config-router)#
Router(config-router)#network
network <network
<networkID>
ID>
[mask
[mask<subnet
<subnet mask>
mask>
Configuring
ConfiguringBGP
BGPRouting
RoutingProtocol
Protocol
Router(config-router)#
Router(config-router)#neighbor
neighbor<IP-Address>
<IP-Address>
remote-as
remote-as<AS
<ASNo.>
No.>
• Router should have a route in the normal routing table to reach neighbor
• Same command for IBGP and EBGP neighbor ,only the AS number will be different for an EBGP
neighbor.
BGP Routing Issue
OSPF S1
S0 A
AS 110
S2
IBGP Route S2 EBGP Route
11.0.0.0/8 IBGP 11.0.0.0/8
S0 B S0 C S1
S0 S1
S1 EBGP S0
EBGP D
EBGP Route
11.0.0.0/8
F E
11.0.0.0/8 AS 2121
AS 5252
BGP Routing Issue
OSPF S1
S0 A
AS 110
S2
S2 Routing Table
IBGP Pro
DATA for
Network Int
11.0.0.1
S0 B S0
B C
11.0.0.0/8 S1S0
S0 Routing Table
S1
DATA for
S1
Pro 11.0.0.1
Network Int
S0
EBGP EBGP
D route
11.0.0.0/8 ? Routing Table
11.0.0.1
F B E
11.0.0.0/8 S0
11.0.0.0/8 AS 2121
AS 5252
Solution :
• Redistribute BGP into IGP (Not recommended)
• Run BGP on All transit routers (routers coming in path from one A.S to other)
Split Horizon in BGP
OSPF S1
S0 A
AS 110
S2
IBGP Route S2
11.0.0.0/8 IGP
S0 B S0 C S1
S0 S1
S1 EBGP S0
EBGP D
EBGP Route
11.0.0.0/8
F E
11.0.0.0/8 AS 2121
AS 5252
Split Horizon :
• Updates coming from IBGP neighbor cannot be forwarded to other IBGP neighbors
Full Mesh IBGP Neighbor
OSPF S1
S0 A
AS 110
S2
IBGP S2 IBGP
IBGP Route
Route EBGP Route
11.0.0.0/8
11.0.0.0/8 11.0.0.0/8
S0 B S0 C S1
S0 S1
S1 EBGP S0
EBGP D
EBGP Route
11.0.0.0/8
F E
11.0.0.0/8 AS 2121
AS 5252
Solution:
• Configure full mesh IBGP neighbor relationship OR
• Use Route Reflector
BGP - Star Topology
OSPF S1
S0 A
AS 110
S2
S2
S2 IBGP
IBGP Route
11.0.0.0/8
S0 S0 C S1
B S0
S1 EBGP S0
EBGP D
EBGP Route
11.0.0.0/8 EBGP
F E
11.0.0.0/8 AS 2121
AS 5252
F
Problems : AS 5251
• In Star topology same routing updates to different router need to pass through hub router
• This creates repetition of same updates
• BGP in full mesh creates (n X (n -1))/2 IBGP Neighbor relationship
Route Reflector
S1 EBGP S0
EBGP D
EBGP Route R R Client
11.0.0.0/8 EBGP
F E
11.0.0.0/8 AS 2121
AS 5252
F
AS 5251
Route Reflector
OSPF S1
S0 A
AS 110
S2
IBGP Route S2 IBGP
11.0.0.0/8
S0 B S0 C S1
S0 S1
S1 EBGP S0
EBGP D
EBGP Route
11.0.0.0/8
F E
11.0.0.0/8 AS 2121
AS 5252
Idle
Connect Active
Open Sent
Open Confirm
Establish
Border Gateway Protocol
(BGP - Day -2)
BGP Neighbor
1.81 1.94
S0 A S1
1.82
S1 AS 110 1.93
S0
IBGP
B C
1.85 1.90
In router B
S0 1.86 1.89
Interface loopback 12
S1 S0 S1 In router C
IP add 10.10.0.1/24 Interface loopback 1
Router BGP 110 IP add 10.20.0.1/24
neighbor 10.20.0.1 Router BGP 110
D neighbor 10.10.0.1
1.81 1.94
S0 A S1
1.82
S1 AS 110 1.93
S0
IBGP
B CC
1.85 1.90
1.86 1.89
In router B S0 1.89 S1
Interface loopback 12 S1 S0 In router C
IP add 10.10.0.1/24 S0 Interface loopback 1
Router BGP 110 IP add 10.20.0.1/24
neighbor 10.20.0.1 D Router BGP 110
neighbor 10.10.0.1
On
OnRouter
RouterBB
B(config)#router
B(config)#routerBGP
BGP110
110
B(config-router)#neighbor
B(config-router)#neighbor10.20.0.1
10.20.0.1remote-as
remote-as110
110
B(config-router)#neighbor
B(config-router)#neighbor10.20.0.1
10.20.0.1update-source
update-sourceloopback
loopback12
12
B(config)#int
B(config)#intloopback
loopback12
12
B(config-if)#ip
B(config-if)#ip add 10.10.0.1255.255.255.0
add 10.10.0.1 255.255.255.0
EBGP Neighbor
10.0.1.1/30 10.0.1.2/30
S0 S0
A S1 S1 B
10.0.2.1/30 10.0.2.2/30
AS 278 AS 523
On
OnRouter
RouterAA
A(config)#router
A(config)#routerBGP
BGP278
278
A(config-router)#neighbor
A(config-router)#neighbor10.20.0.1
10.20.0.1remote-as
remote-as523
523
A(config-router)#neighbor
A(config-router)#neighbor10.20.0.1
10.20.0.1update-source
update-sourceloopback
loopback12
12
A(config-router)#neighbor
A(config-router)#neighbor10.20.0.1
10.20.0.1ebgp-multihop
ebgp-multihop22
A(config)#int
A(config)#intloopback
loopback12
12
A(config-if)#ip
A(config-if)#ipadd
add10.10.
10.10.0.1
0.1255.255.255.0
255.255.255.0
A(config)#ip
A(config)#iproute
route10.20.
10.20.0.0
0.0255.255.255.0
255.255.255.0ss00
A(config)#ip
A(config)#iproute
route10.20.0.0
10.20.0.0255.255.255.0
255.255.255.0ss11
Next Hop in BGP
AS 5252
OSPF NH 192.168.1.1
AS 110 B 11.0.0.0/8
S2
A
2.1 IBGP NH S 1
1
.0 .1 B 192 0 , 5
.0 6 8 ,
1 1 .1 2
1 1 .1 2
. 0 .1
S0 S0
B 1 9 2 52 5
.0 6 8 52
/8
B C S1 . 0 .3
S
1.2 2.2 .0 .1
NH A
/8
3.1
S1 3.2
1.1 EBGP S0
EBGP
F E
11.0.0.0/8 AS 2121
AS 5252
OSPF AS 5252
AS 110 AS 5252,NH 1.1
NH 192.168.2.1
B 11.0.0.0/8
B 11.0.0.0/8 S2
S2 A
NH S 1
2.1 IBGP 1
B 192 0, 5
.0 .1 11 .1 2
S0 S0 S1
11 .1 52
.0 68 52
.0 .1
B C
B 192 52
.0 .3
.0 68
/8
1.2 2.2 3.1 .0 .1
S
/8
NH A
S1 3.2
1.1 EBGP S0
EBGP
F E
11.0.0.0/8 AS 2121
AS 5252
AS 110
AS 123 AS 123
NH 192.168.1.1 NH 192.168.1.1
AS 123 B 11.0.0.0/8 B 11.0.0.0/8
S2
S1 2.1 IBGP
S0 S0
11.0.0.0/8 1.1
1.2 B 2.2 C
F
Origin
• Origin informs all ASs in Internetwork how network got introduced into BGP.
• IGP (i)
• network command
• EGP (e)
• Redistributed from EGP
• Incomplete (?)
• Redistributed from IGP or static
• Local preference defines how data traffic should exit from an AS.
• Default value is 100
• Path with highest preference value is more desirable.
• It is advertised only to IBGP neighbor within an AS.
• Local preference is Well known, discretionary and transitive only to IBGP neighbor.
Local Preference
Local Preference
AS 21117,178
LP 100
B 11.0.0.0/8 AS 21117,178
A B 11.0.0.0/8
C AS 21117
My AS
AS 123
122 250 8
B1
LP .0.0/
0,1
1.0
25,
179
BB
AS 1 .0.0.0/8
B 11
220,1
25,17
9
A 11.0.0.1 LP 100
CC AS 21117
My
AS 123
B
LP 250
Metric
A B 192.1 20
5.2.0/2
4
My
AS 123
192.15.2.0/24 C
AS 12200
t ri c 500
Me .2.0/24
15
B B 192.
MED
My
AS 123
192.15.2.1
192.15.2.0/24
C
AS 12200
B
WEIGHT
AS 1220 AS 179
11.0.0.0/8
WEIGHT
13.0.0.1
11.0.0.1
12.0.0.1
14.0.0.1
A LP 100
C AS 21117
My
12.0.0.0/8
AS 123
B
LP 250
A LP 100
C AS 21117
My
AS 123
B
Route-map BGP
Match IP add 11.0.0.0
Set Local preference 250
Global
ISP X
ISP A
112.0.0.0/8
C
My
A AS 123
ISP B
B 61.0.0.0/8 Global
ISP Y
IPv6
Why Do We Need IPV6
s s!
d re
A d
v 4
e IP
o r
o M
N
Why Do We Need a Larger Address Space?
• Transportation
• Consumer devices
• Unicast
• Multicast
• Anycast
Unicast
Address Scope
Global
Unique-Local
Link-Local
Global Unicast
• The Internet Assigned Numbers Authority (IANA )delegates the current global address’s
prefix as 2000::/3.
Link Local
• Enables communication within local link (local physical network) only.
• The first 10 bits of link-local IP address is set to 1111111010, which is equals to FE80 when it is
converted to hexadecimal.
• Packets are routed within an organization , and not outside it on the public internet.
• IPv6’s site-local addresses have set the first 10 bits to 1111111011, which equals to FC00.
Where do IP addresses come from?
Standards
Allocation
Assignment USER
Multicasting
Group ID
0 Permanent
Flag =
1 Temporary
F F Flag Scope
1 Int Local
2 Link Local
3 Subnet Local
5 Site Local
8 Organization
E Global
Multicast Scope
ANYCAST
Anycast
IP 2001::1/64
IP 2001::2/64
2002::1
GW 2001::1
DNS 2001:1::1
Anycast
00 90 27 17 FC 0F
02 90 27 FF FE 17 FC 0F
0290:27FF:FE17:FC0F
Special IPV6 Addresses
IPV6 Routing Protocols
IPv6 Routing Protocols
• Static
• RIPng
• OSPFv3
• ISIS for IPv6
• EIGRP For IPv6
• MP BGP
RIPNG
RIPng
• Link-State Protocol
• SPF or Dijkstra algorithm
• Basic packet types
• Mechanisms for neighbor discovery and adjacency formation
• Same Interface types
• LSA flooding and aging mechanism
• OSPFv3 still uses Router ID from IPv4 Address
OSPFv3 / OSPFv2 Differences
OSPF v2 OSPF v3
• Transition Richness
• No Fixed day or time Due date for IPv4 to IPv6
• Smooth transition from IPv4 to IPv6
• Use Dual Stack or 6to4 tunnel
• IPv4 to IPv6 host can communicate
IPv4-IPv6 Transition and Co-Existence
• A wide range of techniques have been identified and implemented, basically falling into
three categories:
• Dual-stack techniques, to allow IPv4 and IPv6 to co-exist in the same devices and
networks
• Tunneling techniques, to avoid order dependencies when upgrading hosts, routers,
or regions
• Translation techniques, to allow IPv6-only devices to communicate with IPv4-only
devices.
DUAL Stack
• The term dual stacks means that the host or router uses both IPv4 and IPv6 at the same
time.
Transport Header
IPv6 Header Data
– Authentication
– Anti-Replay (is a sub-protocol of IPsec that is part of Internet Engineering Task Force (IETF). The main goal of anti-
replay is to avoid hackers injecting or making changes in packets that travel from a source to a destination)
– Tunneling
Devices Supports VPN
Routers
Firewall
VPN concentrator
Servers
• Remote-access
– Client-initiated
– Network access server
• Site-to-site
– Intranet
– Extranet
Remote Access VPN
Head Office
IP
/
Internet
RAS
Head Office
Intranet
Branch Office
IP
/
Internet
Business Partner
Extranet
Encryption at Several Layers
Tunneling Protocols
Generic Routing Protocol
Generic Routing Encapsulation
2.2.2.3 IP 61.0.0.5
Data 192.168.1.10
Data 192.168.1.10
192.168.2.20 /
192.168.2.20
Data 192.168.1.10 192.168.2.20
NO
User Data Encryption
YES
NO
GRE / L2TP IP Unicast
YES
IPSec Send
IPSec Modes
• IPSec modes:
– Tunnel Mode
– Tunnel mode creates a new additional IP header with data encryption
– Transport mode
– just encrypt data without adding new IP header
IPSEC PROTOCOLS
IPSec Protocols
• Negotiation protocol
– IKE /ISAKMP
• Security Protocol
– ESP
– AH
IPSec Protocols
• Encryption
– DES
– 3DES
– AES
• Hash
– MD5
– SHA
• Authentication
– Pre-share key
– Username/Password
– OTP
• Password Protection (Diffie-Hellman for password exchange)
– DH Group 1
– DH Group 2
– DH Group 5
IKE
Internet Key Exchange
• IKE solves the problems of manual and unsalable implementation of IPSec by automating the
Negotiation Process
– Automatic key generation, negotiation and implementation
– Negotiation of SA characteristics
– Manageable manual configuration
IKE Negotiation
Branch X
2600 Head Office
Policy 1
Encryption: 3DES
Hash: SHA
IP 3800
Policy 1
Authentication: Pre Share
DH 2
/ Encryption: AES
Hash: SHA
Policy 2 Internet Authentication: Pre Share
DH 2
Encryption: DES
Hash: MD5 Policy 2
Authentication: Pre Share Branch Y Encryption: 3DES
DH 2 2500 Hash: SHA
Authentication: Pre Share
DH 2
Policy 1
Encryption: DES Policy 3
Hash: MD5 Encryption: DES
Authentication: Pre Share Hash: MD5
DH 2 Authentication: Pre Share
DH 2
ESP & AH
Encapsulating Security Payload
• ESP protocol ID 50
• Provides framework for encrypting, authenticating and data integrity. Optional Anti-replay
Transport Mode L2 IP Header ESP Head TCP / UDP Head DATA ESP Tail ESP Auth
New IP
Tunnel Mode L2 ESP Head IP Head TCP / UDP Head DATA ESP Tail ESP Auth
Header
Authentication Header
• AH protocol ID 51
• Provides framework for authenticating and data integrity. Optional Anti-
Replay
Tunnel Mode L2 New IP Header AH Head IP Head TCP / UDP Head DATA
DMVPN
• DMVPN allows a vpn tunnel to dynamically created and torn down between two remote
sites.
• Hardware-based bridging
• Wire-speed performance
• High-speed scalability
• Low latency
• Uses MAC address
Switch
Layer 3 Switching
• Access Layer:
• Access Layer switches are used to connect end devices to the network
• Access Layer Switches used to provide Layer2 ( VLAN) connectivity between users.
• Ex: 2950,2960 switches
• Distribution Layer:
• Distribution Layer switches are used to interconnect access layer switches to core layer switches.
• Distribution Layer is a Layer 3 Boundary where routing meets the VLANs of access layer switches.
• Ex: 3550,3560,3750,4500 Switches
• Core Layer
• Core Layer provides interconnectivity between all distribution layer switches.
• Core Layer is sometimes also called as Backbone must be capable of forwarding traffic from one
distribution layer to other distribution layer switch as efficiently as possible
• Ex: 6500 Switch
Ethernet
Ethernet
Fast Ethernet
40 Km
Metro Ethernet
• Leverages service provider network or existing, unused optical fiber (dark fiber) for
metro Ethernet connectivity
• Supports any IP application
Getting Started with
Cisco Catalyst Switches
Cat OS and Cisco IOS (Native Mode)
•Cat OS
• Layer 2 switching functions
•Hybrid Mode
• Cat OS for Layer 2 switching
• IOS for Layer 3
CAM Table
CAM Table is used to store layer 2 information like
• Source MAC address
• Interface where we learned the source MAC address
• Vlan information
TCAM Table
TCAM table is used to store higher information like
• Access-list
• QOS
• Routing Table
CDP Cisco Discovery Protocol
• If an attacker is listening to CDP messages, it could learn important information about the
device model and the current software version
Switch(conf)#lldp run
Virtual LANs - VLANs
Virtual LANs
• VLANs are used to divide one large broadcast domain into multiple smaller broadcast
domains.
• A large network can be divided into VLANs based on Project,Department or function etc.
Static Dynamic
Switch Switch
Switch
5500
A A
Static VLANS
• Any device connecting to the port will become a member of that Vlan.
• Vlans are automatically created by switch and assigned as per the mac address of the
connected device.
• Voice Vlan allows access ports to carry voice traffic from an IP phone
Switch(config)#Vlan <no>
Switch(config-vlan)#name <name>
Assigning Access Ports to a VLAN
vlan 1
default vlan 2 vlan 3
Deleting VLANs
• VLANs are local to each switch's database, and VLAN information is not passed
between switches. Trunks carry traffic from all VLANs to and from the switch by default
but can be configured to carry only specified VLAN traffic.
VLAN 10
VLAN 20
VLAN 10 VLAN 10
ISL
VLAN 20 VLAN 20
ISL and Layer 2 Encapsulation
Dot1q Trunk
VLAN 10 VLAN 10
• Dynamic Trunking protocol is a dynamic way of establishing a trunk between two switches.
1) Dynamic Desirable
2) Dynamic Auto
To Disable DTP
VTP Server
• Create Vlans
• Delete Vlans
• Modify Vlans
• Sends and Forwards Advertisements
• Synchronizes
VTP Client
• Cannot create, delete and modify Vlans
• Forward Advertisements
• Synchronizes
VTP Modes
VTP Transparent
• Create, delete and modify Vlans local to the switch
• Forward Advertisements
• Does not synchronize
Working of VTP
Network admin
Creates Vlan 10
VTP server
Vlan Database
Vlan 10 Rev.No :0
Network admin
Creates Vlan 10
VTP server
Vlan Database
Vlan 10 Rev.No :1
Network admin
Creates Vlan 10
VTP server
Vlan Database
Vlan 10 Rev.No :1
Vlan Database
Vlan 10 Vlan Database
Switch(config)#vtp pruning
• Enables VTP pruning in the domain
Verifying the VTP Configuration
VTP Version : 2
Configuration Revision : 247
Maximum VLANs supported locally : 1005
Number of existing VLANs : 33
VTP Operating Mode : Client
VTP Domain Name : Lab_Network
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x45 0x52 0xB6 0xFD 0x63 0xC8 0x49 0x80
Configuration last modified by 0.0.0.0 at 8-12-99 15:04:49
Switch#
Spanning Tree Protocol
Bridging Loops
Spanning Tree Protocol
Speed Cost
10 Mbps 100
100 Mbps 19
1000 Mbps 4
10000 Mbps 2
Bridge ID
STP Election
FA0/24 FA0/22
FA0/22 FA0/24
Switch A Switch C
FA0/24 FA0/23
FA0/24 FA0/22
FA0/23 FA0/23
Switch B Switch D
Bridge ID:32768.0A07.D75F.0CAB Bridge ID:32768.0107.0001.0002
STP Election
FA0/22 FA0/24
Switch A Switch C
FA0/24 FA0/23
FA0/24 FA0/22
FA0/23 FA0/23
Switch B Switch D
Bridge ID:32768.0A07.D75F.0CAB Bridge ID:32768.0107.0001.0002
Root ID:32768.0A07.D75F.0CAB Root ID:32768.0107.0001.0002
STP Election
FA0/22 FA0/24
Switch A Switch C
FA0/24 FA0/23
FA0/24 FA0/22
FA0/23 FA0/23
Switch B Switch D
Bridge ID:32768.0A07.D75F.0CAB Bridge ID:32768.0107.0001.0002
FA0/24 FA0/22
Bridge ID:32768.000C.2BCD.ABCD
Switch C
FA0/24 FA0/23
FA0/21
FA0/22
FA0/24
• Disabled State:
• Layer 2 port does not participate in spanning tree and does not forward frames.
• Blocked State:
• Only receives BPDU’s
• Stays for20 sec
• Listening State:
• Receives and Sends BPDU’s
• Stays for 15 sec
STP Port States
• Learning State:
• Receives and Sends BPDU
• Learns Mac address
• Stays for 15 sec
• Forwarding State:
• Receives and Sends BPDU
• Learns Mac address
• Forwards data
STP Timers
•Hello Timer
• Determines how often root bridge sends configuration BPDUs. The default is 2
seconds.
•Max Age
• how long to keep ports in the blocking state before listening. The default is 20
seconds.
•Forward Delay
• how long to stay in the listening state before going to the learning state, and
how long to stay in the learning state before forwarding. The default is 15
seconds.
Planning Root Bridge
1900 2900
10 0 100 Mbps
100 Mbps Mb
ps
A
B 3550 1Gbps 3550
1Gbps 1Gbps
D
C 6500 1Gbps 6500
Cisco enhancements to STP
Enhancements to STP
• Portfast
• used for Access ports
• port state switched from Disable to Forwarding
• No delay, saves 50 seconds
• Uplinkfast
• configured on a switch with at least one Blocked port
• the Blocked port switches to Forwarding state without any delay, saves 30
seconds
• Backbonefast
• configured on all switches
• if indirectly connected link fails, the switch with Blocked port switches to
Forwarding state in 30 seconds, saves 20 seconds
STP Portfast
A
FA0/20
Switch C
FA0/24 FA0/23
FA0/21 B
FA0/22
FA0/24
20 blocking
After Portfast
is configured:
15state
The port listening
switches from
15 learning
Disable Forwarding
Forwarding state
STP Uplinkfast
Switch C
FA0/24 FA0/23
FA0/22 FA0/21
FA0/24
Switch C
FA0/24 FA0/23
FA0/21
FA0/22
FA0/24
• Cisco proprietary
• Single STP instance for each VLAN
• Separate BPDU, Roots and Blocked Port
• PVST work only on trunk link
• PVST works only ISL, PVST+ works on ISL/Dot1Q
PVST
SwitchC
Switch C
FA0/24 FA0/23
FA0/21
FA0/22
FA0/24
Switch D FA0/24 Switch E
Per VLAN Spanning Tree (Cont.)
Advanced Spanning Tree
Rapid Spanning Tree Protocol
Rapid Spanning Protocol
STP RSTP
Disable
Blocked Discarding
Listening
Learning Learning
Forwarding Forwarding
RSTP Port States
Port States
• Discarding
Prevents the forwarding of data frames.
• Learning
Accepts data frames to populate the MAC table.
• Forwarding
Forwards data frames and determines the topology.
RSTP Port Type
Switch C
FA0/24 FA0/23
FA0/21
FA0/22
FA0/24
Switch D FA0/24 Switch E
Multiple Spanning Tree
MST Regions
Switch(config-mst)#name name
• Sets the MST region name
Switch(config-mst)#revision rev_num
• Sets the MST configuration revision number
• By default Layer 2 switch cannot forward the traffic between two different vlans.
• A layer 3 device is required to forward the traffic between two different vlans.
• Router On a Stick
• Multilayer Switch
Legacy Inter Vlan Routing
• Packets would arrive on the router through one interface, leave through another interface.
• Large networks with large number of VLANs require many router interfaces.
Legacy Inter Vlan Routing
Router On a Stick
• The Physical interface of the router is divided into one or more sub interfaces.
• Each sub interface is configured with an IP address for the VLAN it represents.
Trunk link
carrying all
VLANs
Multi Layer Switching
10.1.10.0/24 A
SC R
A
/30 L3
L3 1.0 10
. 1.
1
. 1. 11
.8/
10 30
L3
RB SE
10.1.11.4/30 RC
10.2.10.0/24
10.3.10.0/24
Switch Port
• Process Switching
• Fast Switching
• CEF – Cisco Express Forwarding
Process Switching
IP 192.168.1.100
B
A
D
IP 192.168.1.11 IP 192.168.2.1
C E
IP 192.168.1.200
IP 192.168.2.200
HSRP Hot Standby Routing Protocol
HSRP Hot Standby Routing Protocol
• Cisco proprietary
• Provides Router redundancy
• Routers are grouped together, to work as one virtual router
• Group is identified by Group ID
• Range 0 – 255 (default is 0)
• A router can be member of multiple groups
• Two roles of Router
• Active Router
• Standby Router
HSRP
HSRP Group
47
IP 192.168.1.100
BB
IP 192.168.1.250
V
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250
C E
IP 192.168.1.200
IP 192.168.2.200
HSRP Group
HSRP Group
47
IP 192.168.1.250
V
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250
Standby Router
C E
IP 192.168.1.200
IP 192.168.2.200
HSRP Active router Role
HSRP Group
47
IP 192.168.1.100
Active Router
B
V
IP 192.168.1.250
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250
Standby Router
C E
IP 192.168.1.200
IP 192.168.2.200
HSRP Backup Role
HSRP Group
47
IP 192.168.1.100
Active Router
BB
V
IP 192.168.1.250
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250 V
IP 192.168.1.250
Standby Router
C E
IP 192.168.1.200
IP 192.168.2.200
HSRP ARP
HSRP Group
47
IP 192.168.1.100
Active Router
BB
1.11 A V
1.250 FF
MAC 0000.0c07.ac2f
IP 192.168.1.250
A
ARP
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250
IP MAC
1.250 0000.0c07.ac2f
Standby Router
C E
IP 192.168.1.200
IP 192.168.2.200
HSRP Elections
V
IP 192.168.1.250
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250
Standby Router
C E
IP 192.168.1.200
IP 192.168.2.200
HSRP Configuration
• Initial
• Listen
• Speak
• Standby
• Active
HSRP before Preempt
HSRP Group
47
IP 192.168.1.100
Active Router
B
Priority 100
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250
Priority 150
Standby Router
C E
IP 192.168.1.200
IP 192.168.2.200
HSRP after Preempt
HSRP Group
47
IP 192.168.1.100
Standby Router
B
Priority 100
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250 My Priority is High I
will become Active
Priority 150 Router
Active Router
C E
IP 192.168.1.200
IP 192.168.2.200
c(config-if)#standby <Group No> preempt
HSRP Interface Tracking
IP 192.168.1.100
Active Router
B
Priority 150 S0
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250
Priority 120
S1
CC Standby Router
E
IP 192.168.1.200
IP 192.168.2.200
HSRP Interface Tracking
IP 192.168.1.100
Active Router
B
Priority 150 S0
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250
Priority 120
S1
CC Standby Router
E
IP 192.168.1.200
IP 192.168.2.200
HSRP Interface Tracking
b(config-if)#standby <Group No> track s 0 31
IP 192.168.1.100
Active Router
B
Priority 150 S0
A
D
IP 192.168.1.11 IP 192.168.2.1
GW 192.168.1.250
Priority 120
S1
C Standby Router
E
IP 192.168.1.200
IP 192.168.2.200
HSRP track Command
• Master Router
• Only one master per group
• Actively forwards traffic coming for virtual IP
• Backup Router
• Multiple Backup routers per Group
VRRP
VRRP Configuration
D
IP 192.168.2.1
Int E 0/0
Y E0/0 IP address 192.168.1.200 255.255.255.0 E
C
Standby 10 ip 192.168.1.1
IP 192.168.1.2 Standby 20 ip 192.168.1.254 IP 192.168.2.200
Standby 20 priority 150
Load-Balancing With HSRP/VRRP in Multilayer Switch
• AVG
• Active Virtual Gateway
• Reply for ARP coming for Virtual IP
• Divides load among AVF
• One Per group
• AVF
• Active Virtual Forwarder
• Forwards user traffic coming for Virtual MAC
• There can be up to four forwarder per group
GLBP Elections
IP 192.168.1.1 IP 192.168.1.100
GW 192.168.1.150
X B
AVG/AVF
V-IP 192.168.1.150
D
IP 192.168.2.1
AVF
Y
C E
IP 192.168.1.200
IP 192.168.1.2 IP 192.168.2.200
GW 192.168.1.150
GLBP
IP 192.168.1.1 IP 192.168.1.100
GW 192.168.1.150
X
ARP B
AVG/AVF
V-IP 192.168.1.150
IP MAC V-MAC 0000.0c00.0001
1.150-0000.0c00.0001
D
IP 192.168.2.1
IP MAC AVF
1.150 - 0000.0c00.0002 V-MAC 0000.0c00.0002
Y
C E
ARP
IP 192.168.1.200
IP 192.168.1.2 IP 192.168.2.200
GW 192.168.1.150
GLBP
IP 192.168.1.1 IP 192.168.1.100
GW 192.168.1.150
X B
AVG/AVF
V-IP 192.168.1.150
IP MAC V-MAC 0000.0c00.0001
1.150 – 0000.0c00.0001
D
IP 192.168.2.1
IP MAC AVF
1.150 - 0000.0c00.0002 V-MAC 0000.0c00.0002
Y
C E
IP 192.168.1.200
IP 192.168.1.2 IP 192.168.2.200
GW 192.168.1.150
GLBP
IP 192.168.1.1 IP 192.168.1.100
GW 192.168.1.150
X BB
AVG/AVF
V-IP 192.168.1.150
IP MAC V-MAC 0000.0c00.0001
1.150 – 0000.0c00.0001
D
IP 192.168.2.1
IP MAC AVF
1.150 - 0000.0c00.0002 V-MAC 0000.0c00.0002
Y V-MAC 0000.0c00.0001
C E
IP 192.168.1.200
IP 192.168.1.2 IP 192.168.2.200
GW 192.168.1.150
VSS
• The Virtual Switching System (VSS) allows two Cisco Catalyst 6500 or 4500 to combine
together as one mega switch
• Other devices will see the VSS configured 6500 as a single device
• Two switches will be combined by using a special link called a Virtual Switch Link( VSL) .
Without VSS
With VSS
Switch Security
Recommended Switch Security
• Authentication
– Verifies a user’s identify
• Authorization
– Specifies the permitted tasks for the user
• Accounting
– Provides billing, auditing and monitoring
AAA in a Nutshell
• Accounting provides a method for collecting and sending security server information used for
billing, auditing, and reporting.
Accounting collects data as to what a user did once logged in.
AAA
AAA
• Radius
• Tacacs+
To enable AAA
• Switch(conf)#aaa new-model
• Switch(conf)#aaa authentication login default group radius
• Switch(conf)#radius-server host 192.168.0.1 key ccna123
• Switch(conf)#line vty 0 4
• Switch(conf-line)#login authentication default
Switch Attack Categories
Z F
Y F
C
X F
A Fa0/1 Fa0/1 X
Switch Fa0/1 Y
Fa0/3
Fa0/1 Z
Hacker
B
Network Access Port Security
Switch
0/2
Vlan 10
A B
Network Access Port Security
Switch
0/2
Vlan 10
Switch(c)#interface fa 0/2
Switch(c-if)#switchport port-security
Switch(c-if)#switchport port-security max 1
Switch(c-if)#switchport port-security mac-address
0000.0000.000a
A
Switch(c-if)# switchport port-security violation
<shutdown | protect | restrict>
Verification of port security
Switch#show port-security
Switch#show port-security
Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security Action
(Count) (Count) (Count)
----------------------------------------------------------------------------
Fa5/1 11 11 0 Shutdown
Fa5/5 15 5 0 Restrict
Fa5/11 5 4 0 Protect
----------------------------------------------------------------------------
Creating Access-map
s(c)#vlan access-map V10 10
s(c-access-map)#match mac address cisco
s(c-access-map)#action drop|forward
Implementing
s(c)#vlan filter v10 vlan-list 10
Switchport Protected
Protected port is a feature on Cisco switches that is used to prevent interfaces are
communicating with each other.
A B
Fa0/1 Fa0/2
Protected Protected
Switch
Fa0/3
Un protected
C
Private Vlan
Private Vlan
• Isolated : Ports belong to this vlan will not communicate with each other
Root
FA
0/1
1
Root
Ro
o t
Po FA
0/1
1 2
FA
0/1
1
X
FA
0/1
2
A
A
Ether Channel
Note:
Only similar physical link with same configuration can be aggregated.
Max 8 similar links can be bundled (depend on Hardware)
Ether Channel
Ro
Root o t
Po
1
Switch(config-if)#channel-protocol <pagp/lacp>
Port-channel: Po1
------------
Age of the Port-channel = 01d:01h:31m:38s
Logical slot/port = 1/0 Number of ports = 2
GC = 0x00020001 HotStandBy port = null
Port state = Port-channel Ag-Inuse
• Data sent across an Ether Channel is not load-balanced equally among all interfaces.
• Ether Channel utilizes a load-balancing algorithm, which can be based on several forms
of criteria, including:
Ether Channel Load balancing
• SNMP is a protocol used for network management, i.e. to monitor and configure
devices on IP networks.
• SNMP works in Application Layer (Layer 7)
• SNMP uses UDP
• SNMP uses port No. 161
SNMP Components
• SNMP MANAGER
• SNMP AGENT
SNMP Functions
• SNMP Agent is the software that is installed on network managed devices such as
Router (or) Switch (or) Server (or) PC.
• Agents collects information and then sends it to monitoring station whenever it is
asked.
• Agents are usually built into your network hardware and software. They simply need to
be enabled.
SNMP Agent
Polling
• In Polling method, SNMP Manager continuously asks a network device to report the
statistics of device.
• Example: Interface Status of Router.
• Request is sent from SNMP Manager to Agent.
TRAP
• Trap is where device reports an event to NMS, for example whenever High CPU utilization or High
Memory Utilization or Link Down is detected.
SNMP Modes
• SNMP V1
• SNMP V2
• SNMP V3
SNMP Version 1
• Syslog Server
• A host that accepts and processes log messages from 1 or more syslog clients.
• Syslog Client
• A host that generates log messages and forwards them to a syslog server.
• Ex: Router, switch, firewall, modem
Syslog Message Format
Configure syslog
Requirement:
• R1(config)# logging on
• R1(config)#logging 192.168.0.50
• R1(config)#logging trap i4
• Verification:
• R1#show logging
Telnet vs SSH
Telnet vs SSH
Telnet SSH
Telnet SSH
Telnet is a protocol which allows you to access any SSH is a protocol which allows you to access any
device remotely. remote device securely
It sends the data in Clear-Text format. It sends the data in Encrypted format.
SSH configuration
• Requirement:
• Coordinated Universal Time (UTC) or Greenwich Mean Time (GMT) is the global
standard for time representation.
• Most of the network enabled devices have two clock sources
• Hardware clock
• Software clock
NTP
• NTP provides accurate timing services to each and every network enabled device.
• It provides automatic synchronization of device clock with one or more time
servers which provide accurate time.
• NTP uses UDP port number 123 .
Stratum
• IP SLA is a technology from Cisco that actively monitors traffic to measure the
performance of the network.
• Performance of the network can be measured by using following parameters
- Jitter
- Latency
- Packet Loss
Configure SLA
• Requirement:
• DHCP Relay Agent forwards DHCP messages between DHCP clients and DHCP Servers
which reside on different IP network.
• By default router will not forward broadcasts, DHCP relay agent will convert broadcast
into unicast packets.
To Configure a router as a DHCP Relay Agent
• Switched Port Analyzer (SPAN) is also called Port Monitoring; used for Network
Analysis.
• SPAN allows you to select one or more ports for analysis .
• SPAN is used to monitor devices on only one switch.
• Remote SPAN is used to monitor devices on more than one switch .
SPAN Configuration
SW1(config)#vlan 100
SW1(config-vlan)#remote-span
SW2(config)#vlan 100
SW2(config-vlan)#remote-span
SW1(config)#monitor session 1 source interface fastEthernet 0/1
SW1(config)#monitor session 1 destination remote vlan 100
SW2(config)#monitor session 1 source remote vlan 100
SW2(config)#monitor session 1 destination interface fastEthernet 0/2
NETWORK MONITORING TOOL
PRTG
Agenda
•
What is Network Monitoring
•
Why Monitor Your Network..?
•
Where it use
•
How it works
•
Functions
•
About PRTG.
•
Some practical things
518
What is Network Monitoring?
• Track trends
PRTG is network monitoring software from Paessler AG. PRTG runs on Windows and monitors
network availability and network usage using SNMP, Packet Sniffing, WMI, IP SLAs and Netflow
and various other protocols.
Installation…..
How It Works?
527
528
529
Why Network Monitoring ?
What Does Network Monitoring Do?
Analyse
Optimize
530
Why Network Monitoring ?
531
• PRTG Network Monitor consists of different parts which can be divided into three main
categories:
• System parts
• Core Server
• Probe(s)
• Control interfaces
•
What is Wireshark
•
Where it use
•
How it works
•
Some practical things
• Network analysis is the process of capturing network traffic and inspecting it closely to
determine what is happening on the network.
What is Wireshark……?
• Wireshark is a network packet analyzer. A network packet analyzer will try to capture
network packets and tries to display that packet data as detailed as possible.
• Previously the packet analyzing was very difficult and it required expensive hardware.
• Beside these examples Wireshark can be helpful in many other situations too.
Shark on Water
Shark on wire
How it works?
For Windows
- download
(http://www.wireshark.org/download.html)
- install
- use
Installation Process
STEP : 1
STEP 2:
STEP 3 :
STEP : 4
STEP : 5
STEP : 6
STEP : 7
STEP : 8
STEP : 9
STEP : 10
STEP :11
STEP : 12
Wireshark Graphical User Interface
When you run the Wireshark program, the Wireshark graphical user interface shown in
Figure 2 will de displayed. Initially, no data will be displayed in the various windows.
• Top-down method
• Bottom-up method
• Divide and Conquer method
• Following the Traffic path
• Comparing configurations
• Component swapping
Top-down method
Application
Presentation
Session
Transport
Network
Data Link
Physical
Bottom Up method
Application
Presentation
Session
Transport
Network
Data Link
Physical
Divide and Conquer
Application
Presentation
Session
Transport
Ping 10.0.0.1
Network
Data Link
Physical
Follow the Traffic path method
Component swapping
Network Maintenance
• CLI Tools
• GUI Tools
• Backup tools
• Logging Tools
• Network Time Protocol
• Network Documentation Tools
Examples of Network Maintenance
• Interface is down
• Mismatched Autonomous Systems
• Incorrect Network Statement
• Mismatched K Values
• Passive Interface
• Different Subnet
• Authentication
• ACl
• Timers
OSPF Troubleshooting
OSPF Troubleshooting
• Interface is down
• Interface not running the OSPF process.
• Mismatched timers.
• Mismatched area numbers
• Mismatched area type
OSPF Troubleshooting
• Different subnets
• Passive interface
• Mismatched authentication
• ACL
• MTU mismatch
• Duplicate Router ID
• Mismatched network types
OSPF troubleshooting
• MTU mismatch :
• The maximum transmission unit of neighboring interfaces must match.
• Deliberately configure a different MTU on interfaces of two routers sharing a link
• Router(config)#int s1/0
• Router(config-if)#ip mtu 100
• Verify
• Router#Sh run interfaces s1/0
• After configuring verify by giving the neighbor command
• The state will be exstart
Redistribution
Redistribution
• Distribute list
• Route-maps
• Metric
• AS number
• Process-id
• Hop count
BGP Troubleshooting
BGP Troubleshooting
• Interface is down
• Layer 3 connectivity is broken
• Incorrect neighbor statement
• Incorrect network command
• BGP packets are sourced from wrong IP address
• Mismatched of Authentication
• Neighbor doesn’t have a route
BGP Troubleshooting
• Encapsulation Mismatch
• Incompatible Trunking modes
• Native Vlan Mismatch
• Allowed vlans
• VTP domain name mismatch
Troubleshooting VTP
S1
S2 S3
VTP Troubleshooting
Note : the domain name is only propagated in the beginning if it is null then it will join
the first domain but when it is already part of a domain then it won't update the
domain name. That has to be done manually also on the clients.
VTP Troubleshooting
• Incorrect IP address
• Missing vlan
• Incorrect port Assignment
STP Troubleshooting
STP Troubleshooting
• No Trunking connectivity
• STP disabled
• Portfast
• BPDU Guard and BPDU filter
• Loop Guard
ETHERCHANNEL Troubleshooting
ETHERCHANNEL Troubleshooting
R1
Fa0/0.1 Fa0/0.2
192.168.5.1 192.168.6.1
S1
VLAN 10 VLAN 20
PC A PC B
IP- 192.168.5.2 IP- 192.168.6.2
D.G- 192.168.5.1 D.G- 192.168.6.1
Inter Vlan Routing Troubleshooting
Routing Troubleshooting
S1 S1
VLAN 10 VLAN 20
PC A PC B
IP- 192.168.5.2 IP- 192.168.6.2
D.G- 192.168.5.1 D.G- 192.168.6.1
Switch Security
Switch Security Troubleshooting
• Group number
• Same virtual IP address
• Priority
• Preemption
• Interface tracking