Setting up network using NetworkManager and network scripts in Redhat 7

Red Hat Enterprise Linux 7: Setting up network using NetworkManager and network scripts.

This video tutorial is part of RHCSA Fast Track course.

Here is step by step cookbook to set-up RHEL 7 network using NetworkManager and network scripts:

1) Verify that NetworkManager is running and enabled to start after reboot.
systemctl status NetworkManager
systemctl is-enabled NetworkManager

2) Update /etc/hosts file with IP address, hostname and FQDN of your server.
vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

172.16.99.202 lxserv02 lxserv02.domain99.private.com

3) Configure network scripts – ifcfg Interface Configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
NM_CONTROLLED=yes
BOOTPROTO=static
ONBOOT=yes
IPADDR=172.16.99.202
NETMASK=255.255.255.0
NETWORK=172.16.99.0
BROADCAST=172.16.99.255
GATEWAY=172.16.99.1
DNS1=8.8.8.8
DNS2=208.67.220.220

4) Restart network service.
systemctl restart network

5) Verify resolv.conf configuration file if it contains DNS servers configured in previous step. NetworkManager should update /etc/resolv.conf file automatically.
cat /etc/resolv.conf

6) Verify networking.
ip a (or command: ip addr) (or command: ip address)
ip r (or command: ip route)

yum install net-tools
ifconfig -a
ifconfig eth0

netstat -r
netstat -rn

yum install bind-utils
nslookup redhat.com
dig redhat.com
dig @208.67.220.220 redhat.com

ping redhat.com

Related Video Tutorials:

Red Hat Enterprise Linux v7 networking

Calculate netmask, network and broadcast address – EASY!

Network Interface naming convention in Red Hat 7

Setting up network without NetworkManager in Redhat 7

Setting up network using NetworkManager and network scripts in Redhat 7

Setting up network using a NetworkManager text user interface (nmtui) in Red Hat 7 – EASY!!!

Setting up network in Red Hat 7 in less than a minute – QUICK & EASY!!!

Setting up network using a NetworkManager command line interface (nmcli) in Red Hat 7

nmcli cheat! Setting up network using nmcli in Red Hat 7 in less than a 30 seconds – QUICK & EASY!!!

Setting up network using a NetworkManager connection editor GUI tool in Red Hat 7 – EASY!!!

Complete Beginners Guide to Linux Network Configuration – GUI & Easy!

NetworkManager connection priority – manage network profile priority in Linux.