0% found this document useful (0 votes)
176 views8 pages

Network Configuration

Network Configuration
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
176 views8 pages

Network Configuration

Network Configuration
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Configure the Network

Using Linux

Version 0.1 ● 8th May 2014

© 2014 Faisal Khan - [Link]

licensed under the terms of the GNU Free Documentation License Version 1.3 or later
Configure the Network

Using Linux

VERSION: 0.1 REVISION DATE: 8th May 2014


[Link]
Table Of Contents
Overview.................................................................................................................................. 1

Linux Static TCP/IP Settings..................................................................................................... 2

Debian / Ubuntu Linux Static IP Configuration..........................................................................4

Configure the Network i


[Link]

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

Debian / Ubuntu Linux - /etc/network/interfaces

Configure the Network 1


[Link]

Linux Static TCP/IP Settings


In this example you will use the following Internet Protocol Version 4 (TCP/IPv4) Properties
including IP, default gateway, and preferred DNS servers:

IP address: [Link]

Netmask: [Link]

Hostname: [Link]

Domain name: [Link]

Gateway IP: [Link]

DNS Server IP # 1: [Link]

DNS Server IP # 2: [Link]

DNS Server IP # 3: [Link]

RHEL / Red hat / Fedora / CentOS Linux Static IP Configuration

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

Sample static ip configuration:

NETWORKING=yes

HOSTNAME=[Link]

GATEWAY=[Link]

Edit /etc/sysconfig/network-scripts/ifcfg-eth0, enter:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Sample static ip configuration:

# Intel Corporation 82573E Gigabit Ethernet Controller (Copper)

DEVICE=eth0

Configure the Network 2


[Link]
BOOTPROTO=static

DHCPCLASS=

HWADDR=[Link]

IPADDR=[Link]

NETMASK=[Link]

ONBOOT=yes

Edit /etc/[Link] and setup DNS servers, enter:

# vi /etc/[Link]

Sample static IP configurations:

search [Link]

nameserver [Link]

nameserver [Link]

nameserver [Link]

Finally, you need to restart the networking service, enter:

# /etc/init.d/network restart

To verify new static ip configuration for eth0, enter:

# ifconfig eth0

# route -n

# ping [Link]

# ping [Link]

Configure the Network 3


[Link]

Debian / Ubuntu Linux Static IP Configuration


Edit /etc/hostname, enter:

# vi /etc/hostname

Sample ip config:

[Link]

Edit /etc/network/interfaces, enter:

# vi /etc/network/interfaces

Sample static ip config:

iface eth0 inet static

address [Link]

network [Link]

netmask [Link]

broadcast [Link]

gateway [Link]

Edit /etc/[Link] and setup DNS servers, enter:

# vi /etc/[Link]

Sample dns static IP configurations:

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

Type the following commands to verify your new setup, enter:

# ifconfig eth0

# route -n

# ping [Link]

Configure the Network 5

You might also like