BGP Session Establishment between Internal Peers

Peers from the same autonomous systems are referred as internal peers. The following steps describe how BGP Session establishment is made between two internal peers.

The figure shown below depicts the topology setup used for this configuration.

Figure 1. BGP Configuration and Testing Topology


Use the following commands to configure BGP routing.

  1. To enable BGP in Router R1:

    Execute the following commands:

    • Enter the Global Configuration Mode.
    iS5comm# configure terminal
    • Enter the Autonomous System (AS) number in R1.
    iS5comm(config)# as-num 100
    • Configure the router-id in R1.
    iS5comm(config)# router-id 12.0.0.1
    • Enable BGP in R1.
    iS5comm(config)# router bgp 100
    • Configure R2 (with as-num 100) as internal peer in R1.
    iS5comm(config-router)# neighbor 12.0.0.2 remote-as 100

  2. To enable BGP in Router R2:

    Execute the following commands:

    • Enter the Global Configuration Mode.
    iS5comm# configure terminal
    • Enter the Autonomous System (AS) number in R2.
    iS5comm(config)# as-num 100
    • Configure the router-id in R2.
    iS5comm(config)# router-id 12.0.0.2
    • Enable BGP in R2.
    iS5comm(config)# router bgp 200
    • Configure R1 (with as-num 100) as internal peer in R2.
    iS5comm(config-router)# neighbor 12.0.0.1 remote-as 100

  3. Verify that the BGP session between the external peers R1 and R2 is established, using the following show commands in R1 and R2.

    Type the following:

    • R1: View the bgp summary information.
    iS5comm# show ip bgp summary
    BGP router identifier is 12.0.0.1, local AS number 100
    BGP table version is 0
    Neighbor Version AS MsgRcvd MsgSent Up/DownState/PfxRcd
     -------------------------------- ----------------
    12.0.0.2   4    100   2     2    00:00:00:23 Established

    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.2, remote AS 100, external link
    BGP version 4, remote router ID 12.0.0.2
    BGP state = Established, up for 3 minutes 11 seconds
    Configured BGP Maximum Prefix Limit 100
    Configured Connect Retry Count 5
    Current Connect Retry Count 0
    Peer Status: NOT DAMPED
    Rcvd update before 0 secs, hold time is 90, keepalive interval is 30 secs
    Neighbors Capability:
    Route-Refresh: Advertised and received
    Address family IPv4 Unicast: Advertised and received
    Received 8 messages, 0 Updates
    Sent 8 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 30 seconds
    Connections established 1 time(s)
    Local host: 12.0.0.1, Local port: 179
    Foreign host: 12.0.0.2, Foreign port: 49152
    Last Error: Code 0, SubCode 0.
    • View the peer details for IPv6 entry.
    iS5comm# show bgp ipv6 neighbor
    BGP neighbor is fec0::1111:0:2, remote AS 100, internal link
    BGP version 4, remote router ID 12.0.0.2
    BGP state = Established, up for 27 minutes 22 seconds
    Configured BGP Maximum Prefix Limit 100
    Configured Connect Retry Count 5
    Current Connect Retry Count 0
    Peer Status : NOT DAMPED
    Rcvd update before 0 secs, hold time is 90, keepalive interval is 30 secs
    Neighbors Capability:
    Route-Refresh: Advertised and received
    Address family IPv4 Unicast: Advertised and received
    Received 50 messages, 0 Updates
    Sent 50 messages, 0 UpdatesRoute refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 30 seconds
    Connections established 1 time(s)
    Local host: 0.0.192.254, Local port: 179
    Foreign host: 0.0.192.254, Foreign port: 49152
    Last Error: Code 0, SubCode 0.

    • R2: View the bgp summary information.
    iS5comm# show ip bgp summary
    BGP router identifier is 12.0.0.1, local AS number 100
    BGP table version is 0
    Neighbor Version ASMsgRcvd MsgSent Up/DownState/PfxRcd
     -------- ------- ---- -------------- ----------------
    12.0.0.1 4 1002 200:00:00:6 Established

    • View the peer details for the neighbor.
    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.1, remote AS 100, internal link
    BGP version 4, remote router ID 12.0.0.1
    BGP state = Established, up for 3 minutes 55 seconds
    Rcvd update before 0 secs, hold time is 90, keepalive interval is 30 secs
    Neighbors Capability:
    Route-Refresh: Advertised and received
    Address family IPv4 Unicast: Advertised and received
    Received 9 messages, 0 Updates
    Sent 9 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 5 seconds
    Connections established 1 time(s)
    Local host: 12.0.0.2, Local port: 49152
    Foreign host: 12.0.0.1, Foreign port: 179
    Last Error: Code 0, SubCode 0.
    • View the peer details for IPv6 entry.
    iS5comm# show ip ipv6 neighbor
    BGP neighbor is fec0::1111:0:1, remote AS 100, internal link
    BGP version 4, remote router ID 12.0.0.2
    BGP state = Established, up for 27 minutes 22 seconds
    Configured BGP Maximum Prefix Limit 100
    Configured Connect Retry Count 5
    Current Connect Retry Count 0
    Peer Status : NOT DAMPED
    Rcvd update before 0 secs, hold time is 90, keepalive interval is 30 secs
    Neighbors Capability:
    Route-Refresh: Advertised and received
    Address family IPv4 Unicast: Advertised and received
    Received 54 messages, 0 Updates
    Sent 55 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 5 seconds
    Connections established 1 time(s)
    Local host: 0.0.192.254, Local port: 49152
    Foreign host: 0.0.192.254, Foreign port: 49152
    Last Error: Code 0, SubCode 0.