0% found this document useful (0 votes)
10 views97 pages

Ccna1 CH3

The document discusses network communication protocols. It covers: 1. Protocols must account for requirements like an identified sender/receiver, common language, timing of delivery, and confirmation. 2. Protocols govern how messages are encoded, formatted, encapsulated, and delivered between sender and receiver. Messages may be sent as unicasts, multicasts, or broadcasts. 3. Other protocols discussed include flow control, response timeouts, and application protocols like DNS, DHCP, and FTP. Protocols define a common format and set of rules for exchanging messages between devices on a network.

Uploaded by

User One
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views97 pages

Ccna1 CH3

The document discusses network communication protocols. It covers: 1. Protocols must account for requirements like an identified sender/receiver, common language, timing of delivery, and confirmation. 2. Protocols govern how messages are encoded, formatted, encapsulated, and delivered between sender and receiver. Messages may be sent as unicasts, multicasts, or broadcasts. 3. Other protocols discussed include flow control, response timeouts, and application protocols like DNS, DHCP, and FTP. Protocols define a common format and set of rules for exchanging messages between devices on a network.

Uploaded by

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

Chapter 3

Network Protocols and Communication

1
2
Confirmation or acknowledgement requirement & understand – Ok •
.understood 5
Speed and timing of delivery - slowly • 4
Common language and grammar - English • 3
.Agreed upon method of communicating- phone • 2
An identified sender and receiver • 1
followed in order for the message to be successfully delivered and understood
Before starting communication with each other, rules, or protocols, must be
1. Communication over human network
Rule Establishment
 Protocols must account for the
following requirements:
• An identified sender and receiver
• Common language and grammar
• Speed and timing of delivery
• Confirmation or acknowledgment
requirements

3
Rule Establishment
”Rules that govern Communication “ Protocols

4
Protocols - Message Encoding

 Is converting information into another, acceptable form, for transmission.


 Decoding reverses this process in order to interpret the information.

• In computer communication : Converting messages to binary , encoding it


into an appropriate form to the media in a pattern of sounds, light waves, or
electrical impulses reversed at the destination.
• Message should be also encapsulated and arranged in a specific format called
frame that includes the address of the source and destination beside other
identifiers.

5
Protocols - Message Formatting and Encapsulation

 When a message is sent from source to destination, it must use


a specific format or structure. Message formats depend on the
type of message and the channel that is used to deliver the
message.
 For centuries, the agreed format for personal letters has not
changed. In many cultures, a personal letter contains the
following elements:
• An identifier of the recipient
• A salutation or greeting
• The message content
• A closing phrase
• An identifier of the sender

6
Protocols - Message size

• Frames that are too long or too short are not delivered , the size of the
message sent depends on the type of the media.

• The sender might break the message into parts called segments so that it meets
the requirements and limits determined by the media.
• Each segment should be encapsulated as a frame that contains the address of the
source and destination.
• At the destination , frames are decapsulated , segments are put back together and
the message is built.

7
Protocols - Message Timing
These are the rules of engagement for message timing.
Access Method
Access method determines when someone is able to send a message. If
two people talk at the same time, a collision of information occurs and it is
necessary for the two to back off and start again. Hosts on a network need
an access method to know when to begin sending messages and how to
respond when collisions occur.

Flow Control
Timing also affects how much information can be sent and the speed that it
can be delivered. If one person speaks too quickly, it is difficult for the
other person to hear and understand the message. In network
communication, source and destination hosts use flow control methods to
negotiate correct timing for successful communication.

Response Timeout
If a person asks a question and does not hear a response within an
acceptable amount of time, the person assumes that no answer is coming
and reacts accordingly. The person may repeat the question, or may go on
with the conversation. Hosts on the network also have rules that specify
how long to wait for responses and what action to take if a response
timeout occurs.
8
Protocols – Message delivery options

Messages might be sent to destination


as either acknowledged or
unacknowledged and in one of the
following ways:

• Unicasts transmission : One to


one transmission with only one
single destination.

• Multicast transmission :Delivery of


the same message to a group of
host destinations simultaneously.

• Broadcast : one-to-all message


delivery option at the same time.

9
Rules that Govern Communications

Rules on a network seem almost endless – but they’re not.

• Other Application Protocols:


• DNS, DHCP, FTP
• Some Other Protocols:
• TCP/IP Protocol Suite, Ethernet, Routing Protocols
Eng. Ashraf Sabha PSUT Cisco
Academy Training Center 2014. 10
Rules that Govern Communications

 A “protocol” or a “protocol suite” govern communication between networks.

 Defines what should that data be at the end of each layer but not how to “ It
