Configuring Internal BGP Basic Peering

The following example configures a basic internal BGP peering as displayed in Basic IBGP Peering Topology. The example configures the source IP address using the update source address feature to take advantage of the full mesh within an IBGP topology. See Source IP Address Update to the Peer for an explanation of this feature.

Click to expand in new window
Basic IBGP Peering Topology
Graphics/IBGPPeeringExample1.png

The example consists of two routers with a connection on subnet 192.168.12.0/24. Because this is an internal BGP connection, both routers belong to the same AS. The example configuration consists of configuring, for each router:

  • The loopback interface for the update source IP address
  • The connection interface and IP address
  • The AS the router belongs to
  • The router ID
  • The connection neighbor IP address (use update source IP address) and remote AS
  • The connection neighbor IP address, specifying the update source IP address for this router
  • The redistribution of static routes

    Router 1

    Router 1(rw)->configure
    Router 1(rw-config)->interface loopback 1
    Router 1(rw-config-intf-loop.0.1)->ip address 1.1.1.1 255.255.255.0
    Router 1(rw-config-intf-loop.0.1)->no shutdown
    Router 1(rw-config-intf-loop.0.1)->exit
    Router 1(rw-config)->interface vlan 12
    Router 1(rw-config-intf-vlan.0.12)->ip address 192.168.12.111 255.255.255.0
    Router 1(rw-config-intf-vlan.0.12)->no shutdown
    Router 1(rw-config-intf-vlan.0.12)->exit
    Router 1(rw)->configure
    Router 1(rw-config)->router bgp 1
    Router 1(su-config-bgp)->bgp router-id 1.1.1.1
    Router 1(su-config-bgp)->neighbor 2.2.2.2 remote-as 1
    Router 1(su-config-bgp)->neighbor 2.2.2.2 update-source 1.1.1.1
    Router 1(su-config-bgp)->redistribute static
    Router 1(su-config-bgp)->

    Router 2

    Router 1(rw)->configure
    Router 1(rw-config)->interface loopback 1
    Router 1(rw-config-intf-loop.0.1)->ip address 2.2.2.2 255.255.255.0
    Router 1(rw-config-intf-loop.0.1)->no shutdown
    Router 1(rw-config-intf-loop.0.1)->exit
    Router 2(rw-config)->interface vlan 12
    Router 2(rw-config-intf-vlan.0.12)->ip address 192.168.12.112 255.255.255.0
    Router 2(rw-config-intf-vlan.0.12)->no shutdown
    Router 2(rw-config-intf-vlan.0.12)->exit
    Router 2(rw)->configure
    Router 2(rw-config)->interface vlan 13
    Router 2(rw-config-intf-vlan.0.13)->ip address 192.168.13.111 255.255.255.0
    Router 2(rw-config-intf-vlan.0.13)->no shutdown
    Router 2(rw-config-intf-vlan.0.13)->exit
    Router 2(rw)->configure
    Router 2(rw-config)->router bgp 2
    Router 2(su-config-bgp)->bgp router-id 2.2.2.2
    Router 2(su-config-bgp)->neighbor 1.1.1.1 remote-as 1
    Router 1(su-config-bgp)->neighbor 1.1.1.1 update-source 2.2.2.2
    Router 2(su-config-bgp)->redistribute static
    Router 2(su-config-bgp)->

IBGP Basic Peering Configuration is a simple configuration intended for internal BGP propagation.

Click to expand in new window

IBGP Basic Peering Configuration

Step Task Command
1 In configuration mode, configure static routes between BGP routers to allow IP traffic transmission between remote routers. ip route {prefix mask | prefix/prefix-length} {ip-address [recursive | interface interface-name] | interface interface-name | vlan vlan-id | vrf egress-vrf | blackhole | reject} [distance] [tag tag-id]
2 In configuration mode, configure loopback and physical addresses and enter interface configuration mode. interface {vlan vlan-id | loopback loopback-id | interface-name}
3 In interface configuration mode, configure the IP address for the interface that serves as the BGP speaker. ip address {ip-address ip-mask | ip-address/prefixLength} [primary | secondary]
4 In configuration mode, specify an AS number for the router and enter BGP Configuration mode. router bgp as-number
5 In BGP configuration mode, configure a BGP-specific router ID to override the global router ID. bgp router-id router-id
6 In BGP configuration mode, specify an update source IP address assigned to a loopback interface, for this router, to be used as the source address instead of the default outgoing interface IP address. neighbor ip-address update-source source-addr
7 In BGP configuration mode, configure the peer by identifying its source IP address and AS. neighbor ip-address remote-as as-num
8 In BGP configuration mode, redistribute routes into BGP, optionally specifying a route-map. Supported route-types are connected, static, OSPF, and RIP. redistribute route-type [aspath-limit limit] [origin code] [med value] [local-pref value] [route-map name]