0% found this document useful (0 votes)
17 views

Lecture 5

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Lecture 5

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Lecture 5

TCP/IP Protocols

June 16, 2023


Computer Network II
Outlines
2

 Addressing
 Application Layer protocols:
HTTP,FTP, SMTP,DNS, DHCP,TELNET
 Transport Layer protocols:
UDP, TCP
 Internet Layer protocols:
IP, ICMP, NAT
 Address Mapping
ARP
Computer Network II
ADDRESSING
3
 Four levels of addresses are used in an internet
employing the TCP/IP protocols: physical, logical, port,
and specific.

48 bit address 32 bit address 16 bit address


(0-65535)
Computer Network II
Physical Addressing
4

 It is included in the frame used by the data link layer. It


is the lowest-level address.
 Ethernet uses a 6-byte (48-bit) physical address that is
imprinted on the network interface card(NIC).
 It also called MAC Address( Media Access Control)
address or hardware address.
 It is a unique identifier assigned to each network
interface card (NIC) by the manufacturer.
 It is typically represented as a series of six hexadecimal
numbers separated by colons or hyphens.

Computer Network II
Cont’
5

Computer Network II
Port Addressing
6

 IP address and physical address are necessary for data to


travel from a source to destination host.
 Arrival at the destination host is not the final goal of
data communication on the Internet.
 The end goal of Internet communication is a process
communicating with another process.
 We need to label different processes to enable receiving
data simultaneously.
 Port Address is the label assigned to a process, 16 bit in
length.

Computer Network II
Common /reserved port addresses- Example
7

Computer Network II
Cont’
8

Computer Network II
Specific Addressing
9

 It is designed by users to access web resources through


different applications on the network.
 Some applications have user-friendly addresses that are
designed for that specific address.
Example:
 e-mail addresses ( [email protected] ) to define the
