BGP Messages and Neighbor States
The desired state for BGP neighbors is the established state. In that state, the routers have formed a TCP connection, and they have exchanged Open messages, with the parameter checks having passed. At this point, topology information can be exchanged using Update messages. Table 12-3 lists the BGP neighbor states, along with some of their characteristics. Note that if the IP addresses mismatch, the neighbors settle into an active state.
Table 12-3 BGP Neighbor States
KEY POINT
Table 12-3 BGP Neighbor States
|
State |
Listen for TCP? |
Initiate TCP? |
TCP Up? |
Open Received? |
Neighbor Up? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Idle |
No |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Connect |
Yes |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Active |
Yes |
Yes |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Open sent |
Yes |
Yes |
Yes |
Yes |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Open confirm |
Yes |
Yes |
Yes |
Yes |
Yes |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Established |
Yes |
Yes |
Yes |
Yes |
Yes |
BGP uses four basic messages. Table 12-4 lists the message types and provides a brief description of each. Table 12-4 BGP Message Types KEY POINT Table 12-4 BGP Message Types KEY POINT
Purposefully Resetting BGP Peer Connections Example 12-3 shows how to reset neighbor connections by using the neighbor shutdown command and, along the way, shows the various BGP neighbor states. The example uses routers R1 and R6 from Figure 12-2, as configured in Example 12-2. Example 12-3 Examples of Neighbor States! R1 shuts down R6's peer connection, debug ip bgp shows moving to a down state, ! which shows as "Idle (Admin)" under show ip bgp summary. R1# debug ip bgp BGP debugging is on for address family: BGP IPv4 R1# conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)# router bgp 123 R1(config-router)# neigh 10.1.16.6 shutdown R1# *Mar 4 21:01:45.946: BGP: 10.1.16.6 went from Established to Idle *Mar 4 21:01:45.946: %BGP-5-ADJCHANGE: neighbor 10.1.16.6 Down Admin, shutdown R1# show ip bgp summary | include 10.1.16.6 10.1.16.6 4 678 353 353 0 0 0 00:00:06 Idle (Admin) ! Next, the no neighbor shutdown command reverses the admin state. The various ! debug messages (with some omitted) list the various states. Also note that the ! final message is the one log message in this example that occurs due to the ! default configuration of bgp log-neighbor-changes. The rest are the result of ! a debug ip bgp command. R1# conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)# router bgp 123 R1(config-router)# no neigh 10.1.16.6 shutdown
BGP: 10.1.16.6 rcvd OPEN w/ remote AS 678 BGP: 10.1.16.6 rcvd OPEN w/ remote AS 678 Responses
All BGP neighbors can be reset with the clear ip bgp * exec command, which, like the neighbor shutdown command, resets the neighbor connection, closes the TCP connection to that neighbor, and removes all entries from the BGP table learned from that neighbor. The clear command will be shown in the rest of the chapter as needed, including in coverage of how to clear just some neighbors. NOTE Chapter 13 covers how the clear command can be used to implement routing policy changes without resetting the neighbor completely, using a feature called soft reconfiguration. Continue reading here: Injecting Routes Prefixes into the BGP Table Was this article helpful? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||