19 Mar

Default routes in BGP

There are 3 ways of advertising default route in BGP.

Method 1: Using network 0.0.0.0 command.
It requires only that the route 0.0.0.0 is present in the Interior Gateway Protocol (IGP) routing table. This is the preferred approach.

Method 2: Using default-information originate command.
It requires explicit redistribution of the route 0.0.0.0. This protects against someone accidentally redistributing a default route in BGP which could potentially be disastrous.

Method 3: Using neighbor default-originate command.
This method does not require the presence of the 0.0.0.0/0 network in the routing table of the advertising router.

https://community.cisco.com/t5/routing/bgp-default-information-originate/td-p/772779

http://lostintransit.se/2013/06/12/default-routes-in-bgp/

Incoming search terms:

  • bgp protocol default route
11 Feb

FIB vs RIB

Terminology:
RIB – Routing Information Base
FIB – Forwarding Information Base

RIB
This is a routing protocols database of routing prefixes that could potentially be installed in the routing table.
Derived from the control plane, it is not used for forwarding.
Every protocol such as OSPF, EIGRP, BGP has its own RIB and select their best candidates to try to install to global RIB so that it can then be selected for forwarding.
Is a selection of routing information learned via static definition or a dynamic routing protocol.
EX: show ip ospf databse show ip eigrp topology show ip bgp etc

FIB
The actual information that a routing/switching device uses to choose the interface that a given packet will use for egress.
Used for forwarding, information is derived from the RIB and from adjacency tables so that the packet can be rewritten with the correct encapsulation.
Is programmed by one or more RIB.
EX: show ip cef

Incoming search terms:

  • palo alto rib vs fib
  • rib x fib
18 Jan

BGP RIB-Failure

When a Router receives a BGP UPDATE packet that contains Network Layer Reachability Information (NLRI) – this is, a route; the packet is processed in the next order:

– Step 1. BGP checks for the NLRI (prefix received) against any BGP inbound filter configured on the Router.

– Step 2. If the NLRI is not filtered, the prefix can be seen in the BGP table with the show ip bgp command.

– Step 3. If the Routing Table already has the same prefix/prefix-length entry with a lower Administrative Distance (AD) as seen in show ip route, BGP marks the route received with RIB-Failure.

*You can display BGP routes that are not inserted in the IP routing table with the show ip bgp rib-failure command, which also explains why the BGP route was not inserted in the IP routing table.

*all routes shown in show ip bgp rib-failure command will still advertised to all BGP peers.

*Network Layer Reachability Information (NLRI)

The Network Layer Reachability Information (NLRI) is exchanged between BGP routers using UPDATE messages. An NLRI is composed of a LENGTH and a PREFIX. The length is a network mask in CIDR notation (eg. /25) specifying the number of network bits, and the prefix is the Network address for that subnet.

The NLRI is unique to BGP version 4 and allows BGP to carry supernetting information, as well as perform aggregation.

The NLRI would look something like one of these:

     /25, 204.149.16.128
     /23, 206.134.32
     /8, 10

Reference:
1. https://blog.ipspace.net/2007/12/what-is-bgp-rib-failure.html
2. https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/213286-understand-bgp-rib-failure-and-the-bgp-s.html#anc4
3. https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/5816-bgpfaq-5816.html#anc27

02 Jan

BGP Aggregate experiment

The BGP aggregate-address can be used to summarise a set of networks into a single prefix. For this post, I just wanted to show the difference between aggregate-address and aggregate-address with summary only.

We have below topology. I’m going to summarise prefixes in R1.

R1 config

hostname R1
!
interface GigabitEthernet0/0
 ip address 10.10.10.1 255.255.255.252
!
router bgp 10
 bgp log-neighbor-changes
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 neighbor 10.10.10.2 remote-as 20
!
ip route 192.168.1.0 255.255.255.0 Null0
ip route 192.168.2.0 255.255.255.0 Null0
ip route 192.168.3.0 255.255.255.0 Null0
!

R2 config

hostname R2
!
interface GigabitEthernet0/0
 ip address 10.10.10.2 255.255.255.252
!
router bgp 20
 bgp log-neighbor-changes
 neighbor 10.10.10.1 remote-as 10
!

Case 1: without aggregate-address

R2#sh ip bgp
     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.1.0      10.10.10.1               0             0 10 i
 *>  192.168.2.0      10.10.10.1               0             0 10 i
 *>  192.168.3.0      10.10.10.1               0             0 10 i

Case 2: with aggregate-address
R1 config

router bgp 10
 bgp log-neighbor-changes
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 aggregate-address 192.168.0.0 255.255.252.0
Router#sh ip bgp
     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.0.0/22   10.10.10.1               0             0 10 i
 *>  192.168.1.0      10.10.10.1               0             0 10 i
 *>  192.168.2.0      10.10.10.1               0             0 10 i
 *>  192.168.3.0      10.10.10.1               0             0 10 i

Note that we will be having the original /24 routes (longer prefix) and summarised /22 route.

Case 3: aggregate-address with summary only
R1 config

router bgp 10
 bgp log-neighbor-changes
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 aggregate-address 192.168.0.0 255.255.252.0 summary-only
R2#sh ip bgp
     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.0.0/22   10.10.10.1               0             0 10 i

All the longer-prefixes inside of the aggregate address are suppressed.

08 Nov

Cisco DHCP Server: Excluding IP Addresses

Most of the time in a small network, we will be using the Layer 3 device as a default gateway and a DHCP server. And most of the time also, we will be excluding the gateway’s ip address from the dhcp pool. Just to save 1 more configuration line and for the sake of knowledge, the IP address configured on the router interface is automatically excluded from the DHCP address pool :). You need to exclude addresses from the pool if the DHCP server should not allocate those IP addresses.

Documentation

Incoming search terms:

  • additionalgph
  • leastadf