Professional Documents
Culture Documents
1 Introduction To Computer Networking
1 Introduction To Computer Networking
Mona Ali
Course Objectives
5
1.1 Growth of Computer Networking
11
1.3.1 Network Applications and Network
Programming
13
13
1.3.2 Data Communications
Large Enterprise
24
1.6 Protocol Suites and Layering Models
network addresses
order
1.6 Protocol Suites and Layering Models
email exchange
file transfer
web browsing
telephone services
28
1.7 How Data Passes Through Layers
31
1.8 Headers and Layers
At the same time the Internet protocols were being developed, two large
standards bodies jointly formed an alternative reference model
They also created a set of internetworking protocols
ISO and the ITU use a process that accommodates as many viewpoints as
possible when creating a standard
As a result, some standards can appear to have been designed by a
committee making political compromises rather than by engineers and
scientists
The seven-layer reference model is controversial
It did indeed start as a political compromise
the model and the OSI protocols were designed as competitors for
the Internet protocols
ISO and the ITU are huge standards bodies that handle the world-wide
telephone system and other global standards
The Internet protocols and reference model were created by a small group of
about a dozen researchers
It is easy to see why the standards organizations might be confident that
they could dictate a set of protocols and everyone would switch away
from protocols designed by researchers
At one point, even the U.S. government was convinced that TCP/IP
should be replaced by OSI protocols
35
1.10 The Inside Scoop
43
LAN and WAN
• Examples:
• Network inside the Student Computer Room
44
Fundamental Network Classifications (cont)
Client Client
Client Client
• Wide Area Network (WAN)
• A network that uses long-range telecommunication links to connect
2 or more LANs/computers housed in different places far apart.
• Towns, states, countries
• Examples:
• Network of our Campus
• Internet
Your home
USA
WAN
Student Computer
Centre
46
Fundamental Network Classifications (cont)
53
Client/Server Networking
56
Network topology
Bus topology
Network topology (cont.)
Star Topology
A physical star topology branches each network
device off a central device called a hub, making it very
easy to add a new workstation.
Also, if any workstation goes down it does not affect
the entire network. (But, as you might expect, if the
central device goes down, the entire network goes
down.)
Some types of Ethernet use a physical star topology.
Figure 8.7 gives an example of the organization of the
star network.
Network topology (cont.)
Star topologies are easy to install. A
cable is run from each workstation to the
hub. The hub is placed in a central
location in the office.
Star topologies are more expensive to
install than bus networks, because there
are several more cables that need to be
installed, plus the cost of the hubs that
are needed.
Network topology (cont.)
Star Topology
Network topology (cont.)
Ring
Each computer connects to two other
computers, joining them in a circle creating a
unidirectional path where messages move
workstation to workstation.
Each entity participating in the ring reads a
message, then regenerates it and hands it to
its neighbor on a different network cable.
Network topology (cont.)
The ring makes it difficult to add new
computers.
Unlike a star topology network, the ring
topology network will go down if one
entity is removed from the ring.
Physical ring topology systems don’t
exist much anymore, mainly because the
hardware involved was fairly expensive
and the fault tolerance was very low.
Network topology (cont.)
Ring Topology
Network topology (cont.)
Mesh
The mesh topology is the simplest logical topology in terms of
data flow, but it is the most complex in terms of physical design.
In this physical topology, each device is connected to every other
device
This topology is rarely found in LANs, mainly because of the
complexity of the cabling.
If there are x computers, there will be (x × (x–1)) ÷ 2 cables in the
network. For example, if you have five computers in a mesh
network, it will use 5 × (5 – 1) ÷ 2, which equals 10 cables. This
complexity is compounded when you add another workstation.
For example, your five-computer, 10-cable network will jump to
15 cables just by adding one more computer.
Network topology (cont.)
Because of its design, the physical mesh topology is very
expensive to install and maintain.
Cables must be run from each device to every other device. The
advantage you gain from it is its high fault tolerance.
With a logical mesh topology, however, there will always be a
way of getting the data from source to destination.
It may not be able to take the direct route, but it can take an
alternate, indirect route. It is for this reason that the mesh
topology is still found in WANs to connect multiple sites across
WAN links. It uses devices called routers to search multiple
routes through the mesh and determine the best path.
However, the mesh topology does become inefficient with five or
more entities.
Network topology (cont.)
Mesh Topology
Network topology (cont.)
Advantages and Disadvantages of Network Topologies
For two computers to send and receive data, the cards must
agree on several things. These include the following:
- The maximum size of the data frames
- The amount of data sent before giving
confirmation
- The time needed between transmissions
- The amount of time needed to wait before sending
confirmation
- The amount of data a card can hold
- The speed at which data transmits
In order to successfully send data on the network, you need to
make sure the network cards are of the same type and they are
connected to the same piece of cable.
Hardware, Software and Networks Peripherals (cont.)
Configuration
Coaxial cables
Fiber-optic cables
89
Twisted-Pair Cables
Insulator Metal
91
Shielded Twisted-Pair (STP)
92
Categories of UTP Cables
93
Coaxial Cables
94
Fiber-Optic Cables
96
Light bounces back and forth along
the core
Common light sources: LEDs and
lasers
Guided Media – Fiber-Optic Cable
Fiber Construction
Guided Media – Fiber-Optic Cable
Fiber-optic Cable Connectors
Advantages and Disadvantages
100
Comparison of Physical Media
Unguided Media
Wireless transmission waves
Broadcast Radio
Radio is a general term used to encompass frequencies
radio is 3kHz to 300GHz
use broadcast radio, 30MHz - 1GHz, for:
FM radio
is Omnidirectional
suffers from multipath interference
reflections from land, water, other objects
Unguided Media – Radio Waves
Omnidirectional Antenna
Unidirectional Antenna
Satellite Microwave
satellite is relay station
receives on one frequency, amplifies or repeats
signal and transmits on another frequency
eg. uplink 5.925-6.425 GHz & downlink 3.7-4.2 GHz
typically requires geo-stationary orbit
height of 35,784km
typical uses
television
long distance telephone
private business networks
global positioning
Unguided Media – Infrared
reception antenna
electromagnetic energy impinging on antenna
fed to receiver
122
Function of Packets in Network
Communications
Networks reformat data into smaller, more
manageable pieces called packets or
frames
Advantages of splitting data include:
More efficient transmission, since large units
of data saturate network
More computers able to use network
123
Packet Structure
124
Typical Packet Structure
125
Packet Creation
126
Header/Trailer Information Added or
Removed
127
Packet Creation (continued)
128
The different between the
segment ,frame,paket
A Ethernet "Frame" is the layer 2 frame that is given to the nic card for
transmission.
An IP "Packet" is the information starting with the IP header, and includes all
upper layer protocol information.
And, a TCP segment, encapsulates all higher level protocols above it.
129
Understanding Packets
130
Protocols
Routable
No routable
131
The Function of Protocols
Each protocol has different purpose and
function
Protocols may work at one or more layers
More sophisticated protocols operate at higher
layers of OSI model
Protocol stack or protocol suite is set of
protocols that work cooperatively
Most common protocol stack is TCP/IP used
by the Internet and pretty much all operating
systems
132
Protocols in a Layered
Architecture
Most protocols can be positioned and
explained in terms of layers of OSI model
Protocol stacks may have different protocols
for each layer
See Figure 3 for review of functions of each
layer of OSI model
See Figure 4 for three major protocol types
Application protocols at layers 5-7
Transport protocols at layer 4
Network protocols at layers 1-3
133
Functions of OSI Model Layers
134
Three Main Protocol Types
135
Network Protocols
Provide addressing and routing information, error
checking, and retransmission requests
Services provided by network protocols are called link
services
Popular network protocols include:
Internet Protocol version 4 (IPv4)
Internetwork Packet Exchange (IPX) and NWLink
NetBEUI
Internet Protocol version 6 (IPv6)
136
Transport Protocols
137
Application Protocols
138
Transmission Control Protocol/ Internet Protocol (TCP/IP)
139
TCP/IP Compared to OSI Model
140
IP Addressing
Logical addresses, 32-bits or 4 bytes long
Four octets separated by periods, each with
decimal value from 0-255
First part of address identifies network
Second part of address identifies host or
individual computer
IP addresses broken into classes
Number of IP address registries under control
of Internet Assigned Numbers Authority
(IANA)
141
Classless Inter-Domain Routing (CIDR)
142
Subnet Masks
143
Network Address Translation
(NAT)
Allows organization to use private IP
addresses while connected to the
Internet
Performed by network device such as
router that connects to Internet
See Simulation 6-3 and Figure 6-6 for
examples of NAT
144
Network Address Translation (NAT) (continued)
145
Dynamic Host Configuration Protocol
(DHCP)
DHCP server receives block of available
IP addresses and their subnet masks
When computer needs address, DHCP
server selects one from pool of available
addresses
Can move computers with ease; no need
to reconfigure IP addresses
Some systems, such as Web servers,
must have static IP address
146
IPv6
147
NetBIOS and NetBEUI
148
NetBIOS and NetBEUI (continued)
Figure 6-7 shows Microsoft protocol suite and its
relationship to OSI model
Defines four components above Data Link layer
149
Microsoft Protocol Suite Compared to OSI Model
150
NetBIOS and NetBEUI (continued)
151
NetBIOS and NetBEUI (continued)
NetBIOS operates at Session layer to provide peer-to-
peer network application support
Unique 15-character name identifies each computer
in NetBIOS network
NetBIOS broadcast advertises computer’s name
152
NetBIOS and NetBEUI (continued)
153
IPX/SPX(Internetwork Packet/Sequenced Packet
Exchange
154
NWLink Compared to OSI Model
155
AppleTalk
156
Implementing and Removing
Protocols
Easy to add or remove protocols
TCP/IP loads automatically when most
operating systems are installed
In Windows 2000/2003/XP, use Local
Area Connections Properties to add or
remove protocols
See Figure 6-9
157
Network and Dial-up
Connections
158
Putting Data on the Cable:
Access Methods
Consider several factors
How computers put data on the cable
How computers ensure data reaches
destination undamaged
159
Function of Access Methods
160
Major Access Methods
Token passing
Demand priority
Polling
161
Contention
In early networks, contention method allowed
computers to send data whenever they had data to
send, resulting in frequent collisions and
retransmissions
Figure 6-11 shows data collision
Two carrier access methods were developed for
contention-based networks
Carrier Sense Multiple Access with
Collision Detection (CSMA/CD)
Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)
162
Data Collision
163
CSMA/CD
164
CSMA/CD (continued)
165
CSMA/CD (continued)
166
CSMA/CA
Uses collision avoidance, rather than
detection, to avoid collisions
When computer senses channel is free, it
signals its intent to transmit data
Used with Apple’s LocalTalk
167
Switching
Switch interconnects individual nodes and controls
access to media
Switching usually avoids contention and allows
connections to use entire bandwidth
Other advantages include:
Fairer than contention-based technology
Permits multiple simultaneous conversations
Supports centralized management
Disadvantage include:
Higher cost
Failure of switch brings down network
168
Token Passing
Token passes sequentially from one computer to next
Only computer with token can send data, as
seen in Figure 6-12
Advantages and disadvantages:
Prevents collisions
Provides all computers equal access to media
Computer must wait for token to transmit,
even if no other computer wants to transmit
Complicated process requires more expensive
equipment
169
Communication in a
Token-Passing Network
170
Demand Priority
Used only by 100VG-AnyLAN 100 Mbps
100BaseVG is a 100 Mbit/s Ethernet standard specified to
run over four pairs of category 3 UTP wires (known as voice
grade, hence the "VG"). It is also called 100VG-
AnyLANbecause it was defined to carry both Ethernet and
token ring frame types.
Ethernet standard (IEEE 802.12)
Runs on star bus topology, as seen in Figure 6-13
Intelligent hubs control access to network
Computer sends hub demand signal when it wants to
transmit
171
Advantages and disadvantages:
Allows certain computers to have higher
priorities
Eliminates extraneous traffic by not
broadcasting packets but sending them to
each computer
Price is major disadvantage
172
Demand Priority Uses
Star Bus Topology
173
Polling
One of oldest access methods
Central controller, called primary device, asks each
computer or secondary device if it has data to send, as
seen in Figure 6-14
Advantages and disadvantages:
Allows all computers equal access to channel
Can grant priority for some computers
Does not make efficient use of media
If primary device fails, network fails
174
Primary Device Controls Polling
175
Choosing an Access Method
176
Chapter Summary
177
Chapter Summary (continued)
Each protocol has strengths and weaknesses
A suite, or stack, of protocols allows a number of
protocols to work cooperatively
Major protocol suites are TCP/IP, IPX/SPX, and
NetBEUI
Each suite contains many smaller protocols, each of
which has its own network function
178
Chapter Summary (continued)
179
Chapter Summary (continued)
180
Introduction to TCP/IP
History and Future of TCP/IP
The U.S. Department of
Defense (DoD) created the
TCP/IP reference model
because it wanted a
network that could survive
any conditions.
Some of the layers in the
TCP/IP model have the
same name as layers in the
OSI model.
Application Layer
Each individual
device must be
configured with an
IP address.
Reverse Address Resolution Protocol (RARP)
RARP REQUEST
MAC HEADER IP HEADER
MESSAGE
Destination Destination
FF-FF-FF-FF-FF-FF 255.255.255.255 What is my IP
Source Source address?
FE:ED:FD:23:44:EF ????????
BOOTP IP
Classless addressing
216
The original class C address has 8 bits
of suffix and each of the classless
addresses has 6 bits of suffix
Thus, instead of wasting addresses
ISP can assign each of the four (4)
classless prefixes to a subscriber
Subnet and Classless Addressing
218
Address Masks
219
Address Masks
Why store the boundary size as a bit mask?
A mask makes processing efficient
221
Address Masks( As an example)
:
Consider the following 32-bit network prefix:
222
CIDR Notation
A list of
address masks
in CIDR
notation and in
dotted decimal
224
A CIDR Example
Assume an ISP has the following block 128.211.0.0/16
Suppose the ISP has 2 customers
one customer needs 12 IP addresses and the other needs 9
both customers have the same mask size (28 bits), the prefixes
differ
The binary value assigned to customer1 is:
10000000 11010011 00000000 0001 0000
The binary value assigned to customer2 is:
10000000 11010011 00000000 0010 0000
There is no ambiguity
Each customer has a unique prefix
225
Example of special address
1-Directed Broadcast Address
2- Limited Broadcast Address
4- Loopback Address
Special IP Addresses
Directed Broadcast Address
227
Special IP Addresses
Limited Broadcast Address
Limited broadcast refers to a broadcast on a directly-
connected network:
informally, we say that the broadcast is limited to a
“single wire”
Limited broadcast is used during system startup
by a computer that does not yet know the network
number
IP reserves the address consisting of 32-bits of 1s
refer to limited broadcast
this computer
229
Special IP Addresses
Loopback Address
Loopback address used to test network applications
It is used for preliminary debugging after a network application has been
created
A programmer must have two application programs that are intended to
communicate across a network
Each application includes the code needed to interact with TCP/IP
231
Summary of Special IP Addresses
The table in Figure 21.7 summarizes the special IP addresses
232
Internet Routing
and
Routing Protocols
233
Static Vs. Dynamic Routing
IP routing can be partitioned into two broad categories:
Static routing
Dynamic routing
Static routing forwarding table is created before the system starts to
forward packets
and does not change entries, unless manually altering them
In dynamic routing route propagation software runs on the system and
continuously updates the forwarding table
to insure that each datagram follows an optimum route
the software communicates with other systems to learn optimum
routes to each destination
it continually checks for network failures that cause routes to change
dynamic routing begins exactly like static routing
by loading an initial set of routes into a forwarding table when the
system boots
234
Static Routing in Hosts
and a Default Route
Static routing is straightforward and easy to specify
It does not require extra routing software
235
Static Routing in Hosts
and a Default Route
236
Dynamic Routing and Routers
Can a router in the Internet use static routing the same way a host
does?
Most routers use dynamic routing
but in some exceptional cases static routing can be used
As an exception
(case where static routing does suffice for a router)
237
Dynamic Routing and Routers
Each router exchanges information with other routers
When it learns about changes in routes
the routing software updates the local forwarding table
Routers exchange information periodically
the local forwarding table is updated continuously
238
Packet-Switching Networks
239
Circuit Switching (e.g., Phone Network)
240
Circuit Switching With Human Operator
241
Circuit Switching: Multiplexing a Link
Time-division Frequency-division
Each circuit allocated Each circuit allocated
certain time slots certain frequencies
frequency
time time
242
Advantages of Circuit Switching
Guaranteed bandwidth
Predictable communication performance
Simple abstraction
Reliable communication channel between hosts
No worries about lost or out-of-order packets
Simple forwarding
Forwarding based on time slot or frequency
No need to inspect a packet header
Low per-packet overhead
Forwarding based on time slot or frequency
No IP (and TCP/UDP) header on each packet
243
Disadvantages of Circuit Switching
Wasted bandwidth
Bursty traffic leads to idle connection during silent
period
Unable to achieve gains from statistical multiplexing
Blocked connections
Connection refused when resources are not
sufficient
Unable to offer “okay” service to everybody
244
Disadvantages of Circuit Switching
246
Packet Switching: Statistical Multiplexing
Packets
247
IP Service: Best-Effort Packet Delivery
Packet switching
Divide messages into a sequence of packets
Headers with source and destination address
Best-effort delivery
Packets may be lost
Packets may be corrupted
Packets may be delivered out of order
source destination
IP network
248
IP Service Model: Why Packets?
249
IP Service Model: Why Best-Effort?
250
IP Service: Best-Effort is Enough
No error detection or correction
Higher-level protocol can provide error checking
251
IP Packet Structure
3-bit
16-bit Identification Flags 13-bit Fragment Offset
8-bit Time to
Live (TTL)
8-bit Protocol 16-bit Header Checksum
Payload
IP Header: Version, Length, ToS
Version number (4 bits)
Indicates the version of the IP protocol
Type-of-Service (8 bits)
Allow packets to be treated differently based on needs
E.g., low delay for audio, high bandwidth for bulk transfer
253
IP Header: Length, Fragments, TTL
Time-To-Live (8 bits)
Used to identify packets stuck in forwarding loops
254
IP Header: More on Time-to-Live (TTL)
Potential problem
Forwarding loops can cause packets to cycle forever
Confusing if the packet arrives much later
255
IP Header: Use of TTL in Traceroute
destination
source TTL=2
Send packets with TTL=1, 2, … and record source of “time exceeded” message
256
IP Header Fields: Transport Protocol
Protocol (8 bits)
Identifies the higher-level protocol
E.g., “6” for the Transmission Control Protocol (TCP)
E.g., “17” for the User Datagram Protocol (UDP)
protocol=6
protocol=17
IP header IP header
TCP header UDP header
257
IP Header: Checksum on the Header
134 134
+ 212 + 216
= 346 = 350
258 Mismatch!
IP Header: To and From Addresses
Two IP addresses
Source IP address (32 bits)
Destination address
Unique identifier for the receiving host
Source address
Unique identifier for the sending host
259