Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Routing Algorithms and Encryption Methods, Lecture notes of Computer Networks

Different types of routing algorithms, including dynamic and static routing, single-path versus multipath, flat versus hierarchical, host-intelligent versus router-intelligent, intradomain versus interdomain, and link-state versus distance vector. It also covers routing metrics, such as path length, reliability, delay, bandwidth, load, and communication cost. Additionally, the document briefly touches on encryption methods, including conventional encryption and decryption, character level, bit level, substitutional, transpositional, monoalphabetic, and polyalphabetic.

Typology: Lecture notes

2023/2024

Available from 02/08/2024

rajkunwar-yadav
rajkunwar-yadav 🇮🇳

5 documents

1 / 20

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Dynamic routing algorithms can be supplemented with static routes where appropriate.
A router of last resort (a router to which all unroutable packets are sent), for example,
can be designated to act as a repository for all unroutable packets, ensuring that all
messages are at least handled in some way.
Single-Path Versus Multipath
Some sophisticated routing protocols support multiple paths to the same destination.
Unlike single-path algorithms, these multipath algorithms permit traffic multiplexing
over multiple lines. The advantages of multipath algorithms are obvious: They can
provide substantially better throughput and reliability. This is generally called load
sharing.
Flat Versus Hierarchical
Some routing algorithms operate in a flat space, while others use routing hierarchies. In
a flat routing system, the routers are peers of all others. In a hierarchical routing system,
some routers form what amounts to a routing backbone. Packets from nonbackbone
routers travel to the backbone routers, where they are sent through the backbone until
they reach the general area of the destination. At this point, they travel from the last
backbone router through one or more nonbackbone routers to the final destination.
Routing systems often designate logical groups of nodes, called domains, autonomous
systems, or areas. In hierarchical systems, some routers in a domain can communicate
with routers in other domains, while others can communicate only with routers within
their domain. In very large networks, additional hierarchical levels may exist, with
routers at the highest hierarchical level forming the routing backbone.
The primary advantage of hierarchical routing is that it mimics the organization of most
companies and therefore supports their traffic patterns well. Most network
communication occurs within small company groups (domains). Because intradomain
routers need to know only about other routers within their domain, their routing
algorithms can be simplified, and, depending on the routing algorithm being used, routing
update traffic can be reduced accordingly.
Host-Intelligent Versus Router-Intelligent
Some routing algorithms assume that the source end node will determine the entire route.
This is usually referred to as source routing. In source-routing systems, routers merely
act as store-and-forward devices, mindlessly sending the packet to the next stop.
Other algorithms assume that hosts know nothing about routes. In these algorithms,
routers determine the path through the internetwork based on their own calculations. In
the first system, the hosts have the routing intelligence. In the latter system, routers have
the routing intelligence.
Intradomain Versus Interdomain
Some routing algorithms work only within domains; others work within and between
domains. The nature of these two algorithm types is different. It stands to reason,
therefore, that an optimal intradomain-routing algorithm would not necessarily be an
optimal interdomain-routing algorithm.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Routing Algorithms and Encryption Methods and more Lecture notes Computer Networks in PDF only on Docsity!

Dynamic routing algorithms can be supplemented with static routes where appropriate.

A router of last resort (a router to which all unroutable packets are sent), for example,

can be designated to act as a repository for all unroutable packets, ensuring that all

messages are at least handled in some way.

Single-Path Versus Multipath

Some sophisticated routing protocols support multiple paths to the same destination.

Unlike single-path algorithms, these multipath algorithms permit traffic multiplexing

over multiple lines. The advantages of multipath algorithms are obvious: They can

provide substantially better throughput and reliability. This is generally called load

sharing.

Flat Versus Hierarchical

Some routing algorithms operate in a flat space, while others use routing hierarchies. In

a flat routing system , the routers are peers of all others. In a hierarchical routing system,

some routers form what amounts to a routing backbone. Packets from nonbackbone

routers travel to the backbone routers, where they are sent through the backbone until

they reach the general area of the destination. At this point, they travel from the last

backbone router through one or more nonbackbone routers to the final destination.

Routing systems often designate logical groups of nodes, called domains, autonomous

systems, or areas. In hierarchical systems , some routers in a domain can communicate

with routers in other domains, while others can communicate only with routers within

their domain. In very large networks, additional hierarchical levels may exist, with

routers at the highest hierarchical level forming the routing backbone.

The primary advantage of hierarchical routing is that it mimics the organization of most

companies and therefore supports their traffic patterns well. Most network

communication occurs within small company groups (domains). Because intradomain

routers need to know only about other routers within their domain, their routing

algorithms can be simplified, and, depending on the routing algorithm being used, routing

update traffic can be reduced accordingly.

Host-Intelligent Versus Router-Intelligent

Some routing algorithms assume that the source end node will determine the entire route.

This is usually referred to as source routing. In source-routing systems, routers merely

act as store-and-forward devices, mindlessly sending the packet to the next stop.

Other algorithms assume that hosts know nothing about routes. In these algorithms,

routers determine the path through the internetwork based on their own calculations. In

the first system, the hosts have the routing intelligence. In the latter system, routers have

the routing intelligence.

Intradomain Versus Interdomain

Some routing algorithms work only within domains; others work within and between

domains. The nature of these two algorithm types is different. It stands to reason,

therefore, that an optimal intradomain-routing algorithm would not necessarily be an

optimal interdomain-routing algorithm.

Link-State Versus Distance Vector

Link-state algorithms (also known as shortest path first algorithms) flood routing

information to all nodes in the internetwork. Each router, however, sends only the portion

of the routing table that describes the state of its own links. In link-state algorithms, each

router builds a picture of the entire network in its routing tables. Distance vector

algorithms (also known as Bellman-Ford algorithms) call for each router to send all or

some portion of its routing table, but only to its neighbors. In essence, link-state

algorithms send small updates everywhere, while distance vector algorithms send larger

updates only to neighboring routers. Distance vector algorithms know only about their

neighbors.

Because they converge more quickly, link-state algorithms are somewhat less prone to

routing loops than distance vector algorithms. On the other hand, link-state algorithms

require more CPU power and memory than distance vector algorithms. Link-state

algorithms, therefore, can be more expensive to implement and support. Link-state

protocols are generally more scalable than distance vector protocols.

Routing Metrics

Routing tables contain information used by switching software to select the best route.

But how, specifically, are routing tables built? What is the specific nature of the

information that they contain? How do routing algorithms determine that one route is

preferable to others?

Routing algorithms have used many different metrics to determine the best route.

Sophisticated routing algorithms can base route selection on multiple metrics, combining

them in a single (hybrid) metric. All the following metrics have been used:

  • Path length
  • Reliability
  • Delay
  • Bandwidth
  • Load
  • Communication cost

Path length is the most common routing metric. Some routing protocols allow

network administrators to assign arbitrary costs to each network link. In this case,

path length is the sum of the costs associated with each link traversed. Other routing

protocols define hop count, a metric that specifies the number of passes through

internetworking products, such as routers, that a packet must take en route from a

source to a destination.

Reliability , in the context of routing algorithms, refers to the dependability (usually

described in terms of the bit-error rate) of each network link. Some network links

might go down more often than others. After a network fails, certain network links

might be repaired more easily or more quickly than other links. Any reliability factors

can be taken into account in the assignment of the reliability ratings, which are

arbitrary numeric values usually assigned to network links by network administrators.

Routing delay refers to the length of time required to move a packet from source to

destination through the internetwork. Delay depends on many factors, including the

bandwidth of intermediate network links, the port queues at each router along the

way, network congestion on all intermediate network links, and the physical distance

to be traveled. Because delay is a conglomeration of several important variables, it is

a common and useful metric.

The presentation layer

The presentation layer of information varies from one machine to another machine.

For Example –

One computer may store a character string in ASCII code & other may

store in EBDCIC code. The translation can be done in two ways

  1. Direct
  2. Indirect

ASCII is translated to EBDCIC. ASCII is translated to a standard format at the sender &

translated into EBDCIC at the receiver.

Encryption & Decryption :

Cipher text(C)

Plane text(P) Plane

text(P)

Encryption Algorithms Decryption Algorithms

Ke (Key) Kd (Key)

Conventional Encryption Method:

In Conventional Encryption & Decryption Method -- Encryption Key Ke &

Decryption Key are the same.

Conventional

Character level Bit Level

Substitutional Transpositional

Monoalphabetic Poly alphabetic

1.Character level :

output

8 - bit plain text

Sender key

8 - bit cipher text

8 - bit cipher text

Receiver

8 - bit plain text

4. Rotation:

In this the whole byte pattern is rotated once to get the cipher text.

01100011before

10110001 after 1 rotation

11011000 after 2 rotation

01101100 after 3 rotation

DES Encryption Algorithm:

Key (56 bits)

Plane text Cipher

text

transposition complex complex swapping

complex transposition

1. It is example of bit level encryption.

Sub Key Generator

**2. It was design by I.B.M.

  1. The first & last two step are simple.
  2. Step 2 to 17 are complex.**

Each requiring subnet that are combination of transposition substitution exclusive

or and rotation. These step are same and each uses a different key derive from

originial key.

The DES chaining is used to connect the different phases.

DES Chaining:

Ex-or operation

p0 p1 p2 p

