解决kvm 虚拟机无法与宿主机通讯问题
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-bro-testDEVICE="br0"ONBOOT="yes"TYPE="Bridge"BOOTPROTO=staticIPADDR=172.16.1.80NETMASK=255.255.255.0重启网络,发现网卡[root@localhost ~]# ifconfigbr
·
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-bro-test
DEVICE="br0"
ONBOOT="yes"
TYPE="Bridge"
BOOTPROTO=static
IPADDR=172.16.1.80
NETMASK=255.255.255.0
重启网络,发现网卡
[root@localhost ~]# ifconfig
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.1.80 netmask 255.255.255.0 broadcast 172.16.1.255
inet6 fe80::fc54:ff:febb:58c5 prefixlen 64 scopeid 0x20<link>
ether fe:54:00:bb:58:c5 txqueuelen 1000 (Ethernet)
RX packets 59 bytes 8920 (8.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14 bytes 1766 (1.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
kvm 可以新建网卡,选择br0
虚拟机也产生新的网卡
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens10
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens10
UUID=6ba22e94-9a7e-48df-9b08-9500eb19274b
DEVICE=ens10
ONBOOT=yes
IPADDR=172.16.1.12
PREFIX=24
重启网络
可以看到网络以打通
更多推荐
已为社区贡献4条内容
所有评论(0)