VirtualBox中Centos7自定义IP


vb中网络有4个网卡,分别对应enp0s7 enp0s8 enp0s9 enp0s10 我这里第二个网卡为NAT桥接模式,对应主机为网关,虚拟机为子网 vim /etc/sysconfig/network-scripts/ifcfg-enp0s8 TYPE=Ethernet PROXY_METHO

配置/etc/sysconfig/network-scripts/ifcfg-ethx


ipv4 BOOTPROTO=none DEFROUTE=yes DEVICE=eth0 GATEWAY=172.16.0.1 HWADDR=52:54:00:ff:cc:69 IPADDR=172.16.0.7 NETMASK=255.255.240.0 ONBOOT=yes TYPE=Ether