我有以下的Debiannetworkingconfiguration
主IP:1.2.3.4子网1:8.1.2.248/29子网2:15.1.2.0/29
主要主机networkingconfiguration:
# network interface settings; autogenerated # Please do NOT modify this file directly, unless you know what # you're doing. # # If you want to manage part of the network configuration manually, # please utilize the 'source' or 'source-directory' directives to do # so. # PVE will preserve these directives, but will NOT its network # configuration from sourced files, so do not attempt to move any of # the PVE managed interfaces into external files! auto lo iface lo inet loopback iface eth0 inet manual iface eth1 inet manual auto vmbr1 iface vmbr1 inet manual bridge_ports dummy0 bridge_stp off bridge_fd 0 post-up /etc/pve/kvm-networking.sh auto vmbr0 iface vmbr0 inet static address 1.2.3.4 netmask 255.255.255.0 gateway 1.2.0.254 broadcast 1.2.0.255 bridge_ports eth0 bridge_stp off bridge_fd 0 network 1.2.0.0
我没有任何问题添加了第一个SubNet。 它的工作原理和每个主机都可以访问(它们都有相同的设置)
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 8.1.2.248 netmask 255.255.255.0 network 8.1.2.0 broadcast 8.1.2.255 gateway 8.1.2.254 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 8.8.8.8 dns-search host.name
我今天订购了一个额外的IP块来添加一些额外的虚拟机。
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 15.1.2.0 netmask 255.255.255.248 network 15.1.2.0 broadcast 15.1.2.7 gateway 15.1.2.6 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 8.8.8.8 dns-search host.name
第一台KVM可以到达第一个子网上的Ips,没有任何问题。 它也可以ping第二个子网上的其他Ips。 但其他人不能。
如果我ping第一个主机,我得到消息ping 15.1.2.0你想ping广播? 然后-b
我在configuration过程中错过了什么吗?
其他vms可以到达除了在同一子网上的任何主机。
请帮助我,我在这里错过了一些东西:)
你正在使用你的子网是错误的。 当你有子网时,你不能使用第一个和最后一个IP地址(第一个是networking地址用于路由目的,最后一个是广播IP)。
IE浏览器。 您的子网8.1.2.248/29包含地址8.1.2.248(networking1,不使用),8.1.2.249 – 8.1.2.254(如果OVH没有告诉您某些东西,您可以使用这些IP地址)和8.1。 2.255(为您的子网广播IP,请勿使用)。 15.1.2.0/29 – 15.1.2.0是networking(不使用),15.1.2.1-15.1.2.6可用于VM,15.1.2.7是广播(不使用)。
第一个子网的工作原理是因为你的networking掩码configuration错误(你插入了255.255.255.0,这是/ 24,而不是/ 29!或者你有你的vlan与OVH的另一个客户共享这个子网)。