[SOLVED] I've got an odd PPPoE packet redirection networking problem
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got an odd PPPoE packet redirection networking problem
I have a machine with two network cards running linux mint 8 XFCE (which is compatable with Ubuntu Intrepid Ibex).
eth0 gos out onto the network propper, has a static IP address of 10.10.10.10 and serves DHCP requests for the 10.10.10.x subnet.
eth1 is pluged into a PPPoE concentrator, and has a static address of 192.168.0.1 (I would have left it alone but pppoeconf wouldn't work unless it had an address).
ppp0 is the piont to piont over ethernet conection that is corectly created when I run pon.
I have both guard dog and guide dog installed but they are both disabled.
Now, the weird part:
I can ping the IP number of the machine at the other end of the pppoe conection (when it changes I can still ping the new number), the local IPs (10.10.10.x), but *nothing* else not even the DNS servers passed to the machine during ppp conection which are in the same sub net as the machine I can ping.
When I try to ping or trace the route I get an error message like:
reply from 10.10.10.10: desination unreachable
There is nothing wrong with the network at the other end, as I can make an Identical PPPoE connection from other machines on the network if the the concentrator is pluged into the hub (a rather unsafe place for it to be) and it all just falls into place.
What seems to be happening is that the machine is treating eth0 rather than ppp0 as the internet gateway, and passing the packets round in circles.
I will be happy to provide that, but as my home internet isn't exacly working, I'll have to copy it onto a thumb drive and bring it to work in the morning.
That being said, other than what would have been done automaticaly by guarddog and guidedog, I haven't changed routing from the defaults. Could it be posible I've pushed the wrong button in guidedog?
I will be happy to provide that, but as my home internet isn't exacly working, I'll have to copy it onto a thumb drive and bring it to work in the morning.
That being said, other than what would have been done automaticaly by guarddog and guidedog, I haven't changed routing from the defaults. Could it be posible I've pushed the wrong button in guidedog?
I have no idea as to what guarddog and guidedog are.
I imagine you have a default route problem. If you have your routing table configured correctly, however that was done, then the configuration software you are using could be the issue. Someone else will have to help you with that.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 pan0
0.0.0.0 10.10.10.10 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 1000 0 0 pan0
I think I already see the problem. The only gateway listed is 10.10.10.10 for anything. I imagine there should also be a line listing the pppoe gateway for iface ppp0. Although now I've spotted that, I've no idea how to fix it.
btw, guarddog is a firewall and guidedog is used for IP masquerading and port forwarding.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 pan0
0.0.0.0 10.10.10.10 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 1000 0 0 pan0
I think I already see the problem. The only gateway listed is 10.10.10.10 for anything. I imagine there should also be a line listing the pppoe gateway for iface ppp0. Although now I've spotted that, I've no idea how to fix it.
The 'pan0' interface threw me for a moment. Looked it up, and that's bluetooth, so that's not really an issue at this point.
The gateway you show (and you can have only one default gateway):
0.0.0.0 10.10.10.10 0.0.0.0 UG 0 0 0 eth0
Needs to be the ppp0 interface. You'll need to get the ip information for that network to set the route for it, plus the default route. Does your ISP provide a dynamic address for PPPoE? I'll admit I have no direct experience with it, but from another thread recently on the subject, it appeared the configuration was the same as a standard interface, or at least from a routing standpoint. The reason you're getting errors where you see 10.10.10.10 not knowing what to do with the traffic is because when your web traffic or whatever is sent to it, it has no idea of where it should forward the traffic.
If the address is assigned dynamically (dhcp), when you enter 'ifconfig' in a terminal you should see the interfaces that are configured. If ppp0 is configured, it will show up there. I'm not sure that is the case, as more than likely, if the address is assigned via dhcp, I would have expected your system to set up the routing for it too. Did your ISP provide network information for your PPPoE connection? When you manually add a IP address to an interface, the routing table will reflect it as well. You won't get a default route that way, however.
If you have the network information for your ppp0 interface, you can use these two commands to add it:
ifconfig ppp0 xx.xx.xx.xx netmask 255.xx.xx.xx
route add default gw xx.xx.xx.xx
The default gateway will be the IP of the device where the ppp0 device directs its traffic, not the IP address that you assign the ppp0 interface.
Now I don't know how guarddog and guidedog are going to deal with this information. You might have to alter the configuration there. If your ppp0 interface is supposed to use dhcp to acquire an IP address, you might have to initiate a dhcp client of some sort, like dhcpcd or dhclient. Like I mentioned, I really don't know anything about PPPoE, however. If you do use dhcp in conjunction with PPPoE, when a dhcp lease is acquired, it will assign a gateway address at that point. Check the routing table after you get the lease, it should be there.
Quote:
btw, guarddog is a firewall and guidedog is used for IP masquerading and port forwarding.
Ah. I hadn't dealt with those two before. I generally use Vyatta or OpenWRT firewall/routers right now. I'm fighting off a cold presently. Was too cranky and lazy to look it up yesterday.
Last edited by devwatchdog; 02-08-2010 at 12:35 PM.
I agree, about pan0 it threw me when I first saw it too. Odd it's still there, the bluetooth USB dongle is long gone (and didn't even belong to me).
My PPPoE connection is completly controlled by DHCP. I always thought that the pon command took care of all these things. The other computer (running Ubuntu Hardy Heron), just works, but I'm not sure why. I will look at its routing table when it's connected to see if there's a 'magic number' to use as the gateway. If not I'll try adding a route to the far side of the PPP conection. Do you know how to do that automatically? Becuase the number changes, and this connection will be going up and down a lot I'd hate to have to do this by hand each time. I imagine that it's posible to pipe ifconfig into grep then use the resulting IP to add a route in a shell script but that seems inelegent.
This is a known bug for erlier versions (7 and erlier) of Linux Mint, but I wonder if it's still in version 8. When I get home I'll try what they sugest in that forum, and keep you posted.
Tryed the sugested solution on the Linux Mint forum, but it didn't help.
I did use the route add default gw xx.xx.xx.xx command after connecting, and wonder of wonders I can now ping my DNS servers!
New problem: when I disconect, the gate way has the flags UH set and has to be added again the next time I connect leaving me with two entries one with the flag UG and one with UH. Also, I've noticed that when I run plog after connecting there is an entry saying "Leaving default gateway to 10.10.10.10" which seems to me there is a missing line in a configuration file somewhere.
And I can't route it, even with guide dog turned on, but that problem will have to wait until I can get it to connect properly.
Tryed the sugested solution on the Linux Mint forum, but it didn't help.
I did use the route add default gw xx.xx.xx.xx command after connecting, and wonder of wonders I can now ping my DNS servers!
New problem: when I disconect, the gate way has the flags UH set and has to be added again the next time I connect leaving me with two entries one with the flag UG and one with UH. Also, I've noticed that when I run plog after connecting there is an entry saying "Leaving default gateway to 10.10.10.10" which seems to me there is a missing line in a configuration file somewhere.
And I can't route it, even with guide dog turned on, but that problem will have to wait until I can get it to connect properly.
You should delete the 10.10.10.10 default route. That route is wrong.
Could you show us the 'ifconfig' and 'route -n' results when you bring the ppp0 interface up?
These are what the flags mean when you run the 'route' command.
U - Route is up
H - Target is a host
G - Use gateway
That makes a lot of sence.
I don't even know how it got set, I can only assume that it was put there when I set the static IP address but how I'm not sure.
dumping the route fixed the problem. But the route comes back when the computer restarts.
I thought that I could delete it automaticaly in a script that I wrote that runs just before X starts, which runs corectly but the route is *still* there once X is up.
My current guess is that X is messing with my network settings, but I didn't have a chance to look into it too hard before leaving for work this morning.
Found my wayward setting. In wicd of all places, not sure how it got there but it was reseting the gateway to the same as the IP address. I turned off wicd for the wired ethernet (so that now it's only controlled by /etc/network/interfaces), reran pppoeconf and rebooted.
Finaly, the computer conected to the internet on boot, stayed connected and kept the corect routes.
Thanks for your help devwatchdog.
I shall now move onto my next problem, which is that it won't IP forward. Now that I can apt-get again though I will have a look at Vyatta and OpenWRT.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.