In my last post I wrote some basics about the new 4-bytes AS number which is supported on new Cisco IOS images. Now I would like to give you a brief overview about different BGP peering scenarios that you can meet in the real world. Even if the configuration examples in this article are on a Cisco hardware with the latest IOS, the BGP scenarios can be applied to any other platform.

OK, let take the following topology (the high quality PDF file can be downloaded here):

2bytesAS-4bytesAS-BGP

You can see that I think of 3 main scenarios when it comes to have in the same topology 2-Bytes only and 4-Bytes ASN BGP routers:
– 2-Bytes support ASN peering with a 4-Bytes ASN, which has a number greater that 65535 (if you remember from the previous article, this can be wrote as ASPLAIN or ASDOT)
– 4-Bytes ASN peering with a router that support 4-Bytes ASN, but in fact has a number smaller than 65535 (e.g old telecom provider which has has the ASN already asigned as 3456)
– 2-Bytes ASN peering with the same 4-Bytes supported ASN, but with a number smaller than 65535, as in the above scenario

I chose this particular scenarios because it will be interesting to see how we configure a 2-Bytes ASN BGP router which has a 4-Bytes ASN peer or how the same 2-Bytes ASN BGP router will have the AS-Path containing the 4-Bytes ASN router.

For the R1 and R3 routers I will use a C3640 with an IOS image that support only 2-Bytes ASN, and for R2 and R3 a C7200 with the newest IOS image that can support 4-Bytes ASN. All routers have a Loopback interface that will be the BGP router-id an also announced into BGP (e.g. R2 will have interface Loopback100 with IP address 2.2.2.2/32). The AS number that I will use (ignore the fact that I use public ones, it’s just to be more easy to follow):

R1 – ASN 1111
R2 – ASN 2.2 (ASPLAIN 131074)
R3 – ASN 3333
R4 – ASN 4444

I will skip all the boring point-2-point configuration and present only the BGP config.

#### R1-C3600 ####

router bgp 1111
bgp router-id 1.1.1.1
neighbor 10.10.12.2 remote-as 23456
network 1.1.1.1 mask 255.255.255.255

As you can see in BGP peering between R1 and R2 we have to use the remote-as number 23456, due to the fact that R1 is not supporting 4-Bytes ASN. If you read my previous post, or from other sources, you know that any BGP router that does not support 4-Bytes ASN, will use a transitory number for peering with 4-Bytes ASN BGP routers and this number is 23456.

#### R2-C7200 ####

First let’s be sure that the IOS is supporting 4-Bytes ASN. Simplest way:

router bgp ?
<1-65535>    Autonomous system number
<1.0-XX.YY>  4 Octets Autonomous system number

I think it’s obvious that it supports. A small note. On all Cisco platforms (usually C3600, C7200) with IOS that I tried testing 4-Bytes ASN BGP, I saw that only ASDOT format is supported. I don’t know about other software platforms (like NX-OS) or something high-end hardware if they support ASPLAIN. Now for the configuration, R2 is peering with R1 and R3:

router bgp 2.2
bgp router-id 2.2.2.2
neighbor 10.10.12.1 remote-as 1111
neighbor 10.10.23.3 remote-as 3333
network 2.2.2.2 mask 255.255.255.255

#### R3-C7200 ####

R3 supports 4-Bytes ASN, but due to the fact that it’s and “old telecom provider” it had been assigned a 2-Bytes ASN, so I will preserve this form:

router bgp 3333
bgp router-id 3.3.3.3
neighbor 10.10.23.2 remote-as 2.2
neighbor 10.10.34.4 remote-as 4444
network 3.3.3.3 mask 255.255.255.255

The difference between R3 and R1 is that R3 support for “remote-as” a 4-bytes ASN number (again only ASDOT representation). So, in it’s peering with R2, the remote ASN is 2.2

#### R4-C3600 ####

R4 only support 2-Bytes ASN, but the difference from R1 is that it has to peer with a 4-Bytes supported ASN router that in fact has a 2-Bytes AS number.

router bgp 4444
bgp router-id 4.4.4.4
neighbor 10.10.34.3 remote-as 3333
network 4.4.4.4 mask 255.255.255.255

