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

DCN - 5 - Four Types of Addressing

There are 4 levels of addresses used in TCP/IP protocols: 1. At the application layer, addresses are names like website domains or email addresses. 2. At the transport layer, addresses are port numbers that define the application programs running on a device. 3. At the network layer, addresses are global IP addresses that uniquely identify devices on the Internet. 4. At the link layer, addresses are physical or MAC addresses that uniquely identify devices within a local network.

Uploaded by

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

DCN - 5 - Four Types of Addressing

There are 4 levels of addresses used in TCP/IP protocols: 1. At the application layer, addresses are names like website domains or email addresses. 2. At the transport layer, addresses are port numbers that define the application programs running on a device. 3. At the network layer, addresses are global IP addresses that uniquely identify devices on the Internet. 4. At the link layer, addresses are physical or MAC addresses that uniquely identify devices within a local network.

Uploaded by

Shiza Sahoo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 62

Four levels of addresses used in TCP/IP Protocols

Related Chapter _9,13,24


•CLO-2
• Implement four addressing schemes used at
different layers of TCP/IP
Addressing in in TCP/IP

 We have logical communication between pairs of layers in


TCP/IP model.
 Any communication that involves two parties needs two
addresses (Source address and destination address).

 It looks as if we need five pairs of addresses (one pair per


layer), we normally have only four because the physical
layer does not need addresses; the unit of data exchange
at the physical layer is a bit, which definitely cannot have
an address.
Addressing at each layer
Relationship of layers and addresses in TCP/IP

• At the application layer


– Normally use names to define the site that provides services
– such as someorg.com, or the e-mail address, such as [email protected].

• At the transport layer


– Addresses are called port numbers
– These define the application-layer programs at the source and destination
– Port numbers are local addresses that distinguish between several programs running at the same
time.

• At the network-layer
– The addresses are global, with the whole Internet as the scope
– A network-layer address uniquely defines the connection of a device to the Internet.

• The link-layer addresses


– sometimes called MAC addresses
– Locally defined addresses
– Defines a specific host or router in a network (LAN or WAN)
Addressing
Figure -2inAddresses
the TCP/IP protocol suite
in TCP/IP

site name or
email
(specific
address).
Relationship of layers and addresses in TCP/IP
Types of Data deliveries

• A transport-layer protocol provides for logical communication


between application processes running on different hosts
• Application processes use the logical communication provided
by the transport layer to send messages to each other, free from
the worry of the details of the physical infrastructure used to
carry these messages
Relationship of layers and addresses in TCP/IP

• At the application layer


– Normally use names to define the site that provides services
– such as someorg.com, or the e-mail address, such as [email protected].

• At the transport layer


– Addresses are called port numbers
– These define the application-layer programs at the source and destination
– Port numbers are local addresses that distinguish between several programs running at the same
time.

• At the network-layer
– The addresses are global, with the whole Internet as the scope
– A network-layer address uniquely defines the connection of a device to the Internet.

• The link-layer addresses


– sometimes called MAC addresses
– Locally defined addresses
– Defines a specific host or router in a network (LAN or WAN)
Physical address

• We have already discussed ………….Just revise a


bit…………….
1. Physical address / MAC address

Most local-area networks use a 48-bit (6-byte) physical


address written as 12 hexadecimal digits; every byte (2
hexadecimal digits) is separated by a colon, as shown
below:

07:01:02:01:2C:4B

A 6-byte (12 hexadecimal digits) physical address.


Example _ Physical addresses

In Figure-4 a node with physical address 10 sends a frame to


a node with physical address 87. The two nodes are
connected by a link (bus topology LAN). As the figure shows,
the computer with physical address 10 is the sender, and the
computer with physical address 87 is the receiver.
2. Logical address

• An IP address of the system is called logical address.

• This address is the combination of Net ID and Host


ID.

• This address is used by network layer to identify a


particular network (source to destination) among the
networks.

