Module – 8 Network Configuration

What is networking?

Definition: In the world of computers, networking is the practice of interfacing two or more computing devices with each other for the purpose of sharing data. Computer networks are built with a combination of hardware and software.

Computer networks can be categorized in several different ways. One approach defines the type of network according to the geographic area it spans.

Local area networks (LANs), for example, typically span a single home, school, or small office building, whereas wide area networks (WANs), reach across cities, states, or even across the world.The Internet is the world’s largest public WAN.

Home Networking

While other types of networks are built and maintained by engineers, home networks belong to ordinary homeowners, people often with little or no technical background. Various manufacturers produce broadband router hardware designed to simplify home network setup. Home broadband routers allow devices in different rooms to efficiently share a broadband Internet connection, enable people to more easily share their files and printers within the network, and help with overall network security.

Home networks have increased in capability with each generation of new technology. Years ago, people commonly set up their home network just to connect a few PCs, share some documents and perhaps a printer. Now its common for households to also network game consoles, digital video recorders, and smartphones for streaming sound and video. Home automation systems have also existed for many years, but these too have grown in popularity more recently with practical systems for controlling lights, digital thermostats and appliances.

Business Networks

Small and home office (SOHO) environments use similar technology as found in home networks. Businesses often have additional communication, data storage, and security requirements that require expanding their networks in different ways, particularly as the business gets larger. Whereas a home network generally functions as one LAN, a business network tends to contain multiple LANs. Companies with buildings in multiple locations utilize wide-area networking to connect these branch offices together. Though also available and used by some households, voice over IP communication and network storage and backup technologies are prevalent in businesses. Larger companies also maintain their own internal Web sites, called intranets to help with employee business communication.

Networking and the Internet

The popularity of computer networks sharply increased with the creation of the World Wide Web (WWW) in the 1990s. Public Web sites, peer to peer (P2P) file sharing systems, and various other services run on Internet servers across the world.

Wired versus  Wireless Networking

Many of the same network protocols, like TCP/IP, work in both wired and wireless networks. Networks with Ethernet cables predominated in businesses, schools, and homes for several decades. More recently, however, wireless alternatives have emerged as the premier technology for building new computer networks, in part to support smartphones and the other new kinds of wireless gadgets that have triggered the rise of mobile networking.

What is IP address?

Internet Protocol address, an IP or IP address is an address of a computer or other network device on a network using TCP/IP. For example, the number “” is an example of such an address. These addresses are similar to an addresses used on a house and is what allows data to reach the appropriate destination on a network and the Internet.

There are five classes of available IP ranges: Class A, Class B, Class C, Class D and Class E, while only A, B, and C are commonly used. Each class allows for a range of valid IP addresses. Below is a listing of these addresses.

Class Address Range Supports
Class A to Supports 16 million hosts on each of 127 networks.
Class B to Supports 65,000 hosts on each of 16,000 networks.
Class C to Supports 254 hosts on each of 2 million networks.
Class D to Reserved for multicast groups.
Class E to Reserved for future use, or Research and Development Purposes.


Ranges 127.x.x.x are reserved for the loopback or localhost, for example, is the common loop back address. Range broadcasts to all hosts on the local network.


How to configure IP address (manually) in Linux servers:

Before delving into the interface configuration files, let us first itemize the primary configuration files used in network configuration. Understanding the role these files play in setting up the network stack can be helpful when customizing a Red Hat Enterprise Linux system.


The main purpose of this file is to resolve host names that cannot be resolved any other way. It can also be used to resolve host names on small networks with no DNS server. Regardless of the type of network the computer is on, this file should contain a line specifying the IP address of the loopback device ( as localhost.localdomain.

Following is a sample /etc/hosts file:

           IPAddress                  Hostname    		 Alias


This file specifies the IP addresses of DNS servers and the search domain. Unless configured to do otherwise, the network initialization scripts populate this file.

Following is a example /etc/resolv.conf



This file specifies routing and host information for all network interfaces. It is used to contain directives which are to have global effect and not to be interface specific.

Following is a example /etc/sysconfig/network file:


For each network interface, there is a corresponding interface configuration script. Each of these files provide information specific to a particular network interface.

Following is a example /etc/sysconfig/network-scripts/ifcfg-eth0 file:

vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Configuration for eth0
# This line ensures that the interface will be brought up during boot.
# eth0 - This is the main IP address that will be used for most outbound connections.
# The address, netmask, and gateway are all necessary.

To configure Alias IP on same interface:

vi /etc/sysconfig/network-scripts/ifcfg-eth0:0
# Configuration for eth0:0
# This line ensures that the interface will be brought up during boot.
# eth0:0

& restart network service:
# service network restart

To configure network  to get IP from DHCP server:

vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Configuration for eth0:0
# This line ensures that the interface will be brought up during boot.
& restart network service:
# service network restart

Verify your IP address:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:40:93:9C
     inet addr: Bcast: Mask:
     RX packets:1771 errors:0 dropped:0 overruns:0 frame:0
     TX packets:359 errors:0 dropped:0 overruns:0 carrier:0
     collisions:0 txqueuelen:1000
     RX bytes:138184 (134.9 KiB) TX bytes:49108 (47.9 KiB)
     Interrupt:67 Base address:0x2000

lo   Link encap:Local Loopback
     inet addr: Mask:
     inet6 addr: ::1/128 Scope:Host
     UP LOOPBACK RUNNING MTU:16436 Metric:1
     RX packets:390 errors:0 dropped:0 overruns:0 frame:0
     TX packets:390 errors:0 dropped:0 overruns:0 carrier:0
     collisions:0 txqueuelen:0
     RX bytes:29204 (28.5 KiB) TX bytes:29204 (28.5 KiB)

ping definition

Ping is a basic Internet program that allows a user to verify that a particular IP address exists and can accept requests.

Ping is used diagnostically to ensure that a host computer the user is trying to reach is actually operating. Ping works by sending an Internet Control Message Protocol (ICMP) Echo Request to a specified interface on the network and waiting for a reply. Ping can be used for troubleshooting to test connectivity and determine response time.

# ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=59 time=9.151 ms
64 bytes from icmp_seq=1 ttl=59 time=10.637 ms
64 bytes from icmp_seq=2 ttl=59 time=34.646 ms

# ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=5.958 ms
64 bytes from icmp_seq=1 ttl=64 time=5.272 ms
64 bytes from icmp_seq=2 ttl=64 time=4.112 ms
64 bytes from icmp_seq=3 ttl=64 time=144.064 ms

# ping  —————–> No network connection
PING ( 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>