Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
12 views44 pages

Lec 3

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

Lec 3

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

Computer Networks I

Dr:- Rania Abul Seoud


[email protected]
© 2004, Cisco Systems, Inc. All rights reserved. 1
Lecture 3

Network Devices
Encapsulation
Process
© 2004, Cisco Systems, Inc. All rights reserved. 2
Protocol Data Unit (PDU)
• PDU-The form that a piece of data takes at any layer
• Each protocol of a given layer specified a unit of
data) and it consists of:-
➢Control information of the given layer.
➢Possibly user data of that layer.
• PDU has a different name to reflect its appearance.
• PDUs for the layers of the OSI model :
– PDU of Layer 1 is bit.
–PDU of Layer 2 is frame.
–PDU of Layer 3 is packet.
–PDU of Layer 4 is segment.
– Layer 5 and above are referred to as data.
© 2004, Cisco Systems, Inc. All rights reserved. 3
The Communication Process

Passing
down the
stack

© 2004, Cisco Systems, Inc. All rights reserved. 4


Steps to Encapsulate and Transmit Data
• Data is encapsulated with the necessary protocol
information as it moves down the layers before
network transit.
1. Images and text are converted to data.
2. The data is packed into segments.
3. The data segment is encapsulated in a packet
with the source and destination IP address.
4. The packet is encapsulated in a frame with the
MAC address of the next directly connected
device.
5. The frame is converted to a pattern of ones and
zeros (bits) for transmission on the media.
© 2004, Cisco Systems, Inc. All rights reserved. 5
The Communication Process -Encapsulation
Data Link IP TCP HTTP Data Link
Data Trailer
Header Header Header Header

•Encapsulation – Process of adding


control information as it passes down
through the layered model.

trailer

© 2004, Cisco Systems, Inc. All rights reserved. 6


The Communication Process - Decapsulation

Data Link IP TCP HTTP Data Link


Data Trailer
Header Header Header Header

Client

trailer

© 2004, Cisco Systems, Inc. All rights reserved. 7


L bits

Headers = Overhead HT bits


Application Data

• We want to send L bits TH Application Data


HN bits
• We actually send NH Transport Data
TD+HD+HN+HT+LHbits
bits D TD bits
TH: Transport Header DH Network Data DT
NH: Network Header
DH: Data link Header
DT: data link Trailer Data Link Data
TD+ HD+HN+HT+LL bits
Throughput Efficiency
L
=
For an Error Free Channel L + HT + H N + H D + T D
• Throughput Efficiency reflects the percentage of
information bits to the total number of bits required for
the information frame to arrive safely at the destination
© 2004, Cisco Systems, Inc. All rights reserved. 8
Interconnecting Networks
• All devices that connect the end-user devices together to
allow them to communicate.
• There are several ways of interconnecting
networks:
• Repeaters and Hub:- Interconnecting networks at the
Physical Layer.
• Bridges and Switches : - Interconnecting networks at
the Data Link Layer
• Routers:- Interconnecting networks at the Network
Layer

9
© 2004, Cisco Systems, Inc. All rights reserved.
9
Layer 1 Devices 1- Repeater

• It is a network device which is used to regenerate


signals that are distorted by transmission loss due to
attenuation (due to propagation over long distance).
• Does not make intelligent decision concerning forwarding
packets like a router or bridges.
• It works on physical layer (signal).

Attenuated Signal Amplified Signal

Host 2
Host 1

It has only two ports (input and output)


© 2004, Cisco Systems, Inc. All rights reserved. 10
Repeater

Rule : no more than four repeaters can be used


between hosts on a LAN.

The Four Repeater Rule for 10-Mbps Ethernet


should be used as a standard when extending
LAN segments.
This rule states that no more than four
repeaters can be used between hosts on a
LAN.
This rule is used to limit latency added to frame
travel by each repeater.
© 2004, Cisco Systems, Inc. All rights reserved. 11
Layer 1 devices
2- Hub
Hubs are used to connect
multiple nodes to a single
physical device, which
connects to the network.
Hubs are actually multiport
repeaters.
Using a hub changes the
network topology from a linear
bus, to a star.
It works on physical layer (signal).

•Hubs takes data bits from input port and floods it to all
other ports (logically →bus)
© 2004, Cisco Systems, Inc. All rights reserved. 12
Layer 2 Devices

• A layer 2 device is a device that understand MAC,


for example:
✓Bridge :
- Address learning
- Forwarding decisions are based on software.
- Bridge is used for LAN segmentation.

✓ Switch:
- A multi-port bridge up to 256 port.
- Forwarding decisions are based on hardware ASIC
(faster than bridge).

© 2004, Cisco Systems, Inc. All rights reserved. 13


MAC Address

