0% found this document useful (0 votes)
14 views26 pages

DC-Lec-09 (Addresses)

This document discusses the four levels of addresses used in TCP/IP networks: 1. Physical addresses (MAC addresses) which identify devices on a local network segment. 2. Logical addresses (IP addresses) which allow devices to communicate across multiple networks. 3. Port addresses which identify specific applications and processes running on a device. 4. Specific addresses like email addresses and URLs which are translated to IP addresses and port numbers for routing.

Uploaded by

Farman Afridi
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)
14 views26 pages

DC-Lec-09 (Addresses)

This document discusses the four levels of addresses used in TCP/IP networks: 1. Physical addresses (MAC addresses) which identify devices on a local network segment. 2. Logical addresses (IP addresses) which allow devices to communicate across multiple networks. 3. Port addresses which identify specific applications and processes running on a device. 4. Specific addresses like email addresses and URLs which are translated to IP addresses and port numbers for routing.

Uploaded by

Farman Afridi
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/ 26

DATA

COMMUNICATION

Lecture-09
Recap of Lecture 6, 7 & 8

• The OSI Model


• Functions of OSI Layers
• TCP/IP Protocol Suite
Addresses

• Four levels of addresses are used in an internet


employing the TCP/IP protocols:

1. Physical (link) addresses,


2. Logical (IP) addresses,
3. Port addresses, and
4. Specific addresses
Addresses
Relationship of layers and addresses
in TCP/IP
Physical Addresses
Physical Addresses
• Also known as the link address, is the address of a node as defined by
its LAN or WAN.
• It is included in the frame used by the data link layer.
• It is the lowest-level address.
• The physical addresses have authority over the network (LAN or
WAN).

• The size and format of these addresses vary depending on the


network.
• For example, Ethernet uses a 6-byte (48-bit) physical address that is
imprinted on the network interface card (NIC).
• Local-Talk (Apple), however, has a I-byte dynamic address that
changes each time the station comes up.
Physical Addresses (cont..)
• In Figure 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).
• At the data link layer, this frame contains physical (link) addresses
in the header.
• The trailer usually contains extra bits needed for error detection.
• As the figure shows, the computer with physical address lO is the
sender, and the computer with physical address 87 is the receiver.
• The data link layer at the sender receives data from an upper
layer.
• It encapsulates the data in a frame, adding a header and a trailer.
• The header, among other pieces of information, carries the
receiver and the sender physical (link) addresses.
Physical Addresses (cont..)

• Note that in most data link protocols, the destination address, 87 in this case,
comes before the source address (10 in this case).
• We have shown a bus topology for an isolated LAN.
• In a bus topology, the frame is propagated in both directions (left and right).
• The frame propagated to the left dies when it reaches the end of the cable if the
cable end is terminated appropriately.
• The frame propagated to the right is sent to every station on the network.
• Each station with a physical addresses other than 87 drops the frame because
the destination address in the frame does not match its own physical address.
• The intended destination computer, however, finds a match between the
destination address in the frame and its own physical address.
• The frame is checked, the header and trailer are dropped, and the data part is
de-capsulated and delivered to the upper layer.
Physical Addresses (cont..)

• 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
Physical Addresses (cont..)
Logical Addresses
Logical Addresses

• 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.
Logical Addresses (cont..)
• 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.
• Although it may be obvious that each router must have a separate physical
address for each connection, it may not be obvious why it needs a logical
address for each connection.
• The computer with logical address A and physical address 10 needs to send a
packet to the computer with logical address P and physical address 95.
• We use letters to show the logical addresses and numbers for physical
addresses, but note that both are actually numbers.
Logical Addresses (cont..)
• The sender encapsulates its data in a packet at the network layer and adds two logical
addresses (A and P).
• Note that in most protocols, the logical source address comes before the logical
destination address (contrary to the order of physical addresses).
• The network layer consults its routing table and finds the logical address of the next
hop (router I) to be F.
• The ARP finds the physical address of router 1 that corresponds to the logical address
of 20.
• Now the network layer passes this address to the data link layer, which in turn,
encapsulates the packet with physical destination address 20 and physical source
address 10.
• The frame is received by every device on LAN 1, but is discarded by all except router 1.
• The router de-capsulates the packet from the frame to read the logical destination
address P.
• Since the logical destination address does not match the router's logical address, the
router knows that the packet needs to be forwarded.
Logical Addresses (cont..)
• The router consults its routing table and ARP to find the physical destination
address of the next hop (router 2), creates a new frame, encapsulates the
packet, and sends it to router 2.
• The source physical address changes from 10 to 99. The destination physical
address changes from 20 (router 1 physical address) to 33 (router 2 physical
address).
• The logical source and destination addresses must remain the same; otherwise
the packet will be lost.
• At router 2 we have a similar scenario. The physical addresses are changed, and
a new frame is sent to the destination computer.
• When the frame reaches the destination, the packet is de-capsulated.
• The destination logical address P matches the logical address of the computer.
• The data are de-capsulated from the packet and delivered to the upper layer.
• Note that although physical addresses will change from hop to hop, logical
addresses remain the same from the source to destination.
Logical Addresses
Port Addresses
Port Addresses
• The IP address and the physical address are necessary for a quantity of data to
travel from a source to the destination host.
• However, arrival at the destination host is not the final objective of data
communications on the Internet.
• A system that sends nothing but data from one computer to another is not
complete.
• Computers are devices that can run multiple processes at the same time.
• The end objective of Internet communication is a process communicating with
another process.
• For example, computer A can communicate with computer C by using TELNET.
• At the same time, computer A communicates with computer B by using the File
Transfer Protocol (FTP).
• For these processes to receive data simultaneously, we need a method to label
the different processes.
• In other words, they need addresses.
Port Addresses
• In the TCPIIP architecture, the label assigned to a process is called a port address which
is16 bits in length.
• 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 both computers are using the same application, FTP, for example,
the port addresses are different because one is a client program and the other is a
server program.
• To show that data from process a need to be delivered to process j, and not k, the
transport layer encapsulates data from the application layer in a packet and adds two
port addresses (a and j), source and destination.
• Packet from the transport layer is then encapsulated in another packet at the network
layer with logical source and destination addresses (A and P).
Port Addresses
• Finally, this packet is encapsulated in a frame with the physical source and
destination addresses of the next hop.
• We have not shown the physical addresses because they change from hop
to hop inside the cloud designated as the Internet.
• Note that although physical addresses change from hop to hop, logical and
port addresses remain the same from the source to destination.

• Example
• A port address is a 16-bit address represented by one decimal number as
shown.
753
A 16-bit port address represented as one single number
Port Addresses (cont..)
Specific Addresses
Specific Addresses

• Some applications have user-friendly addresses that are designed for that
specific address.

• Examples include the e-mail address (for example, [email protected]) and


the Universal Resource Locator (URL) (for example, www.mhhe.com).

• The first defines the recipient of an e-mail;


• the 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.
Summary

 Addresses

1. Logical addresses
2. Physical addresses
3. Port addresses
4. Specific addresses
Suggested Reading

• Section
• 2.5,

• “Data Communications and Networking” 4 th Edition by


Behrouz A. Forouzan

You might also like