cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1273
Views
0
Helpful
4
Replies

Protocol BGP mixed with static routing

csco11579831
Level 1
Level 1

can you please tell me if it is possible to communicate from router A and B to the outside without declaring the networkAAAA and BBBB ... ZZZZ in the BGP routing table on Rouater A and B, knowing that I work internally with static routing ?

1 Accepted Solution

Accepted Solutions

Sure. If you have 2 static routes that you want to distribute, you can do this without the network statement like below:

ip route 192.168.1.0 255.255.255.0 192.168.2.1

ip route 192.168.3.0 255.255.255.0 192.168.2.1

router bgp 65500

redistribute static

That's it. A route map can restrict which route you want to advertise like below:

access-list 10 permit 192.168.1.0 0.0.0.255

route-map Static permit 10

match ip address 10

router bgp 65500

redistribute static route-map Static

Obviously some of the caveats to this are that if you specify a redistribute statement without a route map, any new static routes will automatically be redistributed and this may not be what you want. The drawback of using a route map with the redistribute is that you have to remember to add the static route to your acl in order to advertise. Otherwise, you won't advertise what you think you should be.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

View solution in original post

4 Replies 4

John Blakley
VIP Alumni
VIP Alumni

If you're not natting, the router on the other side needs to know about your internal routes somehow. You don't need to "network aaaa" everything, but you can redistribute static in bgp to take care of all of your routes. If you want to be selective, you can redistribute static with a route map matching only the static routes that you want.

If you're natting, then all of your internal traffic will go out as whatever address you want it to at the NAT device (be it a router or firewall) and the only device that needs to know about your real addresses internally would be Routers A and B.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

Hi John,

Tkank you for reply,

I do not use NAT, I have not much knowledge about restribution

can you please give me a quick setup?

Sure. If you have 2 static routes that you want to distribute, you can do this without the network statement like below:

ip route 192.168.1.0 255.255.255.0 192.168.2.1

ip route 192.168.3.0 255.255.255.0 192.168.2.1

router bgp 65500

redistribute static

That's it. A route map can restrict which route you want to advertise like below:

access-list 10 permit 192.168.1.0 0.0.0.255

route-map Static permit 10

match ip address 10

router bgp 65500

redistribute static route-map Static

Obviously some of the caveats to this are that if you specify a redistribute statement without a route map, any new static routes will automatically be redistributed and this may not be what you want. The drawback of using a route map with the redistribute is that you have to remember to add the static route to your acl in order to advertise. Otherwise, you won't advertise what you think you should be.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

Thank you that's very nice of you!

Review Cisco Networking products for a $25 gift card