PPPoE and default route (basic test environment)

Post new topic   Reply to topic    DD-WRT Forum Index -> Ubiquiti Devices
Author Message
Bib
DD-WRT Guru


Joined: 07 Jul 2008
Posts: 629
Location: France

PostPosted: Tue Mar 24, 2015 12:16    Post subject: PPPoE and default route (basic test environment) Reply with quote
Hi
(First posted 2015/mar/22 in Advanced Network forum)
Trying to build a test environment at home for a NS2 14896 router that will later be installed elsewhere as a PPPoE client via a bridged DSL modem, I installed pppoe-server in a machine in the lan (192.168.0.19/24) to which I attached an usb/ethernet adapter detected as eth2 and I set it as disabled in network-manager so it won't have an ip address when I plug the ethernet cable in the home switch before I start the server this way:
Code:
sudo pppoe-server -F -I eth2 -m 1412 -L 192.168.0.251 -R 4.3.2.1


The ddwrt router gets OK a wan ip (4.3.2.x) but no default route is set.

My question is how is default route set compared when the wan is set to dhcp? I searched in PPPoE and PPP mans and RFC's (and peacock thread Wink ) but didn't find anything about this. I'm still trying to find information about /etc/ppp/pppoe-serser-options file.

Thank you for advises.

[EDIT] I also tried with -R 192.168.0.50 -N 5
But it does the same, once connected the router just shows a new entry in route:
Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.251  0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
with no default and ping the Internet fails... but ping to the server (251) is OK, and ping both server's lan ip and gateway fail... seems I miss something at server side.
bye

[EDIT]
More new info:
I found I can ping the server's lan IP when I add in the router:
Code:
route add default gateway 192.168.0.251

with / without
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward

in the server.

This is my server log:
Code:
Mar 23 14:24:25 server pppoe-server[11845]: Session 1 created for client 00:15:6d:f6:71:4b (4.3.2.1) on eth2 using Service-Name ''
Mar 23 14:24:25 server pppd[11845]: pppd 2.4.5 started by root, uid 0
Mar 23 14:24:25 server pppd[11845]: Using interface ppp0
Mar 23 14:24:25 server pppd[11845]: Connect: ppp0 <--> /dev/pts/24
Mar 23 14:24:25 server NetworkManager[1326]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Mar 23 14:24:25 server NetworkManager[1326]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Mar 23 14:24:25 server NetworkManager[1326]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Mar 23 14:24:28 server pppd[11845]: not replacing existing default route via 192.168.0.254
Mar 23 14:24:28 server pppd[11845]: local  IP address 192.168.0.251
Mar 23 14:24:28 server pppd[11845]: remote IP address 4.3.2.1


[EDIT 2015/mar/24]In the end I got it ramdomly getting a default route after an undefined number of reboots, not at all being sure where the issue is, in the roaringpenguin's pppoe-server or ddwrt. I'm posting this from a linux laptop wifi client connected to the NS2 AP.
Here's a summary of the ~w0rKiNg~ config:
Although this is pure fact monologue here as usual for me, anybody with constructive advise else than rtfm/peacock is welcome.
Code:
server:~$ cat /etc/ppp/pppoe-server-options
netmask 255.255.255.0
defaultroute
server:~$ sudo su
root@server:# echo 1 > /proc/sys/net/ipv4/ip_forward
root@server:# exit
server:~$ sudo pppoe-server -I eth2 -m 1412 -L 192.168.0.251 -R 192.168.0.50 -N 5

Code:
root@pppoe-dd-wrt:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.251  *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
169.254.0.0     *               255.255.0.0     U     0      0        0 br0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
root@pppoe-dd-wrt:~# nvram set sv_localdns="208.67.222.222"
root@pppoe-dd-wrt:~# nvram commit
root@pppoe-dd-wrt:~# reboot
root@pppoe-dd-wrt:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.251  *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
169.254.0.0     *               255.255.0.0     U     0      0        0 br0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
root@pppoe-dd-wrt:~# reboot
root@pppoe-dd-wrt:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.251  *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
169.254.0.0     *               255.255.0.0     U     0      0        0 br0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.0.251  0.0.0.0         UG    0      0        0 ppp0
root@pppoe-dd-wrt:~# reboot
root@pppoe-dd-wrt:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.251  *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
169.254.0.0     *               255.255.0.0     U     0      0        0 br0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
...
...
root@pppoe-dd-wrt:~# reboot
root@pppoe-dd-wrt:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.251  *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
169.254.0.0     *               255.255.0.0     U     0      0        0 br0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.0.251  0.0.0.0         UG    0      0        0 ppp0


A point is that when no default gw is in routing table, although we always see the gw IP in Status_Internet.asp page and
Code:

nvram show|grep "192.168.0"
wan_gateway=192.168.0.251
wan_ipaddr=192.168.0.52
wan_ipaddr_buf=192.168.0.51

wan_ipaddr and wan_ipaddr_buf do not need to be equal for the router to get a default gw. The spi firewall doesn't need to be disabled for the router to get a default gw.

_________________
): FoReVeR nEwB Sad
Sponsor
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Ubiquiti Devices All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum