How to “basic networking” on Rhel/Centos 7

A few noteworthy commands

ip add:      to see your interfaces (same as ifconfig on rhel/centos 6)
systemctl status NetworkManager.service:  to verify the status of Network manager
nmcli dev status: to verify which interfaces are managed my Network Manager

i want to change my ip address configuration to static, as such i will go to the network file  /etc/sysconfig/network-scripts/ directory and edit the network file which in my case is “ifcfg-enp0s3

i check to see which interface is managed by network manager by running
# nmcli dev status

enp0s3 is being managed so that’s the one i will edit

# vim /etc/sysconfig/network-scripts/ifcfg-enp0s3
and change as below

ip image

the yellow highlighted entries are the ones to add/or edit
save and exit the file

now run the command below to restart network service

# systemctl restart network.service

and confirm the status by running the below

# ip add

Leave a Reply

Your email address will not be published. Required fields are marked *