You are on page 1of 7

EXPERIMENT NO.

1
AIM:
Study and use of common TCP/IP protocols and term viz. telnet rlogin ftp, ping, finger, Socket,
Port etc.

THEORY: -

TCP/IP (Transmission Control Protocol/Internet Protocol) is actually a suite, or stack, of


communication protocols that interconnect and work together to provide for reliable and efficient
data communications across an internet. TCP/IP is the basic communication language or protocol
of the internet. It can also be used as a communications protocol in a private network (either an
intranet or an extranet). It specifies how data is exchanged over the internet by providing end-to-
end communications that identify how it should be broken into packets, addressed, transmitted,
routed and received at the destination.
The two main protocols in the internet protocol suite serve specific functions. TCP defines how
applications can create channels of communication across a network. It also manages how a
message is assembled into smaller packets before they are then transmitted over the internet and
reassembled in the right order at the destination address.
IP defines how to address and route each packet to make sure it reaches the right destination.
Each gateway computer on the network checks this IP address to determine where to forward the
message.

Importance of TCP/IP
TCP/IP is nonproprietary and, as a result, is not controlled by any single company. Therefore, the
internet protocol suite can be modified easily. It is compatible with all operating systems, so it
can communicate with any other system. The internet protocol suite is also compatible with all
types of computer hardware and networks. TCP/IP is highly scalable and, as a routable protocol,
can determine the most efficient path through the network.
TCP/IP Protocol Stack Maps to the OSI Model
OSI Layer TCP/IP Layer TCP/IP Protocols
Application, Application Telnet, FTP, SMTP, TFTP,
Presentation, Session DNS, HTTP, DHCP
Transport Transport TCP, UDP
Network Internet IP, ICMP, ARP, RARP
Data Link, Physical Network Access Ethernet, Token Ring,

APPLICATION LAYER
The application layer of the TCP/IP Model consists of various protocols that performs all the
functions of the OSI model’s Application, Presentation and Session layers. This includes
interaction with the application, data transition and encoding, dialogue control and
communication coordination between systems.
The following are few of the most common Application Layer protocols: -

TELNET
The Telnet program provides a remote login capability. Telnet is a terminal emulation protocol
used to access the resources of a remote host. A host, called the Telnet server, runs a telnet server
application that receives a connection from a remote host called the Telnet client. This
connection is presented to the operating system of the telnet server as though it is a terminal
connection connected directly (using keyboard and mouse). It is a text-based connection and
usually provides access to the command line interface of the host. Remember that the application
used by the client is usually named telnet also in most operating systems. One should not confuse
the telnet application with the Telnet protocol.

HTTP
The Hypertext Transfer Protocol is foundation of the World Wide Web. It is used to transfer
Webpages and such resources from the Web Server or HTTP server to the Web Client or the
HTTP client. Web client is used when a web browser such as Internet Explorer or Firefox is
used. It uses HTTP to transfer web pages that you request from the remote servers.

FTP
File Transfer Protocol (FTP) enables a file on one system to be copied to another system. File
Transfer Protocol is a protocol used for transferring files between two hosts. Just like telnet and
HTTP, one host runs the FTP server application and is called the FTP server while the FTP client
runs the FTP client application. A client connecting to the FTP server may be required to
authenticate before being given access to the file structure. Once authenticated, the client can
view directory listings, get and send files, and perform some other file related functions. Just like
telnet, the FTP client application available in most operating systems is called ftp. So, the
protocol and the application should not be confused.

SMTP
Simple Mail Transfer Protocol is used to send e-mails. An email client is configured to send e-
mails then one is using SMTP. The mail client acts as a SMTP client here. SMTP is also used
between two mails servers to send and receive emails. However, the end client does not receive
emails using SMTP. The end clients use the POP3 protocol to do that.

TFTP
Trivial File Transfer Protocol is a stripped-down version of FTP. Where FTP allows a user to see
a directory listing and perform some directory related functions, TFTP only allows sending and
receiving of files. It is a small and fast protocol, but it does not support authentication. Because
of this inherent security risk, it is not widely used.

DNS
Every host in a network has a logical address called the IP address. These addresses are a bunch
of numbers. When user go to a website such as www.cisco.com then user is actually going to a
host which has an IP address, but user do not have to remember the IP Address of every
WebSite. This is because Domain Name Service (DNS) helps map a name such as
www.cisco.com to the IP address of the host where the site resides. This obviously makes it
easier to find resources on a network. When user type the address of a website in browser, the
system first sends out a DNS query to its DNS server to resolve the name to an IP address. Once
the name is resolved, a HTTP session is established with the IP Address.