does not dictate how to accomplish specific layer functions”.

 Protocols are implemented in software and hardware that is loaded on each host
and network device. Example: TCP/IP protocol suite.

 Protocols might be vendor-specific “proprietary” or public. Examples of


proprietary protocols are AppleTalk and Novell Netware. Ethernet was a vendor
specific protocol that was publicized in a similar standard 802.3.
 Networking protocols suite is a group of layers that describes :

• How to encapsulate in each layer “PDU format – each layer”.


• How to start or terminate the transfer of sessions.
• How to share pathways information with other networks – network layer .
• Forwarding error system messages between devices – different layers.
• Each layer get support from the layers below.

11
Network Protocols
 Networking protocols define a common format and set of rules for
exchanging messages between devices. Some common
networking protocols are Hypertext Transfer Protocol (HTTP),
Transmission Control Protocol (TCP), and Internet Protocol (IP).
 networking protocols describe the following processes:
• How the message is formatted or structured.
• The process by which networking devices share information about
pathways with other networks.
• How and when error and system messages are passed between
devices.
• The setup and termination of data transfer sessions.

 Note: IP in this course refers to both the IPv4 and IPv6 protocols.
IPv6 is the most recent version of IP and the replacement for the
more common IPv4.

12
Protocol Interaction
 Communication between a web server and web client is an
example of an interaction between several protocols. The
protocols shown in the figure include:

HTTP - is an application
protocol that governs the way
a web server and a web client
interact. HTTP defines the
content and formatting of the
requests and responses that
are exchanged between the
client and server. Both the
client and the web server
software implement HTTP as
part of the application. HTTP
relies on other protocols to
govern how the messages are
transported between the
client and server.
13
Protocol Interaction
 Communication between a web server and web client is an
example of an interaction between several protocols. The
protocols shown in the figure include:

TCP - is the transport


protocol that manages the
individual conversations. TCP
divides the HTTP messages
into smaller pieces, called
segments. These segments
are sent between the web
server and client processes
running at the destination
host. TCP is also responsible
for controlling the size and
rate at which messages are
exchanged between the
server and the client.
14
Protocol Interaction
 Communication between a web server and web client is an
example of an interaction between several protocols. The
protocols shown in the figure include:

IP - is responsible for taking


the formatted segments from
TCP, encapsulating them into
packets, assigning them the
appropriate addresses, and
delivering them to the
destination host.

15
Protocol Interaction
 Communication between a web server and web client is an
example of an interaction between several protocols. The
protocols shown in the figure include:

Ethernet - is a network
access protocol that describes
two primary functions:
communication over a data
link and the physical
transmission of data on the
network media. Network
access protocols are
responsible for taking the
packets from IP and
formatting them to be
transmitted over the media.

16
Message uses Multiple protocols (encapsulation)

HTTP Example :
Protocols Header Data Web data

IP TCP App
Frame Header Header Data Frame Trailer
Header Header

 Encapsulation – Process of adding a headers to the data as it passes down.


 Decapsulation – Process of removing a header.

Eng. Ashraf Sabha PSUT Cisco


Academy Training Center 2014. 17
209.67.102.55 107.16.4.21

Frame Header IP TCP HTTP Frame Trailer


Header Header Header Data

209.67.102.55
107.16.4.21

18
Putting It all Together

.Converted to Binary .1

.NIC generates signals that represent these bits .2

.Passed among LAN devices .3

.Exit the local area (router) .4

19
Putting It all Together

The many interconnected devices


worldwide are often represented by a
cloud.

5. Bits are transmitted to devices


that interconnect the networks.

20
Putting It all Together

Passed among local devices at the .6


.destination

7. The destination device converts the bits into


human readable form.

21
Putting It all Together

At each of these steps, there are protocols


that define the rules for device
communication.

6 7
1 2 3 4

22
Protocol Suites and Industry
Standards
 A protocol suite is a set of protocols that work together to provide
comprehensive network communication services. A protocol suite may be
specified by a standards organization or developed by a vendor. Protocol
suites, can be a bit overwhelming. However, this course will only cover the
protocols of the TCP/IP protocol suite.
 The TCP/IP protocol suite is an open standard, meaning these protocols
are freely available to the public, and any vendor is able to implement
these protocols on their hardware or in their software.
 A standards-based protocol is a process that has been endorsed by the
networking industry and approved by a standards organization. The use of
standards in developing and implementing protocols ensures that products
from different manufacturers can interoperate successfully.
 If a protocol is not rigidly observed by a particular manufacturer, their
equipment or software may not be able to successfully communicate with
products made by other manufacturers.

