0% found this document useful (0 votes)
29 views90 pages

CH 2. Networks

Uploaded by

Ns Arial
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)
29 views90 pages

CH 2. Networks

Uploaded by

Ns Arial
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/ 90

This lecture is based on lectures

prepared by Eng. Tarek El Baz


COMPUTER NETWORKS Edited by Dr. Mohamed
Eltaweel and Dr. Yasser
Elgeddawy
Some materials are from
Guilford Technical Community College
http://www.dbillings.com/networking/osi1.htm
WARNING: DIFFICULT MATERIAL
▪ The most difficult chapter in the book
▪ Abstract and unfamiliar concepts
▪ Concepts are highly interrelated
▪ Will require especially diligent study
▪ Must be mastered for you to do well in the rest of the course

3
FIGURE 2.1: STANDARDS GOVERN
COMMUNICATION
Message Message

Client PC Message

Standards are rules of operation that govern communication between 2 H/W stations
or 2 S/W on different machines.

Standards Typically Focus on Message Exchanges:


Message Format (Syntax)
Message Order (Responses follow Requests)
Message Semantics: Meaning of Each Message
4
TWO COMMUNICATIONS
STANDARDS
OSI vs TCP/IP
-OSI Model

-TCP/IP Model
Network Access Layer
MAC Address
Bridge/Switch
Internet Layer
IP
Router
OSI REFERENCE MODEL
OSI: Open Systems Interconnection

The OSI model is the primary architectural model for networks.

It is group of concepts that describes how device know how to send data from
hop to hop then end to end

OSI/RM was developed by ISO in 1983


International Organization for Standardization
BENEFITS OF USING A LAYERED
MODEL
– It divides the network communication process
into Layers, so easier to troubleshooting.
– It allows multiple-vendor development through
standardization of network components.
– It allows various types of network hardware
and software to communicate.
– Changes in one layer do not affect other layers
because of layer separation
– Layers interact with each other.
OSI SEVEN LAYERS
▪Application
▪Presentation
▪Session
▪Transport
▪Network
▪Data Link
▪Physical
OSI SEVEN LAYERS
Application Layer
It is Responsible for assign network process ----> Applications.
HTTP (Hyper Text Transfer Protocol) ---> Browsing
FTP (File transfer Protocol) ---> Downloading/uploading
SMTP (Simple Mail transfer Protocol) ---> emailing
POP3 (Post office transfers Protocol) ---> emailing
Telnet/SSH (secure Shell) ---> Remote connection
RTP (Real-time Protocol) ---> delivering audio/video over IP networks
OSI SEVEN LAYERS
Presentation

• Data encryption.
OSI SEVEN LAYERS
Presentation

defined at this layer


GIF, TIFF, JPEG, MPEG, MIME, ZIP, and ASCII.
OSI SEVER LAYERS
Session
Establishes, manages and terminates sessions (connections) between
cooperating applications
Controls the sessions between the local and remote applications

I would like to Sounds You are


Thank you.
send you good! welcome!
something.

Establish Close
Connection Connection
OSI SEVER LAYERS
Session

Protocols/API's that operate on this layer include: RPC, SQL,


NETBIOS.
OSI SEVEN LAYERS
Transport
Organize data into segments
Provide reliable transport between end systems (source and
destination hosts)
End-to-end error recovery
End-to-end flow control and ordering
OSI SEVEN LAYERS
Transport

Protocols that operate on this layer: TCP, UDP, NETBEUI, SPX.


These protocols are either connectionless or connection-oriented.
OSI SEVEN LAYERS
Transport

What does it mean that TCP is connection-oriented Protocol


while UDP is connectionless Protocol?
OSI SEVEN LAYERS
Transport
Connection-oriented means that a connection (a virtual link) must be established before data can be exchanged. This
can guarantee that data will arrive, and in the same order it was sent. It guarantees delivery by sending
acknowledgements back to the source when messages are received. It is a form of flow control, and is called
"Windowing". TCP is an example of an connection-oriented transport protocol.

