cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1581
Views
2
Helpful
21
Replies

bgp default gateway ways

Mlex1
Spotlight
Spotlight

Hello everyone i want to configure BGP to send the default route to a neighbor, i receive from ISP full veiw i can't advertise to another peer 0.0.0.0/0.

In lab on EVE, everything works perfectly by the way this step i done for 0.0.0.0/0
ip route 0.0.0.0 0.0.0.0 Null0:
as we know Null0 just for test taking 0.0.0.0/0 the default route is advertised to the intended neighbor as expected.
settings
R01
router bgp 200
bgp log-neighbor-changes
neighbor 10.10.10.2 remote-as 300
neighbor 10.10.10.2 description R03
!
address-family ipv4
network 0.0.0.0
neighbor 10.10.10.2 activate
neighbor 10.10.10.2 route-map RM_DEFAULT out
exit-address-family
!
ip route 0.0.0.0 0.0.0.0 Null0
!
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
!
route-map RM_DEFAULT permit 10
match ip address prefix-list DEFAULT
!
R03
router bgp 300
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
neighbor 10.10.10.1 remote-as 200
neighbor 10.10.10.1 description R1
!
However, in production, it’s not working, even though the configuration appears to be identical.

Mlex1_0-1759899886431.png

Wish all the best
1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

Hello @Mlex1 

Try 2 method.

First on R2 delete network 0.0.0.0 command and add redistribute static command instead. Let your route-map.

Test...Check...

Other way, delete network 0.0.0.0 command on R2 and add default-information originate command instead.

In two cases, if you dont have default route on R2 RIB, you need your static default route pointing towards null0.

 

 

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

21 Replies 21

M02@rt37
VIP
VIP

Hello @Mlex1 

Try 2 method.

First on R2 delete network 0.0.0.0 command and add redistribute static command instead. Let your route-map.

Test...Check...

Other way, delete network 0.0.0.0 command on R2 and add default-information originate command instead.

In two cases, if you dont have default route on R2 RIB, you need your static default route pointing towards null0.

 

 

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

i have default in the rib, for some reason default does not advertised to the neighbor, in need just for specific neighbor not to all.

you mean like this config?

router bgp 200
bgp log-neighbor-changes
neighbor 10.10.10.2 remote-as 300
neighbor 10.10.10.2 description R03
neighbor 192.168.1.2 remote-as 100
neighbor 192.168.1.2 description R1
!
address-family ipv4
redistribute static route-map RM_DEFAULT
neighbor 10.10.10.2 activate
neighbor 10.10.10.2 default-originate
neighbor 10.10.10.2 soft-reconfiguration inbound
neighbor 192.168.1.2 activate

if yes doesn't work this way 

Wish all the best

@Mlex1 

you have default-route in the RIB thanks to your null0 route ? Or do you have default-route thanks to your ISP ?

 

 

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

you have default-route in the RIB thanks to your null0 route ?

not, in production i receive full view from ISP

show ip route

B* 0.0.0.0/0 [20/0] via x.x.x.x, 1:00:00

Wish all the best

Ok so, your receive full internet table form your ISP, right ? and you want to advertise only default route to your others routers ?

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Ok so, your receive full internet table form your ISP, right ? yes

and you want to advertise only default route to your others routers ? yes but not to all my routers for specific neighbors

as show on configs upper, what i show on the picture that one not in the production 

Wish all the best

Hello


@Mlex1 wrote:

Ok so, your receive full internet table form your ISP, right ? yes

and you want to advertise only default route to your others routers ? yes but not to all my routers for specific neighbors



As you have a default in your rib table then you only need to advertise default-information-originate to each specific neighbour, no need for static null routes and redistribution 

Example:
router bgp xx
neighbour x.x.x.x default-information-originate 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

router does not have this option 

R1(config-router-af)#neighbor 10.10.10.2 default-originate

R1(config-router-af)#neighbor 10.10.10.2 default-?
default-originate

R1(config-router-af)#neighbor 10.10.10.2 default-originate ?
route-map Route-map to specify criteria to originate default
<cr> <cr>

i'm i right we need default-originate when router does't have default route? in my citution i have 0.0.0.0/0, it's possible to config or not

Wish all the best

i'm i right we need default-originate when router does't have default route?  YES !

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Hello 


@Mlex1 wrote:

router does not have this option 

R1(config-router-af)#neighbor 10.10.10.2 default-?
default-originate


its a typo on my part but as you can see you can advertise a default to a specific bgp neighbour


@Mlex1 wrote:
need default-originate when router does't have default roue? in my citution i have 0.0.0.0/0, it's possible to config or not

you can advertise a default even if you have or dont have a default in the rib of you own rtr -  but i would say if you do I would make that default information advertisement  conditional , meaning if your own rtr loses the default it will stop advertising a default to its neighbours.

This can be accomplished with a via prefix-list and route-map

example:
ip prefix-list Default_PF permit 0.0.0.0/0
route-map Default
match ip address prefix-list Default_PF

router bgp xxx
neighbor x.x.x.x default-information originate route-map Default


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Ok @Mlex1 

Please do this on R1

router bgp 200

address-family ipv4
network 0.0.0.0
[...]
neighbor 10.10.10.2 activate
neighbor 10.10.10.2 send-community both
neighbor 10.10.10.2 soft-reconfiguration inbound
neighbor 10.10.10.2 route-map DEFAULT-ONLY out

!

ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0

!

route-map DEFAULT-ONLY permit 10
match ip address prefix-list DEFAULT

 

--

AS @paul driver suggest, neighbor 10.10.10.2 default-originate command should be good too. But add route-map to limit only the default-route to be advertised to that neighbor.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

 

network 0.0.0.0 
this network advertise to all neighbor as we enable on bgp

neighbor 10.10.10.2 route-map RM_DEFAULT out
here in my config i done your suggestion not working
!
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
!
route-map RM_DEFAULT permit 10
match ip address prefix-list DEFAULT

neighbor 10.10.10.2 send-community both
neighbor 10.10.10.2 soft-reconfiguration inbound
both command i have

 

Wish all the best

@Mlex1 

network 0.0.0.0 
this network advertise to all neighbor as we enable on bgp

No ! -- add route-map on each neighbor ! Control what you advertise by route-map in outbound and what your receive in inbound (best practice)

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

@Mlex1 

Provide please these output from R1:

#sh ip route 

#sh ip bgp neigh 10.10.10.2 advertised-routes

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.