Red hat Linux provides following tools to make changes to Network configuration such as add new card, assign IP address, change DNS server, etcetera:
- GUI tool (X windows required) - system-config-network
- Command line text based GUI tool (No X windows required) - system-config-network-tui
- Edit configuration files directly, stored in /etc/sysconfig/network-scripts directory
Editing the configuration files stored in /etc/sysconfig/network-scripts:
First change directory to /etc/sysconfig/network-scripts/:
# cd /etc/sysconfig/network-scripts/You need to edit / create files as follows:
- /etc/sysconfig/network-scripts/ifcfg-eth0 : First Ethernet card configuration file
- /etc/sysconfig/network-scripts/ifcfg-eth1 : Second Ethernet card configuration file
# vi ifcfg-eth0Append/modify as follows:
Save and close the file. Define the default gateway (router IP) and hostname in /etc/sysconfig/network file:# Intel Corporation 82573E Gigabit Ethernet Controller (Copper) DEVICE=eth0 BOOTPROTO=static DHCPCLASS= HWADDR=00:30:48:56:A6:2E IPADDR=10.251.17.204 NETMASK=255.255.255.0 ONBOOT=yes
Save and close the file. Restart networking:# vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=host.domain.com GATEWAY=10.251.17.1
# /etc/init.d/network restartMake sure you have correct DNS server defined in /etc/resolv.conf file. Try to ping the gateway, and other hosts on your network. Also check if you can resolv host names:
# nslookup host.domain.comAnd verify if the NTP servers are correct in /etc/ntp.conf, and if you can connect to the time server, by running the ntpdate command against one of the NTP servers:
# ntpdate 10.20.30.40This should synchronize system time with time server 10.20.30.40.
If you found this useful, here's more on the same topic(s) in our blog:
- Quick NFS configuration on Red Hat
- Red Hat: Creating a backup to ISO images
- Display the number of CPU
- Monitoring a log file through Systemd
- ILO: Using Virtual Media with the Command-Line Interface
UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.
Interested in learning more?
Interested in learning more?




