Brkrst-3320 BGP Cisco Live
Brkrst-3320 BGP Cisco Live
Brkrst-3320 BGP Cisco Live
Vinit Jain
CCIE# 22854 (RS, SP, Sec, DC)
Mani Ganesan
CCIE# 27200 (RS, SP)
@vinugenie
[email protected]
@mani_cisco
[email protected]
BRKRST-3320
Introduction
Housekeeping
Cell Phones
Who we are?
Advanced Class
Assume BGP Operational Experience
Basic configuration
Show commands
Understand BGP attributes
Introduction
Operating Systems
Agenda
BGP slow-peer
Troubleshooting
Steps
TAC Example
Solution
Agenda
BGP Slow-peer
iBGP
OSPF
R2
AS65535
eBGP
Physical Topology
R3
AS65534
R1
iBG
P
R2
eBGP
AS65535
Logical Topology
R3
AS65534
iBGP
R2
eBGP
AS65535
R3
AS65534
Check
AS Numbers
Peering IP
eBGP Multihop?
Lo0 = 1.1.1.1/32
R1
AS65535
Rn
Lo0 = 2.2.2.2/32
R2
AS65535
AS65534
R3
R2
Lo0 = 1.1.1.1/32
AS65535
Lo0 = 2.2.2.2/32
R1
Rn
R2
ACL
Foreign Address
1.1.1.1.46523
(state)
ESTAB
state.
Check
You can also use show process blocked to check the blocked
processes
IOS-XR
- Only supported on ASR-9000
- Use ACLs to control what packets to SPAN
RSPAN
- RSPAN has all the features of SPAN, plus support for source ports and destination ports
that are distributed across multiple switches, allowing one to monitor any destination port
located on the RSPAN VLAN. Hence, one can monitor the traffic on one switch using a
device on another switch.
IOS
6500 / 7600
ELAM
NETDR Capture
MPA (Mini Protocol Analyzer)
ASR9000
Ethanalyzer
Elam
For your
reference only
Allows BGP peering to a group of remote neighbors that are defined by a range of
IP addresses
BGP passively listens to configured address range for incoming sessions
Provisioning
- No manual config necessary on hub for new clients
- Significant reduction in config overhead
!
address-family ipv4 unicast
neighbor Test activate
Associating Autonomous
System numbers for listen range
peers
MD5 related
- Make sure MD5 password is configured at both ends if see the error such as "MD5
received, but NOT expected from.." message
Configuration
verified
show
TCP
AS100
R1
R2
FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 002D 0104 0064 00B4
0101 0101 1002 0601 0400 0100 0102 0280 0002 0202 00
Analysis
Capability 131 is set when BGP is trying to establish multisession
- The other side did not understand this capability i.e. Single-session
-
Resolution
-
Symptoms
AS 65534
iBGP
eBGP
iBGP
AS 65535
AS65534
R2
AS65535
Notifications Contd
%BGP-3-NOTIFICATION: sent to neighbor 2.2.2.2 2/2 (peer in wrong AS) 2 bytes 00C8
FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 002D 0104 00C8 00B4 0202 0202 1002 0601 0400
0100 0102 0280 0002 0202 00
Value
Name
Reference
RFC 4271
RFC 4271
RFC 4271
RFC 4271
RFC 4271
Cease
RFC 4271
Notifications Contd
Subcode #
Subcode Name
1
Bad Peer AS
Unsupported Capability
Subcode Description
The version of BGP the peer is running isnt compatible with
the local version of BGP
The AS this peer is locally configured for doesnt match the
AS the peer is advertising
The BGP router ID is the same as the local BGP router ID
There is an option in the packet which the local BGP
speaker doesnt recognize
The remote BGP peer has requested a BGP hold time
which is not allowed (too low)
The peer has asked for support for a feature which the local
router does not support
Failed Peering
Notifications
10.1.2.2
10.1.2.1
R3
AS 200
Lo0 = 1.1.1.1/32
AS65535
Lo0 = 2.2.2.2/32
R2
R1
1500
AS100
PE
AS200
PRTR
Multiple
No
Changes in configuration
Previous
Requested
After Upgrade
Datagrams (max data segment is 1460 bytes):
Rcvd: 166 (out of order: 0), with data: 76, total data bytes: 2203
Sent: 168 (retransmit: 2 fastretransmit: 0),with data: 92, total data bytes: 2555
Peer Flapping
Agenda
BGP slow-peer
Symptoms
- Router unstable
- Traffic loss
- Loss of Manageability
Can be expected for short durations carrying large Internet routing table
High cpu condition varies with the number of neighbors and the number of
routes learned per neighbor
. . . .
393745836
2319493
0 BGP Scanner
The high cpu on the device could also be due to the instability of the BGP table.
(Receiving two copies of routing table one from iBGP and one from eBGP)
Insufficient Memory
You have 150k routes and see the table version increase by 300
- This is probably normal route churn
- Know how many bestpath changes you normally see per minute
You have 150k routes and see the table version increase by 150k
- This is bad and is the cause of your high CPU
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
RR1
PE1
Customer
They
AS65535
RR2
<snip>
B
PE2
PE1
PE2
AS65535
RR2
Symptoms
- Slow performance
- Malloc Failures
- Router reloads
If Malloc error show the process as BGP doesnt mean BGP is the culprit
This error log can be the consequence of insufficient memory or a memory leak
condition
Use IOS XR memory comparator tool to track any incremental memory leak
difference mallocs
---------525528
481856
264992
22144
------33753
11
425
355
It was noticed that BGP Router process accumulated most of the holding
memory
Freed
Holding
Process
458001556
61617656
240877764
BGP Router
459588300
61623540
241919840
BGP Router
463207104
61699296
244022952
BGP Router
467475524
61706168
246534736
BGP Router
Customer denied
PE1
AS65535
RR2
AS MsgRcvd MsgSent
4 1273
4 20646
4 3209
4 8220
4 3209
4 5539
0
0
0
0
0
0
0
0
0
0
0
0
TblVer
0
0
0
0
0
0
0
0
0
0
0
0
never
never
never
never
never
never
Idle
Idle
Idle
Idle
Idle
Idle
(Admin)
(Admin)
(Admin)
(Admin)
(Admin)
(Admin)
Resolution
-
Removing the Idle / Admin down neighbors helped overcome the memory leak
High CPU
- Verify what is the cause of the high CPU
- Is it due interrupt or process?
- Verify if there are route churns happening in your network / partner network
- Verify if there was any recent changes made in your network (addition of new customer,
addition of routes) which triggered the impact in your network
- Configure EEM with appropriate outputs to gather relevant information in case the high
CPU condition is random
High Memory
- Verify Memory baseline, changes done
- How fast is the memory increasing?
- Trigger of memory increase
Agenda
BGP slow-peer
Symptoms
RR1
PE1
Im
Slow
PE3
PE2
BGP Slow-peer
BGP OutQ & Cache Size
AS MsgRcvd MsgSent
109
42
87065
109
42
87391
TblVer
0
0
Members
348
2
1
2
Leader
12.123.67.97
12.122.78.19
199.37.187.24
12.122.78.249
MsgFmt
MsgRepl
1726595727 1938155978
79434677
79398843
0
0
79219618
97412908
Current Next
Csize
Version Version
999/1000 1012333000/1012351142
0/200 1012351503/1012351503
0/100
0/0
0/200 1012351504/1012351504
BGP Slow-peer
TCP sndwnd
RR#show neighbor 10.1.0.1
..
iss: 3662804973 snduna: 3668039487
irs: 1935123434 rcvnxt: 1935222998
SRTT: 300 ms,
minRTT: 0 ms,
Status Flags:
Option Flags:
sndnxt: 3668039487
rcvwnd:
16003
sndwnd:
delrcvwnd:
0
381
Check for send window (sndwnd) and receive window (rcvwnd) using show ip
bgp neighbor <x.x.x.x>
For the TCP session for which outQ is high, we might notice that sndwd is very
low or zero.
On the remote end, we should see the rcvwnd value is very low or zero.
BGP Slow-peer
Static Slow peer
The manual knob to flag a peer as slow will create a separate update group for
the peer.
The advantage - there is a limit to the overhead that this feature will create.
The drawback - slow member update group will have to progress at the pace of
the slowest of the slow peers.
neighbor {<nbr-addr>/<peer-grp-name>} slow-peer split-update-group static
BGP Slow-peer
Dynamic Slow peer
The threshold defines the threshold time in seconds to detect a peer as slow
peer.
BGP Slow-peer
Slow peer protection
When a slow peer recovery is detected (the peer has converged), the peer will
be moved back to its original group
bgp slow-peer split-update-group dynamic [permanent]
neighbor {<nbr-addr>/<peer-grp-name>} slow-peer split-update-group dynamic [permanent]
When permanent is not configured, the slow peer will be moved to its regular
original update group, after it becomes regular peer (converges).
If permanent is configured, the peer will not be moved to its original update
group automatically
BGP Slow-peer
Syslog Messages
The below log message will be generated when a peer is detected as dynamic
slow peer.
"bgp neighbor %s in af %d is detected as slow-peer"
BGP Slow-peer
Show / Clear Commands
Show Commands
show ip bgp [AF/scope/topo] update-group summary slow
Clear Commands
Clear [ip] bgp <nbr-addr> slow
Clear [ip] bgp peer-group <group-name> slow
Clear [ip] bgp af * slow
Clear ip bgp * slow
RR1
Their end-customer removed service from one of their locations but the routes
are still seen on their RR and other locations
Soft clearing the neighborship temporarily resolved the problem but reoccurred
again after sometime
PE1
PE3
Members
150
5
1
Leader
216.156.3.10
65.106.7.100
66.239.189.212
MsgFmt
274950548
41049479
16143960
MsgRepl
Csize
650809652 2000/2000
204232170
0/500
16143960
0/100
Current
Next
Version Version
421492656/421493582
421493582/0
421491282/421493582
PE2
Customers RR router didnt had the slow peer capability in the IOS they were
running
Agenda
BGP slow-peer
Scenario 5 Multi-Homing
Problem Description
Symptoms:
- Under or over utilized link / resource
B
A
90%
D
AS200
AS65000
Provider
5%
C
BGP Multi-homing
Overview
Following examples assume that the multi-homed site has a /19 address block
For your
reference only
Weight
Highest wins
LOCAL_PREFERENCE
Highest wins
Scope is AS only
Locally Originated
AS_PATH
Shortest wins
ORIGIN
Lowest wins
MED
Lowest wins
Lowest wins
10
11
BGP Router ID
Lowest
12
CLUSTER_LIST
Smallest
13
Neighbor Address
Lowest
Applies when end-site has bought a large primary WAN link to their upstream a
small secondary WAN link as the backup
primary link:
- Outbound announce /19 unaltered
- Inbound receive default route
B
A
D
AS200
AS65000
backup
C
primary
backup link:
- Outbound announce /19 with increased metric
- Inbound received default, and reduce local preference
B
A
Link-1
D
AS200
AS65000
Link-2
C
D
AS200
B
A
Internet
AS65000
C
E
AS300
Internet
AS65000
C
E
AS300
For your
reference only
Best Path
Algorithm
Quick bestpath review
Remember
Not synchronized
Only happens if sync is configured AND the route isnt in your IGP
Inaccessible NEXTHOP
Received-only paths
For your
reference only
It was required to prefer router B as the primary router for all outgoing and
incoming traffic.
D
AS200
AS100
Internet
A
C
E
AS300
Making router B the primary HSRP gateway for A will solve the outbound
requirement
Use of set as-path prepend will help solve this problem of inbound
requirement
Router C:
=========
access-list 100 permit <specific_traffic>
route-map foo permit 10
match ip address 1
set as-path prepend 100
!
router bgp 100
neighbor <AS_300_nei> route-map foo out
Agenda
BGP Slow-peer
Symptoms
PE1
RR1
PE2
No reachability
Packet loss
CE1
CE2
PE1
RR1
PE2
MPLS VPN
CE2
MPLS VPN
IGP: POP
IGP: 20
VPN:100
VPN:100
VPN:100
PE1
RR1
Lo0=1.1.1.1/32
PE2
Lo0=3.3.3.3/32
MPLS VPN
Data Plane
Control Plane
CE1
CE2
Lo0=100.1.1.1/32
Lo0=200.1.1.1/32
MPLS VPN
Checking All VPN Labels
PE1#sh ip bgp vpnv4 all labels
Network
Next Hop
In label/Out label
100.1.1.1/32
192.168.10.2
100/nolabel
192.168.10.0/30
0.0.0.0
19/nolabel(A)
192.168.20.0/30
3.3.3.3
nolabel/19
200.1.1.1/32
3.3.3.3
nolabel/20
PE1#
For your
reference only
Use of ping mpls ipv4. Ensure MPLS OAM is enabled for this to work.
Once the above understanding is gained, troubleshoot like regular MPLS VPN
or regular BGP troubleshooting
Customer reported that a newly configured MPLS Services for the customer are
not working. CE2 is unable to see the routes of CE2
Customer didnt have the access to AS1PE2 router initially as it was in a distant
location and managed by a different group.
AS1RR1
AS100
AS1PE1
AS1PE2
CE1
CE2
100.1.1.0/24
200.1.1.0/24
prefix-set BGP_PREFIX
100.1.1.0/24
end-set
debug bgp update vpnv4 unicast [in | out] route-policy DEBUG_BGP
IOS
IOS XR
IOS XR
IOS
NXOS
For your
reference only
ip vrf Cust_A
rd 15832:3772958
route-target import
route-target export
route-target import
route-target import
route-target import
route-target import
route-target import
15832:3772958
15956:3772958
15956:3772958
12956:3772953
13956:3692952
14956:3832957
17956:3773959
It was noticed that there was a missing entry on the vrf import statement
Customer reported they have a multi-homed Customer. But when the primary
BGP session goes down, it takes time to converge and the customer
experiences a traffic loss
Symptoms
Traffic loss
PE2
CE1
PE1
AS100
CE2
PE3
Prefix Independent Convergence (PIC) in CEF and platform whereby cutover to any
backup path happens within sub-seconds and independent of the number of prefixes.
BGP Fast Re-Route (BGP FRR) enables BGP to use alternate paths within subseconds after a failure of the primary or active paths.
Without backup paths available to CEF, convergence is driven from the routing protocols
updating the RIB and CEF one prefix at a time, leading to convergence times directly
proportional to the number of affected prefixes.
When backup paths are available, CEF can use these to provide constant time and prefix
independent convergence, when a failure affecting a shared path-list occurs.
BGP PIC
PIC edge vs. PIC core
1
2
PE2
3
CE1
PE1
Customer
Site A
CE2
PE3
1. PIC
2. PIC
3. PIC
Customer
Site B
BGP PIC
Configuration
BGP PIC
BGP Output
ASR-1K# sh ip bgp vpnv4 vrf site-111111 2.0.0.0
BGP routing table entry for 65300:111111:2.0.0.0/24, version 150035
Paths: (3 available, best #1, table sie-111111)
Additional-path-install
Advertised to update-groups:
105
Refresh Epoch 1
20570 20570
10.200.1.2 from 10.200.1.2 (10.200.1.2)
Origin incomplete, localpref 100, valid, external, best
Extended Community: RT:64300:111111 , recursive-via-connected
rx pathid: 0, tx pathid: 0x0
<snip>
Refresh Epoch 1
20570 20570
10.10.10.2 from 10.10.10.2 (5.5.5.5)
Origin incomplete, localpref 100, valid, internal, backup/repair
Extended Community: RT:64300:111111 , recursive-via-host
rx pathid: 0, tx pathid: 0
BGP PIC
CEF Output
ASR-1K# sh ip cef vrf site-111111 2.0.0.0 255.255.255.0 detail
2.0.0.0/24, epoch 0, flags rib only nolabel, rib defined all labels
recursive via 10.200.1.2
attached to GigabitEthernet0/1/1.200
recursive via 10.10.10.2, repair
attached to GigabitEthernet0/1/0.451
BGP PIC
Show Commands
BGP
RIB
CEF
show (ip | ipv6) cef [vrf XX] prefix/mask internal
show monitor event cef (ipv4 | ipv6 | bfd) all
show cef bfd
debug cef bfd
debug cef loadinfo map
debug cef path
debug cef filter fib (ipv4 | ipv6) prefix/mask
Customer has implemented BGP PIC Edge feature and is also using BFD for
faster failover.
When the best path fails, the customer does not see the fast convergence
happening
P2
CE1
PE4
PE1
CE2
P3
PE5
Agenda
BGP Slow-peer
BGP in VxLAN
Problem Description
The growth of nodes in the Data Center requires that network administrators
segregate the VMs into isolated Layer 2 domains which has caused scalability
problems given the 4K VLAN limit
VXLAN packets are transferred through the underlying network based on its
Layer 3 header
Edge Device
Local LAN
Segment
Physical
Host
Local LAN
Segment
IP Interface
Edge Device
Local LAN
Segment
Physical
Host
Virtual Switch
Virtual Hosts
104
VTEP
V
Local LAN
Segment
Physical
Host
Local LAN
Segment
Encapsulation
VTEP
V
Local LAN
Segment
Physical
Host
Virtual Switch
Control plane learning for end host Layer-2 and Layer-3 reachability
information to build more robust and scalable VXLAN overlay networks.
Provides optimal forwarding for east-west and north-south bound traffic with the
distributed any-cast function
Provides VTEP peer discovery and authentication which mitigates the risk of
rouge VTEPs in the VXLAN overlay network.
VXLAN Concepts
VXLAN Overlay
-
For your
reference only
VXLAN Gateway
-
For your
reference only
VXLAN Encapsulation
Outer
Ethernet
Outer IP
Flags
VXLAN
Reserved
24 Bytes
8 Bytes
Rsvd
Outer
UDP
Rsvd
Ethernet
Header
Payload
FCS
Inner
Ethernet
Payload
New FCS
Instance ID
24 Bytes
Reserved
8 Bytes
Outer UDP Destination Port = VXLAN (originally 8472, recently updated to 4789)
Outer UDP Source Port = Hash of Inner Frame Headers (optional)
The outer IP header has the source IP and destination IP of the VTEP endpoints
The outer Ethernet header has the source MAC of the source VTEP and the
destination MAC of the immediate Layer-3 next hop
For your
reference only
SVI
A
SVI
B
Layer-3 VNI X
Layer-2 VNI A
Layer-2 VNI B
VLAN X
VLAN A
VLAN B
For your
reference only
Enable VXLAN
Enable BGP
For your
reference only
For your
reference only
For your
reference only
vlan 3901
name l3-vni-vlan-for-tenant-2
vn-segment 39010
interface Vlan3901
description l3-vni-for-tenant-2-routing
no shutdown
vrf member evpn-tenant-2
ip address 39.1.0.1/16
fabric forwarding mode anycast-gateway
vrf context evpn-tenant-2
vni 39010
rd auto
address-family ipv4 unicast
route-target import 39010:39010
route-target export 39010:39010
route-target both auto evpn
For your
reference only
Map VLANs to VXLAN VNIs and Configure their MP-BGP EVPN Parameters
vlan 200
vn-segment 20000
vlan 210
vn-segment 21000
evpn
vni 20000 l2
rd auto
route-target
route-target
vni 21000 l2
rd auto
route-target
route-target
import auto
export auto
import auto
export auto
interface Vlan210
no shutdown
vrf member evpn-tenant-2
ip address 21.1.1.1/8
fabric forwarding mode anycast-gateway
For your
reference only
For your
reference only
interface Vlan210
no shutdown
vrf member evpn-tenant-2
ip address 21.1.1.1/8
fabric forwarding mode anycast-gateway
For your
reference only
For your
reference only
For your
reference only
address-family ipv4 unicast for prefix-based routing
V
AS MsgRcvd MsgSent
4 65040
50
50
Remote VTEP
TblVer
26
MAC entry
Weight Path
0 i
0 I
Metric
LocPrf
(L2VNI 400501)
(L2VNI 400502)
Weight Path
<snip>
Route Distinguisher: 10.40.1.1:3
(L3VNI 38000)
L3VNI corresponding to
the VRF context
Peer
Call to Action
Explore most common BGP problems that you faced in your network
Promote your favorite speaker through Twitter and you could win $200 of Cisco
Press products (@CiscoPress)
You can submit an entry for more than one of your favorite speakers
Table Topics
Related sessions
Q&A
Appendix
Customer reported that their resource utilization on edge routers have increased
with the growth of their SP network where as no extra services has been
deployed on those edge devices
Symptoms
PEn
PE(n-1)
PE2
CE1
PE1
CE2
RR
AS100
PE3
CE3
Ideally PE routers need to hold only routes marked with Route Targets
pertaining to VRFs that have local CE attachments.
VRF- Blue
VRF- Red
RR-1
VRF- Red
VRF- Green
RR-2
VRF- Purple
VRF- Blue
PE-3 and PE-4 advertise VRF Blue, red and green VPN routes to RR-1
VRF-Red routes are really unwanted on RR-2 since PE-1 and PE-2 does not have VRF Purple.
By having BGP speakers exchanging the wanted Route Targets, this allows
BGP speaker to eliminate advertising unwanted VPN routes to its peer.
20.0.0.2
20.0.0.1
PE-2
RR-1
20.0.0.2
20.0.0.1
PE-2
RR-1
PE-2
20.0.0.1
RR-1
RT-Constraint:
NLRI = {RT 1, RT 2}
NLRI = {RT 2, RT 3}
VRF- Red RT 2
VRF- Blue RT 1
VRF- Red RT 2
PE-3
PE-4
RR-1
Outbound Filter:
Outbound Filter:
Permit RT 1
Permit RT 3
Permit RT 2
Permit RT 2
Deny all
Deny all
VRF- Green RT 3
Thank you