Skip to contentSkip to conversation

Host not reachable problem

DISCUSSION Steffen Heil 4 participants 5 messages Aug 1, 2006 – Aug 2, 2006

lore
Share & tools
lore
#0 lore raw

Hi

I have a server, which has 68 IPs. 4 for it's own network interfaces and a network of 64 addresses for xen domains and vpn.
Now, only some of these domains are live and only some VPN clients online. As such, only some IPs will be available, ohters will not.

For every available IP there is an entry in the routing table like this:
<singleIP> 0.0.0.0 255.255.255.255 UH 0 0 0
<virtualinterface>

Moreover there is a default route:
0.0.0.0 <ispgateway> 0.0.0.0 UG 0 0 0 eth0

ip_forward contains 1

Now, packets for IPs that are offline right now, are routed to the main ip of my server, which is suppost to forward them.
This works for systems that are online.

However, packets for hosts wich are not online are routed by via the default route.
What I would need is a routing table entry which routes my /26-network to "host not reachable" and which has a lower priority than my explizit routing rules.
How can I do that?

Regards,
Steffen

BTW: Where can I set ip_forward for the next reboot?

#1 lore raw
Quoted 4 lines · Steffen Heil

What I would need is a routing table entry which routes my /26-network to "host not reachable" and which has a lower priority than my explizit routing rules.
How can I do that?

ip route add unreachable <network>/26

Your host routes are more specific so they overrule this network rule.

Andre

Signature · 1 line
RECOVER.COM: a little slice of hell.
#2 lore raw

Hi

Quoted 1 line

ip route add unreachable <network>/26

I didn't realize there was a "unreachable" target... Thanks a lot.

BTW: Is there a way to make this and ip_forward permanent (for reboots)?

Regrads,
Steffen

#3 lore raw
Quoted 4 lines

Hi

Quoted 9 lines
Quoted 2 lines

ip route add unreachable <network>/26

I didn't realize there was a "unreachable" target... Thanks a lot.

BTW: Is there a way to make this and ip_forward permanent (for reboots)?

With a startup script -> YES !

Quoted 3 lines

Regrads,
Steffen

#4 lore raw
In reply to Steffen Heil
Quoted 4 lines

Hi

Quoted 9 lines
Quoted 2 lines

ip route add unreachable <network>/26

I didn't realize there was a "unreachable" target... Thanks a lot.

BTW: Is there a way to make this and ip_forward permanent (for reboots)?

With a startup script -> YES !

Quoted 3 lines

Regrads,
Steffen