1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change WAN MAC address (from shell)

Discussion in 'Tomato Firmware' started by nvtweak, Nov 15, 2008.

  1. nvtweak

    nvtweak LI Guru Member

    Changing WAN MAC address (from shell)

    Can anyone help me change WAN MAC from shell, using normal linux commands? I am trying to avoid nvram commit because I want the unit to use original MAC when rebooted.

    I mean, I can change the MAC...but for some reason I can not get it to renew DHCP after I run the usual Linux commands, such as

    ifconfig vlan1 down
    ifconfig vlan1 hw ether xx:xx:xx:xx:xx:xx
    ifconfig vlan1 up

    Can someone figure out something that works?

    Thanks in advance!
  2. humba

    humba Network Guru Member

    Just to rule that out.. you aren't by any chance on cable and the provider only gives you one IP address? This seems to be the most common cable scenario and many providers cache your MAC address and only a reboot of the cable modem will allow a device with another mac address to get an IP address.
    My cable provider hands out two IPs but using the same approach - once I have two devices that have an IP I need to reset the cable modem to have another get an IP address.
  3. nvtweak

    nvtweak LI Guru Member

    Hi humba,

    I can change the MAC in the Tomato GUI and have it renew just fine. The problem is that the GUI performs nvram commit which is what I'm trying to avoid. I notice there is an option in the debugging section for preventing commit but I'm not sure if/how this works. It would defeat the purpose to enable that option and Save, which probably performs another commit too..
  4. Kiwi8

    Kiwi8 LI Guru Member

    If u had enabled "Prevent NVRAM commit" in the debugging section, saving at any other page will not do a NVRAM commit. U can always try by saving, and rebooting the router to see if the settings remain.
  5. nvtweak

    nvtweak LI Guru Member

    I figured it out.

    nvram set mac_wan="00:11:22:33:44:55"
    service wan stop
    service wan start

    Thanks to this tip from one of fyellin's recent posts.

Share This Page