A common example of connection-oriented communication is a telephone call: you call, the 'destination' picks up the
phone and acknowledges and you start talking (sending data). When a message or a piece of it doesn't arrive, you
say: "What!?" and the sender will retransmit the data.

Connectionless is the opposite of connection-oriented; the sender does not establish a connection before it sends
data, it just sends without guaranteeing delivery. UDP is an example of an connectionless transport protocol. A
common example is regular mail versus registered/return receipt mail. Regular mail is UDP and registered mail is TCP.
OSI SEVEN LAYERS
Network
Organize data into Packets
It is responsible for the Internet Protocol Addressing (IP)🡪logical address
It know the best path for the destination
End-to-end Addressing
OSI SEVEN LAYERS
Network

Examples of protocols defined at this layer: IP, IPX, AppleTalk,


ICMP, RIP

Devices that operate on this layer: Routers, Layer


3 Switches.
WHAT IS THE DIFFERENCE BETWEEN
TRANSPORT AND NETWORK LAYER?
The network layer is responsible for taking the data packets and sending them to the
correct computer. The transport layer then takes the received packets, checks them for
errors and sorts them. Then, it sends them to the session layer of the correct program
running on the computer.
OSI SEVEN LAYERS
Data link
Reliable data transfer across a physical link
It have the physical addressing 🡪 known as MAC address.
Organize the data into frames, to be put on the physical medium
Check the Frame For errors
Hop to hop addressing, indicates the flow the communication follows. Data pass
through multiple devices with an IP address, and each is genetically named “hop”.
OSI SEVEN LAYERS
Data link

Devices that operate on this layer: Switches and


Bridges.
DATA LINK
A NIC (network interface controller) card, also known as a network adaptor or
network interface card, is a circuit board that is installed on a computer to connect to
the network.
DATA LINK
.Data Link layer addresses
Also known as layer 2 addresses, BIAs (Burned-in Address), physical address
and most commonly referred to as MAC address. This is a fixed address
programmed into a NIC or a router interface for example.
00-10-E3-42-A8-BC is an example of a MAC address. The first 6
hexadecimal digits (3 bytes) specify the vendor/manufacturer of the NIC, the
other 6 digits (3 bytes) define the host.
The layer 2 broadcast address is FF-FF-FF-FF-FF-FF.
OSI SEVEN LAYERS
Physical
Transmission of unstructured bit stream over the physical link.
It have the electric signals.
It contains all kinds of cables or Wireless media
OSI SEVEN LAYERS
Physical

Devices that operate on this layer: HUBs/concentrators,


repeaters, NICs, etc.
MAJOR NETWORKING PROTOCOLS

TCP/IP
IPX/SPX
NetBEUI
Apple Talk
TCP/IP PROTOCOL SUITE
TCP/IP is open standard protocol
Not tied to one vendor
TCP/IP is the internet protocol
Now internet use TCP/IP v4
Next version TCP/IP v6
It is the default protocol for
Microsoft Operating Systems
UNIX Operating Systems
LINUX Operating Systems
OSI VERSUS TCP/IP
VERTICAL LAYERED Internet Layer
Data Link Layer
COMMUNICATION Physical Layer
IN A SINGLE HOST 30
VERTICAL COMMUNICATION ON
THE SOURCE HOST ‫ر‬
Internet Process IP Packet

Data Link
Process DL-T IP Packet
IP Packet DL-H

Physical Process

Sender
Host A

31
FIGURE 2.11: VERTICAL
COMMUNICATION ON THE SOURCE
HOST
Internet Layer Process
Creates an IP packet
Passes the packet down to the data link layer process

Data Link Layer Process


Creates a new frame
Places (encapsulates) the IP packet in the data field of the frame, adding a frame header and
perhaps a trailer
Passes frame down to the physical layer process
ENCAPSULATION
Encapsulation is placing a message in the data field of
another message. Encapsulation adds information to a
packet as it travels to its destination.

