PCEVA,PC绝对领域,探寻真正的电脑知识
123
返回列表 发新帖
打印 上一主题 下一主题
开启左侧

老哥,成功了!

  [复制链接]
41#
世纪冰雷 发表于 2011-8-19 19:30 | 显示全部楼层
好像敲错字了。。

config 'interface' 'wan2'
        option 'ifname' 'eht2'
        option 'defaultroute' '0'
        option 'peerdns' '0'
        option 'proto' 'pppoe'
        option 'username' '280014060345'
        option 'password' '*'

我改下..
42#
世纪冰雷 发表于 2011-8-19 19:50 | 显示全部楼层
怎么会呢?我测试了啊,没问题的,脚本运行有提示吗?
qiang_liu8183 发表于 2011-8-19 19:31


    temp下的文件夹在前面的附件里有ls,大鹅看看。

    脚本是放在/etc里吧?脚本运行没提示信息,也没报错。
43#
世纪冰雷 发表于 2011-8-19 20:01 | 显示全部楼层


改了下名字。。ifconfig还是没显示eth2出来。。
看看啥回事。。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
44#
世纪冰雷 发表于 2011-8-19 23:46 | 显示全部楼层
WAN口也就是eth0.1,
然后编辑 /etc/rc.local

加入
ip link add link eth0.1 eth2 type macvlan       //这个eth0.1就是对应wan吧
ifconfig eth2 hw ether 00:90:4C:C0:01:4D
ifconfig eth2 up

:wq

然后/etc/config/network
config 'interface' 'wan2'
        option 'ifname' 'eth2'
        option 'defaultroute' '0'
        option 'peerdns' '0'
        option 'proto' 'none'
:wq


就做了这些~
45#
世纪冰雷 发表于 2011-8-20 13:46 | 显示全部楼层
如果是在命令直接敲的话。。他说我eth2 busy..


  1. root@OpenWrt:~# ip link add link eth0.1 eth2 type macvlan
  2. RTNETLINK answers: File exists
  3. root@OpenWrt:~# ifconfig eth2 hw ether 00:90:4C:C0:01:4D
  4. root@OpenWrt:~# ifconfig eth2 up
  5. ifconfig: SIOCSIFFLAGS: Device or resource busy
  6. root@OpenWrt:~# ifconfig eth2 down
  7. root@OpenWrt:~#
  8. root@OpenWrt:~#
  9. root@OpenWrt:~# ifconfig eth2 up  
  10. ifconfig: SIOCSIFFLAGS: Device or resource busy
复制代码
46#
世纪冰雷 发表于 2011-8-20 19:34 | 显示全部楼层
ifconfig 看不掉down掉的接口...
ifconfig -a可以看到eth2

  1. root@OpenWrt:~# ifconfig -a
  2. br-lan    Link encap:Ethernet  HWaddr 00:90:4C:C0:01:4D  
  3.           inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
  4.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  5.           RX packets:809 errors:0 dropped:0 overruns:0 frame:0
  6.           TX packets:567 errors:0 dropped:0 overruns:0 carrier:0
  7.           collisions:0 txqueuelen:0
  8.           RX bytes:83808 (81.8 KiB)  TX bytes:67936 (66.3 KiB)
  9. eth0      Link encap:Ethernet  HWaddr 00:90:4C:C0:01:4D  
  10.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  11.           RX packets:74080 errors:0 dropped:0 overruns:0 frame:0
  12.           TX packets:72959 errors:0 dropped:0 overruns:0 carrier:0
  13.           collisions:0 txqueuelen:1000
  14.           RX bytes:55253472 (52.6 MiB)  TX bytes:54764003 (52.2 MiB)
  15.           Interrupt:4
  16. eth0.0    Link encap:Ethernet  HWaddr 00:90:4C:C0:01:4D  
  17.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  18.           RX packets:29895 errors:0 dropped:0 overruns:0 frame:0
  19.           TX packets:44906 errors:0 dropped:0 overruns:0 carrier:0
  20.           collisions:0 txqueuelen:0
  21.           RX bytes:3536972 (3.3 MiB)  TX bytes:51088821 (48.7 MiB)
  22. eth0.1    Link encap:Ethernet  HWaddr 00:90:4C:C0:01:4D  
  23.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  24.           RX packets:44145 errors:0 dropped:0 overruns:0 frame:0
  25.           TX packets:28050 errors:0 dropped:0 overruns:0 carrier:0
  26.           collisions:0 txqueuelen:0
  27.           RX bytes:50376686 (48.0 MiB)  TX bytes:3339990 (3.1 MiB)
  28. eth2      Link encap:Ethernet  HWaddr 00:90:4C:C0:01:4D  
  29.           BROADCAST MULTICAST  MTU:1500  Metric:1
  30.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  31.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  32.           collisions:0 txqueuelen:0
  33.           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  34. lo        Link encap:Local Loopback  
  35.           inet addr:127.0.0.1  Mask:255.0.0.0
  36.           UP LOOPBACK RUNNING  MTU:16436  Metric:1
  37.           RX packets:30 errors:0 dropped:0 overruns:0 frame:0
  38.           TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
  39.           collisions:0 txqueuelen:0
  40.           RX bytes:2504 (2.4 KiB)  TX bytes:2504 (2.4 KiB)
  41. pppoe-wan Link encap:Point-to-Point Protocol  
  42.           inet addr:220.242.160.14  P-t-P:220.242.160.1  Mask:255.255.255.255
  43.           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
  44.           RX packets:129 errors:0 dropped:0 overruns:0 frame:0
  45.           TX packets:260 errors:0 dropped:0 overruns:0 carrier:0
  46.           collisions:0 txqueuelen:3
  47.           RX bytes:27467 (26.8 KiB)  TX bytes:33661 (32.8 KiB)
复制代码


可就是up不起来
每次up他就报错


  1. root@OpenWrt:~# ifconfig eth2 up
  2. ifconfig: SIOCSIFFLAGS: Device or resource busy
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部