Host Network
Networks of hosts where private cloud virtual machines are located.
Classic Network
Hosts specify host network configuration through the host service's configuration item networks (/etc/yunion/host.conf). This configuration specifies which layer 2 network the host's specified physical network card corresponds to. There are two configuration methods:
-
Network card name/bridge name/network card IP, for example: eth0/br0/192.168.222.10. This configuration mode tells the system that the host's physical network card eth0 is connected to the layer 2 network corresponding to the IP subnet corresponding to IP 192.168.222.10, and bridges this physical network card with bridge br0. Physical network cards in this mode are used by the host to communicate with the outside world, so a valid IP address must be configured. When the host service starts, it will detect whether this IP is configured on this physical network card. If it doesn't match, the host service will abandon startup. This avoids misconfiguring this network card. After successful startup, the host service will automatically create a bridge, add the physical network card to this bridge, and migrate the IP configuration information on the physical network card to the bridge to maintain the host's normal network communication.
-
Network card name/bridge name/layer 2 network name, for example: eth1/brpub/wire1. This configuration mode tells the system that the host's physical network card eth1 is connected to layer 2 network wire1. This network card does not need to configure a valid IP address, and this physical network card is bridged with bridge brpub. Physical network cards in this mode are not used by the host for communication, so they do not need to explicitly configure valid IP addresses. When the host service starts, it will check whether this physical network card has no IP. If it has an IP, it will abandon startup. This avoids misoperation. After successful startup, it will automatically create a bridge, add the physical network card to this bridge, and automatically assign a 169.254.0.0/16 IP to this bridge.
Impact of Host Network Configuration on Scheduling
When creating a classic network virtual machine, the scheduler will check the IP subnet that the virtual machine is preparing to connect to, filter hosts connected according to the IP subnet's layer 2 network, and use these hosts as candidate hosts.
VLAN Support
Classic networks support VLAN (802.1Q). IP subnets under layer 2 networks in the same classic network can belong to different VLANs. In this case, you need to set the IP subnet's VLAN ID. The IP subnet's VLAN ID defaults to 1.
When an IP subnet's VLAN ID is not 1, the network interface that the virtual machine connects to this IP subnet will automatically join this VLAN. The underlying implementation principle is that when adding the virtual machine's virtual network interface to the OVS bridge, set this interface's VLAN tag to the specified tag. To allow virtual machines on a host to join different VLANs, you need to set the host's physical network port to Trunk mode to allow packets with different VLAN tags to pass through the same physical link simultaneously.