When you are giving IP address in a cent os , By default that IP gets removed when the machine reboots. So you have to configure the on boot Yes to make it permanent .
- Create a file named [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp8s0 as follows:
- DEVICE=eth0
- BOOTPROTO=none
- ONBOOT=yes
- PREFIX=24
- IPADDR=192.168.2.203
- PREFIX=24
- GATEWAY=192.168.2.1
- DNS1=8.8.8.8
- DNS2=4.2.2.2
- Restart network service: systemctl restart network
No comments:
Post a Comment