23
Protocol Suites and Industry
Standards
Some protocols are proprietary which means one company or vendor controls the
definition of the protocol and how it functions. Examples of proprietary protocols are
AppleTalk and Novell Netware, which are legacy protocol suites. It is not uncommon
for a vendor (or group of vendors) to develop a proprietary protocol to meet the
needs of its customers and later assist in making that proprietary protocol an open
standard.

24
Development of TCP/IP
 The first packet switching network and
predecessor to today’s Internet was the
Advanced Research Projects Agency Network
(ARPANET), which came to life in 1969 by
connecting mainframe computers at four
locations. ARPANET was funded by the U.S.
Department of Defense for use by universities
and research laboratories.

25
Getting protocol to the right layer ( TCP/IP Model)

Lower layer protocols : Responsible Ethernet or 802.3 : Used to access


for delivering the IP packet over the media and transmit packets over
.physical medium .physical layer
26
Protocol Suites and Standards
 Early days – proprietary network equipment and protocols.

• Open standards encourage competition and innovation (TCP/IP).

• Now – Industry standards exist and ensure protocols and products from
different manufacturers can work together for efficient communications

• Many protocols started as proprietary and changed to open as ( Ethernet and


Eigrp)

27
Standards
Organizations

 Standards organizations (usually vendor neutral non-profit) organizations


include:

• The Internet Society (ISOC)


• The Internet Architecture Board (IAB)
• The Internet Engineering Task Force (IETF)
• The Institute of Electrical and Electronics Engineers (IEEE)
• The International Organization for Standardization (ISO)
28
ISOC

The Internet Society (ISOC)


 Facilitates the open development of standards and protocols.
 Oversight of the Internet Architecture Board (IAB).

29
IAB

The Internet Architecture Board (IAB)


 Managing and developing Internet standards.
 13 members, including the chair of the Internet Engineering Task Force
(IETF).
 IAB members serve as individuals and not representatives of any company,
agency, or other organization.

30
IETF

Internet Engineering Task Force (IETF)


 Develop, update, and maintain Internet and TCP/IP technologies.
 Produce Request for Comments (RFC) documents that describe protocols and
technologies for the Internet. “TCP, IP, HTTP, FTP”

Internet Research Task Force (IRTF)


 Focused on long-term research related to Internet and TCP/IP

31
IEEE

Institute of Electrical and Electronics Engineers - IEEE


 A professional organization for those in the electrical engineering and
electronics fields who are dedicated to advancing technological innovation
and creating standards.
 IEEE 802.3 and IEEE 802.11 standards are significant IEEE standards in
computer networking.

32
Cisco IOS
Purpose of OS

ISO, the International Organization for Standardization

ISO is not an acronym but based on the Greek word ISOS, meaning equal.
ISO is best known for its Open Systems Interconnection (OSI) reference model.

ISO published the OSI reference model in 1984 to develop a layered framework

for networking protocols.

33
Other Standards Organizations

standards related to
wiring, connectors, Developing standards in a
racks variety of areas cellular
towers, Voice over IP (VoIP)

IP address allocation, DNS managing IP address allocation,


management, and port domain name management, and
numbers protocol identifiers

Defines standards for video compression, Internet Protocol Television (IPTV),


and broadband communications, such as a digital subscriber line (DSL).

34
2 types of networking Model

 A protocol model : A model that closely matches the structure of a


particular protocol suite. Ex: TCP/IP model

 A reference model : Aids in clearer understanding of the functions and


process involved separately . Ex: OSI model

Benefits of a Layered Model

• To achieve interoperability between different manufacturers.


• To visualize the interaction between various protocols.
• Fosters competition .
• Prevents changes in one layer from affecting other layers above and below.

35
The (TCP/IP – OSI) model Comparison

36
The OSI model

 The International Organization for


Standardization (ISO) released the
OSI reference model in 1984.

 Derived from the Latin word ISOS


which means equal.

 Helps you to understand how


information travels throughout a
network and view the network
functions that occur at each layer.

 7 layers - Each illustrates a particular


network function , each provides
services to the layer below it.

37
38
OSI – The Application Layer
 Interface users to network services and applications.

 Negotiating the application commands end to end.

 Think of any network application you use daily.

OSI – The Presentation Layer


 Format “represent “ the information sent by the application layer in a readable
form to the application layer of another system.

 Think of any common file formats (JPEG, txt etc).

OSI – The Session Layer


 Establishes, manages, and terminates “sessions “between two communicating
hosts to send data.

 Synchronize dialogue between presentation layers on the two hosts and manages
their data exchange.

39
OSI – The Transport Layer

 Segmented and reassemble data.

 Ensures that the data arrive completely by adding functions for reliable
