Thursday, 16 March 2017



In this post we will discussed how to  configure Networking in Redhat Linux 7 with CLI mode.

First of all we will know how to set the hostname to your system.
you can set hostname with command & you can edit file under /etc/hostname to set the name for your computer.
In RHEL 7:-  I would like to set my computer name is kaushal.example.com, here is the command to set:-

# hostnamectl set-hostname kaushal.example.com

check with

#hostname or hostnamectl --- this command show information about your hostname/computer name.

# cat /etc/hostname   --- you can also check with this command



Now lets discussed configure the IP address so your machine can communicate in network.

# nmcli c show --- this will show the Connection.

# nmcli c modify "Connection name" "Modification" --- To modify current connection.

# nmcli c delete ---- to delete the current connection

# nmcli c up "connection name" ---- Up the connection

# nmcli c down "Connection Name" --- Down the connection

# nmcli c add con-name kaushal ifname eth0 type ethernet autoconnect yes ip4 172.19.10.0/24 gw4 172.19.10.1

con-name is connection name you can give name anything, ifname is interface name, Type mean what type of connection you want to add i want add here ethernet.  Autoconnect mean connection will auto connect after reboot the system or shutdown the system.  ip4 mean IPv4 IP address with subnet mask. gw4 mean Gateway for IPv4.

Now configure the DNS for your connection/ or modify your connection for name resolving.
# nmcli c modify kaushal ipv4.dns 172.19.10.1 ipv4.method manual

 # nmcli c show





# nmcli c up kaushal

Configure IPv6 for your current connection.
# nmcli c modify kaushal ipv6.addresses 2607:f0d0:1002:51::4/24 ipv6.method manual

# nmcli c show | grep ipv6.addresses




 




0 comments:

Post a Comment

Sample Text

Powered by Blogger.

Video

Popular Posts

Our Facebook Page