09-04-2013 12:31 PM - edited 03-04-2019 08:57 PM
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 ?
Solved! Go to Solution.
09-04-2013 02:19 PM
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 ***
09-04-2013 12:35 PM
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 ***
09-04-2013 02:04 PM
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?
09-04-2013 02:19 PM
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 ***
09-04-2013 02:28 PM
Thank you that's very nice of you!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide