找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 29523|回复: 43

OpenWrt Chaos Calmer 和BB14.07版本kmod-macvlan虚拟网卡生成命令变化说明,请知悉。

  [复制链接]
发表于 2014-10-5 14:06 | 显示全部楼层 |阅读模式
本帖最后由 shenyz 于 2014-10-14 08:39 编辑

首先安装kmod-macvlan
OpenWrt Chaos Calmer 和BB14.07版本生成虚拟网卡命令发生了变化,(BB-RC3之前的没有变化)故许多同学认为CC版本不能生成。启动项新的命令如下:

ip link add link eth0.2  type macvlan   eth0.2 为你的真实网卡 生成默认的虚拟网卡为macvlan0

ip link add link eth0.2  type macvlan  eth0.2 为你的真实网卡 生成默认的虚拟网卡为macvlan1

ip link add link eth0.2  type macvlan  eth0.2 为你的真实网卡 生成默认的虚拟网卡为macvlan2



需要几个就写出几个,默认的带随机的mac
从启路由
然后验证:
命令 ip link 得到
8: macvlan0@eth0.2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
    link/ether 66:2f:4d:fc:68:02 brd ff:ff:ff:ff:ff:ff
9: macvlan1@eth0.2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
    link/ether c6:11:87:1b:4f:c9 brd ff:ff:ff:ff:ff:ff
10: macvlan2@eth0.2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
    link/ether 72:00:1b:15:ee:04 brd ff:ff:ff:ff:ff:ff
web界面 网络--接口添加新的接口可以看到已经生成的网卡

然后命令ifconfig
可以看到虚拟网卡带mac
macvlan0  Link encap:Ethernet  HWaddr 66:2F:4D:FC:68:02  
          inet6 addr: fe80::642f:4dff:fefc:6802/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6616 errors:0 dropped:5301 overruns:0 frame:0
          TX packets:1123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:425374 (415.4 KiB)  TX bytes:34060 (33.2 KiB)
macvlan1  Link encap:Ethernet  HWaddr C6:11:87:1B:4F:C9  
          inet6 addr: fe80::c411:87ff:fe1b:4fc9/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6871 errors:0 dropped:5301 overruns:0 frame:0
          TX packets:1123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:434868 (424.6 KiB)  TX bytes:34060 (33.2 KiB)
macvlan2  Link encap:Ethernet  HWaddr 72:00:1B:15:EE:04  
          inet6 addr: fe80::7000:1bff:fe15:ee04/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6520 errors:0 dropped:5301 overruns:0 frame:0
          TX packets:1123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:413085 (403.4 KiB)  TX bytes:34060 (33.2 KiB)

我的已经拨号成功
pppoe-wan1 Link encapoint-to-Point Protocol  
          inet addr:xx.xx.32.202  P-t-P:49.80.32.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:11463 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10076 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:11339973 (10.8 MiB)  TX bytes:1237734 (1.1 MiB)
pppoe-wan2 Link encapoint-to-Point Protocol  
          inet addr:xx.xx.109.150  P-t-P:121.231.108.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:15039 (14.6 KiB)  TX bytes:68 (68.0 B)
pppoe-wan3 Link encapoint-to-Point Protocol  
          inet addr:xx.xx.62.191  P-t-P:114.227.48.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:499 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:20486 (20.0 KiB)  TX bytes:68 (68.0 B)
pppoe-wan4 Link encapoint-to-Point Protocol  
          inet addr:xx.xx.48.169  P-t-P:114.227.48.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:113 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:5019 (4.9 KiB)  TX bytes:68 (68.0 B)




本帖子中包含更多资源

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

×

评分

参与人数 1恩山币 +10 收起 理由
唯美的风景 + 10 谢谢分享,让更多的人知道~

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
发表于 2014-10-5 14:38 | 显示全部楼层
15天前的更新就这样了。现在想指定名称只要加个name就好。像这样:ip link add link eth0 name vth0 type macvlan
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 15:20 | 显示全部楼层
呵呵,不错,纯支持了^-^
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 16:57 | 显示全部楼层
多了个name
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 16:59 | 显示全部楼层
很实用,辛苦了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 17:20 | 显示全部楼层
这个真心很实用!果断收下了!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 17:38 | 显示全部楼层
回复看看。。。。。。。。。。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 18:34 | 显示全部楼层
1111111111111111
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 18:43 | 显示全部楼层
谢谢分享啊
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 19:05 | 显示全部楼层
好东西啊,谢谢楼主分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 19:12 | 显示全部楼层
学习学习了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 20:54 | 显示全部楼层
感谢分享,谢谢!!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 21:21 | 显示全部楼层
看看看看
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 21:31 | 显示全部楼层
1111111111111111
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-10-5 21:32 | 显示全部楼层
顶楼主啦..希望楼主多发精品好帖啦.....
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 08:30

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表