• This address can be changed by changing the host


position on the network. So it is called logical address.
2. Logical address

• The IP address is the logical address assigned to


your connection by your ISP or network
administrator.

• The Internet Assigned Numbers Authority (IANA)


is responsible for the global coordination of the
• DNS Root
• IP addressing
• and other Internet protocol resources

• The logical address is what the network uses to pass


information along to your computer.
Example _ Logical Address / IP Address
• Figure shows a part of an
internet with two routers
connecting three LANs.

• Each device (computer or


router) has a pair of addresses
(logical and physical) for each
connection.

• In this case, each computer is


connected to only one link
and therefore has only one
pair of addresses.

• Each router, however, is


connected to three networks
(only two are shown in the
figure).

• So each router has three pairs


of addresses, one for each
connection.
The physical addresses will change from hop to hop,
but the logical addresses usually remain the same.
2. Logical address

• For details , please wait


3. Port address

• There are many application running on the computer. Each


application run with a port no.(logically) on the
computer.

• The protocols that primarily use ports are the


Transport Layer protocols ( TCP UDP etc.)

• This port no. for application is decided by the ‘Kernel of


the OS’ (kernel is a computer program that manages input/output requests from
software

• This ‘Port No.’ is called ‘Port address’.


Revision _ Kernel

 The kernel is a computer program that is


the core of a computer's operating system,
with complete control over everything in
the system.
 On most systems, it is one of the first
programs loaded on start-up (after the
bootloader).
 It handles the rest of start-up as well as
input/output requests from software,
translating them into data-processing
instructions for the central processing unit.
 It handles memory and peripherals like
A kernel connects the
keyboards, monitors, printers, and speakers application software to the
hardware of a computer
Note_What is an Application Program…….???
 An application program (app or application for short) is a computer program
designed to perform a group of coordinated functions, tasks, or activities for the
benefit of the user.

 Examples of an application include a word processor, a spreadsheet, an


accounting application, a web browser, a media player, an aeronautical flight
simulator, a console game or a photo editor.

 Applications may be bundled with the computer and its system software or
published separately, and may be coded as proprietary, open-source or university
projects.

 Apps built for mobile platforms are called mobile apps.


Can we distinguish Application Layer Protocol and
Application Program …..????
3. Port address

• In computer networking, a port is an application-specific


or process-specific software construct serving as a
communications endpoint in a computer's host operating
system.

• The purpose of ports is to uniquely identify different


‘applications’ or ‘processes’ running on a single
computer and thereby enable them to share a single
physical connection on Internet.
What is Socket and its relationship with IP address and Port
address ?
 What is a socket?

 To the kernel, a socket is an endpoint of communication.

 To an application, a socket is a file descriptor (File


System that lets the application read/write from/to the
network).

 Clients and servers communicate with each by reading


from and writing to socket descriptors.

 Note:
 Socket descriptors are implemented as file descriptors in the
UNIX System
What is Socket and its relationship with IP address and Port
address ?

• Socket address = IP address & Port number


• Transport layer at the receiving host delivers data to the
socket
• There should be a unique identifier for each socket.
• Socket identifier is called socket address
Let us discuss Client/server model
Server process - What is a Server process?

 A server process (program) fulfills the client


request by performing the task requested.

 Server programs generally receive requests


from client programs, execute database
retrieval and updates, manage data integrity
and dispatch responses to client requests
Server process - What is a Server process?

 The server process acts as a software engine that


manages shared resources such as databases,
printers, communication links, or high powered-
processors.

 The server process performs the back-end tasks that


are common to similar applications.

http://ecomputernotes.com/
computernetworkingnotes/network-
technologies/what-is-client-server-
Client process - What is a Client process?

 The client is a process that sends a message to a


server process requesting that the server perform a
task.

 Client programs usually manage the user-interface


portion of the application, validate data entered by the
user, dispatch requests to server programs, and
sometimes execute business logic.
Client/server model ?

 Client asks (request) – server provides (response)


 Typically: single server - multiple clients
 The server does not need to know anything about the
client
 even that it exists

 The client should always know something about the


server
 at least where it is located

1. Client sends request


Client Server
process process Resource
4. Client 3. Server sends response 2. Server
handles handles
response request

Note: clients and servers are processes running on hosts


(can be the same or different hosts).
What is Socket and its relationship with IP address and Port
address ?

 Address the machine on the network


 By IP address
 Address the process
 By the “port”-number
 The pair of IP-address + port – makes up a “socket-
address”
Client socket address Server socket address
128.2.194.242:3479 208.216.181.15:80

Server
Client
Connection socket pair (port 80)
(128.2.194.242:3479, 208.216.181.15:80)

Client host address Server host address


128.2.194.242 208.216.181.15

Note: 3479 is an Note: 80 is a well-known port


ephemeral port allocated associated with Web servers
by the kernel
 Well-known and registered port numbers
are used for server processes, ephemeral
port numbers are for client processes only
 Each time a client process initiates a UDP or TCP
communication it is assigned a temporary, or ephemeral,
port number to use for that conversation.
What ephemeral port is ?

 An ephemeral port is a short-lived transport protocol port for IP


communications allocated automatically from a predefined range by
the IP stack software.

 An ephemeral port is typically used by TCP, UDP, or SCTP as the


port assignment for the client end of a client–server communication
to a well known port on a server.

 Since the ports are used on a per request basis they are also called
dynamic ports or Private Ports
 These port numbers are assigned in a pseudo-random
way, since the exact number used is not important, as long
as each process has a different number.
Clients
Clients

 Examples of client programs


 Web browsers, FTP, Telnet, SSH(Secure Shell is a cryptographic
network protocol for secure data communication etc..)

 How does a client find the server?


 The IP address in the server socket address identifies the
host
 The (well-known) port in the server socket address
identifies the service, and thus implicitly identifies the
server process that performs that service.
Clients

 Examples of well known ports


 Port 7: Echo server
 Defined in Internet Protocol Suite RFC 862.
 It was originally proposed for testing and measurement of round-trip times in
IP networks

 Port 23: Telnet server


 Telnet program runs on your computer and connects your PC to a server on the
network. You can then enter commands through the Telnet program and they will be
executed as if you were entering them directly on the server console.

 Port 25: Mail server


 Port 80: Web server
 A web server is a computer system that processes requests via HTTP, the basic
network protocol used to distribute information on the World Wide Web.
 The term can refer either to the entire system, or specifically to the software that
accepts and supervises the HTTP requests
Using Ports to Identify Services

Server host 128.2.194.242

Client host Service request for Web server


128.2.194.242:80 (port 80)
(i.e., the Web server)
Client Kernel
Echo server
(port 7)

Service request for Web server


128.2.194.242:7 (port 80)
(i.e., the echo server)
Client Kernel
Echo server
(port 7)
Servers
Servers

 Servers are long-running processes.


 Run continuously until the machine is turned off.
 Each server waits for requests to arrive on a well-
known port associated with a particular service.
 Port 7: echo server
 Port 23: telnet server

 Port 25: mail server

 Port 80: HTTP server

 Other applications should choose between 1024 and 65535


Sockets as means for inter-process communication (IPC)

application layer application layer

Client Process Internet Server Process


Socket Socket
transport layer (TCP/UDP) transport layer (TCP/UDP)
OS network OS network
network layer (IP)
Internet network layer (IP)
stack stack
link layer (e.g. ethernet) link layer (e.g. ethernet)
physical layer
Internet physical layer

The interface that the OS provides to its networking


subsystem
Socket-programming using TCP

Socket: a door between application process and end-end-


transport protocol (UCP or TCP)
TCP service: reliable transfer of bytes from one process to
another

controlled by
controlled by process application
application process
developer
developer socket socket
controlled by TCP with TCP with controlled by
buffers, operating
operating buffers, internet system
system variables variables

host or host or
server server
Structure of Internet Applications
Using TCP & The Sockets API
3. Port address

IANA ranges
Port numbers are 16-bit integers between 0 – 65535

Well-known: Assigned and controlled by Internet Assigned Numbers


Authority IANA for example: FTP 20,21, TELNET 23, SMTP 25, HTTP
80

• 65536 is a power of two: (2 to the 16th power)


• TCP supports 65536 distinct ports (0-65535).
• As with TCP, UDP also supports 65536 ports (0-65535).
Well-known ports used with UDP
Well-known ports used by TCP
3. Port address

• Different IP addresses or protocols may use the same


port number for communication ?

• Note the combination of source and destination IP


address; and source and destination port numbers
together are globally unique. Thus, different IP
addresses or protocols may use the same port number
for communication; e.g., on a given host or interface
UDP and TCP may use the same port number, or on a
host with two interfaces, both addresses may be
associated with a port having the same number.
3. Port address

• Of the thousands of enumerated ports, about 250 well-


known ports are reserved by convention to identify
specific service types on a host.

• In the client-server model of application architecture,


ports are used to provide a multiplexing service on each
server-side port number that network clients connect to
for service initiation, after which communication can be
re-established on other connection-specific port
numbers
3. Port address
3. IP addresses versus port numbers

Process-to-Process delivery needs IP address


and Port number
Example

• Figure shows two computers communicating via the


Internet.
• The sending computer is running three processes at
this time with port addresses a, b, and c.
• The receiving computer is running two processes at
this time with port addresses j and k.
• Process a in the sending computer needs to
communicate with process j in the receiving
computer. Note that although physical addresses
change from hop to hop, logical and port addresses
remain the same from the source to destination.
Port addresses
A port address is a 16-bit address represented by one
decimal number as shown.E.g

753

A 16-bit port address represented


as one single number.
Q2-10.

 If a port number is 16 bits (2 bytes), what is the


minimum header size at the transport layer of the
TCP/IP protocol suite?
 The minimum header size will be (2*16 bits) 32 bits to
contain the sending and receiving port address.
4. Specific Addresses
 Some applications have user-friendly addresses that are
designed for that specific address.
 Examples
1. include the e-mail address (for example, [email protected])
2. and the Universal Resource Locator (URL) (for example, www.mhhe.com).

 The first defines the recipient of an e-mail


 second is used to find a document on the World Wide Web .

 These addresses, however, get changed to the corresponding


port and logical addresses by the sending computer
Types of Addresses in Internet

• Summary :
• Media Access Control (MAC) addresses in the network access
layer
▫ Associated w/ network interface card (NIC)
▫ 48 bits or 64 bits
• IP addresses for the network layer
▫ 32 bits for IPv4, and 128 bits for IPv6
▫ E.g., 123.4.56.7
• IP addresses + ports for the transport layer
▫ E.g., 123.4.56.7:80
• Domain names for the application/human layer
▫ E.g., www.google.com
Question

 Match the following to one or more layers of the TCP/IP


protocol suite:

 Route determination:

 Connection to transmission media:

 Providing services for the end user:


Question

 Match the following to one or more layers of the TCP/IP


protocol suite:

 Route determination:
 data-link, network.

 Connection to transmission media:


 physical.

 Providing services for the end user:


 Application.
Question

 Match the following to one or more layers of the TCP/IP


protocol suite:

 Creating user datagrams:

 Responsibility for handling frames between adjacent


nodes:

 Transforming bits to electromagnetic signals:


Question

 Match the following to one or more layers of the TCP/IP protocol


suite:

 Creating user datagrams:


 Transport, and Network.
 Responsibility for handling frames between adjacent nodes:
 Datalink.

 Transforming bits to electromagnetic signals:


 physical.
Thanks

You might also like