Professional Documents
Culture Documents
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: 192.168.1.10
Netmask: 255.255.255.0
Hostname: server1.faysalkhan.org
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=server1.faysalkhan.org
GATEWAY=192.168.1.254
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
DHCPCLASS=
HWADDR=00:30:48:56:A6:2E
IPADDR=192.168.1.10
NETMASK=255.255.255.0
ONBOOT=yes
# vi /etc/resolv.conf
search faysalkhan.org
nameserver 192.168.1.254
nameserver 8.8.8.8
nameserver 202.54.2.5
# /etc/init.d/network restart
# ifconfig eth0
# route -n
# ping 192.168.1.254
# ping google.com
# vi /etc/hostname
Sample ip config:
server1.faysalkhan.org
# vi /etc/network/interfaces
address 192.168.1.10
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.254
# vi /etc/resolv.conf
search faysalkhan.org
nameserver 192.168.1.254
nameserver 8.8.8.8
nameserver 202.54.2.5
Finally, you need to restart the networking service under Debian / Ubuntu Linux, enter:
Configure the Network 4
www.FaysalKhan.Org
# /etc/init.d/networking restart
# ifconfig eth0
# route -n
# ping google.com