transfer. Functions include acknowledgement, error recovery, and sequencing.

 Transmission Control Protocol “TCP” and User Datagram Protocol (UDP) provide
the necessary functionality.

OSI – The Network Layer

 Select the path of many path ways packet should follow.

 Provide segments with addresses to reach the destination (network address).

40
OSI – The Data Link Layer

 Describe methods of how to access the media “Media Access Control”

 Detect errors that may occur in the Physical layer using the (CRC).

 Physical Addressing, topologies and access media rules

OSI – The Physical Layer

 Defines the electrical, mechanical, procedural, and functional specifications for


activating and maintaining the physical link between end systems.

 Voltage levels, physical data rates, maximum transmission distances, physical


connectors, and other factors.

41
Communicating the Messages

Continuous stream of bits


00101010100101010101010101010

I have to
wait…

 Sending large data “continuous stream of bits” message without fragmentation


could :

• Take over the network and cause delays to other users.


• Inefficient use , any loss - resend entire message.
42
Communicating the
Messages
001010
001010

001010

Segmentation
 Better approach – segmentation and multiplexing.

 Multiplexing: Interleaving different conversations together on the network .

43
Message Segmentation
 Segmenting messages has two primary benefits:
• By sending smaller individual pieces from source to destination, many
different conversations can be interleaved on the network, called
multiplexing.
• Segmentation can increase the efficiency of network communications.
If part of the message fails to make it to the destination, due to failure
in the network or network congestion, only the missing parts need to
be retransmitted.

44
Segmentation and interleaving – Better reliability

Advantages : Reliability : Same message segments need not travel the same
pathway across the network from source to destination

• Different paths .
• Alternate path.
• Only the missing segments need to be retransmitted.

.Disadvantage – added level of complexity , separate envelopes , sequencing


45
The Communication Process

 Protocol Data Unit (PDU) – A layer


specific encapsulation form that a piece
of data takes .

 PDUs are named according to the


protocols of the TCP/IP suite.

• Data - Application layer PDU

• Segment - Transport Layer PDU

• Packet - Internetwork Layer PDU

• Frame - Network Access Layer PDU

• Bits - A PDU used when physically


transmitting data over the medium

46
The Communication Process

Create Data Pass data to


application

Segment and
Encapsulate to a
packet source
Decapsulate and
and destination
Reassemble
logical
addresses.

Generate a Receive from


frame and the media
send it to the
media as 1’s
and 0’s bits

Transport through the segment


47
Protocol Data Units and Encapsulation – another example

Segmentation and Encapsulation

Email Message

Data Data Data

Header Data

Header Data

Header Data Trailer

0010100111011001010000011111010100010101
48
Protocol Data Units and Encapsulation

Decapsulation and Reassembly

Email Message

Data Data Data

Header Data

Header Data

Header Data Trailer

0010100111011001010000011111010100010101
49
Putting It All Together

Port
Logical
MAC MAC

Layer 2 Header Layer 4 Header

Destination Source Destination Source Destination Source


MAC MAC Logical Logical Process Process Data
Address Address Address Address Address Address

Layer 3 Header
Getting Data to the End Device

 Layer 2 source and destination addresses of the frame are concerned with the
delivery of messages on a single local network. “Whose next”

 Layer 2 address is unique on the local network and represents the address of the
end device on the physical media called the Media Access Control (MAC) address.

 Once a frame is successfully received by the destination host, the Layer 2 address
information is removed as the data is decapsulated and moved up the protocol
stack to Layer 3.

 The layer 2 trailer address supports error detection using the CRC.

51
Getting the Data Through the Internetwork

 Layer 3 protocols are used to move data from one local network to another local
network within an internetwork.

 Layer 3 headers contain the Source and the destination IP addresses, also called
the logical address that helps to identify the source and destination.

 At the boundary of each local network, an intermediary network device, usually a


router, decapsulates the frame to read the destination host address contained in
the header of the packet, the Layer 3 PDU

 Routers use the network identifier portion of this address to determine which path
to use to reach the destination host.

52
Two Address Types

Each device has two addresses.

• Layer 2 / MAC address:

 Physical Burned in to the NIC


 Doesn’t change , but can be
spoofed ..later !
 Is the device real identity.

• Layer 3 / Network “protocol” Address:

 Logical address of the host.


 It can be set via software “O.S.”
 Assigned by network administrator
 The device mailing address. 53
 Need to be changed when the device
Each Host Has Two Addresses

• Physical (MAC):

• The physical address uniquely identifies the host from all other hosts all over
the network at Layer 2. “ who is next address”

