openwrt-x86-64
openwrt-x86-64 copied to clipboard
宿主机网络修复
Ubuntu/Debian系统:
编辑/etc/network/interfaces
增加以下内容
# Primary interface
auto eth0
iface eth0 inet dhcp
up ip link set dev eth0 promisc on
# Macvlan interfaces
auto vir1
iface vir1 inet dhcp
pre-up ip link add link eth0 address 02:cd:ab:00:10:01 vir1 type macvlan mode bridge
post-down ip link delete vir1
重启后新建的Macvlan会自动获取多一个IP地址,可与Docker中的Openwrt互通。 但此时宿主机会有两个IP地址,eth0不知道如何禁用DHCP。