computerfaq:setup_network
Table of Contents
RHEL / CentOS - How to setup the Network Manually
Without NetworkManager and using Traditional Configuration Files
Firstly, let's figure out what our adapter is
ls -la /sys/class/net
This will give device names for the physical adapters
ip link
should confirm it and provide a mac address. For this tutorial I'm going to assume its 00:0c:29:e1:b2:7c
We next need to disable Network Manager (if its enabled)
systemctl stop NetworkManager systemctl disable NetworkManager
Now we need to create the device config file in /etc/sysconfig/network-scripts using the physical device name above. I'm going to assume for this tutorial that it was called eno160.
create a file /etc/sysconfig/network-scripts/ifcfg-ens160
NM_CONTROLLED="no" HWADDR="00:0c:29:e1:b2:7c" TYPE="Ethernet" BOOTPROTO="none" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="no" DEVICE="eno160" ONBOOT="yes"
Then we add our local IP stuff to the end e.g.
DNS1="10.1.1.5" IPADDR="10.1.1.2" PREFIX="22" GATEWAY="10.1.1.3" ZONE=internal
And that's it, now reboot and the interface should come right up.
/data/webs/external/dokuwiki/data/pages/computerfaq/setup_network.txt · Last modified: 2022/03/15 15:18 by genadmin