This is the basic configuration in this topology. Let’s take now the IP address 1.1.1.1 which is advertised into BGP from R1. If you will check the AS-Path on R4 and R3, you will see a big difference. Have a look into the screen capture below to see the real environment for the above topology:

2b4b-bgp

Cisco: 2-Bytes / 4-Bytes ASN BGP scenarios
Tagged on:                                     

10 thoughts on “Cisco: 2-Bytes / 4-Bytes ASN BGP scenarios

  • November 14, 2009 at 15:38
    Permalink

    Dear Sir,

    I must need 4 byte BGP in cisco 3750g 12 SFP port swtich. currently working fine 4 byte BGP in our 1841 router with one ISP Bandwidth 45 MB, now we need 2nd ISP bandwidth for load balance and also when any one ISP bandwidht goes down it’s up automec on wokrig ISP bandwidth. 2nd ISP bandwidth is 30 MB, can it is possible  both ISP in our 1841 router if yes , so please what i have to need to upgrade in my router and what is the configuration for two ISP bandwidth in 1841 router for load balance.

    can it is possible 4 byte BGP in 3750g 12 SFP port switch any IOS need to upgrade for 4 byte BGP in cisco 3750g switch.

    Please help me ASAS.

    Thanks in ADV,

    Vaib…

    Reply
  • November 16, 2009 at 23:59
    Permalink

    Hello Vaib,

    According to Cisco the 3750 cannot support yet (or maybe ever) the 4-byte ASN. So you’ll have to connect both ISP to that 1841 and apply a basic “single-homed” BGP configuration.You have to establish BGP sessions with both providers and to receive prefixes (or just a default route) from them. Next if you want one to be higher preferred than the other one, or try to achieve some kind of load-balancing,  you just have to use some simple route-map for the in / out prefixes.

    Since I don’t know the details, this is the only advice that I can give to you. If you want more details, contact me over the e-mail and we can discuss.

    Good luck!

    Reply
  • February 11, 2010 at 13:11
    Permalink

    Hi all,

    We’ve been asigned a 4byte AS and we now have our own PI space, the externally facing routers are 7301’s. I can’t give our routers a 4byte AS as 7301’s don’t support it. Do I need to create an AS in 23456 and somehow pass my 4byte AS ina path attribute, if so how do I do this, the ISP router I’m peering with doesn’t support 4byte AS either.

    Regards Kevin

    Reply
  • February 11, 2010 at 13:52
    Permalink

    Hello Kevin.

    If you got a 4byte AS then your devices have to support 4byte AS configuration. Otherwise you cannot make it work. 23456, was created with special purpose, so you cannot initialize your BGP session with this AS. It is used only if you have a 2byte ASN capable router and you need to peer with a 4byte ASN.

    I believe that if you upgrade your IOS on those 7301 you will get 4byte ASN support. Please contact me if you need more help regarding your issue.

    Reply
  • March 24, 2010 at 07:30
    Permalink

    Thank you for your post i am quiet new to this but still got some useful information from your blog !

    Reply
  • May 4, 2010 at 12:05
    Permalink

    We are trying to run 4 byte as on router 3825 R .And put the latest IOS also..

    But its supporting only <1-65535> Autonomous system number.

    Can you pleas help me

    Reply
    • May 4, 2010 at 20:04
      Permalink

      Hello Davison,

      What do you mean with "latest IOS"?
      I did a simple search with Cisco Software Advisor and it give me 12.4(24)T3 (c3825-adventerprisek9-mz.12.4-24.T3) that it support ASN 4-byte. I went with Enterprise version as I didn't knew what features you need.

      Let me know if this helps you!

    • May 4, 2010 at 20:04
      Permalink

      Hello Davison,

      What do you mean with "latest IOS"?
      I did a simple search with Cisco Software Advisor and it give me 12.4(24)T3 (c3825-adventerprisek9-mz.12.4-24.T3) that it support ASN 4-byte. I went with Enterprise version as I didn't knew what features you need.

      Let me know if this helps you!

  • September 30, 2011 at 19:36
    Permalink

    I find this very useful and clear explanation

    Reply

Leave a Reply

%d bloggers like this: