PPPoE fix by changing DSL MAC

All about firmwares for routers. Support for RouterTech firmwares is here too.
geekgirl
Regular
Regular
Posts: 72
Joined: Sat Feb 27, 2010 3:23 pm
Location: Egypt
Contact:

PPPoE fix by changing DSL MAC

Post by geekgirl » Thu Mar 31, 2011 10:08 pm

I have a DSL-2640T which I had been previously running RT 2.92 on, and recently updated to 2.95 (routertech-ar7wrd-1350A-pspboot-firmware-20110103) - click link for details on hw/fw versions prior to flashing with RT 2.92
I know the router is not officially supported by RT firmware (due to the ADM6996 switch), so I use it at my own risk, and it works for me :)

I was hoping that the update to 2.95 would resolve the PPPoE auth issues, since I was never able to get PPPoE working on this router with RT firmware, and especially since my ISP had stopped support for PPPoA auth a long while back (or so they claimed) and so was unable to use this router with RT firmware due to the pppoe issues. Although occasionally I could manage to connect to the ISP with PPPoA, they often seem to disable it for extended periods of time without prior warning (and support would insist on switching over to PPPoE), which was annoying.
Why do ISP do this, despite the fact that PPPoA is superior to PPPoE?
According to one source:
PPPoE is a (some say ill-conceived) mechanism that utilizes PPP framing to transmit protocol packets across an ethernet. While the idea sounds silly (there is, after all, a well-defined way to do this already), it has a couple of advantages that the ISP community has latched onto. The main ones are the ability to reuse a well-honed infrastructure to support PPP termination, including serving IP addresses and other configuration information; and a pretty good way of tracking usage for billing purposes.
Anyway, I'm aware that many users had been having issues with PPPoE, and I had previously went through several threads on the issue to try and figure out any solution, but to no avail.

Background info:
1. You have no DSL sync issues, no DSL training issues
2. PPPoE does not work, regardless of DSL modem firmware you use (dsp70A, dsp71A, etc), and regardless of modulation and/or PPPoE settings.
3. PPPoA works flawlessly, if/when your ISP supports it, or your same PPPoE settings (and user/pass) work just fine with another DSL modem on the same line.

P.S. out of the box (no special DSP driver config), with 2.95 fw, I have:
/var # cat /proc/avalanche/avsar_ver
ATM Driver version:[7.01.00.10]
DSL HAL version: [7.01.00.08]
DSP Datapump version: [7.01.01.00] Annex A
SAR HAL version: [01.07.2c]
PDSP Firmware version:[0.54]
Chipset ID: [Ohio250(7200/7100A2)]

I came across a well-detailed (recent) thread, on the continued PPPoE issue:
d-link dsl 500T trouble

In that thread, user "free2rhyme" suggested that changing MAC address of the nas0 interface helped (go to post)

Preliminary steps:

1. Make sure you have only one connection:
Click setup -> look under "WAN setup", you should only see 4 items:
New Connection
Modem (should have a green led next to it, means DSL line is synced)
YourConnectionName (or "quickstart")
Log Out
2. Make sure you've properly added a PPPoE connection and clicked "Apply", otherwise there will be no "nas0" interface created.

3. Go to "System" and click "Save All" to permanently save these settings.

You will not be connected yet, of course, due to the PPPoE issue, which we are about to resolve.

The DSL MAC address PPPoE fix:

1. Login to router via telnet or ssh, and run:

Code: Select all

# ps www | grep ppp
Typical output would look like this:

Code: Select all

833 root      2676 S    /usr/sbin/pppd plugin pppoe nas0 user YOURUSERNAME password YOURPASSWORD nodetach pppoe_ses_id 0 defaultroute mru 1492 maxfail 10 lcp-echo-failure 10 lcp-echo-interval 60
That means your settings have applied properly and pppd is now running

2. Run:

Code: Select all

# ifconfig nas0
Typical output would look like this:
(note: I xx'ed out the last three octets of the HWaddr)

Code: Select all

nas0      Link encap:Ethernet  HWaddr 01:E0:03:xx:xx:xx
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:1386 (1.3 KiB)
Take note of that HWaddr. We'll need it later!!

3. Change your nas0 interface to another (valid) MAC address. If you had another DSL modem which you had successfully connected on the same line with PPPoE, you could copy its mac address, and only change the last octet or two of it, and use that.
Here's what I did (I xx'ed out the last three octets):

Code: Select all

# ifconfig nas0 down
# ifconfig nas0 hw ether 0013A3XXXXXX
# ifconfig nas0 up
at this stage, I went straight to the web interface, status -> connection status, and found my pppoe connection instantly connected :)
If your PPPoE connection is not yet connected, you could try Disconnect/Connect on the connection page.

DO NOT PROCEED IF YOU HAVE NOT SUCCESSFULLY CONNECTED AT THIS POINT.

Now that we know that we can successfully connect with our new MAC Address, we want to make it permanent, so you don't have to do this manually every time the router is rebooted.

4. Find the environment variable holding the original HWaddr of the nas0 interface which you noted from step 2. You could also find it through the web-interface by going to "Status" -> "Product Information". It will be next to "DSL MAC"

Code: Select all

# printenv | grep -i 01:e0:03:XX:XX:XX
I got:

Code: Select all

HWA_3   01:e0:03:XX:XX:XX
Take note of that env variable name (in my case: HWA_3)

5. Make a backup env var of that mac address, just in case, for future reference. You could simply copy the var name we got in previous step, and trail it with "_backup":

Code: Select all

# setenv HWA_3_backup 01:e0:03:XX:XX:XX
Setting bootloader environment variable: "HWA_3_backup" to "01:e0:03:XX:XX:XX"
6. Set the env var which we found from step 4, to the MAC address we used in step 3 (which got us connected):

Code: Select all

# setenv HWA_3 00:13:A3:XX:XX:XX
Setting bootloader environment variable: "HWA_3" to "00:13:A3:XX:XX:XX"
7. Reboot the router

Code: Select all

# reboot
Your router should be connected to the internet via PPPoE soon after it comes up and after DSL line is synced.
You will now also see that the new MAC address is reflected in the web-interface, from "Status" -> "Product Information", next to "DSL MAC".

Cheers :D
Last edited by geekgirl on Tue Apr 19, 2011 10:33 pm, edited 1 time in total.
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Re: PPPoE fix by changing DSL MAC

Post by mstombs » Fri Apr 01, 2011 12:29 am

That's great - positive news for a change on PPPoE!

We have heard of problems with DSL MAC addresses before - on a DHCP connection in Sweden I recall. Linksys ADSL2MUE were all shipped with the same MAC address - and the ISP needed them to be unique - There are well followed rules on MAC addresses for the Ethernet port, but it seems not for the DSL port, which also has a programmed default in firmware, and generates a bootup message suggest wan_br_mac be set I recall.

I am not keen on just hijacking MAC addresses, guess they need to be unique on the network they are connected to - I appear to use the same pair of MAC addresses on both my main and test 2MUE - but with swapped roles HWA_1 is the lan port. I do recommend using a MAC address you 'own' on another device, if you have to change.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: PPPoE fix by changing DSL MAC

Post by thechief » Fri Apr 01, 2011 10:02 am

The default "00:00:02:03:04:05" comes from tiatm.o - specifically tn7atm.c

Code: Select all

static int __init tn7atm_get_ESI (struct atm_dev *dev)
{
  int i;
  char esi_addr[ESI_LEN] = { 0x00, 0x00, 0x11, 0x22, 0x33, 0x44 };
  char *esiaddr_str = NULL;

 esiaddr_str = prom_getenv ("macc");
  if (!esiaddr_str)
  {
    // printk("Using default macc address = 00:01:02:03:04:05\n");
    esiaddr_str = "00:00:02:03:04:05";
  }
  str2eaddr (esi_addr, esiaddr_str);
  for (i = 0; i < ESI_LEN; i++)
    dev->esi[i] = esi_addr[i];
  return 0;
}
So it is used when it can't find "macc" (which is "HWA_3" in some routers) in the environment. Perhaps one solution is to set both macc and HWA_3 to the same thing?
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
geekgirl
Regular
Regular
Posts: 72
Joined: Sat Feb 27, 2010 3:23 pm
Location: Egypt
Contact:

Re: PPPoE fix by changing DSL MAC

Post by geekgirl » Fri Apr 01, 2011 11:37 am

thechief wrote:The default "00:00:02:03:04:05" comes from tiatm.o - specifically tn7atm.c
mine was 01:e0:03:xx:xx:xx
clearly different from what you noted.

and HWA_3 env-var was the same w/ the original dlink fw (2006), before I flashed it with RT2.92 over a year ago. I still have RUC output from that time.

I suspect it failed with that (original) MAC because it is invalid:
http://www.coffer.com/mac_find/?string=01%3Ae0%3A03

And unlike the one I used (a MAC of an actual DSL modem which I own - a Siemens):
http://www.coffer.com/mac_find/?string=00%3A13%3AA3

and its not like the ISP is requiring a specific MAC-address for authentication, because I changed the last octet of the Siemens MAC and used that on the D-Link and it worked.

I suspect a picky/finicky DSLAM/Auth-server at ISP end.

macchanger, among the list of many of its features, allows you to "Set a MAC of the same kind (eg: wireless card)"

However, since you mentioned "macc", i looked through dmesg, and came across this particular snippet which I found of possible interest, especially the 2nd line (MACCFG_A not set?)
Error getting CPMAC Configuration params for instance:0
Environment Variable:MACCFG_A not set in bootloader
Setting Default configuration params for CPMAC instance:0

MAC CFG : Tx Interrupts off , threshold : 20
doing a quick google search for "MACCFG_A" reveals nothing more than what I just quoted above.. Seems like a standard. :lol:

---

interestingly, after rebooting router (due to power loss), I realized PPPoE wasn't automatically connected as it should, and the log revealed:
Jan 3 01:54:28 cfgmgr(sar): DSL Carrier is up
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_default oamPing(0.35)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_default oamPing(0.32)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_default oamPing(0.40)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_default oamPing(0.36)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_default oamPing(0.38)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_default oamPing(0.96)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_search oamPing(0.35)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_search oamPing(8.35)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_search oamPing(0.43)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_search oamPing(0.51)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_search oamPing(0.59)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_search oamPing(8.43)result(2)
Jan 3 01:54:28 cfgmgr(sar): auto_vcc_search oamPing(8.51)result(2)
Jan 3 01:54:29 cfgmgr(sar): auto_vcc_search oamPing(8.59)result(2)
Jan 3 01:54:30 pppd[832]: pppd 2.4.4 started by root, uid 0
Jan 3 01:54:31 pppd[832]: Got connection: d02
Jan 3 01:54:31 pppd[832]: Saved Session ID: 0
Jan 3 01:54:31 pppd[832]: AC MAC address: 00-90-1a-xx-xx-xx
Jan 3 01:54:31 pppd[832]: Connect: ppp0 {--} nas0
Jan 3 01:54:31 cfgmgr(pppoe-107): New PPP_ID: 0xd02
Jan 3 01:54:31 cfgmgr(pppoe-107): Received pppoe server mac: 0x00-90-1a-xx-xx-xx
Jan 3 01:54:31 cfgmgr(pppoe-107): PPPoE Exit Status = 19
Jan 3 01:54:31 cfgmgr(pppoe-107): PPPoE Send a Interface Delete Event Below
Jan 3 01:54:31 cfgmgr(pppoe-107): Authenication Failure with Peer
Jan 3 01:54:31 pppd[832]: PAP authentication failed
Jan 3 01:54:31 pppd[832]: Connection terminated.
Jan 3 01:54:31 pppd[832]: Doing disconnect
Jan 3 01:54:32 pppd[870]: pppd 2.4.4 started by root, uid 0
Jan 3 01:54:32 pppd[870]: Got connection: 1d02
Jan 3 01:54:32 cfgmgr(pppoe-107): New PPP_ID: 0x1d02
Jan 3 01:54:32 cfgmgr(pppoe-107): Received pppoe server mac: 0x00-90-1a-xx-xx-xx
Jan 3 01:54:32 pppd[870]: Saved Session ID: 0
Jan 3 01:54:32 pppd[870]: AC MAC address: 00-90-1a-xx-xx-xx
Jan 3 01:54:32 pppd[870]: Connect: ppp0 {--} nas0
Jan 3 01:54:32 pppd[870]: PAP authentication failed
Jan 3 01:54:32 cfgmgr(pppoe-107): PPPoE Exit Status = 19
Jan 3 01:54:32 cfgmgr(pppoe-107): PPPoE Send a Interface Delete Event Below
Jan 3 01:54:32 cfgmgr(pppoe-107): Authenication Failure with Peer
Jan 3 01:54:32 pppd[870]: Connection terminated.
Jan 3 01:54:33 pppd[870]: Doing disconnect
Jan 3 01:54:33 pppd[896]: pppd 2.4.4 started by root, uid 0
Jan 3 01:54:35 pppd[896]: Got connection: 5302
Jan 3 01:54:35 cfgmgr(pppoe-107): New PPP_ID: 0x5302
Jan 3 01:54:35 cfgmgr(pppoe-107): Received pppoe server mac: 0x00-90-1a-xx-xx-xx
Jan 3 01:54:35 pppd[896]: Saved Session ID: 0
Jan 3 01:54:35 pppd[896]: AC MAC address: 00-90-1a-xx-xx-xx
Jan 3 01:54:35 pppd[896]: Connect: ppp0 {--} nas0
Jan 3 01:54:36 pppd[896]: PAP authentication failed
Jan 3 01:54:36 cfgmgr(pppoe-107): PPPoE Exit Status = 19
Jan 3 01:54:36 cfgmgr(pppoe-107): PPPoE Send a Interface Delete Event Below
Jan 3 01:54:36 cfgmgr(pppoe-107): Authenication Failure with Peer
Jan 3 01:54:36 cfgmgr(pppoe-107): Connection Attempt Backoff (PPPoE) for 300 seconds.
Jan 3 01:54:36 pppd[896]: Connection terminated.
Jan 3 01:54:36 pppd[896]: Doing disconnect
and so I had to go to the connection setup page and hit disconnect then connect to get it to reconnect again. It instantly connected after this.

log:
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE Apply Transaction
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE Current State = 4
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE Apple Code = 3
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE ReStart Flag = 0
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE Relaunch = 0
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE AFTER Apply Transaction
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE Current State = 9
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE Apple Code = 0
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE ReStart Flag = 1
Jan 3 01:56:51 cfgmgr(pppoe-107): PPPoE Relaunch = 0
Jan 3 01:56:51 cfgmgr(pppoe-107): RE-PPPoE Timer Apply...
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE Apply Transaction
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE Current State = 9
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE Apple Code = 2
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE ReStart Flag = 1
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE Relaunch = 0
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE AFTER Apply Transaction
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE Current State = 3
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE Apple Code = 0
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE ReStart Flag = 1
Jan 3 01:56:54 cfgmgr(pppoe-107): PPPoE Relaunch = 1
Jan 3 01:56:54 cfgmgr(pppoe-107): RE-PPPoE Timer Apply...
Jan 3 01:56:55 pppd[957]: pppd 2.4.4 started by root, uid 0
Jan 3 01:56:55 cfgmgr(pppoe-107): New PPP_ID: 0x370a
Jan 3 01:56:55 cfgmgr(pppoe-107): Received pppoe server mac: 0x00-90-1a-xx-xx-xx
Jan 3 01:56:55 pppd[957]: Got connection: 370a
Jan 3 01:56:55 pppd[957]: Saved Session ID: 0
Jan 3 01:56:55 pppd[957]: AC MAC address: 00-90-1a-xx-xx-xx
Jan 3 01:56:55 pppd[957]: Connect: ppp0 {--} nas0
Jan 3 01:56:56 pppd[957]: PAP authentication succeeded
Jan 3 01:56:56 cfgmgr(pppoe-107): PPPoE Connect with IP Address 41.218.xxx.xxx
Jan 3 01:56:56 cfgmgr(pppoe-107): PPPoE Connection Successfully Established
Jan 3 01:56:56 cfgmgr(pppoe-107): Renew PPPoE Session ID: 0x370a
Jan 3 01:56:56 cfgmgr(pppoe-107): sys_send_event - pppoe up
Jan 3 01:56:56 cfgmgr(pppoe-107): PPPoE Connect with Gateway IP Address: 10.10.xxx.xxx
Jan 3 01:56:56 pppd[957]: local IP address 41.218.xxx.xxx
Jan 3 01:56:56 pppd[957]: remote IP address 10.10.xxx.xxx
Apr 1 11:26:35 root: onconnectWAN: cron has been disabled in the bootloader environment.
Apr 1 11:28:58 cfgmgr(pppoe-107): TimerEvent: PPPoE not in a state to handle it; currState 6.
something still seems wrong, but I'm too tired to bother right now..
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: PPPoE fix by changing DSL MAC

Post by thechief » Fri Apr 01, 2011 12:05 pm

geekgirl wrote:mine was 01:e0:03:xx:xx:xx
clearly different from what you noted.
That is because, in your case, it was fetched from the env (HWA_3). It is only when there is no "macc" or "HWA_3" that the default is used.

There should be a way to automate what you and free2rhyme did to get the connection working. I have attached a script which tries to do this. Can you please report whether it works or whether it needs tweaking? Thanks.
Attachments
pppoe_bug_fix.sh.gz
(828 Bytes) Downloaded 773 times
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
geekgirl
Regular
Regular
Posts: 72
Joined: Sat Feb 27, 2010 3:23 pm
Location: Egypt
Contact:

Re: PPPoE fix by changing DSL MAC

Post by geekgirl » Sat Apr 02, 2011 2:55 am

Ok Chief, will do soon as I get a chance.
Last edited by geekgirl on Mon Apr 04, 2011 2:10 am, edited 1 time in total.
geekgirl
Regular
Regular
Posts: 72
Joined: Sat Feb 27, 2010 3:23 pm
Location: Egypt
Contact:

Re: PPPoE fix by changing DSL MAC

Post by geekgirl » Mon Apr 04, 2011 1:29 am

thechief wrote:I have attached a script which tries to do this. Can you please report whether it works or whether it needs tweaking? Thanks.
Works well.

Note: I commented out the following lines ust cuz I don't need them:
70:

Code: Select all

setenv "macc_old" "$ODM"
75-76:

Code: Select all

setenv "macc" "$MAC"
setenv "PPPOE_DSL_MAC" "$MAC"
/var # printenv | grep HWA_3
HWA_3_backup 01:e0:03:xx:xx:xx
HWA_3 00:13:A3:xx:xx:82

/var # tmp/pppoe_bug_fix.sh --pppoe-dsl-mac=00:13:A3:xx:xx:83 --save-mac
Setting bootloader environment variable: "HWA_3_old" to "00:13:A3:xx:xx:82"
Setting bootloader environment variable: "HWA_3" to "00:13:A3:xx:xx:83"

/var # ifconfig nas0 | grep [n]as0
nas0 Link encap:Ethernet HWaddr 00:13:A3:xx:xx:83

/var # printenv | grep HWA_3
HWA_3_backup 01:e0:03:xx:xx:xx
HWA_3_old 00:13:A3:xx:xx:82
HWA_3 00:13:A3:xx:xx:83
P.S.

Regarding the several "sleep 1" lines (55,57,59,63), I think it would be faster (and safer) to just omit them and do:

Code: Select all

IFC="/sbin/ifconfig nas0"
$IFC down && $IFC hw ether $MAC && $IFC up && IFC_DONE=1

if [[ -n "$IFC_DONE" && $(is_parameter "--save-mac") -eq 1 ]]; then
   ODM=$(ramenv "HWA_3")
etc..

(also tested and works)

up to you
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: PPPoE fix by changing DSL MAC

Post by thechief » Tue Apr 05, 2011 7:56 am

Ok, thanks.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
speedex
Newbie
Newbie
Posts: 1
Joined: Sun Apr 24, 2011 12:42 am

Re: PPPoE fix by changing DSL MAC

Post by speedex » Sun Apr 24, 2011 2:49 am

My modem, in the admin panel show the mac address i have changed with "setenv" , but, when i telnet my router , the ifconfig command still shows the original MAC, what is the real address which is my modem showing to my ISP?

Thanks, and sorry for my bad english.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: PPPoE fix by changing DSL MAC

Post by thechief » Sun Apr 24, 2011 3:06 pm

Ethernet MAC = "maca" or "HWA0"
DSL MAC = "macc" or "HWA_3"

Which does your ISP want?

Make sure that the environment variables are not duplicated - and, if they are, make sure that maca=HWA_0 and that macc=HWA_3.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
geekgirl
Regular
Regular
Posts: 72
Joined: Sat Feb 27, 2010 3:23 pm
Location: Egypt
Contact:

Re: PPPoE fix by changing DSL MAC

Post by geekgirl » Fri Jun 10, 2011 4:03 pm

speedex wrote:My modem, in the admin panel show the mac address i have changed with "setenv" , but, when i telnet my router , the ifconfig command still shows the original MAC, what is the real address which is my modem showing to my ISP?

Thanks, and sorry for my bad english.
The interface gets its MAC address set on boot-up, from the environment variable which you have changed. After manually changing it (via `setenv`), you'd need to either change the mac addr of the interface (with the `ifconfig` command) or simply reboot the router.
kngtrider
Novice
Novice
Posts: 12
Joined: Sun Jun 26, 2011 5:47 pm
Location: Sydney Australia
Contact:

Re: PPPoE fix by changing DSL MAC

Post by kngtrider » Mon Jun 27, 2011 8:16 am

I followed the guide to upgrade a WAG200 to RT (and I will post my result in the appropiate thread), however i also got bitten by the PPPOE MAC Bug

with the 'default' 2345 mac I cannot authenticate with my ISP at all

If I set a mac everything is fine

The issue im having is , is im confused as to which MAC address I am supposed to set under which variable

my original ENV backup from linksys/openwag used MACA and MACB , ending with EA and EB respectively.
other ar7 i have seen use maca and macb also with sequtial macs.

EA and EB did not get written into the environment, the macs that did get written do not correspond ith the units sticker at all, the sticker being EA

and when it came time to setup the WIFI using WEB i just accepted the defaults and let it build itself without paying any attention to what MAC it determined

i backed up the wrong variables later as suggested and rewrote the 'correct' macs into the env, i wrote MACA as HWA0 and MACB as HWA3 and these get picked up by the system appropiately

RT had 09 for HWA0 and then 0A for WLAN/WANBR mac and no HWA3/macc

WLAN_HWADDR0 and WAN_BR_MAC are the same mac address, and WIFI works fine with that mac address


If my backup env file did not have MACC , then what was my original MACC ?

RT is now setup with Three unique MAC addresses, Wifi, Modem, Ethernet, but the original ENV backup had two Sequetial mac addresses
MACB Was Wifi or Modem in the original setup?

If WIFI Mac gets changed does the wifi need to be rebuilt?

The only issue i have at the moment i use IPTV which uses a 2nd VC in bridge as previously dicusssed on this forum and is not working even though everything is setup correctly could this also be due to a mac address issue as PPP also did?

My isp only uses PPPoE authentication for the Primary Internet Virtual Channel, the second tv bridged virtual channel does not need auth and will work even if pppoe is not authenticated
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Re: PPPoE fix by changing DSL MAC

Post by mstombs » Mon Jun 27, 2011 10:38 am