DHCP
Every host requires a logical address such as an IP address to communicate in a network. The
host gets this logical address either by manual configuration or by a protocol such as Dynamic
Host Configuration Protocol (DHCP). Using DHCP, a host can be provided with an IP address
automatically. To understand the importance of DHCP, imagine having to manage 5000 hosts in
a network and assigning them IP address manually! Apart from the IP address, a host needs other
information such as the address of the DNS server it needs to contact to resolve names,
gateways, subnet masks, etc. DHCP can be used to provide all these information along with the
IP address.

TRANSPORT LAYER
The TCP/IP transport layer’s function is same as the OSI layer’s transport layer. It is concerned
with end-to-end transportation of data and setups up a logical connection between the hosts.
Network protocols are either connection-oriented or connectionless.
The functions of the transport layer are:
1. It facilitates the communicating hosts to carry on a conversation.
2. It provides an interface for the users to the underlying network.
3. It can provide for a reliable connection. It can also carry out error checking, flow control,
and verification.
Connection-oriented protocols - require that a direct connection be established between two
devices before data can begin to transfer between the devices. Packets are transferred using a
prescribed sequence of actions that include an acknowledgment to signal when a packet arrives,
and possibly resending the packet if there are errors. This method is reliable and, as a result of its
reliability and the overhead involved, much slower than connectionless protocols.
Connectionless protocols - Packets are sent over the network without regard to whether they
actually arrive at their destinations. There are no acknowledgments or guarantees, but user can
send a datagram to many different destinations at the same time. Connectionless protocols are
fast because no time is used in establishing and tearing down connections. Connectionless
protocols are also referred to as best-effort protocols.
A port is a logical connection place and specifically, using the Internet's protocol, TCP/IP, the
way a client program specifies a particular server program on a computer in a network. Higher-
level applications that use TCP/IP such as the Web protocol, Hypertext Transfer Protocol, have
ports with pre-assigned numbers. These are known as well-known ports that have been assigned
by the Internet Assigned Numbers Authority (IANA). Other application processes are given port
numbers dynamically for each connection. When a service (server program) initially is started, it
is said to bind to its designated port number.
Two protocols available in this layer are Transmission Control Protocol (TCP) and User
Datagram Protocol (UDP).

Transmission Control Protocol (TCP)


TCP is a connection oriented and reliable protocol that uses windowing to control the flow and
provides ordered delivery of the data in segments.TCP is a connection-oriented reliable, delivery
protocol that ensures that packets arrive at their destination error-free. Using TCP is similar to
sending a registered letter. When you send the letter, you know for sure that it will get to its
destination and that you'll be notified that it got there in good condition. On the Transport layer,
packets are referred to as segments. Combination of the IP address, Protocol (TCP or UDP) and
the Port number forms a socket at both the receiving and sending hosts. Since each socket is
unique, an application can send and receive data to and from multiple hosts. Figure 1.1 shows
two hosts communicating using TCP.

Fig 1.1: two hosts communicating using TCP

User Datagram Protocol (UDP)


User Datagram Protocol (UDP) is a connectionless-oriented protocol, meaning that it does not
provide for the retransmission of data grams (unlike TCP, which is connection oriented). UDP is
not very reliable, but it does have specialized purposes. If the applications that use UDP have
reliability checking built into them, the shortcomings of UDP are overcome.
NETWORK LAYER
A number of TCP/IP protocols operate on the Network layer of the OSI Model, including IP,
ARP, RARP, BOOTP, and ICMP. Remember, the OSI Network layer is concerned with routing
messages across the internetwork. It provides logical addressing, path determination and
forwarding.
The protocols available in this layer are: -
Internet Protocol (IP)
Where TCP is connection-oriented, IP is connectionless. IP provides for the best-effort delivery
of the packets (or datagrams) that it creates from the segments it receives from the Transport
layer protocols. The IP protocol provides for logical addressing on the Network layer.
The Internet Protocol (IP) is the most common protocol that provides these services. Also
working at this layer are routing protocols which help routers learn about different networks they
can reach and the Internet Control Message Protocol (ICMP) that is used to send error messages
across at this layer.
Internet Control Message Protocol (ICMP)
ICMP is essentially a management protocol and messaging service for IP. Whenever IP
encounters an error, it sends ICMP data as an IP packet.

