Привет ЛОР, помоги решить проблему.
Новый сервер в OVH. Небольшая сетка IP.
Через панель OVH создаю MAC 02:00:00:fd:6f:8e для IP 178.33.98.12
Редактирую sysctl.conf => sysctl -p
net.ipv4.ip_forward=1
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
Редактирую interfaces
auto lo br0
iface lo inet loopback
iface br0 inet static
address 149.202.201.105
netmask 255.255.255.0
network 149.202.201.0
broadcast 149.202.201.255
gateway 149.202.201.254
bridge_ports eth0
bridge_stp off
bridge_fd 1
bridge_hello 2
bridge_maxage 12
Проверяю
# ifconfig
br0 Link encap:Ethernet HWaddr 0c:c4:7a:79:db:54
inet addr:149.202.201.105 Bcast:149.202.201.255 Mask:255.255.255.0
inet6 addr: fe80::ec4:7aff:fe79:db54/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:86806 errors:0 dropped:0 overruns:0 frame:0
TX packets:20537 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4400506 (4.1 MiB) TX bytes:2083994 (1.9 MiB)
eth0 Link encap:Ethernet HWaddr 0c:c4:7a:79:db:54
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:86814 errors:0 dropped:0 overruns:0 frame:0
TX packets:20694 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5647572 (5.3 MiB) TX bytes:2093644 (1.9 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4536 (4.4 KiB) TX bytes:4536 (4.4 KiB)
Устанавливаю qemu-kvm => создаю VM => проверяю bridge.
# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.0cc47a79db54 no eth0
vnet0
Захожу по VNC на VM и редактирую interfaces согласно мануалу.
http://docs.ovh.ca/en/guides-network-bridging.html#debian-derivatives-ubuntu-...
Основной ип моего сервера 149.202.201.105 => по-этому использую 149.202.201.254
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address 178.33.98.12
netmask 255.255.255.255
broadcast 178.33.98.12
post-up route add 149.202.201.254 dev eth0
post-up route add default gw 149.202.201.254
pre-down route del 149.202.201.254 dev eth0
pre-down route del default gw 149.202.201.254
Проверяю ifconfig на VM (MAC и IP - все ок) => https://poiuty.com/img/d2/056b99cd00f5ba29eea9db98d14926d2.png
Пытаюсь сделать пинг до 8.8.8.8 не идет => https://poiuty.com/img/11/369a547812328d6b9eae19e2e0ab1211.png
На других серверах (такая же настройка сети для VM) - работает. Что же на этом сервере не так?
Половил трафик через tcpdump - постоянно спамит ARP. (когда VM выключена, когда сеть как bridge/ не как bridge)
# tcpdump -ennqti eth0 \( arp or icmp \)
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.174 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.186 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.246 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.244 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.250 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.189 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.246 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.174 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.181 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.171 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.183 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.1 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.170 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.1 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.177 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.192 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.248 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.188 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff, ARP, length 60: Request who-has 149.202.201.180 tell 149.202.201.253, length 46
00:ff:ff:ff:ff:fe > 0c:c4:7a:79:db:54, IPv4, length 60: 92.222.186.1 > 149.202.201.105: ICMP echo request, id 34118, seq 1, length 12
0c:c4:7a:79:db:54 > 00:ff:ff:ff:ff:ff, IPv4, length 46: 149.202.201.105 > 92.222.186.1: ICMP echo reply, id 34118, seq 1, length 12
...