Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Network

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Contents

Fundamentals of Computer Networks • Transmission Media


• Signalling
ITM 3213 • Bandwidth vs. Data Rate
• Data Encoding
• Multiplexing
Physical Layer

Amith Bandara
Department of Information Systems
2

Transmission Media
• The transmission medium is the physical path between transmitter
and receiver in a data transmission system.

3 4
Transmission Medium can be Twisted-Pair Cable
• Simplex • Consists of eight individually insulated wires that
• Transmission in one direction only. are twisted together in pairs.
• Ex: Fiber optic cable • Sometimes a metallic shield is placed around them,
• Half-duplex called as Shielded Twisted-Pair (STP).
• Transmission in both directions; but not at the same time. • Cable without outer shielding is called Unshielded
• Full-duplex (duplex) Twisted-Pair (UTP).
• Simultaneous transmission in both directions. • Used to connect telephone subscribers to switching
centers and for wiring local area networks.

5 6

Twisted Pairs - UTP and STP Cables Coaxial Cables


• Like twisted pair a coaxial cable (“coax”) has two conductors that are
shielded.
• Contains a center conductor made of copper that’s surround by a
plastic jacket, with a braided shield over it.
• Used for digital transmissions in local area networks (e.g., Ethernet)
and analog transmissions for cable television.
• Coax used for Cable TV supports a spectrum of 50 - 750 Mhz.

7 8
Coaxial Cables Fiber Optic Cable
• Requires Male and Female BNC (Bayonet Neill– Concelman) • Optical fiber is a thin (2-125 mm), flexible medium capable of
connectors. conducting an optical ray.
• Fiber is built of various glasses or plastics.
• Very high bandwidth (currently up to 10 Gbps).
• Used for long-distance trunks, local area networks, high- speed
transmissions.
• Inherently unidirectional.
• Light wave use as a signal
• Half duplex
9 10

Types of Optical Fiber


1. Multimode Fiber:
• Rays may take different paths.
• Diameter is high
• Use it for data transmission in inside the building with long distance and high
bit rate
• Light wave travels using different path not a straight line

11 12
2. Single Mode Fiber: Signals
• By reducing the radius of the fiber core to the order of the wavelength, only
the axial ray can pass. • A signal can be viewed as a function of time (time domain) and as a
• Single Mode fiber has superior performance but needs a laser diode as a light function of its frequencies (frequency-domain)
source (instead of a LED for multimode fiber).
• Signals:
• Continuous (analog)

• Discrete (digital)

13 14

Bandwidth and Capacity Low-pass vs. Band-pass


• Spectrum: Range of frequencies of a signal [fmin, fmax]
• Spectrum of voice communication is 0.3 – 3.4 mHz
• The human ear responds to frequencies in the range of 20 Hz to 20,000 Hz
• Bandwidth: Width of the spectrum (fmax - fmin) (measured in Hz)
• The maximum amount of data transmitted over an internet connection in a
given amount of time
• 3.4 mHz – 0.3 mHz = 3.1 mHz
• 20000 Hz – 20 Hz = 19980 Hz
• Capacity: Rate at which data can be transmitted (measured in bits per
seconds, bps)
• Noise: Random noise which distorts a signal (Unwanted Signal) • Low-pass channel For digital transmission
• Signal-to-Noise Ratio: units are decibels (dB) • Band-pass channel For analog transmission
15 16
Wavelength Data and Signals
• Wavelength is the measured distance between two identical points • Data = Something which carries meaning
on two back-to-back waves • Signals = Encoded data
• Distance between identical points on consecutive waves
• Important to optical transmission • Data
• Analog Data - takes on continuous values (e.g., audio)
• Digital Data - takes on discrete values (e.g., text)
• Signals: All data are propagated by signals
• Analog Signals - Represents data with continuously varying electromagnetic
wave
• Digital Signals - Represents data with a sequence of voltage pulses

17 18

• Encoder / Decoder
Data Encoding • Digital data Digital Digital data
Analog data Signal Analog data
• Technique that used to map data into signal
• All of the following combinations are used: • Modulator / Demodulator
• Digital data Analog Digital data
Analog data Signal Analog data