Data Link
IP Packet in Data Field
Layer
Of the Frame
Header

Frame

33
VERTICAL COMMUNICATION ON THE DESTINATION HOST
(HOST B)

IP Packet Internet Process

DL-T IP
IP Packet
Packet DL-H Data Link Process

Physical Process

Receiver
Host B

34
VERTICAL COMMUNICATION ON
THE DESTINATION HOST
Physical Layer Process
Converts the signal into bits of the frame
Passes the frame up to the data link layer process
Data Link Layer Process
Checks the data link layer header (and, if present, trailer)
Decapsulates the IP packet
Passes the packet up to the internet layer process
VERTICAL COMMUNICATION ON SWITCH X1

Switch X1
A B
Frame Frame
Data Link Layer Process
Port Port Port Port
1 2 3 4
PHY PHY PHY PHY

Host A Switch X2

Notes:
A. Switch X1 receives frame in Port 1.
B. Data Link process sends frame out Port 2.

36
VERTICAL COMMUNICATION ON SWITCH X1

Switch takes the signal from Host A at its the Physical Layer and at specific
port no (as here Port 1), It passes this frames to its Data Link Layer (Note:
switches don’t change frames, they only checking it). If the destination in the
MAC address of the frame refer to the router, then the switch passes this
frame to the router port (here it’s Port 4)
VERTICAL COMMUNICATION ON ROUTER R1

IP Packet
Internet Layer Process

Port 1 Port 2 Port 3 Port 4


DL-T IP
IP Packet
Packet DL-H
DL DL DL DL
PHY PHY PHY PHY
Router R1

Switch X2

Router R1 receives frame from Switch X2 in Port 1.


Port 1 DL Process decapsulates packet.
Port 1 DL passes packet to internet process.

38
VERTICAL COMMUNICATION ON ROUTER R1

IP Packet
Internet Layer Process

Port 1 Port 2 Port 3 Port 4


DL-T IP
IP Packet
Packet DL-H
DL DL DL DL
PHY PHY PHY PHY
Router R1

Router 2
Internet process sends packet out on Port 4.
DL Process on Port 4 encapsulates packet in frame.
DL Process passes frame to Port 4 PHY.

39
VERTICAL COMMUNICATION ON ROUTER R1
• Each Port in the router contains physical layer process and data link
layer process (Switches ports only have physical layer process).
• The internet layer at the router looks out for destination IP address
and makes routing decision of what is the suitable port to use to send
the packet out.
•Routers also don’t change packets, it’s only checks them for their
validity and their destination IP.

40
QUIZ
From knowledge that gained till now:

What is the deference between the Segment, Packet, and


Frames?
DATA ENCAPSULATION
TCP/IP PROTOCOL ARCHITECTURE
Network Access Layer
Hop to Hop addressing
Error detection Mechanism
Transmission medium
Signal rate and encoding
DEVICES USED IN NETWORKING

Network Interface Card NIC


Network adapter
Operate at the physical layer of OSI/RM
The interface between the PC and the network
cable
Resides in the motherboard of the PC
Communicate with the PC through the device driver
Contain transceiver
It Have A physical Address burned on the card
called Mac address.

44
COMMUNICATING WITHIN THE
LAN
Unicast: traffic, many streams of IP packets that move
across networks flow from a single point, such as a website
server, to a single endpoint such as a client PC. This is the
most common form of information transference on
networks.
Broadcast: Here, traffic streams from a single point to all possible endpoints
within reach on the network, which is generally a LAN. This is the easiest
technique to ensure traffic reaches its destinations.

This mode is mainly utilized by television networks for video and audio
distribution. Even if the television network is a cable television (CATV) system,
the source signal reaches all possible destinations, which is the key reason that
some channels’ content is scrambled. Broadcasting is not practicable on the
public Internet due to the massive amount of unnecessary data that would
continually reach each user’s device, the complications and impact of
scrambling, and related privacy issues.
Multicast: In this method traffic recline between the
boundaries of unicast (one point to one destination) and
broadcast (one point to all destinations). And multicast is a
“one source to many destinations” way of traffic
distribution, which means that only the destinations that
openly point to their requisite to accept the data from a
specific source to receive the traffic stream.
PHYSICAL ADDRESSES