AFAIK formal IEEE rules for managing MAC addresses are only applied to Ethernet NICs and equivalents, how they are used on virtual interfaces seems much less well controlled. When used MAC addresses must be unique hardware identifiers in the context - almost all AR7 routers use the same MACs on the USB interface - which combined with Windows driver creates a virtual NIC - but no-one is going to have more than one...

We first had a MAC issue reported with the single Ethernet port Linksys ADSL2MUE in Sweden, Linksys only provide by sticker on the device and envvar a MAC for the LAN Ethernet port, but the firmware was defaulting to a common one on the WAN dhcp connection. With lots of users on same ISP with same firmware and that particular connection method it wasn't going to work!

It seems that PPPoA the WAN MAC is not at all important.

We only recently learnt the importance of WAN MAC for PPPoE - but presumably that's not all ISPs?

Linksys WRT54G* series also only have one MAC on the outside of the router, used for the LAN port and they use +1, +2 for the wireless and WAN port.

To avoid conflict I do not recommend 'guessing' or hijacking MAC addresses, I would recommend you use the allocated router unique MAC address on the WAN port and something else on the LAN where you are in control and can ensure all unique. While it is possible to use the same address on different interfaces this would break comms if the interfaces were ever bridged, but sorry don't know anything specific about multiple PPPoE connections through the same router.
kngtrider
Novice
Novice
Posts: 12
Joined: Sun Jun 26, 2011 5:47 pm
Location: Sydney Australia
Contact:

Re: PPPoE fix by changing DSL MAC

Post by kngtrider » Tue Jun 28, 2011 5:53 am

We only recently learnt the importance of WAN MAC for PPPoE - but presumably that's not all ISPs?
The particular ISP i am using it with is top 3 in Australia and they only support PPPoE with several hundred thousand customers
They used to only supply AR7 units , later changed to broadcom due to supply and model avalibilty
Linksys WRT54G* series also only have one MAC on the outside of the router, used for the LAN port and they use +1, +2 for the wireless and WAN port.
Yep,although even with the third party firmwares they still retain the mac address, probably cause they all use the same platform largely and there isnt as much variation asd there is with the ar7 platforms and their bootloaders
To avoid conflict I do not recommend 'guessing' or hijacking MAC addresses, I would recommend you use the allocated router unique MAC address on the WAN port and something else on the LAN where you are in control and can ensure all unique. While it is possible to use the same address on different interfaces this would break comms if the interfaces were ever bridged
Your logic make perfect sense, but from my POV, since a user who undertakes this process would have and would know the two(at most) unique MAC addresses asigned to their hardware since they did a env backup, why swap them as you have suggested ?

IMO a user is more likely to run into a mac conflict on their lan than if they used the 'wrong' mac on their WAN.


Also at least for speaking for my region, DSL connections are tunneled. if you move you can not simply re authenticate from another physical location, the provider has to reconfigure the tunneling and whatever else to your new location/exchange/phone number. Considering this and that a user can put any modem they like on the line and it should work, I wonder if these didnt work because the MAC was geninuely conflicting or that simply the mac was invalid (being 02 03 04 05 )

Did you ever find out ?

As I mentioned, I allocated the sticker MAC to the ethernet, the +1 to the WAN(which i didnt guess and was in
my envvars backup) , and the WIFI mac was guesstimated by W.E.B

In hindsight it is possible that WiFi was supposed to be MACB and WAN was something abritary as you suggested but in my particular circumstance it is too late for me to determine. I likely have some config backups for the wag200g somewhere but I doublt theyd answer my queries.
but sorry don't know anything specific about multiple PPPoE connections through the same router.
Actually, it is one PPPoE LLC 8/35 (NET), one Bridge LLC 0/35 (TV)

I have posted more imformation, my findings and what isssues remained during the upgrade process to the WAG200G thread for reference and discussion

Cheers

-----
Editor
NitroWare.net
----------
Editor
NitroWare.net
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: PPPoE fix by changing DSL MAC

Post by thechief » Tue Jun 28, 2011 6:43 am

I suggest you start a different thread for your IPTV discussion. Mixing that discussion with discussions on other issues would not be a good idea.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Post Reply