54
The MAC Address

 The Ethernet protocol includes the MAC (Media Access Control)


 Every Ethernet NIC card has a unique MAC address.
 They give hosts a permanent, unique name.

55
Ethernet MAC Address

 48 bits in length.

 Expressed as
12 hexadecimal
digits.

 The first 6 hexadecimal digits are administered by the IEEE, identify the
manufacturer Organizational Unique Identifier (OUI).

 The remaining 6 hexadecimal digits comprise the interface serial number,


or another value administered by the specific vendor.

 MAC addresses are burned-in addresses (BIAs) into read-only


memory (ROM) and are copied into random-access memory (RAM) when
the NIC initializes

56
Ethernet MAC Address

 The OUI and the sequential number ensure that the assigned MAC
addresses remain unique.

 You will see them expressed in different ways.

Cisco MAC Address Intel MAC Address

00-60-2F-3A-07-BC 00-20-E0-6B-17-62
00:60:2F:3A:07:BC 00:20:E0:6B:17:62
0060.2F3A.07BC 0020.E06B.1762

57
What is the Address on my NIC?

58
Each Host Has Two Addresses

IP Addresses are divided into a 2


level hierarchy – Network and Host.

• Logical (IP):

• The logical address uniquely identifies the host and the network to which it
belongs at Layer 3.

• Routers base their decisions on the NETWORK PORTION of the destination IP


address when determining the best path for the packet.

59
Getting Data to the Right Application

 Each application or service is represented at Layer 4 by a port number

 The port number identifies the processes or services that are communicating
within the end devices.

 When the data is received at the host, Layer 4 (TCP/UDP) port number is
examined to determine which application or process is the correct destination
for the data

• Destination port – destination application


• Source port – source application

60
Getting Data to the Right Application

• Under TCP/IP, a port number to identify the


application.

• Port 80: HTTP (Web Browser).


• Port 25: SMTP (Email).
• Port 194: IRC (Internet Relay Chat).

61
Getting Data to the Right Application

 Destination port number tells the OS (TCP/IP) stack which application to hand
the data to.
 Examples:
• 80 = HTTP (www)
• 23 = Telnet
• 20, 21 = FTP
• 25 = SMTP
62
ARP

The Address Request Protocol

63
Default gateway

 Hosts doesn’t know the address of every device on the Internet it might
communicate to.

 When a host needs to communicate with another network, an intermediary device,


or router, acts as a gateway to the other network.

 Each host contain a routing table that contains at the minimum a “gateway”.

 The default gateway IP address is typically a host IP address “router” which is on


the same network as the host itself which is used to forward packets out of the
network.

 The host only has to be aware of:

• Its own network address

• Default gateway IP address to reach all devices outside its own network
Eng. Ashraf Sabha PSUT Cisco
Academy Training Center 2014. 64
TCP/IP and ARP

The TCP/IP Suite of Protocols

File Transfer: FTP, TFTP, NFS, HTTP


Application Email: SMTP
Remote Login: Telnet, rlogin
Network Management: SNMP, BootP
Name Management: DNS, DHCP
Transport TCP, UDP
Internet/Network IP, ICMP, IGMP, ARP, RARP
Network Interface Not Specified: Ethernet, 802.3, Token Ring, 802.5,
(Link Layer) FDDI, ATM,

ARP is a layer 3 protocol, one of many protocols within the TCP/IP suite of protocols.

Eng. Ashraf Sabha PSUT Cisco


Academy Training Center 2014. 65
ARP (Address Resolution Protocol)

Ethernet Header Ethernet Data – 28 byte ARP request/reply


Ethernet Ethernet FrameARP Sender’s Sender’s Target’s Target’s
Destination Source Type headers Ethernet Address IP Address Ethernet Address IP Address
Address Address , i.e. op (MAC) (MAC)
(MAC) (MAC) 0x806 field

Eng. Ashraf Sabha PSUT Cisco


Academy Training Center 2014. 66
Why do devices
have a MAC Address
and an IP Address?

03-0D-17-
8A-F1-32

 IP addresses:
• Original source address of the sending device
• Final destination address of the intended recipient.
• do not change
 Data Link addresses, such as Ethernet MAC addresses are used to get the IP
packet from one hop to the next, within the same network.
• Next hop is either:
 A router on this network

 The final destination of the packet (Destination IP address)


67
My Network is
172.16.10.0

By doing the AND operation, the IP Address and Subnet tells the host what
network/subnet it belongs to.
 All devices in the same LAN have in common
• Host IP address on the same network.
• Same Subnet Mask.

68
Destination
MAC Address

00-0C-04-
38-44-AA

Same network

 What would the Destination MAC address be for IP packets sent within the same