NETWORK ACCESS LAYER


The Network Access Layer is the lowest layer of the TCP/IP protocol hierarchy. The protocols in
this layer provide the means for the system to deliver data to the other devices on a directly
attached network. It defines how to use the network to transmit an IP datagram. Unlike higher-
level protocols, Network Access Layer protocols must know the details of the underlying
network (its packet structure, addressing, etc.) to correctly format the data being transmitted to
comply with the network constraints. The TCP/IP Network Access Layer can encompass the
functions of all three lower layers of the OSI reference Model (Network, Data Link, and
Physical).
The protocols available in this layer are: -

ETHERNET
The Ethernet protocol is by far the most widely used one. Ethernet uses an access method called
CSMA/CD (Carrier Sense Multiple Access/Collision Detection). This is a system where each
computer listens to the cable before sending anything through the network. If the network is
clear, the computer will transmit. If some other nodes have already transmitted on the cable, the
computer will wait and try again when the line is clear. Sometimes, two computers attempt to
transmit at the same instant. A collision occurs when this happens. Each computer then backs off
and waits a random amount of time before attempting to retransmit. With this access method, it
is normal to have collisions. However, the delay caused by collisions and retransmitting is very
small and does not normally affect the speed of transmission on the network. The Ethernet
protocol allows for linear bus, star, or tree topologies. Data can be transmitted over wireless
access points, twisted pair, coaxial, or fiber optic cable at a speed of 10 Mbps up to 1000 Mbps.

Fig. 1.2: Symbol of Ethernet

TOKEN RING
The Token Ring protocol was developed by IBM in the mid-1980s. The access method used
involves token-passing. In Token Ring, the computers are connected so that the signal travels
around the network from one computer to another in a logical ring. A single electronic token
moves around the ring from one computer to the next. If a computer does not have information to
transmit, it simply passes the token on to the next workstation. If a computer wishes to transmit
and receives an empty token, it attaches data to the token. The token then proceeds around the
ring until it comes to the computer for which the data is meant. At this point, the data is captured
by the receiving computer. The Token Ring protocol requires a star-wired ring using twisted pair
or fiber optic cable. It can operate at transmission speeds of 4 Mbps or 16 Mbps. Due to the
increasing popularity of Ethernet, the use of Token Ring in school environments has decreased.

Fig. 1.3: Symbol of Token Ring

COMPUTER NETWORK’S TERMS


rlogin
rlogin (Remote Login) is a software utility for UNIX-like computer operating systems that
allows users to log in on another host via a network, communicating via TCP port.rlogin is also
the name of the application layer protocol used by the software, part of the TCP/IP protocol
suite. Authenticated users can act as if they were physically present at the computer.
rlogin is similar to the Telnet command, but has the disadvantage of not being as customizable
and being able to connect only to Unix hosts. rlogin is most commonly deployed on corporate or
academic networks, where user account information is shared between all the UNIX machines on
the network.

Ping
Ping is a computer network administration utility used to test the reachability of a host on an
Internet Protocol (IP) network and to measure the round-trip time for messages sent from the
host to a destination computer. The name comes from active sonar terminology. Ping operates by
sending Internet Control Message Protocol (ICMP) echo request packets to the target host and
waiting for an ICMP response. In the process it measures the time from transmission to reception
(round-trip time) and records any packet loss. The results of the test are printed in form of a
statistical summary of the response packets received, including the minimum, maximum, and the
mean round-trip times, and sometimes the standard deviation of the mean.

Finger
Finger was one of the first computer network applications. It enabled people to see who else was
using the computer system as well as find basic information on that user. To find information
about a specific user, it was necessary to know that person's email address. Typical information
provided by Finger would be a person's real name, their office location and phone number, and
they last time they logged in. Users also could modify the plan field to add whatever text they
wished.

Socket
A socket represents a single connection between two network applications. These two
applications nominally run on different computers, but sockets can also be used for interposes
communication on a single computer. Applications can create multiple sockets for
communicating with each other.

CONCLUSION: -
We have successfully studied about the TCP/IP Model, protocols and associated computer
network terms.

DISCUSSION: -
1. What do you mean by network?
2. What is OSI model and explain the different layers of the OSI model.?
3. Compare connection oriented and connection less protocols.
4. What do you mean by TCP/IP model and explain the different layers of TCP/IP model?
5. What is the importance of TCP/IP?
6. Compare TCP and UDP protocols.

You might also like