c0 c1 c2 c3 p0 p1 p2 p

Cipher text Plane text

**1. DES chaining is used for the chaining of encryption and decryption boxes.

  1. It is also known as cipher text block chaining.
  2. Each plane text is** Ex-or operation with previous Cipher text block before being

encrypted.

4. Therefore the same text block No longer mark on to the same cipher text block

& encryption is no longer a big mono alphabetic substitution cipher.

E E E

E

D D D D

**_3. Send

  1. Receive
  2. Disconnect_**

TPDU --Transport & data protocol unit

TPDU --Transport & data protocol unit are send in connect send & disconnect send

primitive No TPDU is send is listen and receiver primitives.

Hand Seeking Algorithms:

The Connection establish to 3-bit Hand Seeking Mechanism. It is broken when there is a

present of delay TDPU’s. This protocol does not require both the side begin sending the

same sequence number.

Connection Establish:

The transport entity send a connection request TDPU to Destination and wait for

connection accepted replied. The problem occur the network can use store and rusticate

packet.

Compression :

Compression is a scheme in which the text image Audio Videos, data is Compressed to

reduce the amount of storage they required.

Encoding:

Encoding is a technique in which one representation is converted to another

representation. It is also known as Encryption.

Encoding is the different form of compression in the way that Encoding can not be listing

compression but it is a technique apply for compression.

Ex-

Name is encoded as ABCD but it is not compression. If Name is encoded as “AB” then

it is compression.

  1. Lossy (graphics)
  2. Lossless (text)

The various type of Compression :

1. HF

2. SF

3. LZW

4. JPEG

5. MPEG

LZW Compression Technique :

  1. LZW is a dictionary based Compression Technique.
  2. Compression Technique HF/SF take the symbol of input string & reduce the code. In

all these and equivalent code is produced of exposit probability of symbol.

3. LZW which is dictionary based Compression Technique depend upon the concept

of maintaining the index of a dictionary of all word in the existing string which may

appear in the incoming text for Compression.

4. LZW algo uses initialized dictionary while scanning the character of text. At every

char input are space containing the char are input line is entered into the dictionary.

  1. At entry of char C of the string corresponding to the Phase CD is made to the dictionary

at the next available position in the dictionary.

Ex- Compressed the text plane – using LZW?

WYSWYGWYSWYSWYSWYSG

SOLUTION :

I/P SYMBOL O/P additive to dictionary

W <63 > WY<256 >

Y <64 > YS< 257>

S < 65> S*<258>

* <67 > *W <259 >

WY <256> WYG<260 >

G < 66> GW<261>

WY <256 > WYS<262 >

S* <258 > S*W<263 >

WYS <262 > WYSW<264>

WYS <262 > WYSG<265 >

G <66 >

So code is

The first two step ore relatively to precautions of image for JPEG Encoding.

DCT : –

( Desecrate Cosine Transformation )

