LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-25-2003, 03:41 PM   #1
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Rep: Reputation: 15
pppoe gateway routing problems


Hi all,

I'm having trouble setting a Linux host up as a PPPoE gateway to my DSL account. My existing network configuration works fine:

PPPoE aware router (gets external IP via DHCP from ISP; internal IP is 192.168.0.1) ---->

Linux host (darkstar) dual-homed (192.168.0.4 and 192.168.1.4). --->

Linux host (zen) 192.168.1.2.

There's more, but this is all that's pertinent. My route statement on darkstar is:

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth0
192.168.0.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth1
127.0.0.0 | 0.0.0.0 | 255.0.0.0 | U | 0 | 0 | 0 | lo
0.0.0.0 | 192.168.0.1 | 0.0.0.0 | UG | 0 | 0 | 0 | eth1

As you can see, the default gateway is the router.

zen's route statement is:

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth0
127.0.0.0 | 0.0.0.0 | 255.0.0.0 | U | 0 | 0 | 0 | lo
0.0.0.0 | 192.168.1.4 | 0.0.0.0 | UG | 0 | 0 | 0 | eth0

zen's default gateway is darkstar.

This all works great. Now I'm playing with removing the router and just using darkstar connected directly to the DSL modem. I know there's a lot of security I need to deal with, and I'm OK with that. I have a fair amount of experience.

I've set up rp-pppoe on darkstar, which has given me a configuration for ppp0 that looks like:

USERCTL=yes
BOOTPROTO=dialup
NAME=DSLppp0
DEVICE=ppp0
TYPE=xDSL
ONBOOT=no
PIDFILE=/var/run/pppoe-adsl.pid
FIREWALL=NONE
PING=.
PPPOE_TIMEOUT=999999
LCP_FAILURE=3
LCP_INTERVAL=80
CLAMPMSS=1412
CONNECT_POLL=6
CONNECT_TIMEOUT=60
DEFROUTE=yes
SYNCHRONOUS=no
ETH=eth1
PROVIDER=DSLppp0
USER=<myusername>
PEERDNS=no

Now, I'm not sure, but I think I should remove my setup for eth1, since ppp0 uses it. So, zen doesn't change at all. darkstar changes in that eth1 is no longer setup with a static IP (or any IP). ppp0 is set up instead. eth0 still connects as before to the 192.168.1.0/24 internal network.

Here's the output of darkstar's ifconfig and route:

eth0 Link encap:Ethernet HWaddr 00:01:02:BE:AA:2A
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5089 errors:0 dropped:0 overruns:0 frame:0
TX packets:5010 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:891657 (870.7 Kb) TX bytes:796655 (777.9 Kb)
Interrupt:11 Base address:0xc400

eth1 Link encap:Ethernet HWaddr 00:08:74:BC:8F:48
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:33 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:1 txqueuelen:100
RX bytes:3869 (3.7 Kb) TX bytes:1918 (1.8 Kb)
Interrupt:5 Memory:ed000000-ed001080

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:588 errors:0 dropped:0 overruns:0 frame:0
TX packets:588 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:65503 (63.9 Kb) TX bytes:65503 (63.9 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:nnn.nnn.nnn.nnn P-t-P:nnn.nnn.nnn.254 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2366 (2.3 Kb) TX bytes:812 (812.0 b)

Destination Gateway Genmask Flags Metric Ref Use Iface
nnn.nnn.nnn.254 | 0.0.0.0 | 255.255.255.255 | UH | 0 | 0 | 0 | ppp0
192.168.1.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth0
127.0.0.0 | 0.0.0.0 | 255.0.0.0 | U | 0 | 0 | 0 | lo
0.0.0.0 | nnn.nnn.nnn.254 | 0.0.0.0 | UG | 0 | 0 | 0 | ppp0

With this setup I've eliminated the router completely and I can ping internal and external hosts from darkstar. zen can ping only internal hosts. This is the problem. Why can't a host on the internal network that has darkstar as the default gateway ping external (internet) hosts?

By the way, for this discussion ignore name resolution. darkstar runs a DNS server, but all testing has been done using IP addresses.

I've also tried giving eth1 an IP address on the internal network, although that didn't seem to make much sense. Didn't have any effect.
 
Old 06-26-2003, 12:48 AM   #2
camelrider
Member
 
Registered: Apr 2003
Location: Juneau, Alaska
Posts: 251

Rep: Reputation: 32
I didn't see any mention of IPMASQ or IP_FORWARD (?)
 
Old 06-26-2003, 06:40 PM   #3
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Original Poster
Rep: Reputation: 15
Sorry, darkstar has IP forwarding enabled.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
default gateway not set by PPPoE, can't ping internet rproffit Linux - Networking 3 12-17-2007 05:29 AM
DHCP and gateway routing problems (simple noob problem) michaelsanford Linux - Networking 4 04-13-2005 02:17 PM
Slack 9.1 as router/gateway and PPPoE uros678 Linux - Networking 2 12-12-2003 03:29 AM
configuring openbsd 3.3 pppoe gateway yocompia *BSD 3 09-28-2003 01:11 PM
Help with rp-pppoe and routing ztopher Linux - Networking 2 04-26-2003 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration