Red Hat Enterprise Linux 7: Setting up network using nmcli without learning in less than a 30 seconds like a pro!
This procedure will work on server which does not have any NetworkManager connection configured but also on server which has already some NetworkManager connections configured.
1) Find out name of your ethernet device:
ip a
or
nmcli dev
2) redirect first 4 lines of Example 9 from nmcli-examples man page into a file.
man nmcli-examples | grep -A 4 "Example 9" nmcli.sh
3) modify new file "nmcli.sh" and update it with desired IP address, gateway, DNS servers and given interface name.
vi nmcli.sh
#!/bin/bash
nmcli con add con-name my-con-em1 ifname eth0 type ethernet ip4 172.16.99.98/24 gw4 172.16.99.1
nmcli con mod my-con-em1 ipv4.dns "8.8.8.8 208.67.222.222"
nmcli con up my-con-em1
4) Modify permissions of a new file "nmcli.sh" to executable and run the script "nmcli.sh"
chmod a+x nmcli.sh
./nmcli.sh
5) Verify IP address
ip a
6) Verify gateway
ip r
7) Verify /etc/resolv.conf file
cat /etc/resolv.conf
8) verify DNS server functionality
dig redhat.com
9) Verify if remote destination is pingable
ping redhat.com
Related Video Tutorials:
RHCSA Fast Track course:
Reset forgotten root password in Redhat 7:
• Reset forgotten root password in Redh...
Network Interface naming convention in Red Hat 7:
• Network Interface naming convention i...
Setting up network without NetworkManager in Redhat 7:
• Setting up network without NetworkMan...
Setting up network using NetworkManager and network scripts in Redhat 7:
• Setting up network using NetworkManag...
Setting up network using a NetworkManager text user interface (nmtui) in Red Hat 7 - EASY!!!
• Setting up network using a NetworkMan...
Setting up network in Red Hat 7 in less than a minute - QUICK & EASY!!!
• Setting up network in Red Hat 7 in le...
Setting up network using a NetworkManager command line interface (nmcli) in Red Hat 7
• Setting up network using a NetworkMan...
nmcli cheat! Setting up network using nmcli in Red Hat 7 in less than a 30 seconds - QUICK & EASY!!!
• nmcli cheat! Setting up network using...
The Complete Beginners Guide to Linux Network Configuration - GUI & Easy!
• Complete Beginners Guide to Linux Net...
Shrink ext2 ext3 and ext4 file system and reduce the size of a logical volume with only one command.
• Shrink ext2 ext3 and ext4 file system...
Complete guide to file system shrinking and reducing the size of the underlying logical volume.
• Complete guide to file system shrinki...
Other related video tutorials:
Calculate netmask, network and broadcast address - EASY!:
• Calculate netmask, network and broadc...
NetworkManager connection priority - manage network profile priority in Linux:
• NetworkManager connection priority - ...
RHCE EX300 exam:
RHCE EX300 exam: Configure an iSCSI target on Red Hat Enterprise Linux
• RHCE EX300 exam: Configure an iSCSI t...