Help: Can't Make a Simple iproute2 Configuration to Work

Help: Can't Make a Simple iproute2 Configuration to Work

Post by Weimin Zh » Wed, 27 Aug 2003 06:10:27



I've the following rules defined:


0:      from all lookup local
32764:  from all iif eth0 lookup 2
32766:  from all lookup main
32767:  from all lookup 253

and I've the following route set:


default via 65.11.15.193 dev eth0

and I don't want to use the default route with gateway 65.11.15.193.
I did a "ip ro flush cache", but I still can't ping my host.

Did I miss anything? The situation is so simple: I just want all packets
from eth0 goes back thru eth0. I'm a iproute2 newbie, so there must be
something I didn't do right. I know if I add the default route via
65.11.15.193, it'll work but it defeats my whole purpose: packet goes
back thru the same NIC it came in.

Any help appreciated!
-Weimin

 
 
 

1. iproute2 source routing with table - masquerading doesn't work

Hi!

I have a router with the following interfaces:

eth0    a.b.163.225 (/27)       internal network
eth1    a.b.167.230 (/29)       routing subnet (university)
ppp0    80.1.2.3 ptp 217.4.5.6  DSL (pppoe, dynamic ips, to be masqueraded)

server:~# ip route show
217.4.5.6 dev ppp0  scope link
a.b.167.225 dev eth1  scope link
a.b.167.224/28 dev eth1  proto kernel  scope link  src a.b.167.230
a.b.163.224/27 dev eth0  proto kernel  scope link  src a.b.163.225
a.b.0.0/16 via a.b.167.225 dev eth1
default via a.b.167.225 dev eth1

And i have 2 iproute2-tables "lwl" and "dsl"

server:~# ip route show table lwl
a.b.167.225 dev eth1  scope link
a.b.0.0/16 via a.b.167.225 dev eth1
default via a.b.167.225 dev eth1

server:~# ip route show table dsl
217.5.98.134 dev ppp0  scope link
default via 217.5.98.134 dev ppp0

To avoid other errors I flushed all iptables (and -t nat) and just
inserted a single
iptables -t nat -I POSTROUTING -i eth0 -o ppp0 -j MASQUERADE

If I set a

ip rule add from a.b.163.242 table lwl

to put the pc a.b.163.242 to lwl routing, it works fine.
(To be sure it's really the table lwl and not the standard default routing i
set a different gateway, and i IS table lwl)

If i try that with dsl:
ip rule add from a.b.163.242 table dsl
the packets vanish somewhere in routing, I can't really figure out where.
They don't appear in tcpdump -i ppp0.

But if I don't set a ip rule and do standard routing to dsl with
ip route del default
ip route add default via 217.4.5.6 dev ppp0
all works fine, masquerading included.

Any hints how to get the table dsl working?

--
Marco Dieckhoff
icq# 22243433
GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys

2. Debate: PowerMac "trounces" Pentium....???

3. Help - Can't get simple tcpip working!

4. Networking

5. Simple Client-Server won't work - help!

6. TCPIP Network- help with segments

7. It's not bad canned meat...

8. Parallel Port CD-ROM

9. Making RPM work Like Irix 'gendist'

10. libc5 install on RH7.0 doesn't work, configuration help?

11. Made 'make sgmldocs' work again after serial merge [1/9]

12. Can't configure slapd simple auth to work with netscape's addressbook