嗯~~还是小米R3路由器。。。

思路

虚拟出一个eth网卡--->>pppoe多播

实现方式

用macvlan模块虚拟一个网卡,pppd脚本多播

现实情况

  1. 小米路由器R3 ROM内核版本万年2.6.36。。。。。
  2. 找不到相应版本的macvlan模块
  3. 找不到macvlan的源码
  4. 高版本的macvlan发现有trash.net的邮箱,然在该网站未发现有关macvlan内容

突然

发现小米有一个多的虚拟网卡

br-guest  Link encap:Ethernet  HWaddr 28:6C:07:00:00:00
          inet addr:192.168.32.1  Bcast:192.168.32.255  Mask:255.255.255.0
          inet6 addr: fe80::2a6c:7ff:fe4e:58f8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:368 (368.0 B)

//用于共享WiFi的

相应的网卡为

eth0.3    Link encap:Ethernet  HWaddr 28:6C:00:00:00:00
          UP BROADCAST RUNNING MULTICAST  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1266 (1.2 KiB)

*******network配置********
config interface 'guest'
	option ifname 'eth0.3'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.32.1'
	option netmask '255.255.255.0'

于是

在/etc/config/network中添加

config interface 'wan1'
	option proto 'pppoe'
	option mtu '1480'
	option special '0'
	option username '*********'
	option password '*******'
	option ifname 'eth0.4'
	option macaddr '28:6C:00:00:00:00'   //与原wan端mac地址不同

发现虚拟成功

eth0.4    Link encap:Ethernet  HWaddr 28:6C:00:00:00:00
          inet6 addr: fe80::2a6c:7ff:fe4e:58f8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:464 (464.0 B)

然,只有一个

pppoe-wan Link encap:Point-to-Point Protocol
          inet addr:*********  P-t-P:*************  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1480  Metric:1
          RX packets:1577 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1814 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:713992 (697.2 KiB)  TX bytes:352230 (343.9 KiB)

不管我怎么改network配置

即使有

pppoe-wan1 Link encap:Point-to-Point Protocol
          inet addr:************  P-t-P:***********  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1480  Metric:1
          RX packets:1577 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1814 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:713992 (697.2 KiB)  TX bytes:352230 (343.9 KiB)

任然总数只有1个!~

执行pppd命令

killall pppd
sleep 10
/usr/sbin/pppd plugin rp-pppoe.so mtu 1480 mru 1480 eth0.2 persist usepeerdns nodefaultroute user ****** password ***** ipparam wan ifname pppoe-wan & /usr/sbin/pppd plugin rp-pppoe.so mtu 1480 mru 1480 nic-eth0.4 persist usepeerdns nodefaultroute user ******* password ******* ipparam wan1 ifname pppoe-wan1

结果直接没网了~~~并且还是只有一个pppoe连接

总结

小米路由器R3慎入,,由于是nand的闪存,刷机风险大,同时因为经常用app,所以就没刷第三方的ROM

▃
      ▋    ▋ ◢▀ ▀◣
     ▌     ▌ ▌   .▌
      ▌    ▌ ▌   ▌
     ▐      ▌ ▌    ▌
      ▐     ▀■▀    ▌
    ◢◤         ▀▃
   ◢◤            ◥◣
   ▌              ▌ 好气啊!~~~
  ▐   ●       ●    ▌
   ▌              ▌
   ◥◣      ╳       ◢◤
    ◢▀▅▃▂   ▂▂▃▅▀▅
  ◢◤    ▀▀▀▀▀     ◥◣
 ▐◣▃▌           ▐▃◢▌
 ◥◣▃▌            ▐▃◢◤
   ▀▅▃          ▂▅▀
     ▀■▆▅▅▅▅▅▆■█▀
      ▐▃▃▃▲▃▃▃◢

 

更新于:2017-11-21