LAN, network?

• The Destination MAC address would be that of the device that we are sending
the IP packet to.
• The device’s Destination MAC address would be associated with the
Destination IP address.
69
Destination
MAC Address

00-0D-17-
8A-F1-32

Different network
 What would the Destination MAC address for IP packets sent outside the LAN,
on a different network?

• The destination MAC address will be the MAC address associated with the
IP Address of the Default Gateway.
• The host must know the IP address of the Default Gateway to communicate
with devices outside its own network.
70
Router’s IP
Address

The Default Gateway, Router, will have an IP address and subnet mask that is
on the same network as the hosts on that network.
If the gateway doesn’t exist , users can only contact hosts within their LANs
71
Destination MAC Address?

Same network?

 How does the sending host know if the Source IP Address and Destination IP
Address are on the same network?

Hints:

 How does a host know what network it is on?


• Does an AND operation on its host IP address and subnet mask.
 What do all devices in the same network have in common?
• They all have the same subnet mask (and of course a host IP address in the
same network).

72
Destination MAC Address?

?Same network

AND AND

My Network = 172.16.10.0 Destination Network = 172.16.10.0

Same network? YES!

 Since they are on the same network, the Destination MAC Address will be the MAC
Address of the host with the Destination IP Address.
 Where does the sending host look for this information?

73
The ARP Table or ARP Cache

 It will look for it in it’s ARP Table or


ARP Cache.
 The ARP Table maintains IP Address to
MAC Address mappings.
 Every device that participates in
Ethernet and IP will have such a table,
including hosts and routers.

IP Address to MAC Address Mappings

74
Same
network
00-0C-04- 00-0C-04-
38-44-AA 17-91-CC

Destin ation M AC Address?? ?

ARP Table
IP Address M AC Add ress
172.16.10.3
00-0C-04-38-44- 00-0C-04-32-14-A 1
172.16.10.25
172.16.10.19 00-0C-14-02-00-19
172.16.10.33
AA
00-0C -A 6-19-46-C 1

H ost S tevens H ost C erf


172.16.10.10 172.16.10.25
255.255.255.0 255.255.255.0
M A C 00-0C -04-17-91-CC M A C 00-0C -04-38-44-A A

S ou rce
D estination

172.16.10.0/24
R outer A

E thernet 0
172.16.10.1
255.255.255.0
M A C 03-0D -17-8A -F1-32
75
Does the receiver of the ARP Request need to do its
own ARP Request?
ARP Table
192.168.1.10/24 192.168.1.100/24 initially empty,
ARP Table initially
adds sender’s
empty, so will first need
IP address to
to do an ARP Request
ARP Table
before doing
Echo Request ARP Reply

Echo Reply
Destination IP Source IP
000001 102 192.168.1.100 192.168.1.10 ICMP Echo Request

000002 64 BROADCAST 192.168.1.100 ARP Q PA=192.168.1.10


000003 64 192.168.1.100 192.168.1.10 ARP R HA=00A0C98D8C03

000004 102 192.168.1.10 192.168.1.100 ICMP Echo Reply


000005 102 192.168.1.100 192.168.1.10 ICMP Echo Request
000006 102 192.168.1.10 192.168.1.100 ICMP Echo Reply
000007 102 192.168.1.100 192.168.1.10 ICMP Echo Request
000008 102 192.168.1.10 192.168.1.100 ICMP Echo Reply
000009 102 192.168.1.100 192.168.1.10 ICMP Echo Request
000010 102 192.168.1.10 192.168.1.100 ICMP Echo Reply

This is dependent on the operating system. With most host operating systems, the receiver
(target) of the ARP Request will add the IP address of the sender of this ARP Request to its ARP
Table. However, some devices will not do record the sender of the ARP Request’s IP and MAC
address and will need to do an ARP Request of its own.
76
Same
network
00-0C-04-
17-91-CC

Destin ation M AC Address?? ?


 What if the Destination IP Address is
No Match not in the ARP Table?
ARP Table
IP Address M AC Add ress
 How does it get in there?
172.16.10.3 00-0C-04-32-14-A 1  The host must issue an ARP Request.
172.16.10.19 00-0C-14-02-00-19
172.16.10.33 00-0C -A 6-19-46-C 1

H ost S tevens H ost C erf


172.16.10.10 172.16.10.25
255.255.255.0 255.255.255.0
M A C 00-0C -04-17-91-CC M A C 00-0C -04-38-44-A A

S ou rce
D estination

172.16.10.0/24
R outer A

E thernet 0
172.16.10.1
255.255.255.0
M A C 03-0D -17-8A -F1-32
77
D estination M AC Address???

