docker_ttnode icon indicating copy to clipboard operation
docker_ttnode copied to clipboard

关于Docker MACVLAN 和多线路的问题

Open ghost opened this issue 4 years ago • 5 comments

请问能在一张网卡上创建多个macvlan 吗?? 因为有多条线路 需要设置不同的网关地址好实现分流!

ghost avatar Jun 30 '21 11:06 ghost

分流应该可以对不同的IP做设置, 应该不用创建多个macvlan, 当然了macvlan可以创建多个, 用不同的vlan, 不过这种模式我也没有研究过.

ericwang2006 avatar Jun 30 '21 14:06 ericwang2006

分流应该可以对不同的IP做设置, 应该不用创建多个macvlan, 当然了macvlan可以创建多个, 用不同的vlan, 不过这种模式我也没有研究过.

因为要指向不通网关 网心云的docker没办法进去容器内部设置

lbsystem avatar Jul 01 '21 06:07 lbsystem

分流应该可以对不同的IP做设置, 应该不用创建多个macvlan, 当然了macvlan可以创建多个, 用不同的vlan, 不过这种模式我也没有研究过.

因为要指向不通网关 网心云的docker没办法进去容器内部设置

网心云比较特殊, 会自动申请多个局域网IP, 完全靠DHCP服务分配网关, 我不太清楚macvlan是否可以搞定, 你问问他们技术吧

ericwang2006 avatar Jul 04 '21 07:07 ericwang2006

分流应该可以对不同的IP做设置, 应该不用创建多个macvlan, 当然了macvlan可以创建多个, 用不同的vlan, 不过这种模式我也没有研究过.

你好 请问一下wlan0网络是不是不能建立macvlan网络? 我N1用无线网络连接的,创建的macvlan网络容器无法连接,之前用网线连接的时候是正常的,或者直接无线下用host网络也正常

db-one avatar Jul 26 '21 02:07 db-one

不可以,macvlan独占的。你的网卡创建多个vlan例如eth1.1 eth1.2这样应该可以。

shikkoku avatar Sep 03 '21 10:09 shikkoku