[debian-non-standard] PPPoE on Asus WL-500gP with debian on board [solved problem]

Martin Steigerwald Martin at lichtvoll.de
Fri Feb 22 01:07:40 CET 2008


Am Freitag 22 Februar 2008 schrieb Martin Steigerwald:
> Am Montag 18 Februar 2008 schrieb Przemyslaw Baran:
> > For Tomasz Chmielewski
>
> Hi Przemyslaw Baran,
>
> > I was successfully run my asus wl-500Gp with pppoe via wan port.
> >
> > Configuration on your site is correctly but is not exhaustively.
> >
> > When we use this configuration
> >
> > robocfg switch disable
> > robocfg vlans enable reset
> > robocfg vlan 0 ports "0 1 2 3 4 5u"
> > robocfg switch enable
> >
> > we have only 5 ports switch.
> >
> > When we need router with 4 ports switch and 1 wan port. We should
> > config robo switch like that:
> >
> > robocfg switch disable
> > robocfg vlans enable reset
> > robocfg vlan 0 ports "0 5u"
> > robocfg vlan 1 ports "1 2 3 4 5t"
> > robocfg switch enable
> >
> > and next add new lan interface
> >
> > vconfig add eth0 1
> >
> > Witch this configuration we have 3 interfaces
> >
> > eth0 it is correct wan interface. They listen on WAN  port.
> > eth0.1 it is correct lan interface. The listen on 4 lan ports.
> > eth1 probably it is only virtual interface but I'm not sure.
> >
> > On my asus wl-500Gp this configuration works fine.
> >
> > Small documentation of robocfg is placed hare
> > http://wiki.openwrt.org/OpenWrtRoboCfg
> > I don't know we we use "1 2 3 4 5t" with 5t not 5u but they is
> > working only with 5t.
> > Probably 5t is eth1 on debian.
>
> I tried the whole rest of this evening, but I do not get this...
>
> Default config after boot - without running any robocfg script - is:
>
> gayatri:~# robocfg show
> Switch: enabled
> Port 0(W): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
> Port 1(4): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 2(3):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 3(2):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 4(1):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> VLANs: BCM5325/535x enabled mac_check mac_hash
> vlan0: 1 2 3 4 5u
> vlan1: 0 5u
> vlan2:
> vlan3:
> vlan4:
> vlan5:
> vlan6:
> vlan7:
> vlan8:
> vlan9:
> vlan10:
> vlan11:
> vlan12:
> vlan13:
> vlan14:
> vlan15:
>
> And I have:
>
> gayatri:~# ip addr
> 1: lo: <LOOPBACK> mtu 16436 qdisc noop
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen
> 1000
>     link/ether 00:1e:8c:2e:0f:51 brd ff:ff:ff:ff:ff:ff
>     inet 10.0.0.11/24 brd 10.0.0.255 scope global eth0
> 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
>     link/ether 40:10:18:00:00:2d brd ff:ff:ff:ff:ff:ff
> 4: eth0.1 at eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue
>     link/ether 00:1e:8c:2e:0f:51 brd ff:ff:ff:ff:ff:ff
>     inet 10.0.0.8/24 brd 10.0.0.255 scope global eth0.1
>
>
> With this I have both IP addresses (10.0.0.8 and 10.0.0.11) on LAN
> ports 1 to 4, but *not* on the WAN port (the above output was with both
> the WAN and the LAN port connected).
>
>
> When I now run this script which is based upon your comments above I
> get:
>
> gayatri:~# cat /usr/local/bin/switch-config
> #!/bin/bash
>
> # 4 Port Switch + WAN Port
> robocfg switch disable
> robocfg vlans enable reset
>
> # WAN-Port
> robocfg vlan 0 ports "0 5u"
> # LAN-Ports
> robocfg vlan 1 ports "1 2 3 4 5t"
>
> robocfg switch enable
>
> I get:
>
> gayatri:~# robocfg show
> Switch: enabled
> Port 0(W): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 1(4): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
> Port 2(3):  DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
> Port 3(2):  DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
> Port 4(1):  DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
> Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> VLANs: BCM5325/535x enabled mac_check mac_hash
> vlan0: 0 5u
> vlan1: 1 2 3 4 5t
>
> And now both IP addresses are on the WAN port and not on the WAN port.

