2017年6月9日 星期五

CentOS 7.3 KVM Bridged Network Configuration note

CentOS 7.3
system by default uses NAT network


To change NAT network to Bridge network

1.
Stop and disable the NetworkManager service; (Network Manager is good for configuration, however, it's heard that it can cause issues from time to time)

sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
 
2.
*eno2 here is physical network port on host
#cat /etc/sysconfig/network-scripts/ifcfg-eno2
DEVICE="eno2"
ONBOOT="yes"
NM_CONTROLLED="no"
#TYPE=Ethernet
BRIDGE=br0
BOOTPROTO=static
#IPADDR=192.168.1.100
#NETMASK=255.255.255.0
#GATEWAY=192.168.1.1

3.
#cat /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE="br0"
ONBOOT="yes"
TYPE=Bridge
BOOTPROTO=static
IPADDR=192.168.1.112
NETMASK=255.255.255.0


4.
GATEWAY for both eno2 and br0 is set here
cat /etc/sysconfig/network
# Created by anaconda
GATEWAY=192.168.1.1

run service network restart:
#service network restart
Restarting network (via systemctl):   [  OK  ]


Ping between host OS and guest OS, between guest and hosts on the same subnet shall success now. 




In case needed, shutdown firewall to ensure the firewall is not causing issues
 
Firewalld is a complete firewall solution that has been made available by default on all CentOS 7 servers, including Liquid Web Core Managed CentOS 7, and Liquid Web Self Managed CentOS 7. On occasion, perhaps for testing, disabling or stopping firewalld may be necessary.



Check the Status of Firewalld  :  systemctl status firewalld
Stop the Firewalld : systemctl stop firewalld 

沒有留言:

張貼留言