You are on page 1of 22

Unit 5: TCP/IP Networking and Network File System

TCP/IP Networking: Understanding Network Classes:

What is the TCP/IP Model?


TCP/IP Model helps you to determine how a specific computer should be
connected to the internet and how data should be transmitted between them.
It helps you to create a virtual network when multiple computer networks are
connected together. The purpose of TCP/IP model is to allow communication
over large distances.
TCP/IP stands for Transmission Control Protocol/ Internet Protocol. TCP/IP
Stack is specifically designed as a model to offer highly reliable and end-to-
end byte stream over an unreliable internetwork.
Here, are the essential characteristics of TCP IP protocol:
 Support for a flexible TCP/IP architecture
 Adding more system to a network is easy.
 In TCP IP protocols suite, the network remains intact until the source,
and destination machines were functioning properly.
 TCP is a connection-oriented protocol.
 TCP offers reliability and ensures that data which arrives out of
sequence should put back into order.
 TCP allows you to implement flow control, so sender never overpowers
a receiver with data.

Four Layers of TCP/IP model


In this TCP/IP tutorial, we will explain different layers and their functionalities
in TCP/IP model:
TCP/IP Conceptual Layers

The functionality of the TCP IP model is divided into four layers, and each
includes specific protocols.
TCP/IP is a layered server architecture system in which each layer is defined
according to a specific function to perform. All these four TCP IP layers work
collaboratively to transmit the data from one layer to another.
 Application Layer
 Transport Layer
 Internet Layer
 Network Interface
Four Layers of TCP/IP model

Application Layer
Application layer interacts with an application program, which is the highest
level of OSI model. The application layer is the OSI layer, which is closest to
the end-user. It means the OSI application layer allows users to interact with
other software application.
Application layer interacts with software applications to implement a
communicating component. The interpretation of data by the application
program is always outside the scope of the OSI model.
Example of the application layer is an application such as file transfer, email,
remote login, etc.
The function of the Application Layers are:
 Application-layer helps you to identify communication partners,
determining resource availability, and synchronizing communication.
 It allows users to log on to a remote host
 This layer provides various e-mail services
 This application offers distributed database sources and access for
global information about various objects and services.
Transport Layer
Transport layer builds on the network layer in order to provide data transport
from a process on a source system machine to a process on a destination
system. It is hosted using single or multiple networks, and also maintains the
quality of service functions.
It determines how much data should be sent where and at what rate. This
layer builds on the message which are received from the application layer. It
helps ensure that data units are delivered error-free and in sequence.
Transport layer helps you to control the reliability of a link through flow control,
error control, and segmentation or de-segmentation.
The transport layer also offers an acknowledgment of the successful data
transmission and sends the next data in case no errors occurred. TCP is the
best-known example of the transport layer.
Important functions of Transport Layers:
 It divides the message received from the session layer into segments
and numbers them to make a sequence.
 Transport layer makes sure that the message is delivered to the correct
process on the destination machine.
 It also makes sure that the entire message arrives without any error else
it should be retransmitted.

Internet Layer
An internet layer is a second layer of TCP/IP layes of the TCP/IP model. It is
also known as a network layer. The main work of this layer is to send the
packets from any network, and any computer still they reach the destination
irrespective of the route they take.
The Internet layer offers the functional and procedural method for transferring
variable length data sequences from one node to another with the help of
various networks.
Message delivery at the network layer does not give any guaranteed to be
reliable network layer protocol.
Layer-management protocols that belong to the network layer are:
1. Routing protocols
2. Multicast group management
3. Network-layer address assignment.
The Network Interface Layer
Network Interface Layer is this layer of the four-layer TCP/IP model. This layer
is also called a network access layer. It helps you to defines details of how
data should be sent using the network.
It also includes how bits should optically be signaled by hardware devices
which directly interfaces with a network medium, like coaxial, optical, coaxial,
fiber, or twisted-pair cables.
A network layer is a combination of the data line and defined in the article of
OSI reference model. This layer defines how the data should be sent
physically through the network. This layer is responsible for the transmission
of the data between two devices on the same network.
Differences between OSI and TCP/IP models