Example Physical Address


07:01:02:01:2C:4B
LAN SEGMENT LIMITATIONS

▪ Signals degrade with transmission distance.


▪ Each Ethernet type has a maximum segment length.
EXTENDING LAN SEGMENTS

▪ Shares bandwidth
▪ Extends cable distances
▪ Repeats or amplifies signal
▪ It is layer 1 device
▪ It work only with bits
▪ Must work with half duplex communication
COLLISIONS

▪ All ports of the hub have the same collision domain and broadcast
domain.
▪ Collisions makes the network very slow and congested
CSMA/CD
SWITCH/BRIDGE

▪ Operate at Layer 2 of the OSI model


▪ Forward, filter, or flood frames
▪ Switch have large number of ports compared to the Bridge
▪ Switches forward and process frames in Hardware but Bridges In
Software so that the Bridge slower than switch
▪ Switch work with full duplex communication and Mixture of speeds
ETHERNET FRAME STRUCTURE
SWITCHING FRAMES
ETHERNET SWITCHING TABLE
Switch Table Ethernet Switch
Port Station

10 A1-44-D5-1F-AA-4C UTP
13 B2-CD-13-5B-E4-65
15 C3-2D-55-3B-A9-4F
15 C3-2D-55-3B-A9-4F D4-47-55-C4-B6-9F
16 D4-47-55-C4-B6-9F UTP UTP On Port 16

UTP Frame

Frame
C3-2D-55-3B-A9-4F
A1-44-D5-1F-AA-4C B2-CD-13-5B-E4-65 On Port 15
On Port 10 On Port 13

57
FIGURE 5.1: MULTI-SWITCH
ETHERNET LAN
Switch 2

Port 5 on Switch 1
to Port 3 on Switch 2 Port 7 on Switch 2
to Port 4 on Switch 3

Switch 1 Switch 3

C3-2D-55-3B-A9-4F
Switch 2, Port 5

B2-CD-13-5B-E4-65
Switch 1, Port 7

A1-44-D5-1F-AA-4C D4-55-C4-B6-9F E5-BB-47-21-D3-56


Switch 1, Port 2 Switch 3, Port 2 Switch 3, Port 6

58
MULTI-SWITCH ETHERNET
LAN
Switch 2

Switching Table Switch 1


Port 5 on Switch 1
Port Station
to Port 3 on Switch 2
Switch 1 2 A1-44-D5-1F-AA-4C
7 B2-CD-13-5B-E4-65
5 C3-2D-55-3B-A9-4F
5 D4-47-55-C4-B6-9F
5 E5-BB-47-21-D3-56

B2-CD-13-5B-E4-65
Switch 1, Port 7

A1-44-D5-1F-AA-4C E5-BB-47-21-D3-56
Switch 1, Port 2 Switch 3, Port 6

59
MULTI-SWITCH ETHERNET
LAN
Switch 2

Port 5 on Switch 1 Port 7 on Switch 2


to Port 3 on Switch 2 to Port 4 on Switch 3

C3-2D-55-3B-A9-4F
Switch 1 Switch 2, Port 5 Switch 3

Switching Table Switch 2


Port Station
3 A1-44-D5-1F-AA-4C
3 B2-CD-13-5B-E4-65
5 C3-2D-55-3B-A9-4F
7 D4-47-55-C4-B6-9F
E5-BB-47-21-D3-56
7 E5-BB-47-21-D3-56
Switch 3, Port 6

60
MULTI-SWITCH ETHERNET
LAN
Switch 2
Port 7 on Switch 2
to Port 4 on Switch 3
Switching Table Switch 3
Port Station
4 A1-44-D5-1F-AA-4C Switch 3
4 B2-CD-13-5B-E4-65
4 C3-2D-55-3B-A9-4F
2 D4-47-55-C4-B6-9F
6 E5-BB-47-21-D3-56

