OpenWrt Forum Archive

Topic: pppoe disables forwarding ?

The content of this topic has been archived on 3 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I'm running 7.09 (kernel 2.6, I don`t need wireless, only routing) on a wrt54gl.

It sit`s behind an AVM fritzbox (pppoe passthrough is enabled). Some PCs are behind the Linksys.

If I use

/etc/config/network

#### WAN configuration                                                                                             
config interface        wan                                                                                       
        option ifname   "eth0.1"                                                                                   
        option proto    dhcp

and do a network restart

root@OpenWrt:/# /etc/init.d/network restart
udhcpc (v1.4.2) started
root@OpenWrt:/# Sending discover...
Sending select for 192.168.101.23...
Lease of 192.168.101.23 obtained, lease time 864000
adding router 192.168.101.254
deleting old routes
adding dns 192.168.101.254

all works. I can access the internet from behind OpenWRT. Perfect.

But I want to use pppoe, so /etc/config/network looks like this:

#### WAN configuration                                                                                             
config interface        wan                                                                                       
        option ifname   "eth0.1"                                                                                   
       option proto    pppoe                                                                                     
       option username "killed"                                                                           
       option password "killed" 

the system build the pppoe-connection:

Jan  1 00:13:41 OpenWrt daemon.info pppd[874]: Plugin rp-pppoe.so loaded.
Jan  1 00:13:41 OpenWrt daemon.notice pppd[875]: pppd 2.4.3 started by root, uid 0
Jan  1 00:13:41 OpenWrt daemon.info pppd[875]: PPP session is 2944
Jan  1 00:13:41 OpenWrt daemon.info pppd[875]: Using interface ppp0
Jan  1 00:13:41 OpenWrt daemon.notice pppd[875]: Connect: ppp0 <--> eth0.1
Jan  1 00:13:41 OpenWrt daemon.warn pppd[875]: Couldn't increase MTU to 1500
Jan  1 00:13:41 OpenWrt daemon.warn pppd[875]: Couldn't increase MRU to 1500
Jan  1 00:13:41 OpenWrt daemon.warn pppd[875]: Couldn't increase MTU to 1500
Jan  1 00:13:41 OpenWrt daemon.warn pppd[875]: Couldn't increase MRU to 1500
Jan  1 00:13:41 OpenWrt daemon.notice pppd[875]: PAP authentication succeeded
Jan  1 00:13:41 OpenWrt daemon.notice pppd[875]: PAP authentication succeeded
Jan  1 00:13:41 OpenWrt daemon.notice pppd[875]: peer from calling number 00:15:0C:68:38:67 authorized
Jan  1 00:13:41 OpenWrt daemon.notice pppd[875]: local  IP address 212.60.130.101
Jan  1 00:13:41 OpenWrt daemon.notice pppd[875]: remote IP address 82.139.222.46
Jan  1 00:13:41 OpenWrt daemon.notice pppd[875]: primary   DNS address 81.92.1.1
Jan  1 00:13:41 OpenWrt daemon.notice pppd[875]: secondary DNS address 81.92.1.2

but the PCs behind OpenWRT cannot access the internet anymore.

DHCP works (for the PCs behind OpenWRT) , DNS works (on both OpenWRT and the PCs), ipkg can download and install packages (so OpenWRT has access to the internet)

but forwarding does not work anymore ?

How do I troubleshoot this problem ? Could anyone give me a hint ?

cu romal

I have exactly the same problem, except it's not a FritzBox but a DSL Router. And I'm running the 2.4 kernel on the same model.

Edit: I reflashed the firmware and it automagically started to work.

(Last edited by raw on 19 Jan 2008, 14:52)

Hi,

I got exactly the same problem. I am not sure how you can fix it in a stable way. I think there is something messed up in kamikaze between ifnames and device names... anyway,
just add 2 lines to you iptables :
one for nat/postrouting and one for filter/forward. You will see it uses etho0.1 instead of ppp0.
Just add 2 rules that allow traffic to be forwarded and nated when it comes out through ppp0.
(iptables -vx -L -t nat and -t filter)

Steff

and please fill ticket 2515 of trac, to report that you also experience this problem !

What does the routing table look like when the PPP link is established?

Also, what does "ifconfig -a" or "ip address show" say?

Hi,

looks like i have the same problem.

WL-500gP has wan access because i can do nslookup and ping hosts.

from my PC i receive nslookup output:

> www.daimler.de
Server:  UnKnown
Address:  192.168.1.1

Nicht autorisierte Antwort:
Name:    www.cms.daimler.com
Address:  141.113.97.32
Aliases:  www.daimler.de

Route print on PC gives

C:\WINDOWS\system32>route print
===========================================================================
Schnittstellenliste
0x1 ........................... MS TCP Loopback interface
0x2 ...00 90 27 37 ed 5d ...... Intel(R) PRO/100+-PCI-Adapter #2 - Paketplaner-
iniport
===========================================================================
===========================================================================
Aktive Routen:
     Netzwerkziel    Netzwerkmaske          Gateway   Schnittstelle  Anzahl
          0.0.0.0          0.0.0.0      192.168.1.1   192.168.1.138       30
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
      169.254.0.0      255.255.0.0    192.168.1.138   192.168.1.138       30
      192.168.1.0    255.255.255.0    192.168.1.138   192.168.1.138       30
    192.168.1.138  255.255.255.255        127.0.0.1       127.0.0.1       30
    192.168.1.255  255.255.255.255    192.168.1.138   192.168.1.138       30
        224.0.0.0        240.0.0.0    192.168.1.138   192.168.1.138       30
  255.255.255.255  255.255.255.255    192.168.1.138   192.168.1.138       1
Standardgateway:       192.168.1.1
===========================================================================
Ständige Routen:
  Keine

route on Router gives:

root@OpenWrt:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
213.191.76.49   *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 br-lan
default         lo1.br51.weham. 0.0.0.0         UG    0      0        0 ppp0

my network config:

#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0


#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    pppoe
        option username "xxx"
        option password "xxx"
        option usepeerdns
        option defaultroute
        option persist
        option noipdefault
        option ktune
        option unit     0

So anyway, i cannot ping any IP, i can't access the Internet via Browser...

Anyone got an idea, what's wrong ????

BTW: i compiled the cvs sources a few days ago, to get a Bleeding-Edge FW.

Thanks, Jan

Hi,

my problems still remain sad

anytime i flash mostly any Version of OpenWRT, i cannot connect my PC via the Router to the Internet. The Router connects via PPPoE, i can ping and do dnslookup.

Also my PC connects to the Router and gets DNS infos for example.

But a tracert call on my PC end up at the router as only reachable hop...

No Browser connection to anywhere

Looks like the Router doesn't forward the traffic.

I once had one version working (bleeding edge home build), but it broke during Installation of twonky sad

*** Are there any more tasks to do after installing, than editing /etc/config/network and stuff ???***

getting quite frustrated now.

Any help welcome!

Greetz, Jan

Please post the output of "iptables -t nat -nvL" and "iptables -nvL"

EDIT: See also this ticket:
https://dev.openwrt.org/ticket/2515

(Last edited by Wodin on 3 Mar 2008, 07:49)

I have similar problem with kamikaze 7.09.
I have my ISP internal network and PPPOE internet connection over it on the same vlan.
I tried to solve it and got the following:

in network config:

#### WAN configuration

config "interface" "wan"
    option proto    'pppoe'
    option ifname    'eth0.1'
    option username    'xxxx'
    option password    'xxxx'

config "interface" "ISP_internal"
    option ifname    'eth0.1'
    option proto    'dhcp'

But when I do ifup for both of them, the latter interface brought up overwrites all routes and addresses of another. So I add them manually.

root@OpenWrt:~# ifup ISP_internal
udhcpc (v1.4.2) started
Sending discover...
Sending select for 10.249.28.34...
Lease of 10.249.28.34 obtained, lease time 1200
adding router 10.249.28.254
deleting old routes

root@OpenWrt:~# ip ad sh  
...
4: eth0.1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue 
    link/ether 00:1d:7e:e3:96:02 brd ff:ff:ff:ff:ff:ff
    inet 10.249.28.34/24 brd 10.249.28.255 scope global eth0.1
...

root@OpenWrt:~# ip ro sh
192.168.1.0/24 dev br-lan  proto kernel  scope link  src 192.168.1.1 
10.249.28.0/24 dev eth0.1  proto kernel  scope link  src 10.249.28.34 
default via 10.249.28.254 dev eth0.1 

root@OpenWrt:~# ifup wan
Plugin rp-pppoe.so loaded.

root@OpenWrt:~# ip ad sh
...
4: eth0.1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue 
    link/ether 00:1d:7e:e3:96:02 brd ff:ff:ff:ff:ff:ff
...
10: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1492 qdisc pfifo_fast qlen 3
    link/ppp 
    inet 10.250.28.34 peer 10.250.254.11/32 scope global ppp0
...

root@OpenWrt:~# ip ro sh
10.250.254.11 dev ppp0  proto kernel  scope link  src 10.250.28.34 
192.168.1.0/24 dev br-lan  proto kernel  scope link  src 192.168.1.1 
default via 10.250.254.11 dev ppp0

The ifup script (I think that udhcpc does this) removes address and routes from eth0.1 interface.
I add them manually:

ip ad add 10.249.28.34 dev eth0.1
ip ro add 10.249.28.0/24 dev eth0.1  proto static scope link  src 10.249.28.34
ip ro add to 10.248.0.0/15 via 10.249.28.254 src 10.249.28.34 dev eth0.1 proto static

The last route adds my ISP's local network. Now I am able to access both internet and ISP's network from the router and access internet from computer connected to lan. But I can't connect to ISP's network from my lan.
The following iptables rules solve this issue, assuming that router has a constant address in ISP's network (if this is not the case for you, use MASQUERADE)

iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 10.248.0.0/15 -o eth0.1 -j SNAT --to-source 10.249.28.34
iptables -t filter -A FORWARD -i br-lan -o eth0.1 -j ACCEPT

And all works fine until udhcpc renews ISP_internal. It adds a default route to it. So route table become

root@OpenWrt:~# ip ro sh
10.250.254.11 dev ppp0  proto kernel  scope link  src 10.250.28.34 
192.168.1.0/24 dev br-lan  proto kernel  scope link  src 192.168.1.1 
10.249.28.0/24 dev eth0.1  proto kernel  scope link  src 10.249.28.34 
10.248.0.0/15 via 10.249.28.254 dev eth0.1  proto static  src 10.249.28.34 
default via 10.249.28.254 dev eth0.1 
default via 10.250.254.11 dev ppp0

root@OpenWrt:~# ip ro del default via 10.249.28.254

When I remove wrong route all works fine again.
The problem is to specify somehow to udhcpc what routes I want to be renewed.
And /var/state/network is overflowing since I change routing every time.

Sorry for my terrible english.

[update]

There is ticket #3022.
I fixed it this way: added to /usr/share/udhcp/default.script in renew|bound statement before routing setup lines

for old_ip in $(cat /tmp/state/network | grep ipaddr | awk -F\' '{print $6}'); do           
[ "$old_ip" = "$ip" ] && {                                                                  
exit 0                                                                                      
}                                                                                           
done

That is not good, but seems to work.

(Last edited by zaq-zaq on 1 Jun 2008, 15:23)

Hello... I am having a similar problem.  I can connect to my ISP via pppoe. By that I mean the router can authenticate and connect to the ISP's network.  However, I cannot see anything from my PC.   I can ping from the router ssh session but not from my PC.  I have followed the directions in the bug report (adding "start" to the /etc/init.d/network file.)  No success.  I am using a WRT54GL v1.1, Kamikaze 7.09.

It's a very simple setup.  Cable modem attached to WAN port on router, PC connected to LAN port on router.  Period.

My /etc/config/network file

#### VLAN configuration
config switch eth0
        option vlan0    "0 1 2 3 5*"
        option vlan1    "4 5"

#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0

#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    pppoe
        option username xxxxxx
        option password xxxxx
        option macaddr  00:19:B9:7B:8B:12

and result of ifconfig

root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 00:21:29:A5:BB:A2
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:71 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3819 (3.7 KiB)  TX bytes:4038 (3.9 KiB)

eth0      Link encap:Ethernet  HWaddr 00:21:29:A5:BB:A2
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:313 errors:0 dropped:0 overruns:0 frame:0
          TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:22439 (21.9 KiB)  TX bytes:7574 (7.3 KiB)
          Interrupt:4

eth0.0    Link encap:Ethernet  HWaddr 00:21:29:A5:BB:A2
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:79 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4624 (4.5 KiB)  TX bytes:4890 (4.7 KiB)

eth0.1    Link encap:Ethernet  HWaddr 00:19:B9:7B:8B:12
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:223 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11691 (11.4 KiB)  TX bytes:2172 (2.1 KiB)

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:10.40.38.231  P-t-P:10.40.32.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0

and route

root@OpenWrt:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.40.32.1      *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 br-lan
default         10.40.32.1      0.0.0.0         UG    0      0        0 ppp0

Any ideas?  Looks like a routing problem but I am not sure where to start.  Thanks!

it seems as if everything is right; reset the router and try fresh maybe?

XeoNoX wrote:

it seems as if everything is right; reset the router and try fresh maybe?

I have "reboot" the router at least a dozen times.  I have also cycled the power on the modem.  Is there something else I should do to start fresh?  Thanks!

The discussion might have continued from here.