recipient of an e-mail
 URL addresses ( https://www. uog.edu.et ) to find a
document on the world wide web

Computer Network II
Logical Addressing
10

 Logical addresses are necessary for universal


communications that are independent of underlying
physical networks.
 Physical addresses are not adequate in an internetwork
environment where different networks can have different
address formats.
 A universal addressing system is needed in which each
host can be identified uniquely, regardless of the
underlying physical network.
 A logical address in the Internet is currently a 32-bit
address that can uniquely define a host connected to the
Internet.
 No two publicly addressed and visible hosts on the Internet
can have the same IP address.
Computer Network II
Cont’
11

 Every device connected to the internet, whether it's a


computer, smartphone, or any other networked device,
is assigned a unique identifier called an IP address.
 An IP address is a numerical label that consists of a
series of numbers separated by periods (e.g.,
10.139.10.10).
 It serves as the device's virtual address, enabling it to
send and receive data over the internet.

Computer Network II
Cont’
12

Computer Network II
Application Layer Protocols
13

 Some of the network applications that worked by


different protocols:
 Hyper Text Transfer Protocol

 File Transfer Protocol

 Simple Messaging Transfer Protocol

 Domain Name System

 Dynamic Host Configuration Protocol

 Telnet

Computer Network II
HTTP
14

 HTTP is the protocol used for transferring hypertext


documents on the World Wide Web.
 It defines how web browsers communicate with web
servers, allowing users to request and retrieve web
pages, images, videos, and other web resources.
 It is a request/response protocol between a client
and a server.
 It works on the well known TCP port 80.

Computer Network II
Cont’
15
Client 1: PC running
chrome
Client/server model

 client: browser to
request & receive Web
objects
Server

 Server: Web server


sends objects in
Client2: Linux running
response to requests FireFox

HTTP working principle


Computer Network II
Cont’
16

1. Client initiates TCP connection to server.

2. Server accepts TCP connection from client

3. Messages exchanged between HTTP client and HTTP


server

4. TCP connection closed

Computer Network II
FTP
17

 FTP is a protocol used for transferring files over a


network.
 It provides a set of commands for navigating a remote file
system, uploading and downloading files, and managing
file operations.
 FTP also operates in a client-server model, where a client
initiates the connection and communicates with an FTP
server to perform file transfers.

Computer Network II
Cont’
18

Computer Network II
FTP Advantages and Disadvantages
19

Advantages:

 Simple implementation

 Universal application

 Wide used and standardized

Disadvantages:

 Multiple TCP/IP connections are used

 Hard to filter active mode FTP traffic on the client side.

 High latency compared to HTTP


Computer Network II
SMTP
20

Simple Mail Transfer Protocol (SMTP):


 SMTP is an internet protocol for sending and receiving
email.
 It is responsible for the transmission of email
messages between mail servers.

Computer Network II
DNS
21

DNS (Domain Name Server /System):

 DNS is an Internet service that translates domain


names into IP addresses.

 Because domain names are alphabetic, they're easier to

remember for human. The Internet however, is really


based on IP addresses.

 Therefore, a DNS service must translate the name into

the corresponding IP address.


Computer Network II
Cont’
22

Example:

www.facebook.com

10.154.5.10

Computer Network II
Cont’
23

 URL : stands for Uniform Resource Locator.

 The unique address of any web page.

 It tells your computer where the information is stored so it

can be viewed.
Example:
https://[www].[facebook.com]/ [Learn-the-Net -330002341216]/

Sub domain
Protocol Domain
path/directory

By Lake.F
DNS design goals
24

The primary goal is a consistent name space which will be


used for referring to resources.

The database which holds the names must be distributed.

The system should be useful across a wide spectrum of


host capabilities.

 Both personal computers and large timeshared hosts


should be able to use the system.

Computer Network II
Name Space
25

 Internet is divided it several hundred top level domains,

where each domain covers many hosts.

 Each domain is partitioned into sub domains, these are

further partitioned and so on.

 The leaves of the tree represent a company/organization

and contain thousands of host

 The root of the tree is a special node with new label as

shown in the following figure.


Computer Network II
Distributed, Hierarchical Database
26

First level domains


Root DNS Servers/TLD

com DNS servers org DNS servers edu DNS servers

est.org uog.edu ju.edu


gmail.com amazon.com DNS servers DNS servers
DNS servers DNS servers
DNS servers

Second level domains


Computer Network II
Cont’
27

 Client wants IP for www.amazon.com:

 client queries a root server to find com DNS server

 client queries com DNS server to get amazon.com DNS

server

 client queries amazon.com DNS server to get IP address

for www.amazon.com

Computer Network II
TLD and Authoritative Servers
28

 Top-level domain (TLD) servers:

 responsible for com, org, net, edu, etc,

 Authoritative DNS servers:

 organization’s DNS servers, providing authoritative


hostname to IP mappings for organization’s servers (e.g.,
Web, Mail).
 Can be maintained by organization or service provider

Computer Network II
Cont’
29

 The first level of the generic domain convention


allows seven possible three character labels
describing organization type.
1. com. commercial organization
2. edu. educational institution .
3. gov. government institution.
4. int. international organization.
5. mil. military group.
6. net. Network support center.
7. org. organizations other than listed above.

Computer Network II
DHCP
30

Dynamic Host Configuration Protocol (DHCP):


 DHCP is a protocol for assigning dynamic IP addresses to

devices on a network.

 With dynamic addressing, a device can have a different IP

address every time it connects to the network.

 In some systems, the device's IP address can even change while

it is still connected.

 DHCP also supports a mix of static and dynamic IP addresses.

Computer Network II
Cont’
31

 Every computer on a network must have IP address.

Two ways of assigning an IP address:


1. Static IP
 A user assigns an IP address manually

 IP address is unique for each device


 If manual, IP conflict will happen

Solution
2. Dynamic IP

Computer Network II
Cont’
32

 Dynamic IP addressing is where a computer gets an

IP address from a DHCP server.


 A DHCP server automatically assigns a computer:

 IP address

 Subnet mask

 Default gateway

 DNS server

Computer Network II
Cont’
33

Computer Network II
Cont’
34

Lease time
 DHCP server assigns IP address as a lease.

 Lease is amount of time an IP address is assigned to the

computer.

 It help to make sure the DHCP server does no run out of IP

address.

 When the lease is expired, the computer send a signal to

renew the IP address lease


Computer Network II
TELNET
35

TELNET(TELecommunication NETwork):
 TELNET was developed in 1969 beginning with RFC 15.

 TELNET clients have been available on most Unix

systems for many years and are available for virtually all
platforms.

Computer network II
Cont’
36

 Most network equipment and OSs with a TCP/IP

stack support some kind of TELNET service server


for their remote configuration.

 Once the connection is established, he/she would

then log in with his/her account information and


execute operating system commands remotely on
that computer.

Lake F. Advanced Computer Networks


Transport Layer protocols
37

 TCP is a reliable, connection-oriented protocol that


operates on top of IP.
 It breaks data into packets, ensures their reliable delivery,
and provides mechanisms for flow control and congestion
control.
Application by TCP:
• Browsing email - HTTP

• File Transfer - SMTP

• Congestion Control and Retransmission

Computer Network II
Cont’
38

 UDP is a simpler, connectionless protocol that also


operates on top of IP.
 It is used for lightweight, low-latency communication
and is often employed in scenarios where real-time
streaming, gaming, or voice/video conferencing is
involved.
Application by UDP:

• Online games

• VoIP

Computer Network II
TCP vs UDP
39
 Connection less
 Connection- oriented
 Services are like postal
 Services are like telephone system
system.
 Services are used in case of long  Services are used in bursty
and steady communication communication.

 Connection is necessary  Connection is not necessary

 Give guarantee of reliability  Don't give guarantee of


reliability.
 Data packets follow same route.
 Data packets may follow any
route.

Computer Network II
Internet Layer Protocols
40

 There are common internet layer protocols:


 IP
 ICMP
 NAT

Computer Network II
IP
41

 Internet Protocol (IP) is the method or protocol by


which data is sent from one computer to another on
the internet.
 Each computer(known as a host) on the internet has at
least one IP address that uniquely identifies it from all
other computers on the internet.
 IP is the defining set of protocols that enable the
modern internet.
There are two versions of IP addressing in use
today:
 IPv4 (Internet Protocol version 4) and IPv6 (Internet
Protocol version 6).
Computer Network II
Cont’
42

 However, with the growth of the internet and the


increasing number of devices connected to it, IPv4
addresses have become scarce.
 IPv6 was developed to address the limitations of
IPv4.
 It uses a 128-bit addressing scheme, providing an
enormous number of possible addresses
(approximately 3.4 x 10^38) to accommodate the
expanding network of devices.
 IPv6 adoption is gradually increasing to meet the
demand for more IP addresses.
Computer Network II
Cont’
43

 IPv6 is the latest version of the Internet Protocol,


designed to replace IPv4 due to its limited address
space.
 IPv6 uses 128-bit addresses, providing a significantly
larger number of unique IP addresses compared to
IPv4.
 It offers improved security, better support for mobile
networks, and additional features such as auto-
configuration and easier network renumbering.

Computer Network II
Cont’
44

 Despite all short-term solutions, address depletion is

still a long-term problem for the Internet.

 This and other problems in the IP protocol itself have

been the motivation for IPv6.

Computer Network II
IPv6 address in binary and hexadecimal colon notation
45

Computer Network II
ICMP
46
 ICMP(Internet Controlled Messaging protocol) generates a low-
level request and response to ensure continual connectivity
between two network devices.
 ICMP is a control protocol; hence it does not transmit
application data, but rather information about the network
status.
 ICMP is mainly used to send error messages.

 There are currently many network utilities based on ICMP


messages that can detect errors in the communications of
network applications.
Computer Network II
Cont’
47

 ICMP pings are request packets used to tests the status or

availability of a device or server on a network.

 The ICPM then measures the ping’s round-trip time for

messages sent between the originating host and the


destination.

 A ping is lightweight with small packets, very flexible, and

makes little interference on the network operations.

Computer Network II
NAT
48

 NAT (Network Address Translation): NAT is a


technique used to translate between private IP
addresses used within a local network and public IP
addresses used on the Internet.
 It allows multiple devices in a private network to
share a single public IP address, enabling them to
access the Internet.
 NAT provides a form of firewall by hiding internal IP
addresses from external networks.

Computer Network II
Cont’
49

• More hosts to be connected to the internet & IP addresses

are in depletion.

Solution: NAT (used in router).

• Preserve the limited amount of IPV4 public IP addresses.

• NAT translates a set of IP addresses in to another set of IP

addresses. (Public Private)

 Translate from private IP address to public IP address.

Read about private and public IP addresses


Computer Network II
ARP
50

 ARP (Address Resolution Protocol) is a network layer


communication protocol defined in RFC826.
 It's used to dynamically map an internet protocol (IP)
to a hardware or MAC address.
 If a primary host wants to communicate with another
destination host, it sends out a broadcast request to the
entire network.
 The MAC address of the destination host, which
matches the request, is returned to the primary host as
a response to the request.

Computer Network II
Address Mapping
51

 The process of mapping an internet address to a physical


address is typically handled by IP and the Address
Resolution Protocol (ARP).
Mapping process:
 When a device wants to communicate with another
device on the same local network (subnetwork), it checks
if it has the destination device's IP address and MAC
address in its ARP cache.
 The ARP cache maintains a table of IP-to-MAC address
mappings.
 If the mapping is not present in the ARP cache, the
device sends an ARP request broadcast message on the
local network, asking "Who has IP address X?".

Computer Network II
Cont’
52

 This message is received by all devices on the network.


 The device with the corresponding IP address responds
with an ARP reply message, containing its MAC address.
 This reply is usually unicast directly to the requesting
device.
 The requesting device updates its ARP cache with the IP-
to-MAC address mapping obtained from the ARP reply.

Computer Network II
Cont’
53

 If the destination device is not on the local network, the


sending device needs to determine the next hop (router) to
reach the destination.
 It consults its routing table, which contains information
about network segments and the associated next-hop
routers.
 The sending device forwards the packet to the appropriate
next-hop router based on the routing table information.
 This process repeats until the packet reaches the destination
network and eventually the destination device.

Computer Network II
Cont’
54

 It's important to note that the mapping between IP


addresses and physical addresses (MAC addresses) is
primarily relevant in local network communication.
 When communication occurs across different
networks or over the internet, the mapping is done at
various network layers using techniques like IP
routing and domain name resolution.

Computer Network II
Computer Network II

You might also like