Difference between OSI and TCP/IP model


Here, are some important differences between the OSI and TCP/IP model:
OSI Model TCP/IP model

It is developed by ISO (International It is developed by ARPANET (Advanced


Standard Organization) Research Project Agency Network).
OSI model provides a clear distinction TCP/IP doesn’t have any clear
between interfaces, services, and distinguishing points between services,
protocols. interfaces, and protocols.

OSI refers to Open Systems TCP refers to Transmission Control


Interconnection. Protocol.

OSI uses the network layer to define


TCP/IP uses only the Internet layer.
routing standards and protocols.

OSI follows a vertical approach. TCP/IP follows a horizontal approach.

OSI model use two separate layers


physical and data link to define the TCP/IP uses only one layer (link).
functionality of the bottom layers.

OSI layers have seven layers. TCP/IP has four layers.

OSI model, the transport layer is only A layer of the TCP/IP model is both
connection-oriented. connection-oriented and connectionless.

In the OSI model, the data link layer and In TCP, physical and data link are both
physical are separate layers. combined as a single host-to-network layer.

Session and presentation layers are not There is no session and presentation layer
a part of the TCP model. in TCP model.

It is defined after the advent of the It is defined before the advent of the
Internet. internet.

The minimum size of the OSI header is 5


Minimum header size is 20 bytes.
bytes.

Most Common TCP/IP Protocols


Some widely used most common TCP/IP protocol are:
TCP:
Transmission Control Protocol is an internet protocol suite which breaks up
the message into TCP Segments and reassembling them at the receiving
side.
IP:
An Internet Protocol address that is also known as an IP address is a
numerical label. It is assigned to each device that is connected to a computer
network which uses the IP for communication. Its routing function allows
internetworking and essentially establishes the Internet. Combination of IP
with a TCP allows developing a virtual connection between a destination and
a source.
HTTP:
The Hypertext Transfer Protocol is a foundation of the World Wide Web. It is
used for transferring webpages and other such resources from the HTTP
server or web server to the web client or the HTTP client. Whenever you use
a web browser like Google Chrome or Firefox, you are using a web client. It
helps HTTP to transfer web pages that you request from the remote servers.
SMTP:
SMTP stands for Simple mail transfer protocol. This protocol supports the e-
mail is known as a simple mail transfer protocol. This protocol helps you to
send the data to another e-mail address.
SNMP:
SNMP stands for Simple Network Management Protocol. It is a framework
which is used for managing the devices on the internet by using the TCP/IP
protocol.
DNS:
DNS stands for Domain Name System. An IP address that is used to identify
the connection of a host to the internet uniquely. However, users prefer to use
names instead of addresses for that DNS.
TELNET:
TELNET stands for Terminal Network. It establishes the connection between
the local and remote computer. It established connection in such a manner
that you can simulate your local system at the remote system.
FTP:
FTP stands for File Transfer Protocol. It is a mostly used standard protocol for
transmitting the files from one machine to another.

Advantages of the TCP/IP model


Here, are pros/benefits of using the TCP/IP model:
 It helps you to establish/set up a connection between different types of
computers.
 It operates independently of the operating system.
 It supports many routing-protocols.
 It enables the internetworking between the organizations.
 TCP/IP model has a highly scalable client-server architecture.
 It can be operated independently.
 Supports a number of routing protocols.
 It can be used to establish a connection between two computers.

Disadvantages of the TCP/IP model


Here, are few drawbacks of using the TCP/IP model:
 TCP/IP is a complicated model to set up and manage.
 The shallow/overhead of TCP/IP is higher-than IPX (Internetwork
Packet Exchange).
 In this, model the transport layer does not guarantee delivery of