A1-44-D5-1F-AA-4C D4-55-C4-B6-9F E5-BB-47-21-D3-56


Switch 1, Port 2 Switch 3, Port 2 Switch 3, Port 6

61
HIERARCHICAL ETHERNET
LAN
Only One
Possible Path
Between Ethernet
Any Two Switch A
Stations

Ethernet Ethernet
Switch B Switch C
PC Client 2

Ethernet Switch F
Ethernet
Switch D Ethernet
Switch E

Server X Server Y
Client PC1

62
SINGLE POINT OF FAILURE IN A
SWITCH HIERARCHY Switch Fails

Switch 2
No Communication No Communication

C3-2D-55-3B-A9-4F
Switch 1 Switch 3

B2-CD-13-5B-E4-65 D4-47-55-C4-B6-9F

A1-44-D5-1F-AA-4C E5-BB-47-21-D3-56
63
802.1D SPANNING TREE
PROTOCOL
Normal Operation Module C
Loop, but
Spanning Tree Protocol
Deactivates One Link
Switch 2 Activated
Activated Deactivated

C3-2D-55-3B-A9-4F
Switch 1 Switch 3

B2-CD-13-5B-E4-65 D4-47-55-C4-B6-9F

A1-44-D5-1F-AA-4C E5-BB-47-21-D3-56
64
802.1D SPANNING TREE
PROTOCOL
Switch 2 Fails
Module C

Switch 2 Deactivated
Deactivated
Activated

Switch 1 C3-2D-55-3B-A9-4F Switch 3

B2-CD-13-5B-E4-65 D4-47-55-C4-B6-9F

A1-44-D5-1F-AA-4C E5-BB-47-21-D3-56
65
HIERARCHICAL ETHERNET
LAN
Core
Core
Ethernet
Switch A

Core Ethernet Core Ethernet


Switch B Switch C
PC Client 2
Workgroup
Workgroup Ethernet Switch F
Ethernet Workgroup
Switch D Ethernet
Switch E
Server X Server Y
Client PC1

66
WORKGROUP SWITCHES
VERSUS CORE SWITCHES

Workgroup Switches Core Switches


Client or Server to the Ethernet Switches
Connects
Ethernet Network to One Another
100 Mbps,
Typical Port
10/100 Mbps Gigabit Ethernet,
Speeds
10 Gbps Ethernet

Lower Percentage of 80% or More of


Switching Matrix
Nonblocking* Capacity Nonblocking* Capacity

67
SWITCHING MATRIX WITH
QUEUE
Module C

Switch Matrix

Input Queue

Port Port Port Port Port Port Port Port


1 2 3 4 5 6 7 8

Incoming Outgoing
Signal Signal

68
WORKGROUP SWITCHES VERSUS CORE
SWITCHES
Switching Matrix
Ports = 4 4Gbps
Nonblocking
Speed = 1 Gbps
1 Gbps
Maximum input = 4 Gbps
Nonblocking switch matrix
capacity = 4 Gbps
1 Gbps

1 Gbps
1 Gbps

69
VIRTUAL LAN WITH ETHERNET
SWITCHES
Server Broadcasting without VLANS

Frame is Broadcast
Goes to all stations
Creates congestion

Server
Broadcast

Client C

Client B
Client A Server D Server E

70
VIRTUAL LAN WITH ETHERNET
SWITCHES
Server Multicasting with VLANS

Multicasting (some), not


VLANs are collections
Broadcasting (all)
of servers and their
clients

Server
Broadcast

Client C
on VLAN1

Client B
on VLAN2
Client A Server D Server E
on VLAN1 on VLAN2 on VLAN1
71
TYPICAL 802.11 WIRELESS LAN
OPERATION WITH ACCESS POINTS
CSMA/CA+ACK
Switch
UTP Radio Link

