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




 




Related Posts:

  • How to Extend & Reduce the LVM The need of LVM extend is when we require extra disk space to store the raw data. First we have to provide the storage or extra hardware to volume group. Extend the Volume Group :- # vgextend <vg name> <new pv&… Read More
  • How to add SSH Keys to Lap There are multiple ways of adding ssh keys to ldap. 1.     Download Apache Directory Studio 2.     Extract and Install it. For Linux 3.  tar xvfz ApacheDirectoryStudio-… Read More
  • OpenVPN Client Configuration in Linux OpenVPN installation and configuration on Ubuntu 1.     sudo apt-get update 2.     sudo apt-get install network-manager-openvpn 3.     Click on networ… Read More
  • Configure a Secure FTP Server Open Source Very Secure FTP Server (VSFTPD) FTP is a file transfer protocol  which is use to:-                                      … Read More
  • Ldap Authentication for Owncloud Configure own cloud to access with centralized  ldap authentication. You can say it accessing own cloud with domain authentication. Or how to access ldap with Single sign on. First of all login into your own cloud con… Read More

0 comments:

Post a Comment

Sample Text

Powered by Blogger.

Video

Popular Posts

Our Facebook Page