BGP Unnumbered
This chapter contains configurations for BGP unnumbered interface which provides BGP peering with minimal configuration.
Overview
BGP protocol is used to exchange IP prefixes between AS. For BGP neighbor ship to be established, IPv4 address configuration on peer is pre-requisite. In a large network, this can consume a lot of your address space, requiring a separate IP address for each peer-facing interface apart from administrator effort in configuration. When a BGP peer advertises an IPv4 prefix, it must include an IPv4 next hop address, which is usually the address of the advertising router; for this each BGP peer should have an IPv4 address. This feature is to enable BGP peering with minimal configuration, less IPv4 address-space.
For DC use-case, where hundreds of switches can be connected in CLOS topology, configuring each neighbor is both time consuming and (IPv4) address hungry.
To minimize this, BGP unnumbered can, avoid the need for an IP address on each BGP interface and by removing the need to configure the IP address and ASN of each neighbor. This feature uses link local ipv6 address of interface as per RFC-5549.
Topology
Figure 1-39: BGP unnumbered
Configuration
Spine 1
configure terminal | Enter configure mode |
(config)#interface lo | Enter interface mode for loopback interface |
(config-if)#ip add 1.1.1.1/32 secondary | Assign secondary interface to loopback |
(config-if)#exit | Exit interface mode |
(config)#interface xe12 | Enter interface mode |
(config-if)# ipv6 nd ra-interval 4 | Assign the IPv6 Router Advertisements interval |
(config-if)#exit | Exit interface mode |
(config)#interface xe10 | Enter interface mode |
(config-if)# ip address 10.10.10.2/31 | Assign IP address to the interface in /31 subnet |
(config-if)#exit | Exit interface mode |
(config)#router bgp 100 | Enter bgp router mode |
(config-router)#bgp router-id 1.1.1.1 | Assign router id for BGP |
(config-router)#bgp unnumbered-mode | Enter bgp unnumbered mode |
(config-router-unnum)#neighbor xe12 remote-as internal | Configure iBGP neighborship |
(config-router-unnum)#neighbor xe10 remote-as internal | Configure iBGP neighborship |
(config-router-unnum)# exit-unnumbered-mode | Exit unnumbered mode |
(config-router)#address-family ipv4 unicast | Enter address family mode for IPv4 unicast |
(config-router-af)# bgp v4-unnumbered-mode | Enter unnumbered mode under ipv4 unicast af |
(config-router-v4-unnum)# neighbor xe10 activate | Activate the neighbor |
(config-router-v4-unnum)# neighbor xe12 activate | Activate the neighbor |
(config-router-v4-unnum)# exit-v4-unnumbered-mode | Exit unnumbered mode under ipv4 unicast af |
(config-router-af)# exit-address-family | Exit address family mode for IPv4 unicast |
(config-router)#end | End Config mode |
Spine 2
configure terminal | Enter configure mode |
(config)#interface lo | Enter interface mode for loopback interface |
(config-if)# ip address 2.2.2.2/32 secondary | Assign secondary interface to loopback |
(config-if)#exit | Exit interface mode |
(config)# interface ce6/1 | Enter interface mode |
(config-if)# ipv6 nd ra-interval 4 | Assign the IPv6 Router Advertisements interval |
(config-if)#exit | Exit interface mode |
(config)# interface ce3/1 | Enter interface mode |
(config-if)# ip address 20.20.20.2/31 | Assign IP address to the interface in /31 subnet |
(config-if)#exit | Exit interface mode |
(config)#router bgp 100 | Enter bgp router mode |
(config-router)#bgp router-id 2.2.2.2 | Assign router id for BGP |
(config-router)#bgp unnumbered-mode | Enter bgp unnumbered mode |
(config-router-unnum)#neighbor ce3/1 remote-as internal | Configure iBGP neighborship |
(config-router-unnum)#neighbor ce6/1 remote-as internal | Configure iBGP neighborship |
(config-router-unnum)# exit-unnumbered-mode | Exit unnumbered mode |
(config-router)#address-family ipv4 unicast | Enter address family mode for IPv4 unicast |
(config-router-af)# bgp v4-unnumbered-mode | Enter unnumbered mode under ipv4 unicast af |
(config-router-v4-unnum)# neighbor ce3/1 activate | Activate the neighbor |
(config-router-v4-unnum)# neighbor ce6/1 activate | Activate the neighbor |
(config-router-v4-unnum)# exit-v4-unnumbered-mode | Exit unnumbered mode under ipv4 unicast af |
(config-router-af)# exit-address-family | Exit address family mode for IPv4 unicast |
(config-router)#end | End Config mode |
Leaf 1
configure terminal | Enter configure mode |
(config)#interface lo | Enter interface mode for loopback interface |
(config-if)# ip address 3.3.3.3/32 secondary | Assign secondary interface to loopback |
(config-if)#exit | Exit interface mode |
(config)#interface xe12 | Enter interface mode |
(config-if)# ipv6 nd ra-interval 4 | Assign the IPv6 Router Advertisements interval |
(config-if)#exit | Exit interface mode |
(config)#interface ge4 | Enter interface mode |
(config-if)# ip address 10.10.10.3/31 | Assign IP address to the interface in /31 subnet |
(config-if)#exit | Exit interface mode |
(config)#router bgp 100 | Enter bgp router mode |
(config-router)#bgp router-id 3.3.3.3 | Assign router id for BGP |
(config-router)#bgp unnumbered-mode | Enter bgp unnumbered mode |
(config-router-unnum)#neighbor xe12 remote-as internal | Configure iBGP neighborship |
(config-router-unnum)#neighbor ge4 remote-as internal | Configure iBGP neighborship |
(config-router-unnum)# exit-unnumbered-mode | Exit unnumbered mode |
(config-router)#address-family ipv4 unicast | Enter address family mode for IPv4 unicast |
(config-router-af)# bgp v4-unnumbered-mode | Enter unnumbered mode under ipv4 unicast af |
(config-router-v4-unnum)# neighbor ge4 activate | Activate the neighbor |
(config-router-v4-unnum)# neighbor xe12 activate | Activate the neighbor |
(config-router-v4-unnum)# exit-v4-unnumbered-mode | Exit unnumbered mode under ipv4 unicast af |
(config-router-af)# exit-address-family | Exit address family mode for IPv4 unicast |
(config-router)#end | End Config mode |
Leaf 2
configure terminal | Enter configure mode |
(config)#interface lo | Enter interface mode for loopback interface |
(config-if)#ip address 4.4.4.4/32 secondary | Assign secondary interface to loopback |
(config-if)#exit | Exit interface mode |
(config)#interface xe4 | Enter interface mode |
(config-if)# ipv6 nd ra-interval 4 | Assign the IPv6 Router Advertisements interval |
(config-if)#exit | Exit interface mode |
(config)#interface ge7 | Enter interface mode |
(config-if)# ip address 10.10.10.2/31 | Assign IP address to the interface in /31 subnet |
(config-if)#exit | Exit interface mode |
(config)#router bgp 100 | Enter bgp router mode |
(config-router)#bgp router-id 4.4.4.4 | Assign router id for BGP |
(config-router)#bgp unnumbered-mode | Enter bgp unnumbered mode |
(config-router-unnum)#neighbor xe4 remote-as internal | Configure iBGP neighborship |
(config-router-unnum)#neighbor ge7 remote-as internal | Configure iBGP neighborship |
(config-router-unnum)# exit-unnumbered-mode | Exit unnumbered mode |
(config-router)#address-family ipv4 unicast | Enter address family mode for IPv4 unicast |
(config-router-af)# bgp v4-unnumbered-mode | Enter unnumbered mode under ipv4 unicast af |
(config-router-v4-unnum)# neighbor ge7 activate | Activate the neighbor |
(config-router-v4-unnum)# neighbor xe4 activate | Activate the neighbor |
(config-router-v4-unnum)# exit-v4-unnumbered-mode | Exit unnumbered mode under ipv4 unicast af |
(config-router-af)# exit-address-family | Exit address family mode for IPv4 unicast |
(config-router)#end | End Config mode |
Validation
Spine 1:
Spine1#show ip bgp neighbors
BGP neighbor is 10.10.10.3, remote AS 100, local AS 100, internal link
BGP version 4, local router ID 1.1.1.1, remote router ID 4.4.4.4
BGP state = Established, up for 00:22:12
Last read 00:00:06, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 54 messages, 0 notifications, 0 in queue
Sent 54 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 10.10.10.2, Local port: 179
Foreign host: 10.10.10.3, Foreign port: 49242
Nexthop: 10.10.10.2
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
BGP neighbor is fe80::eac5:7aff:fefe:97e0, remote AS 100, local AS 100, internal link
BGP version 4, local router ID 1.1.1.1, remote router ID 3.3.3.3
BGP state = Established, up for 00:29:54
Last read 00:00:12, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 71 messages, 0 notifications, 0 in queue
Sent 74 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: fe80::eac5:7aff:fe8b:a82a, Local port: 179
Foreign host: fe80::eac5:7aff:fefe:97e0, Foreign port: 37116
Nexthop: 1.1.1.1
Nexthop global: fe80::eac5:7aff:fe8b:a82a
Nexthop local: fe80::eac5:7aff:fe8b:a82a
BGP connection: shared network
Spine 2:
Spine2#show ip bgp neighbors
BGP neighbor is 20.20.20.3, remote AS 100, local AS 100, internal link
BGP version 4, local router ID 2.2.2.2, remote router ID 3.3.3.3
BGP state = Established, up for 00:21:15
Last read 00:00:12, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 52 messages, 0 notifications, 0 in queue
Sent 51 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 20.20.20.2, Local port: 59380
Foreign host: 20.20.20.3, Foreign port: 179
Nexthop: 20.20.20.2
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
BGP neighbor is fe80::36ef:b6ff:fe31:dd3f, remote AS 100, local AS 100, internal link
BGP version 4, local router ID 2.2.2.2, remote router ID 4.4.4.4
BGP state = Established, up for 00:29:31
Last read 00:00:21, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 70 messages, 0 notifications, 0 in queue
Sent 72 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: fe80::ce37:abff:fe3f:9f63, Local port: 179
Foreign host: fe80::36ef:b6ff:fe31:dd3f, Foreign port: 33368
Nexthop: 2.2.2.2
Nexthop global: fe80::ce37:abff:fe3f:9f63
Nexthop local: fe80::ce37:abff:fe3f:9f63
BGP connection: shared network
Leaf 1
Leaf1#show ip bgp neighbors
BGP neighbor is 20.20.20.2, remote AS 100, local AS 100, internal link
BGP version 4, local router ID 3.3.3.3, remote router ID 2.2.2.2
BGP state = Established, up for 00:21:32
Last read 00:00:05, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 52 messages, 0 notifications, 0 in queue
Sent 54 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 20.20.20.3, Local port: 179
Foreign host: 20.20.20.2, Foreign port: 59380
Nexthop: 20.20.20.3
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
BGP neighbor is fe80::eac5:7aff:fe8b:a82a, remote AS 100, local AS 100, internal
link
BGP version 4, local router ID 3.3.3.3, remote router ID 1.1.1.1
BGP state = Established, up for 00:30:46
Last read 00:00:06, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 74 messages, 0 notifications, 0 in queue
Sent 73 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: fe80::eac5:7aff:fefe:97e0, Local port: 37116
Foreign host: fe80::eac5:7aff:fe8b:a82a, Foreign port: 179
Nexthop: 3.3.3.3
Nexthop global: fe80::eac5:7aff:fefe:97e0
Nexthop local: fe80::eac5:7aff:fefe:97e0
BGP connection: shared network
Leaf 2
Leaf2#show ip bgp neighbors
BGP neighbor is 10.10.10.2, remote AS 100, local AS 100, internal link
BGP version 4, local router ID 4.4.4.4, remote router ID 1.1.1.1
BGP state = Established, up for 00:23:24
Last read 00:00:09, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 56 messages, 0 notifications, 0 in queue
Sent 57 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 10.10.10.3, Local port: 49242
Foreign host: 10.10.10.2, Foreign port: 179
Nexthop: 10.10.10.3
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
BGP neighbor is fe80::ce37:abff:fe3f:9f63, remote AS 100, local AS 100, internal
link
BGP version 4, local router ID 4.4.4.4, remote router ID 2.2.2.2
BGP state = Established, up for 00:30:09
Last read 00:00:08, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 72 messages, 0 notifications, 0 in queue
Sent 72 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: fe80::36ef:b6ff:fe31:dd3f, Local port: 33368
Foreign host: fe80::ce37:abff:fe3f:9f63, Foreign port: 179
Nexthop: 4.4.4.4
Nexthop global: fe80::36ef:b6ff:fe31:dd3f
Nexthop local: fe80::36ef:b6ff:fe31:dd3f
BGP connection: shared network