Re: Changing default route for an entire subnet/NIC

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops, made a mistake in my example,
I actually enter
ip rule add from 192.168.0.0/24 table John

As soon as I do this, that subnet loses all contact with my firewall, so it can't DHCP an address,
do DNS servers, ping, anything.. 

Any clues?


brian@xxxxxxx <brian@xxxxxxx> [2003-12-17 22:34:14 -0700]:
> Greetings,
> 
> If you look at Section 4.1 of the howto, they give  asimple example of changing the default
> route for a single IP address by doing the following
> 
> # echo 200 John >> /etc/iproute2/rt_tables
> # ip rule add from 10.0.0.10 table John
> # ip route add default via 195.96.98.253 dev ppp2 table John
> # ip route flush cache
> 
> I'm trying to do something very similar, except that I want to route an entire class C subnet
> out a different NIC card in my firewall..
> 
> I did the exact same thing as above except used the line
> 
> ip rule add from 192.168.0.1/24 table John
> ip route add default via 192.168.1.1 dev eth4 table John
> 
> This doesn't work, what happens is that the entire subnet loses conect with the firewall, so DNS
> lookups fail and I basically can't go anywhere. Using just one IP like the example above seems
> to work fine..
> 
> Any ideas?
> 
> _______________________________________________
> LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux