Summary
This section describes BGP configuration. Traffic Dictator uses BGP to collect network topology information and dissemiante Traffic Engineering policies. 3 address families are supported:
1. BGP Link-State (receive-only) is used to collect link-state information of IGP topologies.
2. BGP SR-TE (send-only) is used to send Traffic Engineering policies to routers.
3. BGP Labeled-Unicast has 2 purposes:
(a) Get Egress Peer Engineering labels from egress ASBR. While BGP Peer SID distributed via BGP-LS is a preferred method for EPE, some implementations use BGP-LU, and Traffic Dictator supports that as well
(b) Alternative method to send Traffic Engineering policies to routers. This can be useful with routers that don’t support BGP SR-TE
Basic BGP configuration
The minimal BGP configuration requires a router ID, and at least one neighbor with remote-AS configured and at least one address family enabled. Both IPv4 and IPv6 are supported. Example configuration.
router bgp 65001 router-id 111.111.111.111 ! neighbor 192.168.0.101 remote-as 65002 address-family ipv4-labeled-unicast address-family link-state ! neighbor 2001:192::101 remote-as 65002 address-family ipv4-srte address-family ipv6-labeled-unicast address-family ipv6-srte address-family link-state
Verify neighbor state
TD1#show bgp summary BGP summary information Router identifier 111.111.111.111, local AS number 65001 Neighbor V AS MsgRcvd MsgSent InQ OutQ Up/Down State Received NLRI Active AF 192.168.0.101 4 65002 217 126 0 0 2:04:21 Established 164 IPv4-LU, LS 2001:192::101 4 65002 215 198 0 0 2:04:20 Established 164 IPv4-SRTE, IPv6-LU, IPv6-SRTE, LS
For more detailed information, run “show bgp neighbors”:
TD1#show bgp neighbors 2001:192::101 BGP neighbor is 2001:192::101, port 24304 remote AS 65002, external link BGP version 4, remote router ID 1.1.1.1 Last read 0:00:46, last write 0:00:24 Hold time is 180, keepalive interval is 60 seconds Configured hold time is 180, keepalive interval is 60 seconds Hold timer is active, time left 0:02:14 Keepalive timer is active, time left 0:00:36 Connect timer is inactive Idle hold timer is inactive BGP state is Established, up for 2:21:24 Number of transitions to established: 1 Last state was OpenConfirm Active address families: IPv4-SRTE, IPv6-LU, IPv6-SRTE, LS Other negotiated capabilities: route-refresh, asn32 Sent Rcvd Opens: 1 1 Notifications: 0 0 Updates: 112 90 Keepalives: 142 141 Route Refresh: 0 0 Total messages: 255 232 NLRI statistics: Sent Rcvd Link-State: 0 164 IPv4 Labeled-Unicast: 0 0 IPv6 Labeled-Unicast: 0 0 IPv4 SRTE: 10 0 IPv6 SRTE: 10 0 Local IP is 2001:192::a8c1:abff:fe87:68a2, local AS is 65001, local router ID 111.111.111.111 TTL is 1
Check BGP routing table
TD1#show bgp link-state BGP-LS routing table information Router identifier 111.111.111.111, local AS number 65001 Status codes: * valid, > best Origin codes: i - IGP, e - EGP, ? - incomplete Prefix codes: E link, V node, T IP reacheable route, S SRv6 SID, u/U unknown, I Identifier, N local node, R remote node, L link, P prefix, S SID, L1/L2 ISIS level-1/level-2, O OSPF, D direct, S static/peer-node, a area-ID, l link-ID, t topology-ID, s ISO-ID, c confed-ID/ASN, b bgp-identifier, r router-ID, s SID, i if-address, n nbr-address, o OSPF Route-type, p IP-prefix, d designated router address Network Next Hop Metric LocPref Weigth Path [E][L2][I101][N[c65002][b0][s0001.0001.0001.00]][R[c65002][b0][s0005.0005.0005.00]][L[i10.100.3.1][n10.100.3.5][i2001:100:3::1][n2001:100:3::5]] *> 192.168.0.101 0 100 0 65002 i 2001:192::101 0 100 0 65002 i [E][L2][I101][N[c65002][b0][s0009.0009.0009.00]][R[c65002][b0][s0006.0006.0006.00]][L[i10.100.10.9][n10.100.10.6][i2001:100:10::9][n2001:100:10::6]] *> 192.168.0.101 0 100 0 65002 i 2001:192::101 0 100 0 65002 i [T][L2][I101][N[c65002][b0][s0004.0004.0004.00]][P[p2002::234/128]] *> 192.168.0.101 0 100 0 65002 i 2001:192::101 0 100 0 65002 i --- TD1#show bgp ipv4 srte BGP-SRTE routing table information Router identifier 111.111.111.111, local AS number 65001 Status codes: * valid, > best, + - inserted Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPref Weigth Path *>+ [96][1][6][0.0.0.0] - 0 - 0 i *>+ [96][1][7][0.0.0.0] - 0 - 0 i *>+ [96][1][3][1.1.1.1] - 0 - 0 i *>+ [96][1][8][9.9.9.9] - 0 - 0 i *>+ [96][1][5][10.100.19.104] - 0 - 0 i *>+ [96][1][4][10.100.20.105] - 0 - 0 i *>+ [96][1][1][11.11.11.11] - 0 - 0 i *>+ [96][1][2][11.11.11.11] - 0 - 0 i *>+ [96][1][9][11.11.11.11] - 0 - 0 i *>+ [96][1][10][11.11.11.11] - 0 - 0 i TD1#show bgp ipv6 srte BGP-SRTE routing table information Router identifier 111.111.111.111, local AS number 65001 Status codes: * valid, > best, + - inserted Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPref Weigth Path *>+ [192][1][106][::] - 0 - 0 i *>+ [192][1][107][::] - 0 - 0 i *>+ [192][1][105][2001:100:19::104] - 0 - 0 i *>+ [192][1][104][2001:100:20::105] - 0 - 0 i *>+ [192][1][103][2002::1] - 0 - 0 i *>+ [192][1][108][2002::9] - 0 - 0 i *>+ [192][1][101][2002::11] - 0 - 0 i *>+ [192][1][102][2002::11] - 0 - 0 i *>+ [192][1][109][2002::11] - 0 - 0 i *>+ [192][1][110][2002::11] - 0 - 0 i
Add “detail” for more detailed outputs; also explore TDCLI further with tab and ?.
Clear or shutdown BGP neighbors
It is possible to shutdown a neighbor
TD1#conf TD1(config)#router bgp 65001 TD1(config-router-bgp)#neighbor 192.168.0.101 TD1(config-router-bgp-nbr)#shut TD1(config-router-bgp-nbr)#do sh bgp su BGP summary information Router identifier 111.111.111.111, local AS number 65001 Neighbor V AS MsgRcvd MsgSent InQ OutQ Up/Down State Received NLRI Active AF 192.168.0.101 4 65002 225 134 0 0 Never Idle(Admin) 0 2001:192::101 4 65002 223 205 0 0 2:11:40 Established 164 IPv4-SRTE, IPv6-LU, IPv6-SRTE, LS
Clear neighbor – note that “soft clear” is the default unlike some other BGP implementations. To reset a session, do “clear bgp hard”:
TD1#clear bgp * ? in Send route refresh to peer out Readvertise all routes to peer hard Reset BGP session
Advanced BGP neighbor configuration
Traffic Dictator has some other configuration options for BGP session.
Adjust keepalive and hold timers (default are 60 and 180):
TD1(config-router-bgp-nbr)#timers 10 30
Enable passive mode (only accept connections but don’t initiate session):
TD1(config-router-bgp-nbr)#passive
Enable eBGP-multihop (increase TTL for eBGP sessions from default value of 1):
TD1(config-router-bgp-nbr)#ebgp-multihop 10
Available address families:
TD1(config-router-bgp-nbr)#address-family ? link-state BGP link-state ipv4-srte BGP IPv4 SRTE ipv6-srte BGP IPv6 SRTE ipv4-labeled-unicast BGP IPv4 labeled unicast ipv6-labeled-unicast BGP IPv6 labeled unicast