Computer Networking INST765-2 M.SC Programs
Computer Networking INST765-2 M.SC Programs
Computer Networking INST765-2 M.SC Programs
• GENERAL PRINCIPLES:
• There are two general principles for controlling congestion:
– OPEN LOOP
– CLOSED LOOP
OPEN LOOP : problem solving by good design, to ensure that it
should not occur, when to accept new packets, when to discard,
making scheduling decisions, etc.
No midcourse correction i.e. when happens no correction.
CLOSED LOOP :
- Monitor the system to detect when and where congestion occurs
- Pass this information to places where action can be taken
- Adjust system operation to correct the problem.
• For Monitoring :
– Percentage of all packets discarded for lack of buffers
– The average queue lengths
– The no. of packets that time out and retransmitted
– The average packet delay
– Standard deviation of packet delay
To pass Information :
- Router detected this information is to be passed to source(s)
- However, this extra packets increase the load.
- But other possibilities, a bit or a field is reserved in every packet for
routers to fill in whenever congestion gets above some threshold level
THAT IS idea is that knowledge of this information cause a preventing
action to be taken by source.
• CONGESTION CONTROL ALGORITHM :
• Many algorithms have been developed to control the congestion.
• However, they have been classified as :
– Open or Closed Loop
– In Open Loop whether acts at Source Vs Destination
– In Closed loop Explicit Feedback or Implicit Feedback
– In Explicit FB the packets are sent back to warn the source
– In Implicit FB the source deduces the existence of congestion
by making local observation i.e. time needed for
acknowledgement to come back.
• TRAFFIC SHAPING :
• One main reason of congestion is that Traffic is often bursty.
• Such situation can be overcome as is done in ATM networks, that is
by forcing the packets to be transmitted at a more predictable rate.
• This approach is known as TRAFFIC SHAPING (used in ATM)
• The traffic shaping is about regulating the average Rate of Data
Transmission.
• Traffic shaping reduces congestion and thus helps the carrier live up
to its promise
• Monitoring a traffic flow is called “TRAFFIC POLICING”
• Traffic shaping is most effective when the sender, receiver, and
subnet all agree to it.
• To get agreement, it is necessary to specify the traffic pattern in a
precise way.
• Such an agreement is called a ‘Flow Specification’
• It consists of a data structure that describes both the pattern of the
injected traffic and the quality of service desired by the applications.
• Differences:
• Token bucket provides or allows bursty traffic equal to the size of
bucket ‘n’ whereas leaky bucket does not
• Token bucket throws away tokens if bucket is full but not packets,
as is done by leaky bucket
• Regulating in traffic flow is better in token bucket than in leaky
bucket.
• CONGESTION CONTROL IN VIRTUAL CIRCUIT:
• One technique is widely used to keep congestion that has already
started from getting worse is ADMISSION CONTROL
• The idea is “once congestion has been signaled, no more virtual
circuits are set up until the problem has gone away.
• Therefore, attempts to set up new transport layer connections fail
• An alternative approach is to allow new virtual circuits but carefully
route all new virtual circuits around problem areas
• Another strategy relating to virtual circuits is to negotiate an
agreement between the host and subnet when a virtual circuit is set
up.
• This agreement normally specifies the volume and shape of the
traffic, quality of service required and other parameters.
• LOAD SHEDDING :
• Finally routers can bring out the heavy artillery : if all these methods
fail (Load Shedding)
• Load Shedding is ‘When routers are being inundated by packets
that they cannot handle, they just throw them away.
• A router drowning in packets can just pick packets at random to
drop, but usually depends upon application running
• Also identifying about the importance and priority of the packets.
• RSVP ( Resource reSerVation Protocol):
• CONGESTION CONTROL FOR MULTICAST
• All those discussed algorithm we have seen can handle congestion
that deal with messages from a single source to a single destination.
• But for managing multicast i.e. signals for multiple destinations and
even from multiple sources we need different technique
• One is RSVP
• It allows multiple senders to transmit to multiple groups of receivers,
permits individual receivers to switch channels freely, and optimizes
bandwidth use while at the same time eliminating congestion.
• It is the simplest form.
• The protocol uses multicast routing using Spanning Trees.
• Every network application has a basic set of requirements that the
network must meet to deliver the traffic generated by this application
in a usable form.
• These conditions, which center on bandwidth and delay
characteristics, are described as quality of service requirements.
• RSVP is a network control protocol that will allow Internet
applications to obtain special qualities-of-service (QoS's) for their
data flows.
• When an application in a host (end system) requests a specific QoS
for its data stream, RSVP carries the request through the network,
visiting each node (router or host) the network uses to carry the
stream.
• At each node, RSVP attempts to make a resource reservation for
the stream and to maintain it's state to provide the requested
service.
• The key assumption of RSVP is that resource reservation will be
needed mostly for multicast applications such as high-speed video
transmission.
• These applications have some peculiar characteristics, like a large
number of receivers who may be experiencing very different
transmission conditions and who also belong to different domains.
• RSVP is intended to add determinism to connectionless information
flows.
• By doing so, it would enable packet-based multimedia to deliver
acceptable levels of video, audio, and real-time data quality .
• RSVP solves the resource reservation problem, leaving solutions to
other parts to the following:
• IP Datagram Transport
• IP Routing
• Internet Group Management Protocol
• Multicast Routing
• A host uses RSVP to request a specific Quality of Service (QoS)
from the network, on behalf of an application data stream.
• RSVP carries the request through the network, visiting each node
the network uses to carry the stream.
• At each node, RSVP attempts to make a resource reservation for
the stream.
• To make a resource reservation at a node, the RSVP daemon
communicates with two local decision modules, admission control
and policy control.
• Admission control determines whether the node has sufficient
available resources to supply the requested QoS
• Policy control determines whether the user has
administrative permission to make the reservation.
• If either check fails, the RSVP program returns an error notification
to the application process that originated the request.
• If both checks succeed, the RSVP daemon sets parameters in a
packet classifier and packet scheduler to obtain the desired QoS.
• The packet classifier determines the QoS class for each packet and
the scheduler orders packet transmission to achieve the promised
QoS for each stream.
• A primary feature of RSVP is its scalability.
• RSVP scales to very large multicast groups because it uses
receiver-oriented reservation requests that merge as they progress
up the multicast tree.
• The reservation for a single receiver does not need to travel to the
source of a multicast tree; rather it travels only until it reaches a
reserved branch of the tree.
• While the RSVP protocol is designed specifically for multicast
applications, it may also make unicast reservations.
• RSVP is also designed to utilize the robustness of current Internet
routing algorithms.
• RSVP does not perform its own routing; instead it uses underlying
routing protocols to determine where it should carry reservation
requests.
• As routing changes paths to adapt to topology changes, RSVP adapts
its reservation to the new paths wherever reservations are in place.
• This modularity does not rule out RSVP from using other routing
services.
• Current research within the RSVP project is focusing on designing
RSVP to use routing services that provide alternate paths and fixed
paths.
• RSVP runs over IP, both IPv4 and IPv6.
• Among RSVP's other features, it provides opaque transport of traffic
control and policy control messages, and provides transparent
operation through non-supporting regions.
INTERNETWORKING
IP ADDRESSING
* Every Host and Router on the Internet has an IP address, which encodes
its network number and host number.
* The combination is unique, no two machines have the same IP address.
* All IP addresses are 32-bits long and are used in Source Address &
Destination Address fields of IP packets.
FORMATS
32 Bits
Class
8 bits 8 bits 8 bits 8 bits
A 0 Netid Hostid
B 10 Netid Hostid
C 110 Netid Hostid
D 1110 Multicast Address
E 11110 Reserved for future use
• Range of Host Address :
– Class A - 1.0.0.0 to 127.255.255.255
– Class B - 128.0.0.0 to 191.255.255.255
– Class C - 192.0.0.0 to 223.255.255.255
– Class D - 224.0.0.0 to 239.255.255.255
– Class E - 240.0.0.0 to 247.255.255.255
-Class A allows upto 126 (7-bit) networks with 16 millions (24-bits) host
each
-Class B allows upto 16,382 Networks with upto 64 K hosts each
-Class C allows upto 2 million networks ( LANs) with upto 254 hosts each
-Class D in which a datagram is directed to multiple hosts MULTICAST
-And addresses beginning with 11110 are reserved for future use but
already exhausted
• Tens of thousands of networks are now connected to the
INTERNET, and number doubles every year
• Network numbers are assigned by the NIC ( Network Information
Centre) to avoid conflicts.
• Usually network addresses are written in DOTTED DECIMAL
NOTATION i.e. from 0 to 255 in decimal.
• The lowest IP address is 0.0.0.0 and highest 255.255.255.255
• In addition to this some special IP addresses are : -
– Example - 1’s in all the field indicate broadcast on the local network
– 127.xx.yy.zz are reserved for loop back testing
6 10
• Subnet
10 Netid Subnet Host
• Mask
• IPv4
• Format of an IP Data Unit is known as DATAGRAM
4 8 16
Version Header Length Type of Service
Total length
Identification
Headers D M Fragment Offset
Time-to-live Protocol
Header Checksum
Source IP Address
Destination IP Address
Option
Data <= 65536 Octets
• The Version : Field contains the version of IP used, currently
version 4 IPv4 is used
• Header : The header length specifies the actual length of the
datagram in multiples of 32-bit words
• Type of Service : Same as QoS in OSI
– Bit 9 10 11 - Precedence - Priority ( 0 – 7 )
– Bit 12 – D - Low Delay
– Bit 13 – T - High Throughput
– Bit 14 - R – High Reliability
– Bit 15,16 - Unused
• IPv6 : Format
0 16 24 32
Destination
Address (128 bit)
Possible Extension
Header(s)
Payload
• To speed up the processing of the IP datagram header, the header
of the IPv6 has been divided into two parts:
– (i) A basic header and (ii) One or more Optional Headers
Application Process
• Appln Specific
service
ASE ASE ASE
• Common appln
Service element ACSE ROSE RTSE CCR
SSAP
Session Entity
TSAP
Network Independent Msg
• ASE - Application Service Element
• ACSE - Association Control Service Element
• ROSE – Remote Operation Service Element
• RTSE – Reliable Transport Service Element
• CCR – Concurrency Control Recovery
• PSAP – Presentation Service Access Point
• TSAP – Transport Service Access Point
• SSAP - Session Service Access Point
• x S-box y
P-box
2 4
• A to To
4 2
De En
• B Co Co
De De
R R
Key 2413
•
• A B x y A B
• 0 0 1000 0100 0 1
• 0 1 0100 0001 0 0
• 1 0 0010 1000 1 1
• 1 1 0001 0010 1 0
• An example of Product cipher is DES ( Data Encryption Standard)
as shown :
• The DES performs a series of bit permutation, substitution, and
recombination operations on blocks containing 64 bits of data and
56 bits of key (eight 7-bit characters).
• The 64 bits of input are permuted initially, and are then input to a
function using static tables of permutations and substitutions (called
S-boxes).
• The bits are permuted in combination with 48 bits of the key in each
round.
• This process is iterated 16 times (rounds), each time with a different
set of tables and different bits from the key.
• The algorithm then performs a final permutation, and 64 bits of
output are provided.
• The algorithm is structured in such a way that changing any bit in
the input has a major effect on almost all of the output bits.
• Indeed, the output of the DES function appears so unrelated to its
input that the function is sometimes used as a random number
generator.
• The plaintext is encrypted in blocks of 64 bits, yielding 64 bits of
ciphertext.
• It has 19 different stages
• The first stage is the key independent transposition
• The stage prior to the last one exchanges the leftmost 32 bits with
the right most 32 bits
• The remaining 16 stages are functionally identical bit are
parameterized by different functions of the key.
• General Outline: 64-bit plaintext
Initial Transposition
Key
Generator Iteration 16
32 bit swap
16 subkeys
each of 48
bits
Inverse transposition
64 bit ciphertext
• The operation of one intermediate stage can be described as:
L i-1 R i-1
32 bits Ri
32 bits Li
• Each stage takes two 32 bit inputs and produces two 32 bit outputs
• The left output is simply a copy of the right input
• The right output is the bitwise EXCLUSIVE OR of the left input and a
function of the right input and the key for this stage, Ki
• This functions are performed in 4 steps:
– A 48 bit number, E is constructed by expanding the 32 bit R i-1
according to a fixed transposition and duplication rule.
– Second E and Ki are Exclusive ORed together
– This output is then partitioned into eight groups of 6 bits each, each of
which is fed into a different S-box
– Each of the 64 possible inputs to an S-box is mapped onto a 4-bit output
– Finally, 8 x 4 bits are passed through a p-box
– In each of the 16 iterations, a different key is used
• Before the algorithm starts, a 56bit transposition is applied to the
key.
• There is a drawback, since we need different keys and the new keys
cannot be reliably sent via the network
• Thus some alternative means, as Courier may be used
• That is distribution of keys is a major problem with private key
encryption systems
• An alternative approach based on a public key rather than a private
key, is sometimes used to overcome this problem
• The best known public key method is RSA algorithm, named after
three inventors : Rivest, Shamir, and Adelman
• The RSA Algorithm:
• RSA is the most widely known algorithm for performing public key
cryptography
• The fundamental difference between a private key system and a public key
system is that the later uses a different key to decrypt the ciphertext from
the key that was used to encrypt it.
• A public key system uses a pair of keys one for the sender and the other for
the recipient
• The strength of RSA is based on the difficulty of factoring a very
large number.
• The RSA algorithm used number theory to develop a method of generating
a pair of numbers – the keys – in such a way that a message encrypted
using the first number of the pair can be decrypted only by the second
number.
• Furthermore, the second number cannot be derived from the first.
• That is to say, the first number can be made available to anyone
who wishes to send an encrypted message to the holder of the
second number since only that person can decrypt the resulting
ciphertext message
• The first number of the pair is known as the PUBLIC KEY and the
second the PRIVATE or SECRET KEY
• The algorithm to compute the two keys are as given:
• To create public key Kp :
• Example
– Select two large positive prime numbers P = 7, Q = 17
P and Q
– Compute X = ( P – 1) * ( Q – 1) X = 96
– Choose an integer E which is prime E =5
relative to X, i.e. not a prime factor of
X or a multiple of it, and which satisfies
the condition indicated below for the
computation of Ks
- Compute N = P * Q N = 119
- Kp is then N concatenated with E Kp = 119,5
• To create the secret key Ks :
Client Server
TELNET TELNET
TCP/IP TCP/IP
Client Server
FTP FTP
TCP/IP TCP/IP
TCP/IP TCP/IP
Internetwork
• The local mail system retains a mailbox for each user into which the user
can deposit or retrieve mail
• While transfer of mail the format of the mail – to ensure that it is interpreted
in the same way in each system - and the SMTP used to transfer it from
one machine to another – to be considered
• The mail format consists of a Header and a Body separated by a blank line
and lines in ASCII text.
• Each line in the header comprises a key word followed by text string with a
colon separating the two
– TO : name of recipient
– FROM: name of sender
– CC: copies to
– --
– --
– The format defined in RFC 822
• After an item of mail has been created in the standard format, the
local mail system determines from the name of recipient whether to
be deposited in local mail box or in the output queue ready for
forwarding
• To send the mail, the client SMTP first ascertains the IP address of
the destination host from the directory service known as DOMAIN
NAME SYSTEM – and then uses this with SMTP port address (25)
to initiate setting up of transport connection with server SMTP
• Transferring the mail involves the exchange of SMTP PDUs known
as commands
• Through a series of exchanged commands between client and
server SMTP mail is transferred
• The mail transfer phase is terminated when the client sends a QUIT
command and the server returns 221 command following which the
transport connection is cleared.
• MIME ( MULTIPURPOSE INTERNET MAIL EXTENSION)
• As today email does not consists only text msg written in English
and expressed in ASCII
• But we have msg in languages, in Nonlatin alphabets, without
alphabet (chinese, Japanese), audio, video (without text)
• The solution of all this is known as MIME
• Basic idea is to continue the RFC 822, but add structure of msg
body and define encoding rules for NON ASCII msg.
• Therefore, different encodings are used.
• SIMPLE NETWORK MANAGEMENT PROTOCOL (SNMP)
• The TELNET, FTP, SMTP are all concerned with providing
networkwide user application services
• However, the SNMP is concern with management of all the
communication protocols within each host and the various items of
networking equipment that provide these services i.e total
networking environment
• POSSIBILITIES
• Fault develops and service interrupts – required to resume services
with minimal delay : known as FAULT MANAGEMENT
• Performance of N/W deteriorate, may be due to increase traffic in
selected parts of N/W – immediate remedial action required –
known as PERFORMANCE MANAGEMENT
• Protocol Associated Parameter such as time-to-live, retransmission
timer required to be changed due to expansion in N/W while N/W is
still operational – known a LAYER MANAGEMENT
• Similarly, we have Name Management, Security Management,
Accounting Management function etc.
• The SNMP helps a network manager to carry out the Faulty &
Performance Management function.
• The role of the SNMP to allow the Manager Process in the manager
station to exchange management related messages with the
management processes running in the various managed elements;
HOST, GATEWAY etc.
• The management process in these elements is written to perform the
defined management functions associated with that element i.e.
receiving updated operational variables, generating and sending
faulty report etc.
• Network Manager
Manager Process MIB
SNMP
UDP
IP
N/W dependent
Protocol
Internetwork
N/W dependent N/W dependent N/W dependent
Protocol Protocol Protocol
IP IP IP
TCP UDP UDP TCP
UDP
FTP etc SNMP SNMP
SNMP FTP etc
User Management
Management User
process process Management
process process
process
• EMPIRICAL METHODS-
• Empirical methods are the most accurate performance
determination approaches for network system as they evaluate
measured data extracted from running hardware
• The evaluation can be done both dynamically, where performance
parameters are determined and provided to the evaluator while the
network system is running or statistically, where the network is
monitored and raw data is extracted while running but the evaluation
of the data is performed after the monitoring period
• The raw data is collected during test run in which the eorkload is
controlled to determine the performance of the network, given
specific workload requirements
• A prototype design need to be developed
• Advantages-
• the evaluation is performed on an actual running network system
• There is no need to validate the system configuration of actual
network implementation
• Disadvantage-
• The cost of developing a prototype is normally beyond the budget of
most programs
• By the time the actual network system is implemented the financial
& time investments are too great to make any major design changes
ANALYTICAL MODELING
• Queue
• Server
• Arrival Departure
• Arrival Rate (λ)
• A/B/C/k/m/z
• Where A : Arrival Process
• B : Service Process
• C : No. of Servers
• k : Maximum capacity of Queue ( default ∞)
• m : Population of customers (default ∞)
• z : Service Discipline (default ∞)
• A & B depend on which probability distribution law is adopted –
• Little’s Theorem –
• The theorem gives the relation between the average number of
customers in a queue to the average customer arrival rate and th
average delay or waiting time.
• That is the average number of customer in queue (in system) N and
the average delay T is given as
• N = λT
• Where λ is average customer arrival rate.
• And is given by