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

Related documents


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. 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 : In this a char replace by another char. It is two type. (a) Substitutional Method: In this a char retain their plane text form but change their position to cipher text. It is also two type. ( I )Monoalphabetic : In this a number is added to ASCII code. Suppose the key value is 3 A+3=D (II)Poly alphabetic: It finds the position of that char in the text &uses that value as a key. Ex. J a i p r a t a p 1 23 4 5 6 7 89 k c l t w g a i y 2. Bit Level: The data as text image graphics are first divide into blocks of bits. It is four type. 1.Encoding & Decoding 2.Permutation 3.Ex-OR 4.Rotation 1.Encoding & Decoding: In this encoder & decoder are used to change an input of n bit to 2n& vice versa. 2. Permutation : It is also known as the Transposition Bit Level. It is of the Three type- 1. Straight 2. Compressed 3. Extended 3. Ex-OR : In this the plane text is Ex-or with the given key to get the output. 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 0011 0101 1001 1001 1010 1100 1010 1100 1001 1001 0011 0101 3. Send 4. Receive 5. 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 . 5. 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? WYS*WYGWYS*WYSWYSWYSG 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 <63 ><64 >< 65><67 ><256>< 66><256 ><258 ><262 ><262 ><66 > Run Length Encoding: 1. It is an example of entropy encoding. Entropy encoding manipulates the bits stream w/o regard to what the bit means. 2. In general It is loss less reversible and applicable all kind of data. 3. In many kind of data string of repeated symbol bit no’s extra are common. This can be replace by special marker followed by symbol compressing the Run followed by How many times is occurs. Ex- 31500000000005781111111111146 it run coded form is 3150A10578A11146 JPEG: It stands for joint photographic expend group. Using GPFG compression the size of compressed file is dependent up on image quality that is required. It image degrading is push liable then must better compression is archive. It was treated by standard groups CCITT ; ISO The measure steps used in JPEG compression infecting are as fallows 1- Color space conversion 2- Block preparation 3- DCT 4- Quantisation 5- Zig zag. Scanning 6- DPCM ONDC Component 7- RLE ONAC Component 8- Entropy encoding RBG toYQ (OPTIONAL) R G B Y I Q f- normal case call collision case x-SYN(SEQ=X) y- SYN(SEQ=Y, ACK=X+1) z- SYN(SEQ=Y) r- SYN(SEQ=X,ACK=Y+1) t- SYN(SEQ=Y,ACK=X+1) In the second fig The two host simentanly attain to the establish to connection b/w to the same to socket . In such a case only one connection is established Connection releases . 1. The connection is full duplex mod . 2. Each simplex connection is released independably. 3. Either host send a FIN bit set means it has no more data to send. The data continuous to ack independably in other direction . 4. Then both the direction have been shut down the connection is released. 5. Both TCP segment can sends FIN segment at the same time TCP Window Management: SENDER RECIVER 0 2K APPLICATION 2K / SEQ=0 DOCUMENTS 2K WRITE ACK=2K ,WIN=2K APPLICATION DOCUMENTS 2K WRITE 2K / SEQ=2K ACK=4K , WIN=2K EMPTY FULL 2K 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. 2. 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 . 3. 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. 3. Then send all the buffer characters in one TCP segment and the start buffering again until they are acknowledged. 4. 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. 5. 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. 2. From fig initially the TCP buffer on the receiving side is full that is size is zero. Then interactive application from TCP stream. 3. The receiving TCP stream sends a windows updates to the sender and how the sender send one byte. 4. 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
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved