Null interfaces

Answered Question
Dec 5th, 2008

Just have a simple question where can I go to read up on using Null interfaces so far the sites I've pulled up are not very helpfull....thank you in advance

I have this problem too.
0 votes
Correct Answer by Jon Marshall about 8 years 6 days ago

Warren

What seems to be happening on your router is it looks like you are peering with RIP to whoever this router is connected to on the fa0/0 interface and you advertise the route for 169.176.124.0/240 to that peer.

You need to advertise this route so any traffic destined for 169.176.124.x/28 will be sent to your router. 169.176.124.x/28 is a NAT pool so it doesn't actually exist on any interface as such. But you need to advertise it so you add a static route for it and redistribute this static into the RIP process. But even though it is not a subnet that is actually configured on any physical interface you need a next-hop so you use Null0.

Now you have "nat outside" on the fa0/0 interface. With traffic coming from outside to inside NAT happens before routing. So a packet arrives for 169.176.124.7 and you have this entry on your router

ip nat inside source static 205.248.197.184 169.176.124.7

so the router translates 169.176.124.7 to 205.248.197.184 and forwards the packet. Note that if routing happened before NAT the packet would be dropped because the router would route the packet to Null0.

So that is why you have a static route pointing to Null0 for this subnet. Why you are tracking the reachability of it to be honest i'm not sure, maybe someone else could explain. Tracking the reachability is a test to see if the next-hop is still up but Null0 will always be up as far as i know as it is a logical interface.

Hope this makes sense.

Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Jon Marshall Fri, 12/05/2008 - 13:42

Warren

Null interfaces are used for a number of reasons - was there anything specific you were looking for information on ?

Jon

wgranada1 Fri, 12/05/2008 - 13:46

Well I'm trying to understand this:

ip route 169.176.124.0 255.255.255.240 Null0 track 20

the 169.176 is a block the customer gave me to NAT my internal IP address to. Also internally I run OSPF and I summurize the 169 block as well. Just trying to figure out how all this relates to each other.

Jon Marshall Fri, 12/05/2008 - 14:01

Warren

Do you know what this route is tracking ie. the track 20 bit.

I'm guessing you are advertising this route so that all traffic for 169.176.124.0/28 is routed to your site. The Null0 is used because it is a NAT pool that isn't actually connected to anything. When traffic destined for a 169.176.124.x address arrives on your router outside interface then it gets Natted to your real inside address and then routed.

Without seeing the full config this could be wrong but it seems the most likely explanation (to me at least!).

Jon

wgranada1 Fri, 12/05/2008 - 14:05

Jon I don't know if this helps but I also found this

track 20 rtr 2 reachability so it goes:

track 20 rtr 2 reachability

ip route 169.176.124.0 255.255.255.240 Null0 track 20

then I see an access-list that redistrubutes the 169 address via rip over the fa0/0 interface

If this doesn't help will post the whole config

Correct Answer
Jon Marshall Fri, 12/05/2008 - 15:30

Warren

What seems to be happening on your router is it looks like you are peering with RIP to whoever this router is connected to on the fa0/0 interface and you advertise the route for 169.176.124.0/240 to that peer.

You need to advertise this route so any traffic destined for 169.176.124.x/28 will be sent to your router. 169.176.124.x/28 is a NAT pool so it doesn't actually exist on any interface as such. But you need to advertise it so you add a static route for it and redistribute this static into the RIP process. But even though it is not a subnet that is actually configured on any physical interface you need a next-hop so you use Null0.

Now you have "nat outside" on the fa0/0 interface. With traffic coming from outside to inside NAT happens before routing. So a packet arrives for 169.176.124.7 and you have this entry on your router

ip nat inside source static 205.248.197.184 169.176.124.7

so the router translates 169.176.124.7 to 205.248.197.184 and forwards the packet. Note that if routing happened before NAT the packet would be dropped because the router would route the packet to Null0.

So that is why you have a static route pointing to Null0 for this subnet. Why you are tracking the reachability of it to be honest i'm not sure, maybe someone else could explain. Tracking the reachability is a test to see if the next-hop is still up but Null0 will always be up as far as i know as it is a logical interface.

Hope this makes sense.

Jon

wgranada1 Sat, 12/06/2008 - 05:59

Yes makes sense, I was just wondering what the tracking part did. But thanks for the info!!!!

Jon Marshall Sat, 12/06/2008 - 06:31

No problem. If you ever find out let me know.

Sometimes config is added that does no harm but serves no purpose - this might be one of those cases.

Jon

wgranada1 Sat, 12/06/2008 - 09:05

Here is something interesting, when I take the tracking stuff off:

track 10 rtr 1 reachability

track 20 rtr 1 reachability

I cannot reach the 170.132.134.0/24 subnet anymore. The only way to for my edge router to advertise that and for me to reach it is to put a loopback inter on the edge router with an IP within that subnet. But if I down the loopback and put back the above statements the 170.132.134.0/24 is being advertised and I can reach it internally so I think it has something to do with how to advertise the NATS. I don't understand that yet so if anyone knows where I can read up on it or give me a explaination that would be great...thank you in advace!!!!!

Actions

This Discussion