Computer Networks I
Dr:- Rania Abul Seoud
[email protected] © 2004, Cisco Systems, Inc. All rights reserved. 1
Lecture 4
Devices & OSI model
© 2004, Cisco Systems, Inc. All rights reserved. 2
Network Devices Capabilities
© 2004, Cisco Systems, Inc. All rights reserved. 3
Network Connection
physical network connection of two hosts via one router and
the corresponding layers. The dotted line represents a virtual
connection
© 2004, Cisco Systems, Inc. All rights reserved. 4
© 2004, Cisco Systems, Inc. All rights reserved. 5
The OSI Layers Communications
6
© 2004, Cisco Systems, Inc. All rights reserved. 6
Router Paths and Packet Switching
• Switching Function of Router is the process used
by a router to switch a packet from an incoming
interface to an outgoing interface on the same
router.
-A packet received by a router will do the
following:
▪Strips off layer 2 headers.
▪Examines destination IP address located in Layer
3 header to find best route to destination.
▪Re-encapsulates layer 3 packet into layer 2 frame.
▪Forwards frame out exit interface.
© 2004, Cisco Systems, Inc. All rights reserved. 7
Data Flow Through a Network
8
© 2004, Cisco Systems, Inc. All rights reserved. 8
Encapsulation Process
9
© 2004, Cisco Systems, Inc. All rights reserved. 9
Case Study
© 2004, Cisco Systems, Inc. All rights reserved. 10
Addressing and Naming Schemes
• Explain how labels in encapsulation headers
are used to manage communication in data
networks.
© 2004, Cisco Systems, Inc. All rights reserved. 11
➢How to get MAC addresses ?
➢How to get IP addresses of each
destination?
© 2004, Cisco Systems, Inc. All rights reserved. 12
➢How to get MAC addresses ?
© 2004, Cisco Systems, Inc. All rights reserved. 13
If the source and distention are in the same
Network:-
• ARP (Address Resolution Protocol) Network layer
protocol
• The Source sends an ARP query- it is a Broadcast
query- to all hosts.
• This query requests the Mac address of the destination
with a certain IP address.
• If your IP address matches then please tell me your
Ethernet address
• The host which owns this IP will replay with a unicast
replay – this MAC address is mine.
• The source will store this MAC address in its ARP table
© 2004, Cisco Systems, Inc. All rights reserved. 14
ARP query- Host A wants to know the MAC
address of Host B
ARP Request - Broadcast to all hosts
„What is the MAC address for IP address 128.0.10.4?“
SIEMENS
NIXDORF
Host A
ARP Reply
SIEMENS
NIXDORF
SIEMENS
NIXDORF
Host B
IP Address: 128.0.10.4
© 2004, Cisco Systems, Inc. All rights reserved.
MAC Address: 08:00:20:02:15:45
15
ARP Table Entry
© 2004, Cisco Systems, Inc. All rights reserved. 16
The ARP Process
© 2004, Cisco Systems, Inc. All rights reserved. 17
What is the Address on my Ethernet NIC?
© 2004, Cisco Systems, Inc. All rights reserved. 18
19
© 2004, Cisco Systems, Inc. All rights reserved. 19
• How to get IP addresses of each
destination?
© 2004, Cisco Systems, Inc. All rights reserved. 20
DNS - Domain Name System Protocol
• Application layer protocol.
• The Source sends a DNS query to its configured
Local DNS server.
• Requests IP address for "www.example.com".
• The DNS server for that client is responsible for
resolving the name & responding by IP address of
that web address.
© 2004, Cisco Systems, Inc. All rights reserved. 21
Application Layer
Protocols
© 2004, Cisco Systems, Inc. All rights reserved. 22
DNS - Domain Name System
© 2004, Cisco Systems, Inc. All rights reserved. 23
DNS - Domain Name System
© 2004, Cisco Systems, Inc. All rights reserved. 24
DNS - Domain Name System
© 2004, Cisco Systems, Inc. All rights reserved. 25
1 Network = 1 Broadcast Domain
A B
host B would reply
Broadcast: ARP request
2 Networks = 2 Broadcast Domains
A B
Router no one would reply
Broadcast: ARP request
26
© 2004, Cisco Systems, Inc. All rights reserved. 26
A wants to send packet to B
A knows the IP
address of B.
A
A
B
Router R
I take care, to forward
IP packets to B
Then A realized that B in Yes, I know the destination
different network network, let me give you my
Ethernet address
27
© 2004, Cisco Systems, Inc. All rights reserved. 27
If the source and distention are not in the
same Network:-
➢Use the MAC (Ethernet)
address of your Default Gateway
© 2004, Cisco Systems, Inc. All rights reserved. 28
Default Gateway
© 2004, Cisco Systems, Inc. All rights reserved. 29
Example
© 2004, Cisco Systems, Inc. All rights reserved. 30
Case Study
© 2004, Cisco Systems, Inc. All rights reserved. 31
Router Paths and Packet Switching
• As a packet travels from one networking device to
another
-The Source and Destination IP addresses NEVER change
-The Source & Destination MAC addresses CHANGE as
packet is forwarded from one router to the next.
© 2004, Cisco Systems, Inc. All rights reserved. 32
Router Paths and Packet Switching
© 2004, Cisco Systems, Inc. All rights reserved. 33
Router Paths and Packet Switching
• Path determination and switching function
details. PC1 Wants to send something to PC 2
here is part of what happens
Step 1 - PC1 encapsulates packet into a frame.
Frame contains R1’s destination MAC address
© 2004, Cisco Systems, Inc. All rights reserved. 34
Router Paths and Packet Switching
Step 2 - R1 receives Ethernet frame.
▪R1 sees that destination MAC address matches its own
MAC.
▪R1 then strips off Ethernet frame.
▪R1 Examines destination IP.
▪R1 consults routing table looking for destination IP.
▪After finding destination IP in routing table, R1 now looks
up next hop IP address.
▪R1 re-encapsulates IP packet with a new Ethernet frame.
▪R1 forwards Ethernet packet out Fa0/1 interface.
© 2004, Cisco Systems, Inc. All rights reserved. 35
Router Paths and Packet Switching
Path determination and switching function details. PC1 Wants
to send something to PC 2 here is part of what happens
© 2004, Cisco Systems, Inc. All rights reserved. 36
Router Paths and Packet Switching
• Step 3 - Packet arrives at R2
▪R2 receives Ethernet frame
▪R2 sees that destination MAC address matches its own MAC
▪R2 then strips off Ethernet frame
▪R2 Examines destination IP
▪R2 consults routing table looking for destination IP
▪After finding destination IP in routing table, R2 now looks up
next hop IP address
▪R2 re-encapsulates IP packet with a new data link frame
▪R2 forwards Ethernet packet out S0/0 interface
© 2004, Cisco Systems, Inc. All rights reserved. 37
Router Paths and Packet Switching
Step 4 - Packet arrives at R3
▪R3 receives PPP frame
▪R3 then strips off PPP frame
▪R3 Examines destination IP
▪R3 consults routing table looking for destination IP
▪After finding destination IP in routing table, R3 is directly
connected to destination via its fast Ethernet interface
▪R3 re-encapsulates IP packet with a new Ethernet frame
▪R3 forwards Ethernet packet out Fa0/0 interface
© 2004, Cisco Systems, Inc. All rights reserved. 38
Router Paths and Packet Switching
• Step 5 - IP packet arrives at PC2. Frame is
decapsulated & processed by upper layer protocols.
© 2004, Cisco Systems, Inc. All rights reserved. 39