cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3382
Views
0
Helpful
7
Replies

BGP network mask missing

abissnetcisco
Level 1
Level 1

hello

 

i have some strange behavior on bgp

i am trying to advertise a network like 192.109.XX.0 mask 255.255.255.0

and when i show run  its like

 

!
address-family ipv4
network 192.109.20.0


so the mask doesn't stay there.

and the advertised-routes on neighbor


Network Next Hop Metric LocPrf Weight Path
*> 192.109.xx.0    0.0.0.0     0     32768 i

 

so no /24

 

what i am missing
with other prefixes it is OK

 

regards

 

 

1 Accepted Solution

Accepted Solutions

Hello,

 

I am not really sure what you are after to be honest. I set up two test routers as below, only the non-classful mask only shows up:

 

R1

 

interface Loopback1
ip address 10.1.1.1 255.0.0.0
!
interface Loopback2
ip address 172.16.1.1 255.255.0.0
!
interface Loopback3
ip address 192.168.1.1 255.255.255.0
!
interface Loopback4
ip address 199.199.199.1 255.255.255.128
!
router bgp 1
bgp log-neighbor-changes
network 10.0.0.0
network 172.16.0.0
network 192.168.1.0
network 199.199.199.0 mask 255.255.255.128
neighbor 200.200.200.2 remote-as 1

 

R1#sh ip bgp topology *

Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0 0.0.0.0 0 32768 i
*> 172.16.0.0 0.0.0.0 0 32768 i
*> 192.168.1.0 0.0.0.0 0 32768 i
*> 199.199.199.0/25 0.0.0.0 0 32768 i

 

R2

 

R2#sh ip route

B 10.0.0.0/8 [200/0] via 200.200.200.1, 00:03:55
B 172.16.0.0/16 [200/0] via 200.200.200.1, 00:03:55
B 192.168.1.0/24 [200/0] via 200.200.200.1, 00:03:55
199.199.199.0/25 is subnetted, 1 subnets
B 199.199.199.0 [200/0] via 200.200.200.1, 00:02:04
200.200.200.0/24 is variably subnetted, 2 subnets, 2 masks
C 200.200.200.0/30 is directly connected, GigabitEthernet0/0
L 200.200.200.2/32 is directly connected, GigabitEthernet0/0

 

R2#sh ip bgp topology *

Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0 200.200.200.1 0 100 0 i
*>i 172.16.0.0 200.200.200.1 0 100 0 i
*>i 192.168.1.0 200.200.200.1 0 100 0 i
*>i 199.199.199.0/25 200.200.200.1 0 100 0 i

 

View solution in original post

7 Replies 7

rais
Level 7
Level 7

This is not an error. Your address is class-C for which mask is /24 by default

HTH.

Jaderson Pessoa
VIP Alumni
VIP Alumni

Hello @abissnetcisco ,

 

this is not a error.

 


Network Next Hop Metric LocPrf Weight Path
*> 192.109.xx.0    0.0.0.0     0     32768 i

 

when you see 0.0.0.0  the switch itself is the next-hop to this network. :)

Jaderson Pessoa
*** Rate All Helpful Responses ***

this is not right because should be like

Network Next Hop Metric LocPrf Weight Path
*> 192.109.xx.0/24    0.0.0.0     0     32768 i

 

this is a bgp advertisement so should be like this to be accepted on public routing.

these are public IP 

 

router bgp xxxxxx
bgp router-id 10.1.10.1
no bgp fast-external-fallover
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor xxxx remote-as xxxx
neighbor xxxx description xxxx
neighbor xxxx version 4
!
address-family ipv4
network 192.109.xx.0
network 79.174.xx.0 mask 255.255.255.0
neighbor xxxx activate
neighbor xxxx prefix-list IN in
neighbor xxxx prefix-list OUT out
neighbor xxxx route-map RM-IN in
exit-address-family

 

how can i advertise with /24 subnet  192.109.xx.0 

the other one it is OK

 

 

Hello,

 

post the full configs of both sides so we can lab this...

hello 

i cant send this because the other side is the transit provider
but you can test by typing 

router bgp xxxx
network 192.109.xx.0 mask 255.255.255.0

 

after that do sho run | sec bgp

and you will find


router bgp xxxx
network 192.109.xx.0

the mask is missing
and the subnet doesn't advertise on provider BGP like xxx/24 but just 192.109.xx.0   (without /24)

Hello,

 

I am not really sure what you are after to be honest. I set up two test routers as below, only the non-classful mask only shows up:

 

R1

 

interface Loopback1
ip address 10.1.1.1 255.0.0.0
!
interface Loopback2
ip address 172.16.1.1 255.255.0.0
!
interface Loopback3
ip address 192.168.1.1 255.255.255.0
!
interface Loopback4
ip address 199.199.199.1 255.255.255.128
!
router bgp 1
bgp log-neighbor-changes
network 10.0.0.0
network 172.16.0.0
network 192.168.1.0
network 199.199.199.0 mask 255.255.255.128
neighbor 200.200.200.2 remote-as 1

 

R1#sh ip bgp topology *

Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0 0.0.0.0 0 32768 i
*> 172.16.0.0 0.0.0.0 0 32768 i
*> 192.168.1.0 0.0.0.0 0 32768 i
*> 199.199.199.0/25 0.0.0.0 0 32768 i

 

R2

 

R2#sh ip route

B 10.0.0.0/8 [200/0] via 200.200.200.1, 00:03:55
B 172.16.0.0/16 [200/0] via 200.200.200.1, 00:03:55
B 192.168.1.0/24 [200/0] via 200.200.200.1, 00:03:55
199.199.199.0/25 is subnetted, 1 subnets
B 199.199.199.0 [200/0] via 200.200.200.1, 00:02:04
200.200.200.0/24 is variably subnetted, 2 subnets, 2 masks
C 200.200.200.0/30 is directly connected, GigabitEthernet0/0
L 200.200.200.2/32 is directly connected, GigabitEthernet0/0

 

R2#sh ip bgp topology *

Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0 200.200.200.1 0 100 0 i
*>i 172.16.0.0 200.200.200.1 0 100 0 i
*>i 192.168.1.0 200.200.200.1 0 100 0 i
*>i 199.199.199.0/25 200.200.200.1 0 100 0 i

 

leave it


it was just useless feature of Cisco (drooping the /24 visually)

i am used seeing that /24 or /xx

i just checked on looking glasses and the prefix is OK on public 

 

sorry  & thank you

 

Review Cisco Networking products for a $25 gift card