• Modem à Equipment that use for data modulate or demodulate

19 20
Analog vs. Digital Data/Signaling Digital Data / Digital Signals
• Recall:
• A digital signal is a discrete voltage pulse.
• Each pulse represents one or several bits.
• Terminology
• Bit Length: Time to transmit a bit. Different between
communication channel
• Data Rate: Rate at which data can be transmitted (measured in
bps) (Capacity)
• Modulation Rate: Rate at which the signal is changed (measured in
signal elements per second or baud). Time to combine
data with signal or derive data from signal

21 22

Cont Cont
• A large number of digital data/digital signal encoding techniques are
available.
• The criteria for selecting a scheme are;
• Frequency Spectrum
• Bit Timing (Clocking)
• Error Detection
• Immunity to interference

23 24
• Unipolar Encoding. • Polar Encoding.

• Two issues
• DC component
• Lack of synchronization

25 26

• Polar Encoding - Encoding Schemes • Polar Encoding - Encoding Schemes


• NRZ-L (Nonreturn-to-zero-level) • RZ (Return-to-zero)
• 0 = high level • 0 = Negative level with a transition to zero at the middle
• 1 = low level • 1 = Positive level with a transition to zero at the middle
• NRZ-I (Nonreturn-to-zero-Inverted)
• 0 = no transition at beginning of interval
• 1 = transition at beginning of interval

27 28
• Polar Encoding - Encoding Schemes • Bipolar Encoding - Encoding Schemes
• Manchester • Alternative Mark Inversion (AMI)
• 0 = transition from positive to negative in middle of interval • 0 = Zero level
• 1 = transition from negative to positive in middle of interval • 1 = Positive and negative alternatively
• Differential Manchester: Always a transition in middle of interval
• 0 = transition at beginning of interval
• 1 = no transition at beginning of interval

29 30

Digital Data / Analog Signal Digital Data / Analog Signal


• Familiar example:
• Using a modem over the (analog) telephone network
• Recall:
• Basis for analog signaling is carrier signal
• Data are modulated onto carrier signal
• There are 3 encoding techniques for transforming digital data to
analog signals;
• Amplitude-shift keying
• Frequency-shift keying
• Phase-shift keying

31 32
Analog Data/ Digital Signal Pulse Code Modulation (PCM)
• Sampling Theorem (by Nyquist);
• Transmission is accomplished in two steps; If a signal f(t) is sampled at regular intervals of time and at a rate higher than
• Conversion of analog data into digital data (Digitization) twice the highest significant signal frequency, then the samples contain all the
• Digital data is converted into a digital signal information of the original signal. The function f(t) may be reconstructed from
• Pulse code modulation is used to convert analog data into digital data these samples by the use of a low pass filter.

• Then use NRZ-L method to convert digital data into digital signal

33 34

Analog Data/Analog Signal • Amplitude Modulation (AM)

• There are three types of modulation;


• Amplitude Modulation (AM)
• Frequency Modulation (FM)
• Phase Modulation (PM)

35 36
• Frequency Modulation (FM)
Multiplexing at the Physical Layer
• Goal: Get many information flows on a single physical channel.

• Basic techniques:
• For Analog:
• Frequency Division Multiplexing (FDM)
• Wave Division Multiplexing (WDM)
• For Digital:
• Time Division Multiplexing (TDM)

37 38

Frequency Division Multiplexing (FDM) Frequency Division Multiplexing (FDM)


• Used in radio, TV, analog telephone transmission, satellite
communication.
• Idea: Divide the frequency spectrum into logical channels and assign
each information flow one logical channel.
• Example: Voice in (analog) telephone network;
• Needed bandwidth: 3000 Hz
• Allocated bandwidth: 4000 Hz
• Therefore, a channel with 64 kHz can carry 16 voice conversations

39 40
Wave Division Multiplexing (WDM) Time Division Multiplexing (TDM)
• Used for digital telephone transmission, satellite communication.
• Idea: Multiple signals can be carried on a single transmission medium
by interleaving portions of each signal in time.

41 42

Time Division Multiplexing (TDM)

Thank You

43 44
Data Link Layer
Fundamentals of Computer Networks • Provides for reliable transfer of information across physical link
• Includes:
ITM 3213 • Transmission of blocks of data (The PDU at the Data Link Layer (DLPDU) is
typically called a Frame. A Frame has a header, a data field, and a trailer )
• Synchronization
• Error control
Data Link Layer • Flow control

Amith Bandara
Department of Information Systems
2

Data Link Layer Functions Flow Control


• Frame Synchronization - Create abstraction of “frame-at- a-time” channel • Necessary when data is being sent faster
for higher layer (start & end of each frame must be recognizable) than it can be processed by receiver
• Addressing - Needed when many nodes share transmission link • Computer to printer is typical setting
• Flow Control - Control rate of transmission to prevent overflow of • Can also be from computer to computer,
receiver's buffers when a processing program is limited in
• Error Control - Correct transmission errors (by retransmission or by error capacity
correction schemes)
• There are two methods
• Sequence Control - Receiver must be able to distinguish control • Stop and Wait flow control
information from data • Sliding Window flow control
• Link Management - Initiation, maintenance, & termination of connections
3 4
Stop-and-Wait Flow Control Sliding-Window Flow Control
• Simplest form of Flow Control • Allows multiple frames to be in transit
• Source may not send new frame until receiver acknowledges the • Receiver sends acknowledgement with sequence number of
frame already sent anticipated frame
• Very inefficient, especially when a single message is broken into • Sender maintains list of sequence numbers it can send, receiver
separate frames maintains list of sequence numbers it can receive
• ACK (acknowledgement) supplemented with RNR (receiver not ready)

5 6

Error Control Process Error Detection


• All transmission media have potential for introduction of errors • Parity Check
• Error control process has two components • Cyclic Redundancy Check (CRC)
• Error detection
• Error correction

7 8
Error Correction Stop-and-Wait ARQ
• Two types of errors • One frame received and handled at a time
• Lost frame • If frame is damaged, receiver discards it and sends no
• Damaged frame acknowledgment
• Automatic Repeat reQuest (ARQ) • Sender uses timer to determine whether or not to retransmit
• Error detection • Sender must keep a copy of transmitted frame until acknowledgment is
• Positive acknowledgment received
• Retransmission after time-out • If acknowledgment is damaged, sender will know it because of
• Negative acknowledgment and retransmission numbering

9 10

Go-Back-N ARQ Selective-Reject ARQ


• Uses sliding-window flow control • The only frames retransmitted are those that receive a negative
acknowledgment (SREJ)
• When receiver detects error, it sends negative acknowledgment (REJ)
• More efficient than go-back-N
• Sender must begin transmitting again from rejected frame • Minimizes the amount of retransmission
• Transmitter must keep a copy of all transmitted frames • The receiver must maintain a buffer large enough to save post-SREJ
frames until the frame in error is retransmitted
• The transmitter, too, requires more complex logic to be able to send a
frame out of sequence
• Because of such complications, select-reject ARQ is much less widely
used than go-back-N ARQ

11 12
Flow Control Stop & Wait Flow Control
• Sender sends a frame
• Technique for controlling data rate so that sender does not over-run • Receiver receives frame & acknowledges it
receiver • Sender waits to receive “ack” before sending next frame (If receiver is
• Two approaches exist: not ready to receive another frame it holds back the ack)
• Stop-and-wait • One frame at a time is sent over the transmission line
• Sliding-window

13 14

Utilization (Efficiency) of Stop & Wait Utilization (Efficiency) of Stop & Wait
• Transmission time: time taken to emit all bits of frame at sender = Tt
= L / B.

• Propagation time: time taken for signal to travel from S to R. Thus first
bit transmitted at t=0 arrives at R at t = T p = d / V.

15 16
Utilization (Efficiency) = U Utilization (Efficiency) of Stop & Wait
U = Active time of sender / Total time of one cycle
• With stop & wait scheme, for high channel utilization, we need a low
a (since U= 1/(1+2a))