Not on the LAN ports 1-4 that should have meant. Time to go to bed.

> Even after /etc/init.d/networking restart.
>
> This is whats in there:
>
> gayatri:~# cat /etc/network/interfaces
> # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
> # /usr/share/doc/ifupdown/examples for more information.
>
> auto lo
> iface lo inet loopback
>     #pre-up /usr/local/bin/switch-config
>
> # WAN-Port
> auto eth0
> iface eth0 inet static
>     address 10.0.0.11
>     netmask 255.255.255.0
>     broadcast 10.0.0.255
>     gateway 10.0.0.9
>
> # LAN-Ports
> auto eth0.1
> iface eth0.1 inet static
>     address 10.0.0.8
>     netmask 255.255.255.0
>     broadcast 10.0.0.255
>     gateway 10.0.0.9
>
> In above output of robocfg those null MAC addresses look suspicious to
> me.
>
> Also I am not sure whether eth0 and eth0.1 should have the same mac
> address.
>
> gayatri:~# ifconfig
> eth0      Protokoll:Ethernet  Hardware Adresse 00:1E:8C:2E:0F:51
>           inet Adresse:10.0.0.11  Bcast:10.0.0.255  Maske:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:2000 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:1817 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 SendewarteschlangenlÀnge:1000
>           RX bytes:190957 (186.4 KiB)  TX bytes:187857 (183.4 KiB)
>           Interrupt:4
>
> eth0.1    Protokoll:Ethernet  Hardware Adresse 00:1E:8C:2E:0F:51
>           inet Adresse:10.0.0.8  Bcast:10.0.0.255  Maske:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:70 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 SendewarteschlangenlÀnge:0
>           RX bytes:5970 (5.8 KiB)  TX bytes:4508 (4.4 KiB)
>
>
> So I tried manually. I did ifdown eth0.1 and then
>
> vconfig add eth0 1
>
> Set a different MAC address:
>
> ifconfig eth0.1 hw ether 00:1E:8C:2E:0F:52
>
> And configured my IP address to it:
>
> ifconfig eth0.1 10.0.0.8 netmask 255.255.255.0 broadcast 10.0.0.255
>
>
> It did come a bit closer to what I want to achieve, but still it
> doesn't work correctly. Now I had it that on the WAN port both IP
> addresses where and on the LAN ports one. But I also had added a VLAN
> 0...
>
> I then configure that other IP address on VLAN 0 and removed the IP
> address from eth0. But it all did not work. Now it was all on the LAN
> ports and I didn't understand a bit of it at all.
>
>
> I am no switch guru - actually this is the first hardware switch I
> attempted to configure. I only did a Linux bridge before.
>
> Can you give a concrete example? Can it be done entirely
> within /e/n/interfaces - except the switch-config script? I tried
>
> auto lo
> iface lo inet loopback
>     pre-up /usr/local/bin/switch-config
>
> but then loopback interface was not configured at all after start and
> robocfg showed the factory details.
>
>
> Basically I like to have:
>
> - WAN port: no IP address at all, only pppoe
> - LAN port: IP 10.0.0.9/24 in the end, temporarily 10.0.0.8/24
>
> What I do have to feed into robocfg and /e/n/i or some other start
> script in order to make it happen?
>
> What foomagic do I have to master? Maybe I should leave out /e/n/i
> completely and do it all in a custom script? Actually I'd like to use
> standard Debian way of network configuration as much as possible.
>
>
> Installing and customizing Debian for my needs on the ASUS has been
> easy so far. I already have bzr running - from etch-backports and
> screen configured and vim and stuff... But I am completely stuck at
> that robocfg. Basically I think my problem is that I do not have a
> frigging clue on how this tool works.
>
> I leave it now. I think I could go trying around for ages without
> finding the obvious.
>
> Ciao,



-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7



More information about the debian-non-standard mailing list