Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
You may experience some slow load times, errors, and slight inconsistencies. We ask for your patience as we finalize the launch. Thank you.

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Protocol BGP mixed with static routing

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 ?

  • WAN Routing and Switching
1 ACCEPTED SOLUTION

Accepted Solutions

Protocol BGP mixed with static routing

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 ***
4 REPLIES

Re: Protocol BGP mixed with static routing

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 ***
New Member

Protocol BGP mixed with static routing

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?

Protocol BGP mixed with static routing

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 ***
New Member

Protocol BGP mixed with static routing

Thank you that's very nice of you!

375
Views
0
Helpful
4
Replies