Mailinglist Archive: opensuse-networking (9 mails)
| < Previous | Next > |
Re: [opensuse-networking] Re: Return packet issues ....
- From: Paul Zirnik <tami@xxxxxxxxxxxxxxx>
- Date: Fri, 9 May 2008 17:28:31 +0200
- Message-id: <200805091728.31998.tami@xxxxxxxxxxxxxxx>
On Freitag 09 Mai 2008, LDB wrote:
you can't use lookup table 0 it's reserved (IMHO for ALL). The ip rule command
will automaticaly use the next (until now not used) table by default.
So
ip rule list
32765: from 192.168.100.0/24 lookup 1
32766: from all lookup main
32767: from all lookup default
will show, it has used lookup table 1
you can also give a name, if a number is nothing that you like :)
#remove the old rule
ip rule del from 192.168.100.0/24 lookup 1
# create a name associated to a number
echo 200 DMZ >> /etc/iproute2/rt_tables
ip rule add from 192.168.100.0/24 lookup DMZ
Yes, table 0 is a alias for ALL and you have already a default route there.
When you have used the name as described above you can now do a
ip route add default via 192.168.100.254 dev eth1 table DMZ
ip route flush cache
You can check what routing tables you have with:
ip route list # this per default will show table "main"
ip route list table main
ip route list table DMZ
ip route list table all
If you like to learn more about this, have a look at http://lartc.org/howto/
regards,
Paul
--
To unsubscribe, e-mail: opensuse-networking+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-networking+help@xxxxxxxxxxxx
I apologize but I am having email problems, but my results from the
above are as follows:
agos:~ # ip rule add from 192.168.100.0/24 lookup 0
you can't use lookup table 0 it's reserved (IMHO for ALL). The ip rule command
will automaticaly use the next (until now not used) table by default.
So
ip rule list
32765: from 192.168.100.0/24 lookup 1
32766: from all lookup main
32767: from all lookup default
will show, it has used lookup table 1
you can also give a name, if a number is nothing that you like :)
#remove the old rule
ip rule del from 192.168.100.0/24 lookup 1
# create a name associated to a number
echo 200 DMZ >> /etc/iproute2/rt_tables
ip rule add from 192.168.100.0/24 lookup DMZ
agos:~ # ip route add default via 192.168.100.254 dev eth1 table 0
RTNETLINK answers: File exists
Yes, table 0 is a alias for ALL and you have already a default route there.
When you have used the name as described above you can now do a
ip route add default via 192.168.100.254 dev eth1 table DMZ
ip route flush cache
You can check what routing tables you have with:
ip route list # this per default will show table "main"
ip route list table main
ip route list table DMZ
ip route list table all
If you like to learn more about this, have a look at http://lartc.org/howto/
regards,
Paul
--
To unsubscribe, e-mail: opensuse-networking+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-networking+help@xxxxxxxxxxxx
| < Previous | Next > |