packets.
 Replacing protocol in TCP/IP is not easy.
 It has no clear separation from its services, interfaces, and protocols.

Setting Up a Network Interface Card (NIC):


How To Install a Network Interface Card (NIC)
A network interface card (NIC) is easy to install. The only considerations for
installation are that you have an available slot and that the NIC is designed
for the slot type you have. Most PCs use a PCI or a PCIe ("e" for express)
slot for a NIC. Older PCs used an ISA slot; which is now obsolete. Check
that you have an available slot and the slot type, before purchasing a NIC.
Caution:Please read our safety information before attempting any testing or
repairs.
 Before installing the network interface card, unplug the PC to avoid
an electrical shock hazard. Exercise caution as there are sharp edges on a
PC and its components. Always wear a static electricity discharge strap
when working with your PC's components to avoid damaging your PC.
Always follow the manufacturer's instructions that were supplied with your
modem.

1. Unplug the PC
2. Remove the cover
3. Remove the cover plate adjacent to the slot for your NIC
4. Align the NIC over the slot with the jack facing toward the outside of
the PC
5. Set the NIC into the slot and press down firmly. Make sure the
mounting bracket is properly aligned with any slot that might be
present. It may be necessary to gently rock the card from end to end
to secure it in the slot. The gold contacts at the bottom of the NIC
should nearly or completely disappear into the slot. The card should
be level and straight.
6. Secure the NIC mounting bracket to the case with a screw (or replace
the securing mechanism your case uses.
7. Replace the cover
8. Plug in the PC
9. Plug in the ethernet wire to the RJ-45 jack and plug the other end into
the your DSL modem, hub, router or if using a crossover wire, directly
to another PC.
That completes the hardware installation, next you will need to start the
computer and complete the software installation. Your NIC should have
come with a disk which contains the appropriate drivers.
Follow the manufacturer's instructions for installing the software. Windows
will detect the NIC and start the hardware wizard; simply follow the
prompts. Some manufacturers require you to cancel the hardware wizard
and complete the installation using their own installation instructions.
To connect your PC to a local area network, you will have to configure your
operating system software. In Windows, use the Network Wizard or read
our article on the topic.
Configure Network Interface Card (NIC) on Development
Computer
To connect the Xilinx® Zynq® hardware board to the development computer,
you must configure an available network connection on the development
computer. Follow the steps outlined for your specific operating system.
Windows
1. Open the Control Panel.
2. Set View by to Category.
3. Click Network and Internet.
4. Click Network and Sharing Center.
5. On the left pane, click Change adapter settings.
6. Right-click the local area network connection that is connected to the radio
hardware and select Properties.
 If an unused network connection is available, the local area connection
appears as Unidentified network.
 If you plan to reuse your network connection, select the local area connection
that you plan to use for the radio hardware.
 If you have only one network connection, check if you can connect
wirelessly to the existing local area network. If you can, you can use the
network connection for the radio hardware.
 You can use a pluggable USB to Gigabit Ethernet LAN adapter instead of a
NIC. The instructions are the same.
7. On the Networking tab of the Properties dialog box, clear all options
except Internet Protocol Version 4 (TCP/IPv4). Other services, particularly
antiviral software, can cause intermittent connection problems with the radio
hardware.
8. Double-click Internet Protocol Version 4 (TCP/IPv4).
9. On the General tab, select Use the following IP Address.
10.The default IP address of the Xilinx Zynq hardware board is 192.168.1.101.
The development computer network connection must be on the same subnet as
the hardware board. To meet this requirement, a compatible IP address must be
assigned to the development computer network connection. Set the network IP
address to 192.168.1.x, where x is any number in the range 1 through 255,
apart from 101.
11.Leave the subnet mask set to the default value of 255.255.255.0 and
click OK.

Understanding Subnetting:
An IP address is the combination of two addresses; network address and host address.
Network address is always written first in sequence. While reading an IP address how
much portion should be treated as network address and how much portion should be
treated as host address is decided by an another address known as Subnet mask.
An IP address is always used with Subnet mask. Without subnet mask an IP address is an
ambiguous address and vice versa.
Both IP address and Subnet mask consists 32 bits. These bits are divided in four octets.
Octets are separated by periods and written in a sequence.

A Subnet mask can be written in two ways; in full form and in abbreviated form. In full
form a decimal value of each octet is written along with IP address. In abbreviated form
only the number of network bits are written along with IP address. Following table lists
some examples of both types.
IP address with full subnet mask IP address with abbreviated subnet mask

10.0.0.0 10.0.0.0/8
255.0.0.0

172.168.1.0 172.168.1.0/16
255.255.0.0

192.168.1.0 192.198.1.0/24
255.255.255.0

In Subnetting questions, mostly second type is used.


There are five IP classes A, B, C, D and E. From these, only first three classes A, B and C
are used in Subnetting. Subnetting cannot be done in class D and E.
In class A, B and C first 8, 16 and 24 bits are reserved for network address respectively. In
all three classes last 2 bits are reserved for host addresses.
If we exclude reserved network bits and host bits from total IP bits, we will get
Subnetting eligible host bits.
Subnetting can be done only in Subnetting eligible host bits.

To know how many Subnetting bits are required to create how many networks, we use
power of 2.
For example if we want to know many networks can be created from 3 Subnetting bits,
we will use power 2 three times.
23 = 8
We can create 8 networks from 3 Subnetting host bits.
Power of 2
2X Value 2X Value 2X Value 2X Value

1 2 9 512 17 131072 25 33554432


2 4 10 1024 18 262144 26 67108864

3 8 11 2048 19 524288 27 134217728

4 16 12 4096 20 1048576 28 268435456

5 32 13 8192 21 2097152 29 536870912

6 64 14 16384 22 4194304 30 1073741824

7 128 15 32768 23 8388608 31 2147483648

8 256 16 65536 24 16777216 32 4294967296

In each network first address and last address are always reserved for network address
and broadcast address respectively. Besides these two addresses, all remaining
addresses are considered as valid host addresses.
Subnetting Questions
A Subnetting question can be asked in three ways.
1. Find the number of networks and number of host addresses in each network
2. Find the type of given address, network ID and broadcast ID
3. Build the Subnet mask
Let’s understand the each type of Subnetting question in detail with examples.
Finding the number of networks and host addresses in each network
In this type of questions, we are asked to find the number of networks and host
addresses in each network from a given address space. Let’s take some examples.
Following table lists 15 imaginary networks. Find the number of networks, total hosts
and valid hosts in each network.

What are Routers?


A Router is a networking layer system used to manage and forward data packets to
computer networks. Data packets are sent through the e-mail and web pages in the
form of data packets. It is responsible for analyzing, forwarding, and receiving the data
packets to other networks. The packet's destination or target IP address is determined
by a router, and the best way to transmit the packet is also determined by using
forwarding tables and headers.
A Router is linked to two or more data networks from different IP addresses. When a
data packet comes in the line, it reads the network address data in the packet header to
decide its destination. Using the routing table or routing policy directs the packet on its
path to the next network. It is primarily used in Wide Area Network (WAN) and Local
Area Network (LAN) domains. It is more expensive than the other network devices
such as the hub, switch, and many more.

Working with Gateways and Routers,


Configuring Dynamic Host Configuration Protocol,
Configuring the Network Using the Network
What is Gateway?
A gateway is simply a device or hardware that acts as a "gate" between the networks.
We can also define it as a node that acts as an entry for other network nodes. It is also
responsible for facilitating the traffic flow within the network. Gateway uses more than
one communication protocol, so its activities are more complicated than a router or a
switch.
A gateway is essentially a system used to communicate between networks with different
protocols and are responsible for converting one protocol into another. The gateway is
a computer device that's responsible for routing traffic from the primary workstation to
the outside network for every workplace form. It is responsible for providing access to
the internet for households, thereby serving as an internet service provider.

Main Differences between the Router and Gateway


Here, we are going to discuss the main differences between the Router and Gateway.

The complexity of the Components


The single access point in the gateway outside the network is the main difference
between router and gateway. Based on the gateway's criticality, it either serves as a
server with the gateway application installed or acts as a linking mechanism to others
between several computer networks. The two networks should have a gateway that
allows the networks to communicate as an entry and exit endpoint if any N network
wants to reach the M network. Gateways are doors to the network that determine the
network's boundaries and edges. In comparison, routers determine the minimum
possible distance from computer M to computer N to be transported by data packets.

Security
Routers have to be secluded from being filled with massive data and heavy traffic. It is
important to ensure that congestion between the routing paths can be minimized
acceptably, so several routing tables should be designed to map the network's data
travel process. Whereas the gateway is important, since it is the endpoint for the
network, it should be highly protected to avoid a virus attack. The data passes via the
gateway could be easily accessed. If a single router is flooded or granted, the particular
router can be disabled by the customer. In order to get the data over the network,
another router determines the shortest possible way. However, if the user eliminates the
gateway, it leads to the whole down of the network.

Components Configuration
The routers are designed with a list of IP addresses from the routing tables that can
transfer the router data. While the gateway is configured by specifying the
recommended internal and external IP addresses, it has two ports to iterate between
routers and gateways for internal and external IPs.

Routing and Managing the Traffic Flow


The two devices are used to monitor network traffic between two or more different
networks. However, a minimum of two network cards can be applied in the system if the
user finds it difficult to manage traffic. The gateway handles traffic between two similar
networks easily, while routers control the same network's traffic flow.

Head to Head Comparison between the Router and


Gateway
Let us discuss the head to head comparison between Router and Gateway through the
below tabular form.

Features Router Gateway

Definition A Router is a networking layer system A gateway is simply a device or hardware that acts
used to manage and forward data as a "gate" between the networks. It could also be
packets to computer networks. defined as a node that acts as an entry for other
network nodes.

Working Usually, routers run on the 3rd layer of Gateway interprets the network system as
Principle the protocol and transmit the packets endpoints from one packet to another.
from one system to another. A router
chooses the network's path to
transport the data packets.

Hosting It is available only to dedicated It is hosted on the dedicated application, physical


applications. servers, and virtual applications.
Networks It routes the data packets via similar It connects two dissimilar networks.
networks.

Deployment It is deployed on the router hardware The gateway is deployed as the virtual or physical
in a specific appliance. server or the specific appliance.

OSI Layer It can operate only on 3 and 4 layers. It can operate only on the 5 layers.

Dynamic Router supports dynamic routing. Gateway doesn't support dynamic routing.
Routing

Associated The router is also called a wireless The gateway is also called a gateway router, proxy
terms router and an Internet router. server, and voice gateway.

Component's The router operates by installing The gateway works by distinguishing between the
Operating different routing data for different network structure and the components available
Process networks, and the destination address outside the network.
is based on traffic.

What is Linux NFS Server?


Network File Sharing (NFS) is a protocol that allows you to share
directories and files with other Linux clients over a network. Shared
directories are typically created on a file server, running the NFS server
component. Users add files to them, which are then shared with other
users who have access to the folder.
An NFS file share is mounted on a client machine, making it available
just like folders the user created locally. NFS is particularly useful when
disk space is limited and you need to exchange public data between
client computers.
How to Configure NFS Server in Redhat Linux:
Network File System (NFS) protocol allow Linux client to mount remote file systems and
interact with those file systems as they are mounted locally.
 NFS was developed by Sun Microsystems in 1980
 NFS stand for Network File System
 NFS is used to share files and printer between Linux / Unix systems
 Red Hat Enterprise Linux supports NFSv2, NFSv3, and NFSv4 clients.
 By default RHEL use NFSv4 if the server supports it.
NFSv1
NFSv1 was the development stage of NFS protocol. It was used only for in house
experimental purpose. When a stable version of NFS was ready, Developers decided to
release it as the new version of NFS known as NFSv2.
NFSv2
 NFSv2 supports only 32 bit.
 NFSv2 only allowed the first 2 GB of a file to be read
 NFSv2 operated only over UDP
NFSv3
 NFSv3 supports 64 bit file system.
 NFSv3 can handle files larger than 2 GB.
 NFSv3 supports asynchronous writes on the server. asynchronous writes improve write
performance.
 NFSv3 supports additional file attributes in many replies, to avoid the need to re-fetch them.
 NFSv3 supports READDIRPLUS operation. READDIRPLUS operation get file handles and
attributes along with file names when scanning a directory.
 NFSv3 supports TCP. Using TCP as a transport made NFS over a WAN more feasible.
NFSv4
 NFSv4 retains all NFSv3 advantages.
 NFSv4 supports ACLs.
 NFSv4 uses the virtual file system to present the server's export.
 NFSv4 supports Pseudo file system. Pseudo File System provide maximum flexibility. Exports
Pathname on servers can be changed transparently to clients.
 NFSv4 have locking operations as the part of protocol which keep track of open files and
delegations.
 NFSv4 works through firewalls and on the Internet.
Configure NFS Server
Our first task is to install the necessary RPM. Two RPM are required for NFS server
 nfs-utils
 rpcbind
nfs-utils
This is the main RPM which provide nfs service.
rpcbind
NFS depends on Remote Procedure Calls(RPC) service which is controlled by rpcbind
service. In earlier version of RHEL portmap service was used to map RPC program
numbers to IP address port number combinations. This service is now replaced by
rpcbind to enable IPv6 support.
If you do not have above RPM installed, than first install them. You can use any method
to install RPM.
"NFS file server" is the primary group associated with NFS. So if you have configured
yum repository than following command will install the mandatory packages[nfs-utils
and nfs4-acl-tools] from that group.
#yum groupinstall" NFS file server"

Or alternatively you can use


# yum install nfs* -y

If you do not have yum repository use RPM command to install these packages. Go in
the folder which contain RPM (In installation disk of RHEL, Package folder contains all
RPM ) and run following command.
#rpm -ivhnfs* --nodeps --force
#rpm -ivhrpcbind* --nodeps --force

Our second task is to verify that the NFS services are installed. This can be done form
following command.
rpm –qanfs-utils
Verify that rpcbind package is installed.
rpm –qarpcbind

For this article I assume that you have both packages installed.
Following services are associated with NFS daemons. Each service have its script file
stored in init.d directory.
/etc/init.d/nfs Main control script for NFS Daemons which control NFS services.

/etc/init.d/nfslock Script for lock files and the statd daemon, which locks and provides status of files those are c

/etc/init.d/portreserve Replacement script for the portmap which used to set up ports for RPC services.

/etc/init.d/rpcbind RPC program number converter.

/etc/init.d/rpcgssd Script for RPC-related security services.

/etc/init.d/rpcidmapd Configuration script used for mapping of NFS user ID to LDAP and Kerberos systems.

/etc/init.d/rpcsvcgssd Control script for the server side of RPC-related general security services.

You can start each script directly by following command


#/etc/init.d/[script name]
For example to start nfs service
#/etc/init.d/nfs
Or you can use service command to start / stop /restart the service
#service nfs start
nfs and rpcbind are the compulsory services for nfs daemons.
Make sure nfs and rpcbind scripts are active before you configure NFS server.
Start the services

Make sure that services remain on after reboot


Check the status to services it must be running

How to configure NFS client on RHEL6


Check necessary RPM

Install if you are missing them


Start the necessary services and Verify the status of services it must be running

Make sure service remain on after reboot

Check connectivity form server

You might also like