≡ Menu

Border Gateway Protocol (BGP) as SDN Backbone

Border Gateway Protocol (BGP) is the core of Internet and yet its versatility is hardly utilised by majority of the networking community within a data centre environment. BGP is widely used by the service provides and also in conjunction with MPLS. In the introduction of Software-Defined Networking (SDN), the whole concept of network will change dramatically in the coming years; some could say it has already changed, and I agree. We will hardly be managing devices individually and it will become impractical to manage 100s or even 1000s of devices in a data centre architecture.

Why Border Gateway Protocol?

I will try and justify my views as how BGP would be the perfect candidate as a SDN backbone. However, other protocols will still tick some of the boxes but those won’t be able to tick every boxes as BGP does.


I can’t think of a protocol which is versatile enough to handle control plane and data plane separate, yet when it comes to talking between control and data plane, it does it efficiently. After all, SDN is all about separating Control Plane from Data Plane.
[click to continue…]

4 Byte BGP Autonomous System Numbers

Like IPv4 Address space depletion, the 2-Byte (16 bit) BGP AS number is also running out. As per RFC4893 (BGP Support for Four-octet AS Number Space) 4-Byte Autonomous Systems (AS) numbers have been issued by the Regional Internet Registry (RIR).

2-Byte (16 Bit) Autonomous System Numbers
We have a total of 216 = 65536 Possible AS Numbers
Private AS Numbers: 64512 – 65534
Reserved AS Numbers: 59392 – 64511, 65535

4-Byte (16 Bit) Autonomous System Numbers
We have a total of 232 = 4,294,967,296 Possible AS Numbers
Any numbers ranging from 65536 to 4294967295 are considered 32Bit AS Numbers.

This is the IETF preferred notation of AS Numbers, where a 2-Byte AS Number such as 65535 is represented in the form of text in both command and CLI. Where a 4-Byte As number such as 65546 will be represented in the form of “65546”

As mentioned above, the ASDOT notation for the 2-Byte AS Numbers are represented in decimal format.
4-Byte AS Numbers is represented in the following format.
[click to continue…]

How to remember BGP Selection Process

“We Love Oranges AS Oranges Mean Pure Refreshment”

W – Weight (Highest)
L – LOCAL_PREF (Highest)
O – Originate (local) routes that are advertise through the “network” command or redistributed from an IGP.
AS – AS_PATH (shortest)
O – ORIGIN Code (IGP > EGP > Incomplete)
MMED (lowest)
P – Paths (External > Internal)
RRID (lowest)

Fine-tuning BGP Client / Server Relationship

Before you read through this post, I assume you have got at least the basic understanding of BGP and how it works.

Here are some facts…

BGP is a path vector Routing Protocol works on TCP port 179.

Neighbor with the lowers IP address will establish the connection to the Remote Peer on TCP port 179 with a random source port.

In this case, the Remote Peer will become the Server and the Local Peer will become the client. This peering relationship will change when we clear the BGP process on either peer or the underlying BGP connection get severed for any reason.

In case you want to specifically want to set one Peer as the Server and one as the Client, the IOS does support it.

This is how it is done…

[click to continue…]

BGP Peer Templates

I have came across a lot of BGP configurations where there are lot of the configurations can be optimized. But having said that, this is not always the case when the Network is being built gradually.

Here is a couple of them, called Peer Session Templates and Peer Policy Templates; which we can use in such BGP configuration optimisations, when we…

  1. Design a Network from scratch.
  2. Design with a future overview.

These configurations can be used when it comes to commands which are session specific.

  • description
  • disable-connected-check
  • ebgp-multihop
  • exit peer-session
  • inherit peer-session
  • local-as
  • password
  • remote-as
  • shutdown
  • timers
  • translate-update
  • update-source
  • version

I wouldn’t personally set password on a template, because…

  1. You might want to have a different password for a specific peer because it is controlled by some other Administrative body.
  2. In my opinion, it is best practice to set the password per peer than to have it under a template.

Here is an example configuration from Cisco and also take a look at the Peer Policy Templates which is used under address-family. I would strongly advise you to read through the whole document.

[click to continue…]

BGP no-export vs local-as

This is one of the BGP configuration I have came across on my lab…

no-export : This will keep the route inside the confederation, but not to any peers.

local-as : This will keep the route inside the AS, but not even to confederation peers.

no-export –> local-as –> no-advertise

If there is no confederation present, no-export will reflect the same result as local-as.

Copyright © Nish Vamadevan 2002-2018. All Rights Reserved. Terms and Policies.