cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
504
Views
0
Helpful
13
Replies

Route redistribution.

loyalty
Level 1
Level 1

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.

13 Replies 13

thisisshanky
Level 11
Level 11

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

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

thisisshanky
Level 11
Level 11

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.

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

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.

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.

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

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

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

Thanks very much I have made the chages I'm just waiting for the remote end to confirm.

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.

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

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

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.

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.

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

Thanks very much for making that clear, really do appreciate your help.

Thanks very much you suggestion worked I can connect to the remote end, really do appreciate your help.

You are welcome!

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus