줄기세포

VMware 환경 위에 CentOS 7 network 설정 본문

Linux

VMware 환경 위에 CentOS 7 network 설정

줄기세포(Stem_Cell) 2020. 11. 27. 15:51

NAT 주소 설정

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33

-----------------------------------

TYPE="Ethernet" 
PROXY_METHOD="none" 
BROWSER_ONLY="no" 
BOOTPROTO="static" 
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="ens33" 
UUID="bb342853-ad54-4de6-9f06-02b3fb937d44" 
DEVICE="ens33" 
ONBOOT="yes" 
IPADDR="192.168.74.220" 
PREFIX="24" 
NETMASK=255.255.255.0 
GATEWAY="192.168.74.2" 
IPV6_PRIVACY="no" 
DNS1=192.168.74.2 

-----------------------------------

host-only network 주소 설정


[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens37 

----------------------------------

BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.204.20
NETMASK=255.255.255.0
DEVICE=ens37
PEERDNS=NO
ZONE=public

-----------------------------------

네트워크 재시작
[root@localhost ~]# systemctl restart network 

주소반영되었는지 확인

[root@localhost ~]# ip a

 

 

 

ping www.google.com

ping을 날려서 응답이 주기적으로 오면 network 성공입니다.

Comments