Access
Point A
Laptop

Access Handoff(‫)اﻟﺗﺣوﯾل‬
Point B If mobile computer
Client PC moves to another
Server access point,
it switches service
to that access point
Large Wired LAN

72
TYPICAL 802.11 WIRELESS LAN
OPERATION WITH ACCESS POINTS
Access Point

Industry
Standard
Coffee
Cup

Wireless
Notebook
To Ethernet
NIC
Switch

73
FIGURE 5.8: TYPICAL 802.11
WIRELESS LAN OPERATION WITH
ACCESS POINTS

D-Link
Wireless
Access
Point

Using Two Antennas Reduces Multipath Interference (See Ch. 3)

74
CSMA/CA + ACK IN 802.11
WIRELESS LANS
CSMA/CA (Carrier Sense Multiple Access with
Collision Avoidance)
Station or access point sender listens for traffic
If there is no traffic, can send if there has been no traffic for a specified
amount of time
If the specified amount of time has not been met, must wait for the specified
amount of time. Can send if the line is still clear

75
CSMA/CA + ACK IN 802.11
WIRELESS LANS
CSMA/CA (Carrier Sense Multiple Access with
Collision Avoidance)
Station or access point sender listens for traffic
If there is traffic, the sender must wait until traffic stops
The sender must then set a random timer and must wait while the timer is
running
If there is no traffic when the station or access point finishes the wait, it may
send

76
CSMA/CA + ACK IN 802.11
WIRELESS LANS
ACK (Acknowledgement)
Receiver immediately sends back an acknowledgement;
no waiting because ACKs have highest priority
If sender does not receive the acknowledgement,
retransmits using CSMA/CA

77
WHO IMPLEMENTS CSMA/CA?
Stations (when they send)
Access Points (when they send)

802.11
Mobile Frame
Access
Station Point

CSMA/CA+ACK

78
AD HOC 802.11 NETWORKS Module C

No Access Point
a wireless network that allows easy connection establishment between wireless client devices in
the same physical area without the use of an infrastructure device.

Stations broadcast to one another directly


Not scalable but can be useful for SOHO use
NICs automatically come up in ad hoc mode

79
TCP/IP PROTOCOL ARCHITECTURE
Internet Layer (IP)
Routing of data
Logical addressing IPV4 , IPV6
WHY IP ADDRESSES?
They uniquely identify each device on an IP network.
Some times we called it the logical address
Every host (computer, networking device, peripheral) must have a unique address.
Host ID:
Identifies the individual host
Is assigned by organizations to individual devices
The router maintain network information to route the data
The IP address 32 bit divided into 4 octets each octet 8 bit
Octet is a unit consists of 8 bits

Network.Host
IP ADDRESS FORMAT: DOTTED
DECIMAL NOTATION

The binary-to-decimal and


decimal-to-binary conversion will be
detailed later in this course.
IP ADDRESS CLASSES: THE FIRST
OCTET
IP ADDRESS RANGES

*127 (01111111) is a Class A address reserved for loopback testing and


cannot be assigned to a network.
RESERVED ADDRESS

▪ Direct Broadcast
▪ Loopback address
▪ Auto configuration
▪ All networks
PUBLIC IP ADDRESSES

▪ InterNIC is an organization decide the stability of the IP address


▪ You Got Bulk of the IP addresses from your ISP
PRIVATE IP ADDRESSES
Class Private Address Range

A 10.0.0.0 to 10.255.255.255

B 172.16.0.0 to 172.31.255.255

C 192.168.0.0 to 192.168.255

▪ Nat is used to Translate the private IP address to public IP


addresses.
IPCONFIG
DEVICES USED IN NETWORKING

Routers / L3 Switch
A device used to redirect packets between networks
Use network layer address ( IP Address)
Operate at the network layer of OSI
Routers forward packets based upon The Destination IP Network
Router search the routing table for the needed network ID
Routers are protocol dependent

89
THANK YOU

You might also like