𝐋𝐨𝐰 𝐚 →𝑳 𝒂𝒔 𝒍𝒂𝒓𝒈𝒆 𝒂𝒔 𝒑𝒐𝒔𝒔𝒊𝒃𝒍𝒆

• However, in practice it is desirable to limit frame length L because


• error probability increases with L
• high average delay with multi-point lines
• buffer size limitations
• So a more efficient scheme is called for, especially with WAN/satellite
Note: a = Tp / Tt or Tp = aTt Vertical-Time Sequence communication
Diagram
17 18

Utilization (Efficiency) of Stop & Wait Utilization (Efficiency) of Stop & Wait
• WAN using ATM • LAN
• d = 10 km,
• B = 10 Mbps,
• V = 2 x 108 m/sec
• L = 1000 bits à a = 0.005 ~ 0.5 à U = 0.5 ~ 0.99

19 20
• Suppose that the stop and wait protocol is used on a link with a bit
rate of 64 b/s and 20 second of propergation delay. Assume that the
Sliding-Window Flow Control
transmission delay for the acknoledgement and the processing time
at nodes are negligible. Then the minimum frame size in bytes to • Pipeline transmission of successive frames
achieve a link utilization of at least 50% is ? • Transmit up to “N” frames if necessary without receiving acks.
• Wait for acks when “N” unacked frames in transit
• For full duplex transmission each station needs a sending window &
receiving window.

21 22

Example of a sliding-window protocol Utilization: U is a function of a and N


• Case 1: N > 1 + 2a :
U=1
• Ack for frame 1 reaches Sender before transmission of Nth frame →
continuous transmission possible
• Case 2: N < 1 + 2a :
U = N / (1 + 2a)
• Wasted time between N and 1 + 2a

23 24
Error Detection Error Detection
• Basic Principle • Two common techniques
• Transmitter: For a given bit stream M, additional bits (called error-detecting • Parity checks
code) are calculated as a function of M and appended to the end of M • Cyclic redundancy checks (CRC)
• Receiver: For each incoming frame, performs the same calculation and
compares the two results. A detected error occurs if there is a mismatch
• Parity Check
• One extra “parity” bit is added to each word
• Odd parity: bit added so as to make # of 1’s odd
• Even parity: makes total # of 1’s even
• Single parity is very effective with white noise (noise on a line without any
active signals on it; e.g., Thermal Noise), but not very robust with noise bursts
(which may extend over whole word duration).
25 26

Cyclic Redundancy Checks Cyclic Redundancy Checks


• Powerful error detection method, easily implemented • Let
• Message (M) to be transmitted is appended with extra frame • T = (k+n)-bit frame to be transmitted, n<k
checksum bits (F), so that bit pattern transmitted (T) is perfectly • M = k-bit message, the first k bits of T
divisible by a special “generator” pattern (P) - (divisor) • F = n-bit FCS, the last n bits of T
• P = n+1 bits, generator pattern (predetermined divisor)
• At destination, divide received message by the same P. If remainder is
nonzero → error • The concept uses modulo-2 arithmetic
• no carries/borrows; add ≡ subtract ≡ XOR

