• MAC地址取自/etc/config/network文件

 

config interface 'loopback'

        option ifname 'lo'

        option proto 'static'

        option ipaddr '127.0.0.1'

        option netmask '255.0.0.0'

 

config globals 'globals'

        option ula_prefix 'fd06:4a10:ba39::/48'

 

config interface 'lan'

        option ifname 'eth0'

        option force_link '1'

        option type 'bridge'

        option proto 'static'

        option ipaddr '192.168.1.1'

        option netmask '255.255.255.0'

        option ip6assign '60'

        option macaddr '00:0c:43:28:80:ed'

 

config interface 'wan'

        option ifname 'eth1'

        option proto 'dhcp'

        option macaddr '00:0c:43:28:80:ee'—MAC地址

 

config interface 'wan6'

        option ifname '@wan'

        option proto 'dhcpv6'

 

  • Override Mac address(MAC地址的克隆):

 

MAC地址克隆的用处:

mac地址克隆就是把自己电脑的mac地址复制到路由器上,让运营商误识别是用户使用电脑上网,而通过认证。这样就可以防止用户的账号在别的电脑登录了。

 

设置页面如下

Openwrt版本智能路由的MAC地址

Openwrt版本智能路由的MAC地址

 

三、How to change the Ethernet MAC address

The MediaTek Ethernet uses Factory MTD block to save its LAN/WAN MAC address. If the

setting is empty, it will generate a random MAC address instead.

Openwrt版本智能路由的MAC地址

Openwrt版本智能路由的MAC地址

The following tools can help to modify the MAC address setting in the flash.

1. eth_mac

2. flash

For example, Set the LAN (eth2.1) MAC address of MT7620 as 00:0c:43:76:21:01

1. # eth_mac w lan 00 0c 43 76 21 01

2. # flash -w 40028 -o 00

# flash -w 40029 -o 0c

# flash -w 4002A -o 43

# flash -w 4002B -o 76

# flash -w 4002C -o 21

# flash -w 4002D -o 01

 

四、

Openwrt版本智能路由的MAC地址

 

五、修改如下代码:

Openwrt

文件target/linux/ramips/base-files/etc/uci-defaults/02_network

函数ramips_setup_macs()

lan_mac=$(eth_mac r lan)

wan_mac=$(eth_mac r wan)

 

相关文章:

猜你喜欢
相关资源
相似解决方案