cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5685
Views
10
Helpful
9
Replies

BGP network without mask

sebastien3
Level 4
Level 4

Hello,

I just added a public X.X.X.0/24 ip block on our BGP routers... I have 3 routers BGP on AS 1234 with an IGP.

 

router bgp 1234

address-family ipv4
network A.A.A.0 mask 255.255.255.0
network B.B.B.0 mask 255.255.252.0
network X.X.X.0

 

The subnet mask is not specified (show running-config). I don't understand why this one is not present when I have 2 other prefixes on which the mask is present !

 

The config for prefixe X.X.X.0/24 is (for router 1 - the configuration is the same on the other two routers except the IP changes 10.2.84.2 10.2.84.3) :

 

ip route X.X.X.0 255.255.255.0 10.2.84.1
ip route X.X.X.0 255.255.255.0 Null0 254

 

BGP-01#sh ip bgp X.X.X.0
BGP routing table entry for X.X.X.0/24, version 15938714 Paths: (3 available, best #3, table default) Advertised to update-groups: 4 7 8 10 Refresh Epoch 2 Local, (received & used) A.A.A.128 (metric 129536) from A.A.A.128 (A.A.A.128) Origin IGP, metric 0, localpref 100, valid, internal rx pathid: 0, tx pathid: 0 Refresh Epoch 1 Local, (received & used) A.A.A.129 (metric 129536) from A.A.A.129 (A.A.A.129) Origin IGP, metric 0, localpref 100, valid, internal rx pathid: 0, tx pathid: 0 Refresh Epoch 1 Local 10.2.84.1 from 0.0.0.0 (A.A.A.127) Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best rx pathid: 0, tx pathid: 0x0
BGP-01#sh ip route X.X.X.0
Routing entry for X.X.X.0/24
  Known via "static", distance 1, metric 0
  Advertised by bgp 1234
  Routing Descriptor Blocks:
  * 10.2.84.1
      Route metric is 0, traffic share count is 1

On the looking glass the prefix X.X.X.0 is present with the /24. My ISPs do receive the /24 via eBGP sessions.

What can be the problem ?

2 Accepted Solutions

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

we need to know more information what is that full subnet .

 

in general BGP - "no mask it assumes the classful network"

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

Hello,

 

this is default BGP behavior. You only see the masks when they are non-classfull. 

View solution in original post

9 Replies 9

balaji.bandi
Hall of Fame
Hall of Fame

we need to know more information what is that full subnet .

 

in general BGP - "no mask it assumes the classful network"

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello,

 

by default, only the non-classful masks show up. Have a look at the config below. Even though I entered the classful masks in the BGP configuration, only the non-classful mask shows up:

 

interface Loopback0
ip address 192.168.1.1 255.255.255.0
!
interface Loopback1
ip address 10.1.1.1 255.0.0.0
!
interface Loopback2
ip address 20.1.1.1 255.255.255.0

!

router bgp 1
bgp log-neighbor-changes
network 10.0.0.0
network 20.1.1.0 mask 255.255.255.0
network 192.168.1.0

@Georg Pauwen @balaji.bandi 

Thank you for your reply !

 

If I understand your answer correctly, this is normal and does not concern a fault on my configuration ?

Hello,

 

this is default BGP behavior. You only see the masks when they are non-classfull. 

yes not to worry, until you see some different results - please raise it.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Thanks to you two

I am sorry I know it day ago but,

are prefix "subnet" present or not, 

the mask of it is other issue but why it is not select as best-path is issue here.


@MHM Cisco World wrote:

the mask of it is other issue but why it is not select as best-path is issue here.


 Can you explain it please ?

I think your extending your original question.  Now that we know why the mask part of the CLI is not showing up in the config this is a new but related question.

If you have:

router bgp 65100
 network 172.17.0.0

We assume the network command is actually...

router bgp 65100
 network 172.17.0.0 mask 255.255.0.0

We now must consider that the prefix specified by the network command must match the prefix in the routing table perfectly, including the mask.  If you have the following:

ip route 172.17.0.0 255.255.240.0 null0
ip route 172.17.16.0 255.255.240.0 null0

...neither prefix will be redistributed into BGP because the masks do not match.