为什么widora每次启动eth0的mac不同?



  • 如题,启动时修改mac的地方在哪儿呢?为什么要每次去修改mac地址?


  • administrators

    今晚我会测试后回复。



  • 应该是你的eeprom里面没有配置mac地址,都是0XFF,所以系统自动分配了



  • 应该不对吧,出厂模块mac地址保存在factory分区里,我们升级一般都动不到这里面内容。

    mango,你测的咋样了?能复现么


  • administrators

    目前测试每次都是这个

    root@Widora:/# ifconfig
    br-lan    Link encap:Ethernet  HWaddr 0C:EF:AF:CF:FF:B7  
              inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::eef:afff:fecf:ffb7/64 Scope:Link
              inet6 addr: fde8:61c6:343d::1/60 Scope:Global
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:0 (0.0 B)  TX bytes:5349 (5.2 KiB)
    
    eth0      Link encap:Ethernet  HWaddr 0C:EF:AF:CF:FF:B6  
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:7772 (7.5 KiB)
              Interrupt:5 
    
    eth0.1    Link encap:Ethernet  HWaddr 0C:EF:AF:CF:FF:B6  
              inet6 addr: fe80::eef:afff:fecf:ffb6/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:0 (0.0 B)  TX bytes:2681 (2.6 KiB)
    

    Factory里如下:

    root@Widora:/# iwpriv ra0 e2p
    ra0       e2p:
    [0x0000]:7628  [0x0002]:0201  [0x0004]:EF0C  [0x0006]:CFAF  
    [0x0008]:B6FF  [0x000A]:0000  [0x000C]:0000  [0x000E]:0000  
    [0x0010]:FFFF  [0x0012]:FFFF  [0x0014]:FFFF  [0x0016]:FFFF  
    [0x0018]:FFFF  [0x001A]:FFFF  [0x001C]:FFFF  [0x001E]:FFFF  
    [0x0020]:0000  [0x0022]:0000  [0x0024]:0020  [0x0026]:0000  
    [0x0028]:EF0C  [0x002A]:CFAF  [0x002C]:B6FF  [0x002E]:EF0C  
    [0x0030]:CFAF  [0x0032]:B7FF  [0x0034]:3411  [0x0036]:2000  
    [0x0038]:FFFF  [0x003A]:0100  [0x003C]:0000  [0x003E]:0000  
    [0x0040]:0000  [0x0042]:0022  [0x0044]:0000  [0x0046]:0000  
    [0x0048]:0030  [0x004A]:0000  [0x004C]:0000  [0x004E]:0000  
    [0x0050]:0082  [0x0052]:9400  [0x0054]:B440  [0x0056]:CAC0  
    [0x0058]:8120  [0x005A]:8080  [0x005C]:CA40  [0x005E]:0023  
    [0x0060]:0000  [0x0062]:0000  [0x0064]:0000  [0x0066]:0000  
    [0x0068]:0000  [0x006A]:0000  [0x006C]:0000  [0x006E]:0000  
    [0x0070]:0000  [0x0072]:0000  [0x0074]:0000  [0x0076]:0000  
    [0x0078]:0000  [0x007A]:0000  [0x007C]:0000  [0x007E]:0000  
    [0x0080]:0001  [0x0082]:0000  [0x0084]:0000  [0x0086]:0000  
    [0x0088]:0000  [0x008A]:0000  [0x008C]:0000  [0x008E]:0000  
    [0x0090]:0000  [0x0092]:0000  [0x0094]:0000  [0x0096]:0000  
    [0x0098]:0000  [0x009A]:0000  [0x009C]:0000  [0x009E]:0000  
    [0x00A0]:C6C6  [0x00A2]:C4C4  [0x00A4]:C0C4  [0x00A6]:C4C0  
    [0x00A8]:C4C4  [0x00AA]:C4C4  [0x00AC]:C0C0  [0x00AE]:0000  
    [0x00B0]:0000  [0x00B2]:0000  [0x00B4]:0000  [0x00B6]:0000  
    [0x00B8]:0000  [0x00BA]:0000  [0x00BC]:0000  [0x00BE]:0000  
    [0x00C0]:0000  [0x00C2]:0000  [0x00C4]:0000  [0x00C6]:0000  
    [0x00C8]:1A00  [0x00CA]:2A22  [0x00CC]:3531  [0x00CE]:3501  
    [0x00D0]:4039  [0x00D2]:4D46  [0x00D4]:7F7F  [0x00D6]:007F  
    [0x00D8]:0000  [0x00DA]:0000  [0x00DC]:0000  [0x00DE]:0000  
    [0x00E0]:1D11  [0x00E2]:1D11  [0x00E4]:351C  [0x00E6]:351C  
    [0x00E8]:351E  [0x00EA]:351E  [0x00EC]:1917  [0x00EE]:1917  
    [0x00F0]:0002  [0x00F2]:0000  [0x00F4]:00D5  [0x00F6]:8880  
    [0x00F8]:000A  [0x00FA]:0000  [0x00FC]:0000  [0x00FE]:0000  
    [0x0100]:FFFF  [0x0102]:FFFF  [0x0104]:FFFF  [0x0106]:FFFF  
    [0x0108]:FFFF  [0x010A]:FFFF  [0x010C]:FFFF  [0x010E]:FFFF  
    [0x0110]:FFFF  [0x0112]:FFFF  [0x0114]:FFFF  [0x0116]:FFFF  
    [0x0118]:FFFF  [0x011A]:FFFF  [0x011C]:FFFF  [0x011E]:FFFF  
    [0x0120]:0000  [0x0122]:0000  [0x0124]:0000  [0x0126]:0000  
    [0x0128]:0000  [0x012A]:0000  [0x012C]:0000  [0x012E]:0077  
    [0x0130]:1D11  [0x0132]:1D11  [0x0134]:7F15  [0x0136]:7F15  
    [0x0138]:7F17  [0x013A]:7F17  [0x013C]:3B10  [0x013E]:3B10  
    [0x0140]:FFFF  [0x0142]:FFFF  [0x0144]:FFFF  [0x0146]:FFFF  
    [0x0148]:FFFF  [0x014A]:FFFF  [0x014C]:FFFF  [0x014E]:FFFF  
    [0x0150]:FFFF  [0x0152]:FFFF  [0x0154]:FFFF  [0x0156]:FFFF  
    [0x0158]:FFFF  [0x015A]:FFFF  [0x015C]:FFFF  [0x015E]:FFFF  
    [0x0160]:FFFF  [0x0162]:FFFF  [0x0164]:FFFF  [0x0166]:FFFF  
    [0x0168]:FFFF  [0x016A]:FFFF  [0x016C]:FFFF  [0x016E]:FFFF  
    [0x0170]:FFFF  [0x0172]:FFFF  [0x0174]:FFFF  [0x0176]:FFFF  
    [0x0178]:FFFF  [0x017A]:FFFF  [0x017C]:FFFF  [0x017E]:FFFF  
    [0x0180]:FFFF  [0x0182]:FFFF  [0x0184]:FFFF  [0x0186]:FFFF  
    [0x0188]:FFFF  [0x018A]:FFFF  [0x018C]:FFFF  [0x018E]:FFFF  
    [0x0190]:FFFF  [0x0192]:FFFF  [0x0194]:FFFF  [0x0196]:FFFF  
    [0x0198]:FFFF  [0x019A]:FFFF  [0x019C]:FFFF  [0x019E]:FFFF  
    [0x01A0]:FFFF  [0x01A2]:FFFF  [0x01A4]:FFFF  [0x01A6]:FFFF  
    [0x01A8]:FFFF  [0x01AA]:FFFF  [0x01AC]:FFFF  [0x01AE]:FFFF  
    [0x01B0]:FFFF  [0x01B2]:FFFF  [0x01B4]:FFFF  [0x01B6]:FFFF  
    [0x01B8]:FFFF  [0x01BA]:FFFF  [0x01BC]:FFFF  [0x01BE]:FFFF  
    [0x01C0]:FFFF  [0x01C2]:FFFF  [0x01C4]:FFFF  [0x01C6]:FFFF  
    [0x01C8]:FFFF  [0x01CA]:FFFF  [0x01CC]:FFFF  [0x01CE]:FFFF  
    [0x01D0]:FFFF  [0x01D2]:FFFF  [0x01D4]:FFFF  [0x01D6]:FFFF  
    [0x01D8]:FFFF  [0x01DA]:FFFF  [0x01DC]:FFFF  [0x01DE]:FFFF  
    [0x01E0]:FFFF  [0x01E2]:FFFF  [0x01E4]:FFFF  [0x01E6]:FFFF  
    [0x01E8]:FFFF  [0x01EA]:FFFF  [0x01EC]:FFFF  [0x01EE]:FFFF  
    [0x01F0]:FFFF  [0x01F2]:FFFF  [0x01F4]:FFFF  [0x01F6]:FFFF  
    [0x01F8]:FFFF  [0x01FA]:FFFF  [0x01FC]:FFFF  [0x01FE]:FFFF
    


  • 我的部分模块也是正常的,mac不变,但部分mac是会变的

    DIY的烧录程序,每次烧写是采用的局部擦写,应该不会破坏factory,再进一步,我试着将预先保存的factory.bin回写回去并firstboot 还是不行,mac会变

    头大,怎么会有这种差异。源码中读取factory数据的操作在哪个位置呢

    mango请指点一下


  • administrators

    mac会变的都是些什么样的mac?