Академический Документы
Профессиональный Документы
Культура Документы
– BGP/OSPF/EIGRP
BRKRST-2619
Ruchir Jain
Customer Support Engineer
Agenda
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 3
View From 50,000 Metres
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Troubleshooting EIGRP
5
Lifecycle View of the EIGRP Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
Lifecycle View of the EIGRP Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
EIGRP Neighbour Process
Hello process used for neighbour discovery and maintenance
Hello Types A
K-value
AS number should match
IP subnet
Primary/secondary IP address Hello
B
Hello Interval
60 seconds for low-speed NBMA
5 seconds for all other interfaces
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
EIGRP Neighbour Process
RTRA#show ip eigrp neighbors
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
2 10.1.1.2 Et0 12 6d16h 20 200 0 233
1 10.1.4.3 Et1 13 2w2d 87 522 0 452
0 10.1.4.2 Et1 10 2w2d 85 510 0 3
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
EIGRP Neighbour Problems
Hold Time Expired
B
Other checks:
Access-lists
Debug EIGRP packet hello
Ping neighbour with small & large packets
Neighbour 10.1.1.1 (Ethernet0) is
Interface errors down: holding time expired
Sniffer Captures – external or internal
Configure neighbour statements
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
EIGRP Neighbour Problems
Manual Changes
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
EIGRP Neighbour Log Messages
eigrp log-neighbor-changes must be enabled
Example logs
Neighbor 10.1.1.2 (Ethernet0) is down: peer restarted
Neighbor 10.1.1.2 (Ethernet0) is down: holding time expired
Neighbor 10.1.1.2 (Ethernet0) is down: retry limit exceeded
Neighbor 10.1.1.2 (Ethernet0) is down: route filter changed (old)
Neighbor 10.1.1.2 (Ethernet0) is down: K-value mismatch
Neighbor 10.1.1.2 (Ethernet0) is down: manually cleared
Neighbor 10.1.1.2 (Ethernet0) is down: Interface Goodbye received
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
Lifecycle View of the EIGRP Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
EIGRP Topology Exchange
RouterA#debug ip eigrp Lo0: 10.1.1.1
IP-EIGRP Route Events debugging is on
A
RouterA#debug ip eigrp 10 10.2.2.0 255.255.255.0
IP-EIGRP AS Target Events debugging is on .1
10.10.10.0/2
02:13:13.765: IP-EIGRP(Default-IP-Routing-Table:10): Processing incoming UPDATE packet 4
02:13:13.765: IP-EIGRP(Default-IP-Routing-Table:10): Int 10.2.2.0/24 M 409600 – 256000
153600 SM 128256 - 256 128000 Update .2
B
Lo0: 10.2.2.2
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
EIGRP Topology Exchange
Lo0: 10.1.1.1
RouterA#show ip eigrp events
A
Event information for AS 10:
... .1
...
10.10.10.0/24
10 13:20:43.289 Rcv update met/succmet:
409600 128256 Update .2
11 13:20:43.289 Rcv update dest/nh:
B
10.2.2.0/24 10.1.1.2
Lo0: 10.2.2.2
...
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
EIGRP Event Log
Always running
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
EIGRP Topology Exchange
Retry Limit Exceeded
Ack Packet
After 16 retransmissions: re-initialise the neighbour
B
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
EIGRP Topology Exchange
Retry Limit Exceeded - Troubleshoot and Causes
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
Lifecycle View of the EIGRP Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
EIGRP DUAL Routing Algorithm Concepts
A neighbour meets the feasibility condition (FC) if the RD is smaller than the
FD of this router.
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 20
DUAL FD, RD, FS and Successor
A-B-E = 20+30 = 50 B
A-C-E = 20+40 = 60
10.200.1.0
A-D-E = 20+70 = 90 20 Se1/1 RD=40 20 RD=20
A C E
FD = 50
Computed Reported
Distance Distance
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Show IP EIGRP Topology All-Links
Show ip eigrp topology all-links B
10.200.1.0
.1 .2 .1 .2
56k 128k
A C E
Reported
Distance
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
Show IP EIGRP Topology Summary
Total number of routes in the local topology table
Number of queries this router is waiting on replies for
Internal data structures
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
EIGRP DUAL Routing Algorithm
Finite-State-Machine
Track all routes
Select a Successor
Remember Feasible Successors
If Successor lost
Use Feasible Successor
If no Feasible Successor exists
Query Neighbours and Recompute new Successor
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
EIGRP DUAL Routing Algorithm
Active Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
EIGRP DUAL Routing Algorithm
Stuck in Active
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
EIGRP DUAL Routing Algorithm
Troubleshooting the Stuck Part of SIAs
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
EIGRP DUAL Routing Algorithm
Likely Causes for Stuck-in-Active
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
Minimising SIA Routes
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
Lifecycle View of the EIGRP Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 30
EIGRP Routing Table
Problem with External Routes
10.1.1.0/24
EIGRP not installing external routes via RIP
A
The first thing to check is: router eigrp 100
redistribute rip
....
- default metric configured
What metric
- metric tied to the redistribution statement should I use?
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 31
EIGRP Routing Table
Problem with External Routes
What metric
should I use?
B
C
B#show ip route 10.1.1.0 C#show ip route 10.1.1.0
.... C#
10.1.1.0/24 via [A]
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 32
EIGRP Routing Table
Problem with External Routes
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 33
EIGRP Routing Table
Problem with External Routes
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 34
Lifecycle View of the OSPF Routing Process
35
Lifecycle View of the OSPF Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 36
Lifecycle View of the OSPF Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 37
OSPF Neighbour Adjacency Process
Init, 2-Way
1.1.1.1 2.2.2.2
R1 R2
Hello
• Init
{ RID =1.1.1.1
Hello
RID =2.2.2.2
Init on R2
Init on R1
Hello
{ 2-Way on R2
RID =1.1.1.1
N =2.2.2.2
• 2-Way
Hello
RID =2.2.2.2 2Way on R1
N =1.1.1.1
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 38
OSPF Neighbour Adjacency Process
Init, 2-Way
1.1.1.1 2.2.2.2
R1 R2
R1#debug ip ospf adj
OSPF adjacency events debugging is on
20:23:45.539: OSPF: 2 Way Communication to 2.2.2.2 on Ethernet0/0, state 2WAY
20:23:45.539: OSPF: Neighbor change Event on interface Ethernet0/0
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 39
OSPF Neighbour Adjacency
Stuck in Init
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 40
OSPF Neighbour Adjacency
Stuck in 2-WAY
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 41
OSPF Neighbour Adjacency
Common Issues
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 42
Interface Scoped Debugging
limiting the OSPF debug to selected interfaces
Example:
‒ debug condition interface Ethernet 0/0
‒ debug condition interface Ethernet 1/0
‒ debug ip ospf hello
‒ debug ip ospf adjacency
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 43
Lifecycle View of the OSPF Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 44
OSPF LSA Database
EXSTART /EXCHANGE
1.1.1.1 2.2.2.2
R1 R2
DBD
• EXSTART MTU = 1500
Flag = 0x7
Seq = 0x2499
DBD
• EXCHANGE MTU = 1500
Flag = 0x3
Seq = 0x837
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 45
OSPF LSA Database
EXSTART
1.1.1.1 2.2.2.2
R1 R2
R1#debug ip ospf adj
23:42:08.259: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq u opt 0x52 flag 0x7 len 32
23:42:08.339: OSPF: Rcv DBD from 2.2.2.2 on Ethernet0/0 seq 0x836 opt 0x52 flag 0x7 len 32 mtu 1500 state EXSTART
23:42:08.339: OSPF: NBR Negotiation Done. We are the SLAVE
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 46
OSPF LSA Database
The Flag Field
OSPF: Send DBD to 1.1.1.1 on Ethernet0/0 seq 0x836 opt 0x52 flag 0x7 len 32
Flag 0x7--> 111 means I(Initial) = 1, M = 1(More), MS = 1(Master)
Flag 0x6 --> 110 not possible
Flag 0x5 --> 101 not possible
Flag 0x4 --> 100 not possible
Flag 0x3 --> 011 means master has more data to send
Flag 0x2 --> 010 means slave has more data to send
Flag 0x1 --> 001 means master has no more data left to send
Flag 0x0 --> 000 means slave has no more data left to send
0 0 0 0 0 I M MS
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 47
OSPF Neighbour Adjacency
The Options Field
Normal area: OSPF: Send DBD to 141.108.97.1 on Serial0 seq 0xBC4 opt 0x2 flag 0x3 len 492
E bit is 1, Allow externals, option: 0x2(HEX) = 00000010(Bin)
Stub area: OSPF: Send DBD to 141.108.97.1 on Serial0 seq 0x1866 opt 0x0 flag 0x3 len 372
E bit is 0, no external allowed, options: 0x0 = 00000000
NSSA: OSPF: Send DBD to 141.108.97.1 on Serial0 seq 0x118 opt 0x8 flag 0x3 len 372
N/P bit is on, options: 0x8 = 00001000
DC: OSPF: Send DBD to 141.108.97.1 on Serial0 seq 0x1A1E opt 0x20 flag 0x3 len 392
DC bit is negotiated, options: 0x20 = 00100000
O DC EA N/P MC E
* *
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 48
OSPF LSA Database
Stuck in EXSTART or EXCHANGE - Common Causes
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 49
OSPF LSA Database
Loading and Full
1.1.1.1 2.2.2.2
R1 R2
LS Req
LS Type
• LOADING Link State ID
Advertising Router
LS Update
# LSA’s
• FULL LSA’s
LSA ..
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 50
OSPF LSA Database
Stuck in LOADING
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 51
Lifecycle View of the OSPF Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 52
OSPF LSA Database - LSA Type Review
Type LSA
1 Router
2 Network
3 Summary Network
4 Summary ASBR
5 External
6 Group Membership
7 NSSA
8 External Attributes
9–11 Opaque
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 53
Router LSA of R3 for Area 0
R3#show ip ospf database router 3.3.3.3
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 54
Router LSA of R3 for Area 1
Router Link States (Area 1)
LS age = 253
Options = (No TOS-capability, DC) 192.1.1.x/24
LS type = Router Links This is a Type 1 LSA 4.4.4.4
DR
Link State ID = 3.3.3.3
Advertising Router = 3.3.3.3 Router ID of R3 .4
It is an area border router bit B = 1 R4 Area 0
Cost = 1 18.10.0.4/30
3.3.3.3 6.6.6.6
# links = 2 .3 .5
Link ID = 192.1.1.4 IP address of the DR .6
Link Data = 192.1.1.3 Interface address of this router R3
Type = 2 This is a transit network Cost =8 R6
# TOS metrics = 0 Area 1 192.1.4.0/24
Cost = 2
metric = 1 Cost to reach the interface
Link ID = 192.1.4.0 IP network number
Link Data = 255.255.255.0 Subnet mask of the interface
Type = 3 Stub network
# TOS metrics = 0
metric = 2
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 55
Link Details
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 56
Network LSA for 192.1.1.0
R3#show ip ospf database network 192.1.1.4
Network Link States (Area 1)
LS age = 0
Options = (No TOS-capability, DC)
LS type = Network Links Type 2 LSA
Link State ID = 192.1.1.4 IP interface address of DR
Advertising Router = 4.4.4.4 RID of DR
Network Mask = 255.255.255.0
Attached Router = 4.4.4.4
Attached Router = 3.3.3.3 RID of attached routers FULL with DR
Attached Router = 2.2.2.2
Attached Router = 1.1.1.1
192.1.1.0/24
4.4.4.4
1.1.1.1 DR
.4
.1 R4
R1
Cost = 1 Area 0
3.3.3.3 18.10.0.4/30
2.2.2.2 .3 6.6.6.6
.2 .5
.6
R3
R2 Cost =8 R6
Area 1
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 57
Type 3 Details
R4#show ip ospf database summary 192.1.2.0
Summary Net Link States (Area 0)
LS age = 0
Options = (No TOS-capability, DC, Upward)
LS type = Network Links Type 3 LSA
Link State ID = 192.1.2.0 Summary IP network number
Advertising Router = 4.4.4.4 RID of ABR
Network Mask = 255.255.255.0
metric = 4
O IA
192.1.1.0/24
ABR 192.1.2.0/24
4.4.4.4
1.1.1.1 DR metric 4
192.1.2.0/24 .4
Cost = 3 .1 Cost =8
R4
R1 Area 0
Cost = 1 ABR
2.2.2.2 3.3.3.3 18.10.0.4/30
.3 6.6.6.6
.2 .5
.6
R3
R2 Cost =8 R6
Area 1
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 58
Type 4 Details
R4#show ip ospf database asbr-summary 7.7.7.7
Summary ASB Link States (Area 1)
LS age = 0
Options = (No TOS-capability, DC, Upward )
LS type = Summary Links(ASBR)
Link State ID = 7.7.7.7 RID of ASBR
Advertising Router = 4.4.4.4 RID of ABR
Network Mask = 0.0.0.0
metric = 16
Type 4 Summary
192.1.1.0/24 ABR External Route
4.4.4.4
1.1.1.1 DR 140.10.0.0
.4
.1 R4 Cost =8 Cost =8
R1 Area 0
Cost = 1 ABR Cost =20
2.2.2.2 3.3.3.3 18.10.0.4/30
.3 6.6.6.6 7.7.7.7
.2 .5
.6
R3 R7 ASBR
R2 Cost =8 R6
Area 1
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 59
Type 5 Details
R4#show ip ospf database external 140.10.0.0
Routing Bit Set on this LSA
LS age = 0
Options = (No TOS-capability, DC)
LS type = AS External Link Type 5
Link State ID = 140.10.0.0 IP network number
Advertising Router = 7.7.7.7 Router ID of R7
Network Mask = 255.255.0.0
Metric Type: 2 Bit E = 1 -> O E2 (Default)
metric = 20 Metric is 20 in all redistributed E2 routes
Forwarding address = 0.0.0.0 Traffic should be forwarded to the ASBR
192.1.1.0/24 ABR
4.4.4.4
External Route
1.1.1.1 DR 140.10.0.0
.4
.1 R4 Cost =8 Cost =8
R1 Area 0
Cost = 1 ABR Cost =20
2.2.2.2 3.3.3.3 18.10.0.4/30
.3 6.6.6.6 7.7.7.7
.2 .5
.6
R3 R7 ASBR
R2 Cost =8 R6
Area 1
External Type 5
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 60
Forwarding Address (Type 5)
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 61
Type 7 Details
R7#show ip ospf database nssa-external 140.10.0.0
LS age = 0
Options = (No TOS-capability, No Type 7/5 translation, DC)
LS type = AS External Link Type 7 LSA
Link State ID = 140.10.0.0 IP network number
Advertising Router = 7.7.7.7 Router ID of R7(NSSA ASBR)
Network Mask = 255.255.0.0
P = 0 -> This router is an NSSA ASBR+ ABR
P = 1 -> This router is an NSSA ASBR
metric = 20
Forwarding address = 0.0.0.0 Traffic should be forwarded to the ASBR
192.1.1.0/24 ABR
4.4.4.4
External Route
1.1.1.1 DR 140.10.0.0
.4
.1 R4 Cost =8 Cost =8
R1 Area 0
Cost = 1 ABR Cost =20
2.2.2.2 3.3.3.3 18.10.0.4/30
.3 6.6.6.6 7.7.7.7
.2 .5
.6 R7 ASBR
R3
R2 Cost =8 R6
Area 1 Type 7
NSSA
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 62
OSPF SPF Algorithm
SPF Running Constantly
R3#show ip ospf database
OSPF Router with ID (3.3.3.3) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
3.3.3.3 3.3.3.3 106 0x80000009 0xC3F1 3
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
18.10.0.0 7.7.7.7 3 (DNA) 0x80000008 0x3DC2
18.10.0.0 8.8.8.8 1396 0x80000004 0x27D8
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 2 0x80000016 0xE6CD 2
. . .
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 63
OSPF SPF Algorithm
SPF Running Constantly
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 64
OSPF SPF Algorithm
SPF Running Constantly - Debugging Commands
R3#debug ip ospf monitor
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 65
OSPF Traffic Statistics
show/clear ip ospf [process-id] traffic [interface]
Global section router2#show ip ospf traffic
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 66
OSPF Traffic Statistics
Per Process Summary
Summary traffic statistics for process ID 1:
TX Failed 0 0
TX Hello 10 792
TX DB des 6 624
TX LS req 2 112
TX LS upd 8 708
TX LS ack 5 460
TX Total 31 2696
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 67
OSPF Traffic Statistics
Queues
InputQ UpdateQ OutputQ
Limit 0 200 0
Drops 0 8881 0
Max delay [msec] 1076 21188 28
Max size 3961 200 6
Invalid 0 0 0
Hello 3961 0 0
DB des 0 0 0
LS req 0 0 0
LS upd 0 200 0
LS ack 0 0 6
Current size 0 0 0
Invalid 0 0 0
Hello 0 0 0
DB des 0 0 0
LS req 0 0 0
LS upd 0 0 0
LS ack 0 0 0
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 68
Lifecycle View of the OSPF Routing Process
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 69
OSPF Routing Table
Prefix in Database but not in the Routing Table
101.1.1.1 201.1.1.1
R1
10.10.10.0/24 R2
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 70
OSPF Routing Table
Prefix in Database but not in the Routing Table
R1#sh ip ospf data router 201.1.1.1 R1#sh ip ospf data router 101.1.1.1
OSPF Router with ID (101.1.1.1) (Process ID 1) OSPF Router with ID (201.1.1.1) (Process ID 1)
Adv Router is not-reachable Adv Router is not-reachable
LS age: 1254 LS age: 1670
Options: (No TOS-capability, DC) Options: (No TOS-capability, DC)
LS Type: Router Links LS Type: Router Links
Link State ID: 201.1.1.1 Link State ID: 101.1.1.1
Advertising Router: 201.1.1.1 Advertising Router: 101.1.1.1
Link connected to: a Transit Network Link connected to: a Stub Network
(Link ID) Designated Router address: 10.1.1.2 (Link ID) Network/subnet number: 10.10.10.0
(Link Data) Router Interface address: 10.1.1.2 (Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0 Number of TOS metrics: 0
TOS 0 Metrics: 10 TOS 0 Metrics: 10
101.1.1.1 201.1.1.1
R1 R2
10.10.10.0/24
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 71
Lifecycle View of the BGP Routing Process
72
Lifecycle View of the BGP Routing Process
Populate the IP
Form BGP Peers Routing Table
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 73
Lifecycle View of the BGP Routing Process
Populate the IP
Form BGP Peers Routing Table
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 74
Lifecycle of BGP Peers
BGP uses TCP port 179
Peers exchange OPEN messages:
– Router ID
– AS #
– Capabilities
– Hold Time
FSM (Finite State Machine) is used to negotiate to Established state
Initial exchange of entire table
Incremental updates
Keepalive messages
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 75
BGP Peers - Peering Finite State Machine
Active OpenSent
Idle
OpenConfirm
Valid Condition
Error Condition
Established
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 76
BGP Peers - Peering Finite State Machine
R1#debug ip bgp (shows the state transitions)
BGP: 2.2.2.2 went from Idle to Active
BGP: 2.2.2.2 active open failed - TCP session must be opened passively
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 77
BGP Peers – The TCP Connection
R1 to R2 TCP connection
‒neighbor 2.2.2.2 remote-as 100
‒neighbor 2.2.2.2 update-source loopback 0
R2 to R1 TCP connection
‒neighbor 1.1.1.1 remote-as 100
‒neighbor 1.1.1.1 update-source loopback 0
1.1.1.1 2.2.2.2
R1 .2 R2
.1
10.1.1.0/24
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 78
Keepalive & Holdtime
Holdtime is negotiated via OPEN messages
Lowest holdtime wins
0 seconds : infinite holdtime
3 seconds : lowest non-zero setting
180 seconds is default
X (0-65535) is keepalive
Y (0-65535) is holdtime
Z (0-65535) minimum acceptable holdtime
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 79
BGP Peers
Show ip bgp neighbours - AFI independent BGP info
R1#show ip bgp neighbors 2.2.2.2
BGP neighbor is 2.2.2.2, remote AS 200, external link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 00:02:07
Last read 00:00:06, last write 00:00:13, hold time is 180, keepalive
interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 6 6
Notifications: 0 0
Updates: 4 0
Keepalives: 175 177
Route Refresh: 0 0
Total: 185 183
Default minimum time between advertisement runs is 30 seconds
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 80
BGP Peers
Show ip bgp neighbours - AFI specific BGP info
R1#show ip bgp neighbors
<snip>
For address family: IPv4 Unicast
BGP table version 2, neighbor version 2/0
Output queue size : 0
Index 1, Offset 0, Mask 0x2
1 update-group member
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 1 0
Prefixes Total: 1 0
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 0
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: -------- -------
Total: 0 0
Number of NLRIs in the update sent: max 1, min 1
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 81
BGP Peers
Show ip bgp neighbours (cont) BGP specific TCP info
<snip>
Connections established 6; dropped 5
Last reset 00:02:09, due to User reset
External BGP neighbor may be up to 255 hops away.
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 1.1.1.1, Local port: 12348
Foreign host: 2.2.2.2, Foreign port: 179
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 82
BGP Peers
Show ip bgp neighbours (cont) Generic TCP info
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
SRTT: 146 ms, RTTO: 1283 ms, RTV: 1137 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: higher precedence, retransmission timeout, nagle, path mtu capable
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 83
Lifecycle View of the BGP Routing Process
Populate the IP
Form BGP Peers Routing Table
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 84
BGP Database Table
BGP Peers exchange UPDATE packets.
All locally known routes
Only the bestpath is advertised
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 85
BGP Database Table
R1# R2#
router bgp 2 router bgp 2
no synchronization no synchronization
bgp log-neighbor-changes bgp log-neighbor-changes
network 100.1.1.0 mask 255.255.255.0 network 200.1.1.0 mask 255.255.255.0
network 101.1.1.0 mask 255.255.255.0 network 201.1.1.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 2 neighbor 1.1.1.1 remote-as 2
neighbor 2.2.2.2 update-source Loopback0 neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 prefix-list From_R1 in
neighbor 1.1.1.1 prefix-list To_R1 out
no auto-summary
1.1.1.1 2.2.2.2
ip prefix-list To_R1 seq 5 deny 201.1.1.0/24
ip prefix-list To_R1 seq 7 permit 0.0.0.0/0 ge 1
R1 R2 ip prefix-list From_R1 seq 5 deny 101.1.1.0/24
ip prefix-list From_R1 seq 7 permit 0.0.0.0/0 ge 1
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 86
BGP Database Table
show ip bgp neighbor x.x.x.x received-routes
1.1.1.1 2.2.2.2
101.1.1.0/24 R1 R2
100.1.1.0/24
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 87
BGP Database Table
13:49:45.878: BGP(0): 1.1.1.1 rcvd UPDATE w/ attr: nexthop 1.1.1.1, origin i, localpref 100, metric 0
13:49:45.878: BGP(0): 1.1.1.1 rcvd 101.1.1.0/24 -- DENIED due to: distribute/prefix-list;
13:49:45.878: BGP(0): 1.1.1.1 rcvd 100.1.1.0/24
13:49:46.146: BGP(0): Revise route installing 1 of 1 routes for 100.1.1.0/24 -> 1.1.1.1(main) to main IP table
13:49:46.146: BGP(0): nettable_walker 200.1.1.0/24 route sourced locally
13:49:46.146: BGP(0): nettable_walker 201.1.1.0/24 route sourced locally len is 4
13:49:46.146: BGP(0): 1.1.1.1 send UPDATE (format) 200.1.1.0/24, next 2.2.2.2, metric 0, path
R2#
1.1.1.1 2.2.2.2
R1 R2
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 88
Lifecycle View of the BGP Routing Process
Populate the IP
Form BGP Peers Routing Table
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 89
BGP Best Path Algorithm – BGP Router
BGP Router Process decides the best path
http://www.cisco.com/en/US/partner/tech/tk365/technologies_tech_note09186a00
80094431.shtml
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 90
BGP Path Selection Algorithm Simplified
1. Next-hop has to be accessible (in the routing table)
2. Route must be synchronised (better turn synchronisation off)
3. Largest weight (Admin Preference, local to the router)
4. Largest local preference (Admin Preference. Spread within AS)
5. Router originated (Metric= “0 ASes” - Better if we originated it)
6. Shortest as-path (Metric in AS’s)
7. Lowest origin (igp < egp < incomplete)
8. Lowest MED (metric information from the next AS)
9. External over internal (Metric better if we are the border router)
10. Closest next-hop (IGP metric - the next-hop must be close)
11. Lowest router-id of Originator (tie-breaker)
12. Shortest Cluster-list (tie-breaker)
13. Lowest IP address of Neighbour (tie-breaker)
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 91
BGP Best Path Algorithm
How to Identify constant bestpath changes
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 92
BGP Best Path Algorithm
How to Identify constant bestpath changes
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 93
BGP Best Path Algorithm – BGP Scanner
The Scanner performs the following Housekeeping Tasks
Validate nexthop reachability
Validate bestpath selection
Route redistribution and network statements
Conditional advertisement
Route dampening
BGP Database cleanup
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 94
BGP Best Path Algorithm – BGP Scanner
“debug ip bgp events” will show you when scanner ran for each address-family
BGP: Performing BGP general scanning
BGP(0): scanning IPv4 Unicast routing tables
BGP(IPv4 Unicast): Performing BGP Nexthop scanning for general scan
BGP(0): Future scanner version: 7, current scanner version: 6
BGP(1): scanning IPv6 Unicast routing tables
BGP(IPv6 Unicast): Performing BGP Nexthop scanning for general scan
BGP(1): Future scanner version: 13, current scanner version: 12
BGP(2): scanning VPNv4 Unicast routing tables
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 95
Lifecycle View of the BGP Routing Process
Populate the IP
Form BGP Peers Routing Table
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 96
The BGP Routing Table
The Best path selected is put in Routing Table (RIB)
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 97
The BGP Routing Table
Why is the prefix not in the Routing Table?
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 98
Troubleshooting Best Practices
https://supportforums.cisco.com/community/netpro/service-
providers/blog/2013/05/29/packet-capture-capabilities-of-cisco-routers-and-
switches
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 99
Summary
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 100
Q&A
101
Complete Your Online Session Evaluation
Give us your feedback and receive a
Cisco Live 2014 Polo Shirt!
Complete your Overall Event Survey and 5 Session
Evaluations.
Directly from your mobile device on the Cisco Live
Mobile App
By visiting the Cisco Live Mobile Site
www.ciscoliveaustralia.com/mobile
Visit any Cisco Live Internet Station located
throughout the venue
Learn online with Cisco Live!
Polo Shirts can be collected in the World of Solutions
on Friday 21 March 12:00pm - 2:00pm
Visit us online after the conference for full access
to session videos and presentations.
www.CiscoLiveAPAC.com
BRKRST-2619 © 2014 Cisco and/or its affiliates. All rights reserved. Cisco Public 102