On Mon, Dec 21, 2009 at 11:20 PM, Michael Robinson <[email protected]
> wrote:

> [r...@dodo firewall]# ip route list
> 192.168.4.16/28 via 192.168.4.2 dev eth2
> 192.168.4.0/28 dev eth2  scope link
> 192.168.5.0/28 dev eth1  proto kernel  scope link  src 192.168.5.2
> 192.168.3.0/28 dev eth0  proto kernel  scope link  src 192.168.3.1
> 192.168.4.48/28 via 192.168.4.2 dev eth2
> 192.168.3.16/28 dev eth0  scope link
> 192.168.4.32/28 via 192.168.4.2 dev eth2
> 192.168.0.0/24 dev eth1  scope link
> 127.0.0.0/8 dev lo  scope link
> default via 192.168.4.2 dev eth2
>
> [r...@dodo firewall]# iptables -nvL -t mangle
> Chain PREROUTING (policy ACCEPT 388K packets, 95M bytes)
>  pkts bytes target     prot opt in     out     source
> destination
> 16154 6068K MARK       all  --  *      *       0.0.0.0/0
> 0.0.0.0/0          MAC 00:02:E3:02:C8:8F MARK set 0x4
>  3191  197K MARK       all  --  *      *       0.0.0.0/0
> 0.0.0.0/0          MAC 00:40:F4:2D:AF:5C MARK set 0x3
>  318 31032 MARK       all  --  *      *       0.0.0.0/0
> 0.0.0.0/0          MARK set 0x4
>
> Chain INPUT (policy ACCEPT 388K packets, 95M bytes)
>  pkts bytes target     prot opt in     out     source
> destination
>
> Chain FORWARD (policy ACCEPT 140 packets, 38019 bytes)
>  pkts bytes target     prot opt in     out     source
> destination
>
> Chain OUTPUT (policy ACCEPT 371K packets, 109M bytes)
>  pkts bytes target     prot opt in     out     source
> destination
>
> Chain POSTROUTING (policy ACCEPT 371K packets, 109M bytes)
>  pkts bytes target     prot opt in     out     source
> destination
>
> [r...@dodo firewall]# ip route list table 3
> 192.168.1.0/24 via 192.168.3.2 dev eth0
>
> [r...@dodo firewall]# ip rule show
> 0:      from all lookup local
> 32764:  from all fwmark 0x4 lookup 3
> 32765:  from all fwmark 0x3 lookup 2
> 32766:  from all lookup main
> 32767:  from all lookup 253
> [r...@dodo firewall]#
>
> >From the above output, it seems that dodo should use 192.168.3.2
> when the destination is 192.168.1.0/24.  That isn't what happens
> though.  Even if I delete the default route it doesn't happen.
> How can I make this happen?
>
> I'm thinking I want to delete the default route.  I'm thinking
> it comes from dhcp during boot.
>
>

what DOES happen when the destination is 192.168.1.0/24? Can you provide a
traceroute?

I don't know what "table 3" means, but I'm pretty sure that if it doesn't
show up in "ip route list" it's not going to be effective.

>From the ip(8) man page:

...
Route tables: Linux-2.x can pack routes  into  several  routing  tables
identified  by  a number in the range from 1 to 255 or by name from the
file /etc/iproute2/rt_tables main table (ID 254) and  the  kernel  only
uses this table when calculating routes.
...

On my system, ip route list gives the same output as ip route list table
254. I would expect the same result on your system.

-wes
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to