10-04-2002 11:45 AM - edited 03-02-2019 01:51 AM
I have a static route to a Network configured to null zero on my router and I want to advertise it to my BGP neibour, I have used the Network command to do this but he is still having problems connecting to it. Considering that I have other static routes on my router I donot want them to see, is it okay to use static route redistribution to resolve the problem. Will welcome any Ideas, thanks.
10-04-2002 11:55 AM
CHeck your network command.
If you have a class network (base network) 10.0.0.0 and you subnet it to get...
10.10.10.0 /24 is the network you have.
Now the network command should be off the form
router bgp 100
network 10.10.10.0 mask 255.255.255.0
If you give only the network and not the mask as follows, it wont work.
router bgp 100
network 10.10.10.0 ----- this wont work..
So if a network is subneted, and that network isbeing used in the network command, you have to include the appropriate mask in the network statement, for BGP to propagate that route.
Hope it helps
10-04-2002 12:00 PM
Usually its not advisable to use a redistribution into BGP. But still if you need it ,you can ofcourse use redistribution of static routes into BGP with a filter along with it. The filter should permit only the network you want them to see.
router bgp 100
redistribute static route-map filter
route-map filter 10
match ip add 1
route-map filter 20
access-list 1 permit x.x.x.x
wildcard = inverse of subnet mask.
10-04-2002 12:14 PM
Thanks for your prompt respose, qusetion in your config you have a command for' route-map filter 20' are you saying i create too route map statements and if so what is the purpose of the second. Thanks.
10-04-2002 12:19 PM
The second statement with number 20 is a second instance of the same route-map.
route-maps are processed in order of lowest to highest instance numbers. So in this case 10, 20 etc....Router matches first conditions under instance 10, if a match is found, it goes out of the loop, if a match is not found, it goes to instance 20 and so oon.
i created an empty instance, just to define what needs to be done, for those routes which are not matched by access-list 1.
In this case, even if you dont have that instance of 20, its fine. Just one instance is fine.
10-04-2002 12:21 PM
I am so sorry to mislead you about the syntax of the route-map. I just messed, when i was typing.
route-map filter permit 10
match ip add 1
route-map filter permit 20
10-04-2002 12:38 PM
Thanks very much I have made the chages I'm just waiting for the remote end to confirm.
10-07-2002 10:58 AM
Is it okay to configure a static route to null zero without having any other routes on my router to the Network. On my router I have this command
ip route 10.10.6.0 255.255.255.0 null 0
and I'm advertising Network 10.10.6.0 to my BGP neighbor. The reason I' ve put in this command is because BGP will not advertise a route it has not learnt via IGP. The IP-addresses on this network are translated via NAT to 192.168.6.0 and I have a route to this network on my router but none to the 10.10.6.0 (apart from null zero). I'm wondering if the remote end would be able to connect to 10.10.6.0. Thanks.
10-07-2002 11:07 AM
I guess, your router is doing a outside to inside nat. Connections come into your network with a destination address falling in 10.10.6.0 network, but your router does a translation from 10.10.6.0 to 192.168.6.0 ?? Am I right???
If i am right, i guess this should work. You can use this static route to 10.10.6.0 network pointing to a null 0 , while use a network statement in BGP to advertise this network via BGP. When you use this make sure you specify teh /24 mask in the network statement as follows..
router bgp xxx
network 10.10.6.0 mask 255.255.255.0 (or which ever mask you are using)
regards
10-07-2002 11:25 AM
Yes you are right, dose it not matter that I have no other route on my router to 10.10.6.0 considering that I'm running BGP. The books says a static route to Null zero is used to specify that any information for this Network should be discarded. Thanks for your help.
10-07-2002 11:43 AM
It It doesnt matter in this case. This is because, since the NAT is done from outside to inside, the router checks NAT table first and then the routing table. When the router makes an entry for the packet in the NAT table, it would have already created a new packet in which the destination address has been changed to an ip address from 192.168.6.0 network. Once this is done, It would check routing table and search for a route to 192.168.6.0 network.
10-07-2002 11:55 AM
Thanks very much for making that clear, really do appreciate your help.
10-10-2002 08:29 AM
Thanks very much you suggestion worked I can connect to the remote end, really do appreciate your help.
10-10-2002 09:33 AM
You are welcome!
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