# ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up
# cd /etc/sysconfig/networking/devices # vi ifcfg-eth0
DEVICE=eth0 BOOTPROTO=none HWADDR=00:0C:29:DE:94:8B ONBOOT=yes TYPE=Ethernet USERCTL=no IPV6INIT=no PEERDNS=yes NETMASK=255.255.255.0 IPADDR=192.168.0.100 GATEWAY=192.168.0.1
# cd /etc # vi resolv.conf
search your-dns-search-path nameserver dns1-ip-address nameserver dns2-ip-address nameserver dns3-ip-address
# ifdown eth0 # ifup eth0
The minimal install does not include ifconfig. To install ifconfig run the following:
yum install net-tools
In Redhat 7.X, the interface naming convention has changed from ethX to EnsXXX. To restore the default behavior, do the following:
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"