The following example configures a basic External BGP peering as displayed in Basic EBGP Peering Topology.
The example consists of two routers with a connection on subnet 192.168.12.0/24. One router belongs to AS 1. The other router belongs to AS 2. The example configuration consists of configuring, for each router:
Router 1
Router 1(rw)->configure 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 192.168.12.112 remote-as 2 Router 1(su-config-bgp)->redistribute static Router 1(su-config-bgp)->
Router 2
Router 2(rw)->configure 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 192.168.12.111 remote-as 1 Router 2(su-config-bgp)->redistribute static Router 2(su-config-bgp)->
EBGP Basic Peering Configuration is a simple configuration intended for external BGP propagation.
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, configure the peer by identifying its IP address and AS. | neighbor ip-address remote-as as-num [password password] |
7 | 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] |