Configuring Static IP Addresses in Centos 7
I am trying to assign static IP address to Centos 7 with the commands
vim /etc/sysconfig/network-scripts/ifcfg-ens33
I can edit and it is saving but when i try checking for configs through ifconfig it is the same ip as of earlier through dhcp. using centos in a virtual environment of VMware.
I am using CENTOS 7 in VMWare, earlier the IP address (dhcp) was 192.168.139.135, but now when I assigned 192.168.139.100, it can neither ping any website or connect in any manner.
ping google.com
ping: unknown host google.com
this is the output when I try to do ping.
is there anything I am missing in vim /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.139.100
NETMASK=255.255.255.0
GATEWAY=192.168.139.2
DOMAIN=majan.com
DNS1=192.168.139.100
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=yes
NAME=ens33
UUID=5f06d8d9-273b-45a8-807b-35e2e27c840f
DEVICE=ens33
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
this is what I entered.
Please help.
|