© 2004, Cisco Systems, Inc. All rights reserved. 14


MAC Address -Ethernet Address-
Physical Address

• Each devise has a NICs (network interface cards)


which is identified by a unique code called a Media
Access Control (MAC) address.
• It is required to uniquely identify computers and
interfaces to allow for local delivery of frames on the
LAN.
• It is a layer 2 (Data Link Layer) address.
• MAC address is used to control data communication
for the terminal on the network.
▪ MAC addresses are 48 bits in length and expressed as
12 hexadecimal digits or 6 Byte address, (6 octet), (8-
bit numbers = one octet).
▪ 00:00:00:00:00:00
© 2004, Cisco Systems, Inc. All rights reserved. 15
MAC Address
▪The first six hexadecimal digits, which are administered
by the IEEE, identify the vendor. This is known as the
Organizational Unique Identifier (OUI).
▪The remaining six hexadecimal digits represent the
interface serial number or another value
administered by the manufacturer.

© 2004, Cisco Systems, Inc. All rights reserved. 16


MAC Address Types

• Unicast address.
• Multicast address. 01:10:1c:xx:xx:xx:
• Broadcast address. Ff:ff:ff:ff:ff:ff
(dedicated).

© 2004, Cisco Systems, Inc. All rights reserved. 17


Network Devices 3- Bridges
• It provides connections between LANs.
– Bridges are used to logically separate network
segments within the same network.

• LAN • LAN
• LAN Bridge provides connections
MAC 1 between LANs.

MAC 2 Hub Bridge Hub MAC 5

MAC 3 MAC 6

© 2004, Cisco Systems, Inc. All rights reserved. 18


Bridge
•It works on two layers physical layer and Data Link Layer
(frame) .
•Switching process is done by software.
•Bridge make intelligent decisions about whether or not to
pass signals on to the next segment of a network (basic
data transmission management). Bridges filter packets;
– A bridge examines frame header and selectively
forwards frame based on its destination.
When a bridge receives a frame on the network, the
destination MAC address is looked up in the bridge table to
determine whether to filter, flood, or copy the frame onto
another segment
Broadcast Packets are forwarded.
© 2004, Cisco Systems, Inc. All rights reserved. 19
If MAC 3 wants to send a frame to MAC 6

MAC 1

MAC 2 Hub Bridge Hub MAC 5

Data frame (f1)


MAC 3 MAC 6

MAC3 (source)
© 2004, Cisco Systems, Inc. All rights reserved. MAC6 (destination) 20
MAC Address O/P Port
Bridging Table MAC 1 Port = 1
MAC 2 Port = 1
If MAC 3 wants to send a MAC 3 Port = 1
frame to MAC 6
MAC 4 Port = 2
MAC3 MAC6 MAC 5 Port = 2
MAC 6 Port = 2
F1

MAC 1 F1

MAC 2 F1 Hub Hub F1 MAC 5


F1 Bridge F1
F1

MAC 3 MAC 6
Others will ignore this frame It will accept this frame
© 2004, Cisco Systems, Inc. All rights reserved. 21
MAC Address O/P Port
Bridging Table MAC 1 Port = 1
MAC 2 Port = 1
If MAC 3 wants to send a
frame to MAC 1 MAC 3 Port = 1
MAC 4 Port = 2
MAC 5 Port = 2
It will accept this frame
MAC 6 Port = 2
It will not cross the bridge
F1

MAC3 MAC1
MAC 1

Port 1 Port 2

MAC 2 F1 Hub Hub MAC 5


Bridge
F1
MAC 6
MAC3 MAC1
MAC 3 © 2004, Cisco Systems, Inc. All rights reserved. 22
Network Devices • Switches

• Switches are Multiport Bridges.


• Switching process is done by hardware.
• It works on two layers physical layer and Data Link
Layer (frame) .
• It connect LANs & adds more intelligent to data
transfer management (transfer data only to the
connection that needs it ).
• Hubs are replaced with switches to increase network
performance and bandwidth .
It receives a frame then it checks its MAC and by using
its switching table it forwards the frame to its
destination.
© 2004, Cisco Systems, Inc. All rights reserved. 23
Switching Table
If PC 4 wants to send a frame to PC 2
MAC Address Interface
MAC PC 1 f0/1
MAC-PC 2 f0/2
MAC-PC 3 f0/3
Serv. 5
MAC-PC 4 f0/4 PC 1
PC 4
MAC-Serv. 5 f0/5
f0/4 f0/5

f0/1
SMAC DMAC f0/3 f0/2
PC4 PC2

PC 3 PC 2

© 2004, Cisco Systems, Inc. All rights reserved. 24


Switch Learning

It learns MAC addresses

© 2004, Cisco Systems, Inc. All rights reserved. 25


Switch Forwarding Operation