ARP Request from Host


AR P Tab le
IP Address M AC Add ress Stevens at 172.16.10.10,
172.16.10.3
172.16.10.19
00-0C-04-32-14-A1
00-0C-14-02-00-19 looking for the MAC address
172.16.10.33 00-0C -A 6-19-46-C 1
of the 172.16.10.25
H ost S tevens
172.16.10.10
H ost Cerf
172.16.10.25
(Destination IP Address).
255.255.255.0 255.255.255.0
M AC 00-0C -04-17-91-C C M A C 00-0C -04-38-44-A A “Hey everyone! I have this IP
S ou rce
Destination
Address and I need the host this
belongs to, to send me their MAC
address.”
172.16.10.0/24
R outer A

Ethernet 0
172.16.10.1
255.255.255.0
MA C 03-0D -17-8A -F1-32

ARP Request from 172.16.10.10


Ethernet Header Ethernet Data – 28 byte ARP request/reply
Ethernet Ethernet Frame ARP Sender’s Sender’s Target’s Target’s
Destination Source Type headers Ethernet IP Address Ethernet IP Address
Address Address , i.e. op Address Address
(MAC) (MAC) field (MAC) (MAC)
FF-FF- 00-0C- 0x806 op = 1 00-0C- 172.16.10.10 172.16.10.25
FF-FF-
FF-FF
04-17-
91-CC
04-17-
91-CC
?

op field – ARP request = 1


ARP reply = 2
RARP request = 3 78
RARP reply = 4
D estination M AC Address???

AR P Tab le ARP Reply from 172.16.10.25,


IP Address M AC Add ress
172.16.10.3 00-0C-04-32-14-A1 back to the requester
172.16.10.19 00-0C-14-02-00-19
172.16.10.33 00-0C -A 6-19-46-C 1 172.16.10.10.
H ost S tevens
172.16.10.10
H ost Cerf
172.16.10.25
“Hey sender of ARP Request!
255.255.255.0
M AC 00-0C -04-17-91-C C
255.255.255.0
M A C 00-0C -04-38-44-A A
Here is my MAC address that you
wanted for that IP address.”
S ou rce
Destination

172.16.10.0/24
R outer A

Ethernet 0
172.16.10.1
255.255.255.0
MA C 03-0D -17-8A -F1-32

00-0C-04- 00-0C-04-
38-44-AA 17-91-CC 172.16.10.10 172.16.10.25

ARP Reply from 172.16.10.25


Ethernet Header Ethernet Data – 28 byte ARP request/reply
Ethernet Ethernet Frame ARP Sender’s Sender’s Target’s Target’s
Destination Source Type headers Ethernet IP Address Ethernet IP Address
Address Address , i.e. op Address Address
(MAC) (MAC) field (MAC) (MAC)
00-0C- 00-0C- 0x806 op = 2 00-0C- 172.16.10.25 00-0C- 172.16.10.10
04-17- 04-38- 04-38- 04-17-
91-CC 44-AA 44-AA 91-CC

!Here it is 79
What if the hosts are on different networks?
H ost P erlm an
Host S tevens
172.16.20.12
172.16.10.10
255.255.255.0
255.255.255.0
M A C 00-0C -22-A 3-14-01
M A C 00-0C -04-17-91-CC

Default Gateway: 172.16.10.1 D estination


Source

172.16.10.0/24 172.16.20.0/24
R outer A

Ethernet 0
172.16.10.1
255.255.255.0
M AC 03-0D -17-8A -F1-32

00-0C-04-
? 17-91-CC 172.16.10.10 172.16.20.12

Here we have an example of a Host at IP address 172.16.10.10 wanting to send


an IP packet to Host IP address 172.16.20.12

80
Review: Destination MAC Address?

Same network?

AND AND

My Network = 172.16.10.0 Destination Network = 172.16.20.0

!Same network? NO
 In this case both the Source IP Address and the Destination IP Address are on
different networks.

81
Review: Destination MAC Address?

Different networks

Different Network: The Default Gateway’s MAC Address

 Since they are on different networks, the Destination MAC Address will be the
MAC Address of the device with the Default Gateway IP Address.
 The IP Address of the Default Gateway must be known by the sending host in
order to commincate with devices outside its own network.
 The host look for this information in the ARP table or ARP request again if not
known.

82
OSI Network Layer

Routing: How Data Packets Are Handled


The subnet mask for the example below is /54

83
IP Packets: Carrying Data End to End

• Host X sends a packet to Host Y.

• A router generally relays a packet from one


