这个是母鸡网卡配置
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address 149.202.94.**/24
gateway 149.202.94.***
bridge-ports eno1
bridge-stp off
bridge-fd 0
hwaddress A4:BF:01:28:5A:AA
iface vmbr0 inet6 static
address 2001:****:1004:e63::ffff/128
post-up sleep 5; /sbin/ip -6 route add 2001:****:1004:0eff:ff:ff:ff:ff dev vmbr0
post-up sleep 5; /sbin/ip -6 route add default via 2001:****:1004:0eff:ff:ff:ff:ff
pre-down /sbin/ip -6 route del default via 2001:****:1004:0eff:ff:ff:ff:ff
pre-down /sbin/ip -6 route del 2001:****:1004:0eff:ff:ff:ff:ff dev vmbr0
auto vmbr1
#private sub network
iface vmbr1 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s ’10.10.10.0/24’ -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s ’10.10.10.0/24’ -o vmbr0 -j MASQUERADE
iface vmbr1 inet6 static
address 2001:****:1004:e63::1/128
小鸡桥接vmbr1
ip填:2001:****:1004:e63::3/64
网关填:2001:****:1004:e63::1
现在ipv4的nat通了,ipv6的不通。
主机ping不通小鸡,小鸡之间可以互相ping通
。
使用iptables把网卡流量转发:
ip6tables -t nat -A POSTROUTING -s 2001:****:1004:e63::3/64 -o vmbr0 -j MASQUERADE
ipv6依旧不通