Network Configuration
Network Configuration
Using Linux
licensed under the terms of the GNU Free Documentation License Version 1.3 or later
Configure the Network
Using Linux
Overview
How do we can configure the Internet Protocol version 4 (IPv4) properties of a network
connection with a static IP address for servers running Linux operating systems? How do we can
configure static IP address under Debian Linux or Redhat / RHEL / Fedora / Redhat Enterprise
Linux server?
If you need to update and/or edit the network configuration files. This manual provides
procedures to configure a static IP address on a computer running the following operating
systems:
RHEL / Red hat / Fedora / CentOS Linux eth0 config file - /etc/sysconfig/network-scripts/ifcfg-eth0
RHEL / Red hat / Fedora / CentOS Linux eth1 config file - /etc/sysconfig/network-scripts/ifcfg-eth1
IP address: [Link]
Netmask: [Link]
Hostname: [Link]
For static IP configuration you need to edit the following files using a text editor such as vi. Edit
/etc/sysconfig/network as follows, enter:
# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=[Link]
GATEWAY=[Link]
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
DHCPCLASS=
HWADDR=[Link]
IPADDR=[Link]
NETMASK=[Link]
ONBOOT=yes
# vi /etc/[Link]
search [Link]
nameserver [Link]
nameserver [Link]
nameserver [Link]
# /etc/init.d/network restart
# ifconfig eth0
# route -n
# ping [Link]
# ping [Link]
# vi /etc/hostname
Sample ip config:
[Link]
# vi /etc/network/interfaces
address [Link]
network [Link]
netmask [Link]
broadcast [Link]
gateway [Link]
# vi /etc/[Link]
search [Link]
nameserver [Link]
nameserver [Link]
nameserver [Link]
Finally, you need to restart the networking service under Debian / Ubuntu Linux, enter:
Configure the Network 4
[Link]
# /etc/init.d/networking restart
# ifconfig eth0
# route -n
# ping [Link]