data link to another, using two basic functions:
Remember:
• a path determination function - Routing
Two addresses are needed to move a packet
from •thea source
switching function
to the -Packet Forwarding
destination.
• MAC Address
• •Let’sIPgoAddress
through all of the stages these routers
use to route and switch this packet.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source

A111 H111 192.168.4.10 192.168.1.10

• Host X begins by encapsulating a packet with


Host Y’s IP address and Router A’s MAC
address.

How does HOST X obtain Router A’s Layer 2 address?

How does Host X know to forward the packet to


Router A and not directly to Host Y?

Host X determines that the destination is NOT on


the same network. (More Later)
The packet is forwarded to the default gateway.
Queries the router for the router’s MAC address
(more later).
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source

A111 H111 192.168.4.10 192.168.1.10

• Router A receives the packet on port fa0/0.

NOW what happens?

Router A uses the destination


IP address to search its routing table for
network 192.168.4.0/24.
It finds that it has a next hop
address of 192.168.2.2 and an
exit port of fa0/1.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source

A111 H111 192.168.4.10 192.168.1.10

• Router A knows that the exit port is an


Ethernet interface.

NOW what happens?

Router A looks in a table of IP address to MAC


address for all connected networks. If the
network isn’t there, it queries Router B for it’s
MAC address.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source

B111
A111 A222
H111 192.168.4.10
192.168.4.10 192.168.1.10

• Router A now has all of the information it


needs to forward the packet. It knows that the
destination MAC address is B111 and that the
exit port is fa0/0.

• Router A now re-encapsulates the frame,


changing the Layer 2 addresses and forwards
(switches) the frame out port fa0/1.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source

B111 A222 192.168.4.10 192.168.1.10

• Notice that the Layer 3 addresses in the packet


DID NOT change!

• Also notice that the routing table was used to


find:

• The next hop Layer 3 address


• The next hop Layer 2 address
• The exit port to use to forward the frame.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source

B111 A222 192.168.4.10 192.168.1.10

• Router B receives the packet.

NOW what happens?

Router B uses the destination


IP address to search its routing table for network
192.168.4.0/24.
It finds that it has a next hop
address of 192.168.3.2 and an
exit port of s0/1 – a serial interface.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source
B111 A222 192.168.4.10 192.168.1.10

• Router B knows that the exit port is a serial


interface.

NOW what happens?

Since the exit interface is a serial interface, NOT


an Ethernet interface, Router B does not need
the Layer 2 address for the next hop.
Remember, serial interfaces are
like a pipe – one way in
and one way out.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source
B111 A222 192.168.4.10 192.168.1.10

• Router B now encapsulates the IP packet into


the proper data link frame, using the proper
serial encapsulation (HDLC, PPP, etc.).
IP Packets: Carrying Data End to End
Layer 2 Layer
Layer22 Layer
Layer33 Layer 3
Destination Source
Source Destination
Destination Source
B111
FFFF A222
B222 192.168.4.10 192.168.1.10

The destination Layer 2 address is set to a


broadcast since there is only one other end to the
pipe.

The source Layer 2 address is set to the exit port


of Router B – the source of the frame.

Finally, the frame is forwarded (switched) out


port s0/1 on Router B.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source

FFFF B222 192.168.4.10 192.168.1.10

• Router C receives the frame


on the serial interface - port s0/1

NOW what happens?

Router C uses the destination


IP address to search its routing table for network
192.168.4.0/24.
It finds that the network is a directly connected
network with an exit interface of fa0/0.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source
FFFF B222 192.168.4.10 192.168.1.10

• Router C realizes that this destination IP


address is on the same network as one of its
interfaces and it can send the packet directly to
the destination and not another router.

• Since the exit interface is on an directly


connected Ethernet network, Router C must
obtain the destination’s MAC address.
IP Packets: Carrying Data End to End
Layer 2 Layer 2 Layer 3 Layer 3
Destination Source Destination Source
FFFF B222 192.168.4.10 192.168.1.10

• Router C looks in a table of IP address to MAC


address for all connected networks.
• If the entry was not in the table, Router C
would need to send a query out fa0/0 that
says, “What is the MAC address for this IP
address?”
• Host Y would send back a reply that says, “This
is the MAC address that matches the IP
Address you sent.”
IP Packets: Carrying Data End to End
Layer
Layer22 Layer
Layer22 Layer 3 Layer 3
Destination
Destinatio Source
Source Destination Source
n H222
FFFF C222
B222 192.168.4.10 192.168.1.10

Router C encapsulates the Ethernet frame and


uses the destination MAC address of Host Y.

The source Layer 2 address becomes the MAC


address of the router’s fa0/0 port.

The frame is forwarded (switched) out port


fa0/0 to the destination host – Host Y.

You might also like