You are not logged in.

#1 2008-03-09 04:22:23

Abecedarian
Member
Registered: 2006-07-30
Posts: 43

Splitting traffic between ppp0 and eth0

Hi,

My network at college is set so that each computer has their own external interface (using pppoe) and a dhcp-recieved internal interface (on eth0). Without pppoe started, I can access other computers, samba shares, and games fine. However, once I start pppoe, a default route gets set that (seems to me) routes all traffic through ppp0. This means I have no local access.

Here's my routing table:

[tom@archie ~]$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
220-245-189-130 *               255.255.255.255 UH    0      0        0 ppp0
192.168.25.0    *               255.255.255.0   U     0      0        0 eth0
default         *               0.0.0.0         U     0      0        0 ppp0

If I delete the default route, then I can access the local network again, as well as the internet. The problem is that I have to specify which interface to use in every instance of network access. Not only is this annoying, but it also means that internet applications such as firefox and pidgin don't work properly.

How can I set it up to automatically send local traffic (192.168.25.0/255.255.255.0) through eth0 and internet traffic through ppp0?
Thanks.

Last edited by Abecedarian (2008-03-09 04:23:10)

Offline

#2 2009-01-08 14:14:18

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: Splitting traffic between ppp0 and eth0

well, according to this setup, if internet traffic needs to go through the ppp0 interface, you must know the gateway address of the server for the pppoe connection, since there is no gateway, the kernel doesnt know where to send the packets not maching to the network 192.168.25.0 , so,

route del default
route add default gw <gateway ip>

this way, all traffic not meant for 192.168.25.0 will go through the pppoe interface, and all local traffic wont matter because the 192.168.25.0 is on the same subnet. and the kernel doesnt need a route lookup.


Try it.

Offline

Board footer

Powered by FluxBB