1 - After the block are prepare each block is subjected to discreet C.T. `which

trans form the singed or image farm special domain to frequency domain.

  1. The edge point contain the A.C.componant.
  2. The DCT operates ON 1 block at a time and generate 64 coefficients of these

coefficients one is the D.C. coefficients which other DCT are A.C.componant.

4. The two number coefficient represent low frequency color frequency

image and high number’s coefficient representing high frequency

color components.

Disadvantage:

The calculation time require for each element is depending upon size of matrix.

Quantization :

  1. The Quantization is as a second step after apply DCT.
  2. It is used to through extra bits as lossy schema
  3. After DCT pointer is apply to obtain a Quantization matrix
  4. Quantization help in compression since It reduces most of the values. In the DCT

matrix to zero. Which can be neglected.

  1. Quantization is the process reducing the no’s of bits needed to store and integer value

by reducing precision.

Encoding :

The coefficients are arrange Zig Zag sequence.

The purpose of Zig Zag scanning is to group lower frequency coefficients in the top of

the array.

It is perform to using

  1. Entropy Encoding
  2. Run Length Encoding

TCP Connection Management:

  1. In TCP Connection is establish using three way Hand Shecking Mechanism.
  2. The receiver execute LISTEN and ACCEPT primitives and the Clint execute

connect the primitives specifying IP address and part to which it wanta to

connect.

  1. The connect primitives sends TCP segments which syn bit ON and acknowledge

& ack bit are wait for response.

  1. When the segment arrive at the destination the TCP entity check to see if there

is a process that done LISTEN. If not send send a reply with rst bit ON to reject

the connection.

The two way of Connection establish meet is shown as

host 1 host2 host 1 host

x x z

y r t

z

ACK=4K , WIN=2K

K / SEQ=4K

TCP Window Management

1.The Window Management in TCP is not directly tied to he

acknowledgement as a more data link protocols.

  1. The simple Window Management is given the fig.

The receiver has four K buffers if sender transmits 2K byte segments that is

correctly coefficient. The receiver will ack the segment.

  1. Now it has only 2K buffer Space so until the application remove send data

from buffer .It will advertise a window of 2K starting at the next by accepted.

4.The sender transmits another 2K byte which are ack but advertise window is

zero.

5.The sender must stop .Until the application process on the receiving hole has

remove some data from the buffer at which TCP can advertise a larger window.

Nagle algorithm:

  1. It is used to optimize the performance TCP Window Management.
  2. Nagle algorithm states that when data comes into the sender one byte at

a time, just send first byte and buffer all the rest until they out sending byte

is acknowledged.

  1. Then send all the buffer characters in one TCP segment and the start

buffering again until they are acknowledged.

  1. If a user is typing quickly and n/w is in slow a substantial No’s may go in

each segment greatly reading b/w used.

  1. This aglo allows a new packet to be send is enough data is there to fill the

half the windows of maximum windows segments.

1K 2K

Silly Window Syndrome:

  1. This problem arise when data is passed to sending TCP entity in large drops but

interactive application on the receiving.

  1. From fig initially the TCP buffer on the receiving side is full that is size is zero. Then

interactive application from TCP stream.

  1. The receiving TCP stream sends a windows updates to the sender and how the sender

send one byte.

  1. The buffer is again full & this behaviors goes on indefinably leading to silly window

syndrome.

Clack’s algorithm:

  1. It is used to over come the problem of silly window syndrome.
  2. It prevents the receiver from sending the window update from 1 byte.

3.Install it is face to wait until a certain amount of space is available than advertise.

4.Especially the receiver should not send a window updates until it can handle the

maximum segment size. It advertises when the connection was established.

Receiver buffer is full

Application reads 1 bytes

Room for 1 Byte

Windows updates a segment send

New buffer is arrive

Receiver buffer is full

SNMP:

[Simple network management protocol]

It’s a protocol that can be used by software and hardware that are designed to monitor

various network and system components. The SNMP protocol which runs on the top of

UDP, specifies the syntax and format of the information passed between the agents and

manager components. for each possible request and reply SNMP specifies the exact

meaning of these messages. Information passed between the managers and agents is

encoded using the abstract system notation.

PING:

There comes a time on a TCP \ IP NETWORK when you

need to determine whether or not your computer a connect to a particular remote

computer.

one of the most useful and universal tools for this is the ping utility. Ping is an application

that uses Internet control message protocol [ICMP]

syntax to use ping; simply type.

ping the.remote.ip.address

such as

ping172.16.0.

The ping of death of service attack is one such example of Flexibility of Internet

protocol being used for malicious ends. In the ping of death attack; malicious user

sends an ICMP message and modifies the size of the packet so that it is larger than

the legal size for a ping packet.

DNS:

(Domain Name System)

It is one of the services and mechanism available in the IP

protocol suite that provide this services.

DNS services are spread across many different server system to provide name

resolution on the internet. No single DNS server maintain a complete list of the

registered domain name found on the internet.

The different DNS server maintain a database of certain names and address.

ARP:

Address Resolution Protocol

The PI protocol suite the Address Resolution Protocol [ARP] for

devices to resolve IP addresses to physical PI addresses. The use of a protocol ensures

that all devices can understand and handle the message properly. The ARP protocol

includes definitions for two types of messages: a request and response message.

The request message contains the IP address of the requested device in

addition to the IP and physical address of the device initiating the request. The

response message contains the IP and physical address of the requested device and

the IP and physical address of the device that sent out the response message.

ICMP:

The operation of the internet is monitored closely occurs; `the event is reported by

the ICMP[Internet Control Message Protocol] which is also used to test the internet.

DHCP:

Dynamic Host Configuration Protocol: It is a protocol designed to provide the

information dynamically [based on demand]. DHCP is also used to assign addresses

to a host dynamically. When a computer in an organization needs an address; it can

use DHCP. It is a client server program.

RARP( )

Reverse Address Resolution Protocol: It is an IP protocol that resolves hardware

addresses to an IP addresses. This type of situation arises with system that does not

have an operation system when they start up. In a RARP servers handle the RARP

requests and reply back to the requester

With the IP address. The requester can thin communicate with a sever or servers to

receive an operation system so that device can continue to boot success fully.

HTTP:

Hypertext Transfer Protocol: It specifics the rules for communication between

browses and web servers. The HTTP requests are sent as ASCII test and there are

several keywords that permit different type of actions. The get command is used to

request a document or item from the server. Notice that information sent to the sever

from the browser when an HTTP get command is delivered.