27 28
Cyclic Redundancy Checks Cyclic Redundancy Checks Examples
• Method • M = 110011, P = 11001, R = 4 bits
• Extend M with n ‘0’s to the right (= M)(shift left by n bits
2n • 1. Append 4 zeros to M, we get 1100110000
• Divide extended message by P to get R (2n M / P = Q + R/P)
• Add R to extended message to form T (T = 2n M + R) • For each stage of division, if the
number of dividend bits equals
• Transmit T number of divisor P bits, then
• At receiver, divide T by P. Nonzero remainder means: à error Q=1, otherwise Q=0

29 30

Cyclic Redundancy Checks Cyclic Redundancy Checks


• Exercise 01: Compute the frame to be transmitted for message • Can view CRC generation in terms of polynomial arithmetic
1101101 using P = 10101 • Any bit pattern = polynomial in dummy variable X as shown in the
• Exercise 02: Compute the frame to be transmitted for message following example:
11100101 using P = 11011 • e.g., M = 110011 = 1·X5 +1·X4 +0·X3 +0·X2 +1·X+1·X0
• So then, Answer is M(X)=X5 +X4 +X+1

31 32
Can Detect Error control techniques
• All single-bit errors • Forward error control:
• All double-bit errors, as long as P(X) has a factor with at least three • Error recovery by correction at the receiver [Forward Error Correction (FEC)]
terms (as long as p has at least three 1s) • Backward error control:
• Any odd number of errors, as long as P(X) contains a factor (X+1) • Error recovery by retransmission [Automatic Repeat Request (ARQ)]

• Any burst error for which the length of the burst is less than the
length of the FCS
• Most larger burst errors

33 34

Automatic Repeat Request (ARQ) Stop & Wait ARQ


• Based on • Simple and minimum buffer requirement, but inefficient
• Error detection • Sender transmits message frame
• Positive ack • Receiver checks received frame for errors; send ACK/NAK
• Retransmission after timeout • Sender waits for ACK/NAK.
• Negative ack. And retransmission • NAK à retrans
• ACK ànextframe
• ARQ
• Stop-and-wait ARQ
• Continuous ARQ
• Go-back-NARQ
• Selective-reject ARQ

35 36
Stop & Wait ARQ
• Frame/ACK could be lost à Uses a timeout mechanism
• Possibility of duplication à Number frames
• Only need a 1-bit frame number alternating 1 and 0 since they are
sent one at a time

37 38

Go-back-N ARQ
• If the receiver detects an error on a frame, it sends a NAK for that
frame.
• The receiver will discard all future frames until the frame in error is
correctly received.
• Thus the sender, when it receives a NAK or timeout, must retransmit
the frame in error plus all succeeding frames.
• Sender must maintain a copy of each unacknowledged frame.

39 40
41 42

Selective-reject ARQ High-Level Data Link Control (HDLC)


• The only frames retransmitted are those that receive a NAK or which • A synchronous data link protocol
timeout • Widely used, and basis for many other data link control protocols
• Can save retransmissions, but requires more buffer space and • Connections can be multipoint or point-to-point
complicated logic
• Can be used in half-duplex or full-duplex
• Maximum window size (with n-bit sequence number)
• Go-back-N : 2n – 1
• Selective-reject : 2n-1

43 44
Three types of stations Two link configurations
• Primary station - (e.g., Mainframe) Controls the operation of the link, • Unbalanced configuration - One primary and one or more secondary
issues commands, and receives responses stations
• Secondary station - (e.g., Terminal) Usually only communicates • Balanced configurations - Two combined stations
(responds) to a primary station
• Combined station - Can be both a primary and a secondary

45 46

Three data transfer modes HDLC Frame Structure


The 1st 3 fields are the header
• Normal response mode (NRM) - Unbalanced configuration Primary and the last 2 fields are the trailer
station always dictates who sends and receives
• Asynchronous balanced mode (ABM) - Two combined stations. Either
can initiate transmission
• Asynchronous response mode - Unbalanced configuration. Secondary
station can send at any given time, but only one secondary can be
active at a time

47 48
HDLC Frame Structure HDLC Frame Structure
Flag fields
• Flag fields
• 8 bits (01111110)
• “Bit stuffing” is used for data transparency
• Bit stuffing: whenever five 1’s are transmitted, extra zero is inserted

49 50

HDLC Frame Structure


• Address field
• 8 bits. If needed longer address, the MSB can be set to zero and the address
field is then assumed to be 8 bits longer.
• All 1’s indicates this is a broadcast frame.
• Control field Thank You
• 8 bits. If the 1st bit is 0, then “information frame”, Otherwise, 10 indicates
“supervisory frame” and 11 indicates “unnumbered frame”.

51 52
Introduction
Fundamentals of Computer Networks • Main Task of the network layer is to move packets from the source
host to the destination host.
• Lowest layer to deal with end-to-end issues!
ITM 3213
Network Layer

Amith Bandara
Department of Information Systems
2

Concepts of Network Layer • Routing:


Routing means selecting a path/ root. Decide the path by going to each routers
or decide from where to where the whole network run
• Switching Technique: • How to forward packets.
Switching is transferring a packet from one host to another • To what port the packet should send, that receive to the one end of a router
• Datagrams. • How to calculate a path from source to destination?
• Packet may transfer to the destination through various paths, and a packet may consider • Calculate the best path from source to destination
as an independent unit
• Virtual circuits.
• First establish a virtual path. Then packets are send along the established path

3 4
• Traffic Control:
• Naming and Addressing:
Control the packets of being subjected to a traffic (Prevent the network from
• How to find the name of a network node?
becoming bottleneck
• Congestion control. • Internetworking:
• Control the congestion of packets. • How to interconnect heterogeneous networks?
• Rate control.
• In transmission the packets should be send in a better way with in a minimum time
period.
• Rate control means packets should transfer in a best way with in a minimum transmit
time (does not mean send in a higher speed)

5 6

Services and Implementation Connectionless and Connection-oriented


• Two packet switching techniques are used: • Connectionless service and connection-oriented service can be
• Datagrams. reliable or unreliable.
• Virtual Circuits. • Reliable = Delivery of all data is ensured. The receiver acknowledges
• Two services are provided to the transport layer: data and sender retransmits data that was not received.
• Connectionless Service. • Unreliable = No acknowledgments or retransmission of data.
• Sender and receiver treat each transmitted message as an independent unit.
• Connection-oriented Service • Note: unreliable connectionless service is often called “datagram
• Sender and receiver see data as traveling on a logical connection. service”.
• Receiver receives data in the same order in which they are transmitted.

7 8
Datagram Packet-Switching Virtual-Circuit Packet Switching
• Each packet is routed independently. • All packets of a VC follow the same route.

9 10

Connectionless Service Connection-oriented Service


• Each packet is transmitted independently. • Logical connection is established.

11 12
Summary Packet Routing
• The following implementations are feasible: • There are two parts to the routing problem:
• How to pass a packet from an input interface to the output interface of a
router (packet forwarding)?
Connectionless service Connection-oriented service • How to calculate routes?
• Packet forwarding is done differently in datagram and virtual-circuit
packet networks.
• Route calculation is done in a similar fashion.
Unreliable Speed Reliable Low Speed

13 14

Packet Forwarding of Datagrams Packet Forwarding of Datagrams


• Recall: In datagram networks, each packet carries the full destination • When a packet with destination node arrives at an incoming link, ...
address. • The router looks up the routing table.
• Each router maintains a routing table which has one row for each • The routing table lookup yields the address of the next node (next hop).
possible destination address. • The packet is transmitted onto the outgoing link that goes to the next hop.
• Good: The router does not need to know about end- to-end flows.
• Bad: Size of the routing table can grow very large.

15 16
Packet Forwarding with Virtual Circuits Packet Forwarding of Virtual Circuits
• Recall: In VC networks, the route is setup in the connection • When a packet with VCin in header arrives from router n in, ...
establishment phase. • The router looks up the routing table for an entry with (VCin, nin).
• During the setup, each router assigns a VC number (VC#) to the • The routing table lookup yields (VCout, nout).
virtual circuit. • The router updates the VC# of the header to VCout and transmits the packet to
nout
• The VC# can be different for each hop.
• Good: Routing table is small (how small?).
• VC# is written into the packet headers.
• Bad: Changing the route is complicated Routing table changes for
each virtual circuit.

17 18

Comparison IP Address
• An IP address is a unique address that identifies a device on the internet or
a local network
• IP stands for "Internet Protocol," which is the set of rules governing the
format of data sent via the internet or local network.
• IP addresses are the identifier that allows information to be sent between
devices on a network
• An IP address is a string of numbers separated by periods. IP addresses are
expressed as a set of four numbers — an example address might be
192.158.1.38
• Each number in the set can range from 0 to 255. So, the full IP addressing
range goes from 0.0.0.0 to 255.255.255.255

19 20
IPv4 & IPv6
• IPv4 is actually the first version of IP to be used. It was launched all
the way back in 1983 and, even today, it’s still the most well-known
version to identify devices on a network
• The IPv6 is a newer version of IP that uses a 128-bit address format
and includes both numbers and letters
• The main difference between IPv4 and IPv6 is the address size of IP
addresses.
• The IPv4 is a 32-bit address, whereas IPv6 is a 128-bit hexadecimal
address.

21 22

Dotted Decimal Notation Network prefix and Host number


• IP addresses are written in a so-called dotted decimal notation. • The network prefix identifies a network and the host number
• Each byte is identified by a decimal number in the range [0 - 255]. identifies a specific host (actually, interface on the network).
• Example:

• How do we know how long the network prefix is?


• The network prefix used to be implicitly defined (class- based addressing,
A,B,C,D...)
• The network prefix now is flexible and is indicated by a prefix/netmask
(classless).

23 24
IP Address Classes Class A Network
• IP address divide into five separate classes based on four address bits • This IP address class is used when there are a large number of hosts.
• Classes A, B, C offers addresses for networks of three distinct network • In a Class A type of network, the first 8 bits (also called the first octet)
sizes. Class D is only used for multicast, and class E reserved identify the network, and the remaining have 24 bits for the host into
exclusively for experimental purposes. that network.
• An example of a Class A address is 102.168.212.226. Here, “102”
helps you identify the network and 168.212.226 identify the host.
• Class A addresses 127.0.0.0 to 127.255.255.255 cannot be used.

25 26

Class B Network Class C Network


• In a B class IP address, the binary addresses start with 10. • Class C is a type of IP address that is used for the small network.
• In this IP address, the class decimal number that can be between 128 • In this class, three octets are used to indent the network. This IP
to 191. ranges between 192 to 223.
• The number 127 is reserved for loopback, which is used for internal • In this type of network addressing method, the first two bits are set
testing on the local machine.
to be 1, and the third bit is set to 0.
• The first 16 bits (known as two octets) help you identify the network.
The other remaining 16 bits indicate the host within the network. • The first 24 bits help you identify the network. The other remaining
• An example of Class B IP address is 168.212.226.204, where *168 08 bits indicate the host within the network.
212* identifies the network and *226.204* helps you identify the • Mostly local area network used Class C IP address to connect with the
network host. network.

27 28
Network Host
• Class A à 1 -126 (Bit stream start from 0) • Class A à 224 - 2 = 16777214
• Class B à 128 – 191 (Bit stream start from 10) • Class B à 216 - 2 = 65534
• Class C à 192 – 223 (Bit stream start from 110) • Class C à 28 - 2 = 254
• Class D à Bit stream start from 1110
• Class E à Bit stream start from 1111

29 30

• Receive network address 192.20.10.0


• Can give only upto 254 • Organization want to subdivide their network into two parts that for
two departments. HR department has 10 computers and IT
• 255 host number provode to broadcast department has 20 computers. They have number of methods to do
that task, Those are
• Buy two class C IP addresses to each two departments and then can provide
IP address to each computers.
• Buy one class C IP address and then it divided in to two parts then provide it
to two departments.

31 32
Subneting Subnet mask
• A subnet, or subnetwork, is a segmented piece of a larger network • A subnet mask is like an IP address, but for only internal usage within
• Organizations will use a subnet to subdivide large networks into a network
smaller, more efficient subnetworks. • Routers use subnet masks to route data packets to the right place.
• One goal of a subnet is to split a large network into a grouping of • The subnet mask splits the IP address into the host and network
smaller, interconnected networks to help minimize traffic. addresses, thereby defining which part of the IP address belongs to
the device and which part belongs to the network
• The “255” address is always assigned to a broadcast address, and the
“0” address is always assigned to a network address

33 34

Question 01 Question 02
• Organization want to develop four networks named network A, • Organization want to develop eight networks. An organization can use
Network B, Network C and network D. Organization can use the 193.40.20.0 IP address for that
195.20.30.0 IP address for that • What is the IP address class?
• What is the IP address class? • What are the network addresses of eight subnetworks?
• What are the network addresses of four subnetworks? • What are the first host IP address of eight subnetworks?
• What are the first host IP address of four subnetworks? • What are the last host IP address of eight subnetworks?
• What are the last host IP address of four subnetworks? • What are the broadcast IP addresses?
• What are the broadcast IP addresses? • What is the subnet mask of the network?
• What is the subnet mask of the network? • How many hosts are in one network?
• How many hosts are in one network?

35 36
Question 03 Question 04
• 192.50.20.0/26 • Identify the subnet of devices with following IP addresses ?
• How many bits are taken to create subnets from the host side? • 192.10.12.66/27
• How many maximum subnets can create by using the above IP address? • 204.15.5.42/27
• How many hosts in each subnet?
• 172.16.98.12/20
• What is the subnet mask?
• 192.168.123.73/26

• 185.60.0.0/22
• How many bits are taken to create subnets from the host side?
• How many maximum subnets can create by using the above IP address?
• How many hosts in each subnet?
• What is the subnet mask?

37 38

Question 05 Routing
• 190.60.132.130/23 • Static routing and dynamic routing are two methods used to
• What is the IP address class? determine how to send a packet toward its destination.
• What is the subnet IP address? • Static Routing
• What is the host range between in above IP address? • In static routing, the routes show the path between two routers that cannot
• What is the broadcast IP address? be updated automatically.
• How many maximum subnets can create by using the above IP address? • The path is manually updated
• What is the subnet mask? • Static routing uses small routing tables with only one entry for each
destination. It also requires less computation time than dynamic routing
because each route is preconfigured.
• Network administrators must add and delete to reflect any network topology
changes

39 40
Routing Routing Algorithms
• Dynamic Routing • Objective of routing algorithms is to calculate ‘good’ routes.
• Sometimes called adaptive routing, is more complex than static routing • Routing algorithms for both datagrams and virtual circuits should
because it creates more possible routes to send packets across a network. satisfy;
• Dynamic routing uses algorithms to compute multiple possible routes and
• Correctness
determine the best path for traffic to travel through the network.
• Simplicity
• It uses two types of complex algorithms: distance vector protocols and link
state protocols. • Robustness
• Stability
• Fairness
• Optimality
• Impossible to satisfy everything at the same time.
41 42

Shortest-Path Routing Approaches to Shortest Path Routing


• Adaptive routing algorithms use a shortest path algorithm to calculate • There are two basic approaches to least-cost routing in a
the route with the least cost. communication network.
• Three components: • There are two basic approaches to shortest-path routing:
• Measurement Component. • Link State Routing.
• Nodes (routers) measure the current characteristics such as delay, throughput, and • Distance Vector Routing.
“cost”.
• Protocol.
• Nodes disseminate the measured information to other nodes.
• Calculation.
• Nodes run a least-cost routing algorithm to recalculate their routes.

43 44
• Link State Routing
• Each node knows the distance to its neighbours.
Link State Routing Distance vector Routing
• The distance information (=link state) is broadcast to all nodes in the network. Nodes knows distance to its neighbours Nodes knows distance to its derectly connected
• Each node calculates the routing tables independently. neighbours

• Distance Vector Routing The distance information is broadcast Node sends list to its neighbours with the current
distances to all nodes
• Each node knows the distance (=cost) to its directly connected neighbours. Each node calculate routing table indipendantly Routing table automatically update
• A node sends a list to its neighbours with the current distances to all nodes.
• If all nodes update their distances, the routing tables eventually converge.

45 46

Calculate the shortest path

Dijkstra’s Algorithm
• The Dijkstra's algorithm finds the shortest path from a particular
node, called the source node to every other node in a connected
graph.
• It produces a shortest path tree with the source node as the root.
• It is profoundly used in computer networks to generate optimal
routes with the aim of minimizing routing costs.

47 48
Calculate the shortest path

49 50

You might also like