© 2004, Cisco Systems, Inc. All rights reserved. 26


Switching Latency

© 2004, Cisco Systems, Inc. All rights reserved. 27


Network Devices •Routers
• Have all capabilities previously listed.
• WAN device connect LANs separated by great
distance.
• It chooses the best path through which the packet
will be forwarded to reach its destination.
• It is a network layer layer device, learns IP address.
• It receives a data packet and checks for its IP
address and uses its routing table to choose the
best path to reach its destination.

© 2004, Cisco Systems, Inc. All rights reserved. 28


Basic Purpose of Router
• Routers are the network center
-Routers generally have 2 connections:
-WAN connection (Connection to ISP)
-LAN connection

© 2004, Cisco Systems, Inc. All rights reserved. 29


IP – layer 3 - Addressing
➢It is a 32-bit, 4 octet, number that is assigned manually
or dynamically (DHCP).
➢It contains a network ID & a host ID embedded within
the 32-bit number.
➢An IP address Usually expressed using dotted decimal
notation.

• Binary notation:- 32 bit, 4 octet


or 4-byte address address
10000000.00001011.00000011.0
0011111
• Decimal point notation:-
30
© 2004, Cisco Systems, Inc. All rights reserved. 30
IP Addressing Structure

© 2004, Cisco Systems, Inc. All rights reserved. 31


IP & MAC Addresses

MAC A
41:16:1c:AE:BA:CD: MAC E
IP: 1.1.1.1 IP: 2.2.2.3

MAC D
IP: 2.2.2.1
MAC C
IP: 1.1.1.3

IP: 1.1.1.2 IP: 2.2.2.2

© 2004, Cisco Systems, Inc. All rights reserved. 32


Routing Tables

Network 11 Network 21
F0/1 S0/1
F0/1
R1 R2
F0/0 S0/1 F0/0
Network 20
Network 12 Network 22

© 2004, Cisco Systems, Inc. All rights reserved. 33


Routing table
learned Network Hob interface
Address
Routing C Network 11 0 F0/1
C Network 12 0 F0/0
Tables- R1 C Network 20 0 S0/1
R Network 21 1 S0/1
R Network 22 1 S0/1

R1 R2

© 2004, Cisco Systems, Inc. All rights reserved. 34


Routing table
learned Network Hob interface
Address
C Network 21 0 F0/1
Routing C Network 22 0 F0/0
C Network 20 0 S0/1
Tables - R2 R Network 11 1 S0/1
R Network 12 1 S0/1

R1 R2

© 2004, Cisco Systems, Inc. All rights reserved. 35


Collision Domains / Broadcast Domain

Collision Domains

• All stations connected to a Hub see traffic that


passes through it.
• It means that they all are in the same collision
domain .

• A collision domain is then a shared resource.


• Problems originating in one part of the
collision domain will usually impact the entire
36
collision domain.
© 2004, Cisco Systems, Inc. All rights reserved. 36
Repeaters and Hubs
Repeater and hub work in half duplex mode

All ports of the Repeaters and Hubs are members in a


single collision domain, and single broadcast domain

Layer 1 Devices Extend Collision Domains

© 2004, Cisco Systems, Inc. All rights reserved. 37


Hub - Collision Domain
•Hubs do not isolate collision domains (i.e., A station
may collide with any node residing at any segment
in LAN) LAN

•Single Collision domains

Broadcast Domain Hub

- Hub
•Single Broadcast domains.
© 2004, Cisco Systems, Inc. All rights reserved. 38
Collision Domain - Switches
• Switches provide a unique network segment on
each port, thereby separating collision domains.
• Each interface in a different Collision domains -
Multi Collision domains = No of interfaces of the
SW.
Broadcast Domain- Switches
• Single Broadcast domains.

© 2004, Cisco Systems, Inc. All rights reserved. 39


Uncontrolled collision & broadcast domains
• Collision Domains: - •4
• Broadcast Domains:- • One

© 2004, Cisco Systems, Inc. All rights reserved. 40


Collision Domain
• Routers provide a unique network segment on
each port, thereby separating collision domains.
• Multi Collision domains.

Broadcast Domain
• Multi Broadcast domains.

© 2004, Cisco Systems, Inc. All rights reserved. 41


Collision Domain Segmentation

Limiting the
Collision Domains

© 2004, Cisco Systems, Inc. All rights reserved. 42


Find number of broadcast domains and number of
collision domains

Solution :
no. of broadcast domains = 2
no. of collision domains =4

© 2004, Cisco Systems, Inc. All rights reserved. 43


Network Devices
• Repeater
• Signal
• Hub

• Bridge
• Frame
• Switch
• Packet
• Router

© 2004, Cisco Systems, Inc. All rights reserved. 44

You might also like