Thursday, January 17, 2019

How to configure IP address in Linux | How to add an IP address in Linux | How to change IP address in Linux

How to configure IP address in Linux 
How to add an IP address in Linux 
How to change IP address in Linux





To configure an IP address or to change an IP address or to add an IP address please follow below details. 

In this post I'm showing command and images according to my system. 


Steps: 
[root@reyaz ~]# ifconfig

[root@reyaz ~]# vi /etc/sysconfig/network-scripts/p8p1
Edit as below

TYPE=Ethernet
BOOTPROTO=none
IPADDR0=192.168.20.234
PREFIX0=22
GATEWAY0=192.168.20.1
DNS1=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="
p8p11"

UUID=43ff9b45-9de4-4e2e-ae09-254d6bb3e060
ONBOOT=yes


save and exit

[root@reyaz ~]# systemctl restart network 

Done



At first check your ether name by using the Linux command "ifconfig"



Then open the file where all info is stored for your network (ether)
 [root@reyaz ~]# vi /etc/sysconfig/network-scripts/p8p1



Then edit "NAME" line and "IPADDR" line according to my steps and image

After that save and exit. 

Now restart your system Network.


Check again by command   "ifconfig"

Done.
  

 

You can find me on Fiverr & LinkedIn

No comments:

Post a Comment