To
configure the static IP address, Route and DNS to the Linux box Centos 7, edit
the interface configuration file under /etc/sysconfig/network-scripts/
directory and append the below line in the end the file:
[root@linuxcnf
~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
……
BOOTPROTO=none
IPADDR
= 192.168.43.15
GATEWAY
= 192.168.43.1
NETMASK
= 255.255.255.0
|
Finally, restart network service to configure the static
IP address:
[root@linuxcnf
~]# systemctl restart network
[root@linuxcnf
~]# systemctl enable network
|
That’s it
the static IP address is configured!!!
No comments:
Post a Comment