University of Technology Computer Science Department Network Administration Branch First Class
description
Transcript of University of Technology Computer Science Department Network Administration Branch First Class
![Page 1: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/1.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Second Semester – 2012
Prepare by: Dr. Mazin S. Ali
available at: www.uotechnology.edu.iq/dep-cs
![Page 2: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/2.jpg)
Resource:The University California, San DiegoComputer Science and Engineering
Lecture Notes of Professor George Varghesehttp://www-cse.ucsd.edu /~varghese
2
![Page 3: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/3.jpg)
Lecture1:Introduction and Principles of Network Algorithms
Contents: 1. Algorithm (Definition) 2. Computer Network (Definition)
3. Network Components (NIC, Access Point, Repeater, HUB, Bridge, Switch, Router, BRouter, GATEWAY)
4. Network Bandwidth (Definition)
5. Network Algorithms 6. Routing (Routing Protocols, Routing Table, Routing Configuration) 7. Capacity of Router 8. History of big Routers (Short History)
3
![Page 4: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/4.jpg)
Lecture 2:Lookup and Router Architecture
Contents: 1. Short Review 2. Routing Table Lookup 3. Router Architecture (Input Port Processing, Switching Fabrics,
Routing Processing, Output Port Processing)
4
![Page 5: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/5.jpg)
Lecture 3:Searching Routing-Table Algorithms
Contents: 1. Searching Algorithm (Definition)
2. Searching Routing Table (Definition)
3. Searching Routing Table Algorithms 3.1. Binary Search. 3.2. Hash Table. 3.3. Tire based Algorithms: 3.3.1. 1-Bit Trie (BMP) Algorithm 3.3.2. Multi-Bit Tire (VST) Algorithm 3.3.3. Compressed Tries 4. Tire based Algorithm for Strings
5
![Page 6: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/6.jpg)
Lecture 4:Searching Routing-Table Algorithms
Contents: 1. Searching Algorithm 2. Searching Routing Table 3. Searching Routing Table Algorithms 3.1. Binary Search. 3.2. Hash Table. 3.3. Tire based Algorithms: 3.3.1. 1-Bit Trie (BMP) Algorithm 3.3.2. Multi-Bit Tire (VST) Algorithm 3.3.3. Compressed Tries 4. Tire based Algorithm for Strings
6
![Page 7: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/7.jpg)
Lecture 5:Packet Classification
Contents: 1. Network Reference Models 2. TCP/IP Reference Model (IP Protocol Stack)
2.1. The Application Layer2.2. The Transport Layer (Host-to-Host) (End-to-End)
2.3. Internet Layer2.4. Network Layer (Host-To-Network) (Link)
3. ICMP and OSPF Core Protocols 4. IP v4 and IP v6 Packets 5. TCP and UDP Packets 6. Simplified Network Packet Format 7. Screening Router
7
![Page 8: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/8.jpg)
Lecture 6:Packet Classification (Cont.)
Contents: 1. Network Reference Models 2. TCP/IP Reference Model (IP Protocol Stack)
2.1. The Application Layer2.2. The Transport Layer (Host-to-Host) (End-to-End)
2.3. Internet Layer2.4. Network Layer (Host-To-Network) (Link)
3. ICMP and OSPF Core Protocols 4. IP v4 and IP v6 Packets 5. TCP and UDP Packets 6. Simplified Network Packet Format 7. Screening Router
8
![Page 9: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/9.jpg)
Lecture 7:Switching Theory
Contents: 1. Short Reviewing 2. Switching Theory 3. Crossbar Switch Architecture 4. Crossbar Switch Models IQ Switch OQ Switch CIOQ Switch
9
![Page 10: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/10.jpg)
Lecture 8:Switching Theory (Cont.)
Contents: 1. Review 2. Speed Up and Delay Control in CIOQ 3. Stable Marriage Algorithms for CIOQ Gale-Shapley Algorithm (GSA) 4. Scheduling Algorithms for CIOQ First In First Out Scheduling Algorithm (FIFO) Most Urgent Cell First Scheduling Algorithm (MUCF) Randomized Switch Scheduling
10
![Page 11: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/11.jpg)
Lecture 9:Bandwidth Partitioning
Contents: 1. Review 2. Network Bandwidth 2.1. Network Bandwidth – Network Centric Approach 2.2. Network Bandwidth – User Centric Approach
11
![Page 12: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/12.jpg)
Lecture 10:IP Addressing
Contents: 1. IPv4 Addresses 2. Classful IPv4 Addressing Scheme 3. Public and Private IP Addresses 4. Reserved IP Addresses 5. Subnetting / Netmask 6. NAT (Network Address Translation)
12
![Page 13: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/13.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 1:Introduction and Principles
of Network Algorithms
available at: www.uotechnology.edu.iq/dep-cs
![Page 14: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/14.jpg)
Lecture1:Introduction and Principles of Network Algorithms
Contents: 1. Algorithm (Definition) 2. Computer Network (Definition)
3. Network Components (NIC, Access Point, Repeater, HUB, Bridge, Switch, Router, BRouter, GATEWAY)
4. Network Bandwidth (Definition)
5. Network Algorithms 6. Routing (Routing Protocols, Routing Table, Routing Configuration) 7. Capacity of Router 8. History of big Routers (Short History)
14
![Page 15: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/15.jpg)
1. Algorithm (from Algoritmi, the Latin form of Al-Khwārizmī) in computer science is a step-by-step procedure for calculations, data processing, and automated reasoning to solve a specific problem.
The algorithm should be starting from an initial state and initial input, then should be transition from one state to the next to execute the instructions (which describe a computation that), eventually producing "output" and terminating at a final ending state.
initial state
exec. state
exec. state
exec. state
final state
15
![Page 16: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/16.jpg)
2. Computer Network, often simply referred to as a network, is an interconnected collection of hardware components and autonomous computers interconnected by communication channels that allow to exchange information and share the resources.
A network consists of a set of devices like:
Hosts , host is individual computer connected to the computer network, which can offer information resources, services, and applications to users or other nodes on the network.
Nodes , node is any device that is attached to a network, either a redistribution point (capable of sending, receiving or forwarding information over a communications channel), or a communication endpoint (some terminal equipment).
16
![Page 17: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/17.jpg)
17
![Page 18: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/18.jpg)
3. Network Components are used to connect computing devices together in different networks, and to connect multiple networks or subnets together, these includes:
NIC: (Network Interface Card) is network device used to enable a network device (such as a computer or other network
equipment) to connect to a network.
Access Point: is a network device that allows wireless devices to connect to a wired network.
wired network
Access Point
Repeater
Segment A
Segment BRepeater: is a network device that connects two or more network segments and retransmits any incoming signal to all other segments.
18
![Page 19: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/19.jpg)
HUB / Switch: is a central network device that connects all nodes in a star topology. Also it is concentrator (a device that can have multiple inputs and outputs all active at one time).
HUB Switch
Difference between
HUB and Switch
19
![Page 20: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/20.jpg)
Bridge: is a network device that sends information between two LANs.
20
![Page 21: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/21.jpg)
Router: is a network device that direct traffic between hosts.A router is connects two or more different networks.
BRouter: is a network device that acts as a Bridge in one circumstance and as a Router in another.
GATEWAY: The term gateway refers to a software or hardware interface that enables two different types of networked systems or software to communicate.
Network Components: NIC , Access Point , Repeater , HUB , Bridge ,
Switch , Router , BRouter , GATEWAY21
![Page 22: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/22.jpg)
The difference between Switch and Router
Connection to other Networks
22
![Page 23: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/23.jpg)
4. Network BandwidthNetwork Bandwidth (bit rate, channel capacity, or throughput) is a measure of communication channel usage (available or consumed of communication path) in bits/second “pbs” or multiples of it (kilobits/s “Kbps”, megabits/s “Mbps”, etc.).
23
![Page 24: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/24.jpg)
24
![Page 25: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/25.jpg)
5. Network Algorithms are the algorithms to select the paths in network along which (network traffic routes) to send network traffic “also called Routing”, and to process the network bottlenecks at servers, routers, or other networking devices.
25
There are many network algorithms like Trie based Algorithm, Multibit Trie Algorithm, etc.
![Page 26: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/26.jpg)
6. Routing is the process of selecting paths in network along which (network traffic routes) to send network traffic.
There are two main routing protocols: • Distance-Vector (DV) Routing Protocol (Simple and efficient in
small networks and require little management, but it have count-to-infinity
problem). • Link-State (LS) Routing Protocol (More scalable for use in large
networks, but more complex).
There are other protocols like; Optimized Link State Routing Protocol (OLSR) (which used for routing mobile ad-hoc networks), and Path Vector Routing Protocol (PV) (which used for routing between
autonomous network systems).
26
![Page 27: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/27.jpg)
Each of these routing protocols are applying a “Routing Table” to multiple routes to select the best route.
The routing table (routing metrics, or routing distances) contains information about the topology of the network immediately around the router.
The routing table consists of at least three information fields:• Network ID.• Cost (cost or length of path through).
• Next Hop (the address of the next station to which the packet is to be sent).
27
Next Hop Cost Network ID
![Page 28: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/28.jpg)
There are two main routing configuration ways: • Static Routing: The network administrator adds the routes
(fixed paths) to the routing table manually. But when there is a change in the network or a failure occurs between two nodes, traffic will waiting for repairing the failure (not be rerouted), or the static route to be updated by the administrator before restarting its journey.
• Dynamic Routing (Adaptive Routing): The system adds routs to the routing table automatically, the adaptation is allow to rerouting the routing table when automatically.
28
![Page 29: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/29.jpg)
Capacity of Router = N x R (measured by packets per second)
N = number of linecards (Typically 8 - 32 per chassis)R = line-rate (1Gb/s, 2.5Gb/s, 10Gb/s, 40Gb/s, 100Gb/s)
7. Capacity of Router
29
![Page 30: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/30.jpg)
8. History of big RoutersIn the original 1960s, the general-purpose computers served as routers.
The general-purpose computers with extra hardware added to accelerate both common routing functions and specialized functions such as encryption functions.Other changes also improve reliability, such as using battery rather than mains power, and using solid storage (hard disk) rather than magnetic storage.
The first modern (dedicated, standalone) router were the Fuzzball router (with capacity: 56kbps).
30
![Page 31: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/31.jpg)
Cisco GSR 12816Capacity: 640Gb/s
Juniper T640Capacity: 320Gb/s
31
![Page 32: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/32.jpg)
Mikrotik 3Com
D-Link
32
![Page 33: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/33.jpg)
Cisco Series
Cisco 2811
33
![Page 34: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/34.jpg)
There are several manufacturers of routers including: • 3Com (www.3com.com)
• Cisco Systems (www.cisco.com)
• D-Link Systems (www.dlink.com) • Juniper Networks (www.juniper.net)
• Linksys (www.linksys.com)
• Mikrotik (www.mikrotik.com)
• NETGEAR (www.netgear.com)
34
![Page 35: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/35.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs
![Page 36: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/36.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 2:Lookup and
Router Architecture
available at: www.uotechnology.edu.iq/dep-cs
![Page 37: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/37.jpg)
Lecture 2:Lookup and Router Architecture
Contents: 1. Short Review 2. Routing Table Lookup 3. Router Architecture (Input Port Processing, Switching Fabrics,
Routing Processing, Output Port Processing)
37
![Page 38: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/38.jpg)
38
Router: (as sown in the pervious lecture) is a network device that direct traffic between hosts.A router is connects two or more different networks.
GATEWAY: The term gateway refers to a software or hardware interface that enables two different types of networked systems or software to communicate.
1. Review:
Routing Table: (Routing Metrics, or Routing Distances) contains information about the topology of the network immediately around the router, the router are applying a “Routing Table” to multiple routes to select the best route.
![Page 39: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/39.jpg)
39
The Routing Table Lookup is search through the routing table, looking for a destination entry that best matches the destination network address of the packet, or a default route if the destination entry is missing
2. Routing Table Lookup:
The most important complicating factor is that backbone routers must operate at high speeds, being capable of performing millions of lookups per second. It is best for the input port processing to be able to proceed at line speed, that is, that a lookup can be done in less than the amount of time needed to receive a packet at the input port. In this case, input processing of a received packet can be completed before the next receive operation is complete.
![Page 40: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/40.jpg)
3. Router Architecture A high-level view of Router Architecture is shown below.
40
Switching Fabric
Routing Processor
Input Ports Output PortsOutput ports:
Stores the packets (that
have been forwarded to it
through the switching fabric)
and then transmits the
packets on the outgoing link
Switching Fabric: Connects the
router's input ports to its output ports
Routing Processor: Executes the Routing Protocols, Maintains the Routing Tables, and performs Network
Management functions, within the router
Input Ports: Terminating an incoming
link to a router, data
link processing,
and performs a lookup and forwarding functions
![Page 41: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/41.jpg)
3.A. Input Port ProcessingTerminating an incoming link to a router, data link processing, and performs a lookup and forwarding functions.
41
Switc
hing
Fab
ric
Line Termination
Function
Data Link Processing
Lookup, Forwarding,
Queuing
Input Port
![Page 42: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/42.jpg)
3.A. Input Port ProcessingInside Input Port… the router determines the output port to which an arriving packet will be forwarded via the switching fabric.
42
((The choice of the output port is made using the information contained in the routing table)). A shadow copy (local copy) of the routing table is stored at each input port and updated (as needed) by the routing processor. With shadow copies (local copies) of the routing table, the switching decision can be made locally, at each input port, without invoking the centralized routing processor. Decentralized
Switching
![Page 43: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/43.jpg)
3.A. Input Port Processing
43
When a computer works as a router; Here, the input port is just a NIC (with limited processing capabilities), so the input port simply forward the packet to the centralized routing processor (the computer's CPU) which will perform the routing table lookup and forward the packet to the appropriate output port.
As an old fashioned:
Centralized Switching
![Page 44: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/44.jpg)
44
3.B. Switching FabricsThe switching fabric is at the heart of a router. Through it the packets are actually moved from an input port to an output port.
Switching can be accomplished in a number of ways:
![Page 45: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/45.jpg)
45
3.B. Switching Fabrics / Switching via Memory
The input port receives the packets.
The packet was copied from the input port into memory of the routing processor (on the input port).
The routing processor extracted the destination address from the header, looked up the appropriate output port in the routing table, and copied the packet to the output port's buffers.
![Page 46: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/46.jpg)
46
3.B. Switching Fabrics / Switching via Bus
The input ports transfer a packet directly to the output port over a shared bus, without intervention by the routing processor. But only one packet at a time can be transferred over the bus.
A packet arriving at an input port (and finding the bus busy with the transfer of another packet) is blocked from passing through the switching fabric and is queued at the input port.
Because every packet must cross the single bus, the switching bandwidth of the router is limited to the bus speed.
![Page 47: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/47.jpg)
47
3.B. Switching Fabrics / Switching via Crossbar
One way to overcome the bandwidth limitation of a single, shared bus is to use a crossbar.A crossbar switch is an interconnection network consisting of 2N busses that connect N input ports to N output ports.
A packet arriving at an input port travels along the horizontal bus attached to the input port until it intersects with the vertical bus leading to the desired output port.
If the vertical bus is free, the packet is transferred to the output port. If the vertical bus is being used to transfer a packet from another input port to this same output port, the arriving packet is blocked and must be queued at the input port.
![Page 48: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/48.jpg)
3.C. Routing ProcessingRouting Processing is the “Routing Table Lookup” for search through the routing table, looking for a destination entry that best matches the destination network address of the packet, or a default route if the destination entry is missing
The most important complicating factor is that backbone routers must operate at high speeds, being capable of performing millions of lookups per second, so we have several algorithms to accomplish that, like:
• Tire based Algorithm,• Multibit Tire Algorithm,• Compressed Tries,• Binary Search.
![Page 49: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/49.jpg)
49
3.D. Output Ports ProcessingIt takes the packets which stored in the output port's memory and transmits them over the outgoing link.
The data link processing and line termination are interact with the input port on the other end of the outgoing link.
The queuing and buffer management functionality are needed when the switch fabric delivers packets to the output port at a rate that exceeds the output link rate.
Switc
hing
Fab
ric
Line Termination
Function
Data Link Processing
Queuing
Output Port
![Page 50: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/50.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs
![Page 51: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/51.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 3:Searching Routing-Table
Algorithms
available at: www.uotechnology.edu.iq/dep-cs
![Page 52: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/52.jpg)
Lecture 3:Searching Routing-Table Algorithms
Contents: 1. Searching Algorithm (Definition)
2. Searching Routing Table (Definition)
3. Searching Routing Table Algorithms 3.1. Binary Search. 3.2. Hash Table. 3.3. Tire based Algorithms: 3.3.1. 1-Bit Trie (BMP) Algorithm 3.3.2. Multi-Bit Tire (VST) Algorithm 3.3.3. Compressed Tries 4. Tire based Algorithm for Strings
52
![Page 53: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/53.jpg)
53
Search Algorithm: is an algorithm for finding a specific item among a collection of items.
1. Searching Algorithm:
5 3 8 2 4 6 9 1 - - - - 7 - 10
Search Example:
To find item(5) “search key” we need to only 1 step to find it,to find item(10) we need to 15 steps to find it,to find other item like item(9) we need to 7 steps to find it,and so on.
So..The best case is when we find the item at the first location (1 time),while worst case is when we find the item at the last location (n times),and the average case is (best-case + worst-case)/2.
Linear Search
“Sequential Search”
![Page 54: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/54.jpg)
54
2. Searching Routing Table:
The most important complicating factor is that “backbone routers“ must operate at high speeds, being capable of performing millions of lookups per second.
So the lookup operations should be searching a destination through the Routing Table at high speeds.
The linear search suffered from a problem with its worst case cost, its proportional to the number of items in the list.
So the linear search is not suitable for lookups routing table, and we need to the faster searching algorithm.
![Page 55: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/55.jpg)
55
3. Searching Routing Table Algorithms:
The worst case cost of Linear Search is proportional to the number of items in the list … this is the big problem with linear search algorithm.
Therefore, there are other algorithms will be faster, but they also impose additional requirements.
There are several Searching Algorithms to optimize the work of lookup inside routing table like:-
• Binary Search Tree• Tire based Algorithm,• Multibit Tire Algorithm,• Compressed Trie Algorithms.
![Page 56: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/56.jpg)
56
3.1. Binary Search:
Binary Tree: is a tree that is characterized by that any node can have at most two branches. A binary may be empty or consist of a root and two disjoint binary tree called the left subtree and the right subtree .
Binary Tree Search: is a binary tree in which the left child (if there is) of any node contains a smaller value than does the parent node and the right child (if there is) contains a larger value than the parent node.
Its a fast way to search a list of items.
![Page 57: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/57.jpg)
57
3.1. Binary Search (cont.):
The idea is to look at the item in the middle. If the key is equal to that, the search is finished. If the key is less than the middle element, do a binary search on the left half. If it's greater, do a binary search of the right half.
5
3 8
2 4 6 9
1 7 10
![Page 58: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/58.jpg)
58
3.1. Binary Search (cont.):
The advantage of a binary search over a linear search is a very good for large-number of items.
![Page 59: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/59.jpg)
59
3.2. Hash Table:
Hash Table: is a random access data structure (like an array), and uses a mapping function (called a hash function), to allow for O(1) searches or constant searching time.
The Hash Function provides a way for assigning numbers to the input data such that the data can then be stored at the array index corresponding to the assigned number.
![Page 60: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/60.jpg)
60
3.2. Hash Table (cont.):
Example: We has a hash table array of strings with size=11.
Simple Hash Function hash(“ “,11) :yields
Steve
3
0
1
2
3
4
5
6
7
8
9
10
Steve
![Page 61: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/61.jpg)
61
3.2. Hash Table (cont.):
Simple Hash Function hash(“ “,11) :yields
Steve
6
0
1
2
3
4
5
6
7
8
9
10
Spark
Spark
![Page 62: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/62.jpg)
62
3.2. Hash Table (cont.):
Simple Hash Function hash(“ “,11) :yields
Steve
10
0
1
2
3
4
5
6
7
8
9
10
Notes
Spark
Notes
![Page 63: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/63.jpg)
63
3.2. Hash Table (cont.):
Simple Hash Function hash(“ “,11) :yields
Steve
3
0
1
2
3
4
5
6
7
8
9
10
Pad
Spark
Notes
Pad Collision
A collision occurs when two data
items are hashed to the same value.
![Page 64: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/64.jpg)
64
3.2. Hash Table (cont.):
Separate chaining is a method for dealing with collisions.
The hash table is an array of linked lists.
Data items that hash to the same value are stored in a linked list originating from the index equivalent of their hash value.
0
1
2
3
4
5
6
7
8
9
10
Array of Linked Lists
![Page 65: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/65.jpg)
65
3.2. Hash Table (cont.):
Hash Table with Separate Chaining to avoid the collision.
Simple Hash Function hash(“ “,11) :yields
0
1
2
3
4
5
6
7
8
9
10
Steve : 3
Spark : 6
Notes: 10
Pad: 3
Steve
Spark
Notes
Pad
![Page 66: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/66.jpg)
66
3.2. Hash Table (cont.):
A search follows the same steps as doing an insertion.i.e. the search key is “Notes”
Simple Hash Function hash(“ “,11) :yields
0
1
2
3
4
5
6
7
8
9
10
Steve
Spark
Notes
Pad
Notes
10
The number of steps is O(1)
![Page 67: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/67.jpg)
67
3.2. Hash Table (cont.):
Separate Chaining allows us to solve the problem of collision.
The drawback is, all items inserted at the same place in the array (and this is impossible).
In that case, we'd really be doing a straight linear search on a linked list, which means that our search operation is back to being O(n) .
The worst case search time for a hash table is O(n).
![Page 68: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/68.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs
![Page 69: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/69.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 4:Searching Routing-Table
Algorithms (Cont.)
available at: www.uotechnology.edu.iq/dep-cs
![Page 70: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/70.jpg)
Lecture 4:Searching Routing-Table Algorithms
Contents: 1. Searching Algorithm 2. Searching Routing Table 3. Searching Routing Table Algorithms 3.1. Binary Search. 3.2. Hash Table. 3.3. Tire based Algorithms: 3.3.1. 1-Bit Trie (BMP) Algorithm 3.3.2. Multi-Bit Tire (VST) Algorithm 3.3.3. Compressed Tries 4. Tire based Algorithm for Strings
70
![Page 71: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/71.jpg)
“The term trie comes from retrieval”.
In general, a trie tree (or prefix tree), is an ordered tree data structure that is used to store a list (where the keys are usually strings).
No node in the trie tree stores the key associated with that node; instead, its position in the tree defines the key with which it is associated.
The root is associated with the empty string, and the values are normally not associated with every node, only with leaves.
3.3. Tire based Algorithms:
![Page 72: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/72.jpg)
1-Bit Trie (or Best Matching Prefix (BMP)) is a binary tree-based data structure that uses prefix bits to direct branching, the search guided by bits.
At each level, proceed left or right based on the next address bit, on visiting a node marked as prefix, the search ends when there are no more branches to take.
The search guided by bits, these means that the sequential prefix search by length (Look at length-1 prefixes first, then length-2 prefixes, …).
Note that each step reduces the search space.
3.3. Tire based Algorithms (Cont.): 3.3.1. 1-Bit Trie Algorithm (Tire based Algorithm):
![Page 73: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/73.jpg)
Example 1:
Prefixes: a : 0* b : 01000* c : 011* d : 1* e : 100* f : 1100* g : 1101* h : 1110* i : 1111*
3.3. Tire based Algorithms (Cont.): 3.3.1. 1-Bit Trie Algorithm(Cont.):
a
c
b
e
d
f g h i
Each step reduces the search space
![Page 74: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/74.jpg)
Example 2:
3.3. Tire based Algorithms (Cont.): 3.3.1. 1-Bit Trie Algorithm(Cont.):
P1
P2
P3
P4
P5
P6
![Page 75: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/75.jpg)
3.3. Tire based Algorithms (Cont.): 3.3.1. 1-Bit Trie Algorithm (Cont.):
The 1-Bit Trie algorithm is a classical solution to allow a good representation of length prefixes, but these way may involve long sequences of one-child nodes.
These requires bit inspection and these allow to increase lookup time.
drawbackhave long sequences
of one-child nodes
![Page 76: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/76.jpg)
3.3. Tire based Algorithms (Cont.): 3.3.2. Multi-Bit Trie Algorithm (VST):
The basic idea is to speedup search by examining multiple bits at a time, for example, examine 4 bits.
The number of bits examined in each step called “Stride”, so the algorithm also called Variable-Stride Trie (VST).
Its complex algorithm to calculate, but should notes that, the nodes at the same level may have different strides.
For example; the stride for the root of some tree is 2; that for the left child of the root is 5; and that for the root’s right child is 3.
![Page 77: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/77.jpg)
3.3. Tire based Algorithms (Cont.): 3.3.2. Multi-Bit Trie Algorithm (VST) (Cont.):
Example:
Prefixes: P1 : 10* P2 : 11* P3 : 11001* P4 : 1* P5 : 0* P6 : 1000000*
Assume that the stride for the root of some tree is 2; And that for the root’s left child is 5;And that for the root’s right child is 3.
00
01
10
11
P5
P4
P1
P200000
00001
00010
00011
11111
::
P6000
001
010
011
100
101
110
111
P3
![Page 78: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/78.jpg)
3.3. Tire based Algorithms (Cont.): 3.3.3. Compressed Tries:
The “Compressed Tries” (or Path Compressed Tries) attempt to reduce space and time performance of the tow Trie algorithms:
• 1-Bit Trie algorithm (BMP), and • Mulit-Bit Trie algorithm.
![Page 79: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/79.jpg)
3.3. Tire based Algorithms (Cont.): 3.3.3.A. Compressed Tries with 1-Bit Trie Algorithm:
The “Path Compressed Tries” attempt to reduce space and time performance of 1-Bit Trie algorithm (BMP), by the following: 1- Collapse one-way branch nodes. 2- Jump directly to the bit used for decision.
![Page 80: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/80.jpg)
Prefixes: a : 0* b : 01000* c : 011* d : 1* e : 100* f : 1100* g : 1101* h : 1110* i : 1111*
a
c
b
e
d
f g h i
Collapse
Jump
![Page 81: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/81.jpg)
a
c
b
e
d
f g h i
Collapse
Jump
![Page 82: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/82.jpg)
a
c
b
e
d
f g h i
Collapse
Jump
![Page 83: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/83.jpg)
a
c
b
d
f g h i
e
Collapse
Jump
![Page 84: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/84.jpg)
a
cb
e
d
f g h i
Collapse
Jump
![Page 85: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/85.jpg)
a
cb e
d
f g h i
![Page 86: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/86.jpg)
a
cb e
d
f g h i
1-Bit Trie / Prefixes: a : 0* b : 01000* c : 011* d : 1* e : 100* f : 1100* g : 1101* h : 1110* i : 1111*
Compressed 1-Bit Trie/ Prefixes: a : 0* b : 01000* c : 011* d : 1* e : 100* f : 1100* g : 1101* h : 1110* i : 1111*
00*01*
10*
![Page 87: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/87.jpg)
1-Bit Trie Prefixes: a : 0* b : 01000* c : 011* d : 1* e : 100* f : 1100* g : 1101* h : 1110* i : 1111*
1-Bit Trie Algorithm
Compressed 1-Bit Trie Algorithm
Path Compressed Tries( Collapse and Jump )
Each step reduces the search space
Compressed 1-Bit Trie Prefixes: a : 0* b : 00* c : 01* d : 1* e : 10* f : 1100* g : 1101* h : 1110* i : 1111*
![Page 88: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/88.jpg)
3.3. Tire based Algorithms (Cont.): 3.3.3.B. Compressed Tries with Multi-Bit Trie Algorithm:
The Compression Scheme is:• Compress repeated occurrences of BMPs.• Compression is same across sub-trie.• Compression is not optimal – but access is simpler and
efficient.
![Page 89: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/89.jpg)
Example 1: A 1-Bit Trie tree for keys "A", "to", "tea", "ted", "ten", "i", "in", and "inn“ is display here:
4. Tire based Algorithm for Strings:
A
e
it
o
a d n
n
n
![Page 90: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/90.jpg)
Example 1 (Cont.): A Compressed tree for the 1-Bit Trie tree is display here:
A
e
it
o
a d n
n
n
Collapse
Jump
n
4. Tire based Algorithm for Strings (Cont.):
![Page 91: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/91.jpg)
Example 1 (Cont.): A Compressed tree for the 1-Bit Trie tree is display here:
A
e
it
o
a d n
nn
4. Tire based Algorithm for Strings (Cont.):
![Page 92: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/92.jpg)
Example 1 (Cont.): A Compressed tree for the 1-Bit Trie tree is display here:
A
e
it
o
a d n
nn
nn
4. Tire based Algorithm for Strings (Cont.):
![Page 93: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/93.jpg)
Example 1 (Cont.): A Compressed tree for the 1-Bit Trie tree is display here:
A
e
innt
o
a d n
4. Tire based Algorithm for Strings (Cont.):
![Page 94: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/94.jpg)
Example 2: Construct the 1-Bit Trie tree for the following keys: “bear", “bell", “bid", "ted", “bull", “buy", “sell", “stock", and “stop“. Then construct the Compressed 1-Bit Trie tree for it.
4. Tire based Algorithm for Strings (Cont.):
1-Bit Trie Tree
Compressed 1-Bit Trie Tree
Solution:
![Page 95: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/95.jpg)
Example 3: Construct the 1-Bit Trie tree for the following keys: “yahoo", “yamal", “google", “gomee", “gomer", “facebook", “facetime", “fact", and “facetik“. Then construct the Compressed 1-Bit Trie tree for it.
4. Tire based Algorithm for Strings (Cont.):
Solution:
?1-Bit Trie Tree Compressed 1-Bit Trie Tree
?
![Page 96: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/96.jpg)
Must be remember
that …
![Page 97: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/97.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
Router
![Page 98: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/98.jpg)
Compressed 1-Bit Trie Algorithm
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
Router
![Page 99: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/99.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
Compressed 1-Bit Trie Algorithm
1100
1100
f
Router
![Page 100: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/100.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
1100
Centralized Switching
Router
![Page 101: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/101.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
00
Decentralized Switching
Router
![Page 102: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/102.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs
![Page 103: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/103.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 5:Packet Classification
available at: www.uotechnology.edu.iq/dep-cs
![Page 104: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/104.jpg)
Lecture 5:Packet Classification
Contents: 1. Network Reference Models 2. TCP/IP Reference Model (IP Protocol Stack)
2.1. The Application Layer2.2. The Transport Layer (Host-to-Host) (End-to-End)
2.3. Internet Layer2.4. Network Layer (Host-To-Network) (Link)
3. ICMP and OSPF Core Protocols 4. IP v4 and IP v6 Packets 5. TCP and UDP Packets 6. Simplified Network Packet Format 7. Screening Router
104
![Page 105: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/105.jpg)
With “1st Class - Principles of Network & Application Subject”, we have discussed the two important network reference models, the OSI reference model and the TCP/IP reference model.
1. Network Reference Models:
TCP : Transmission Control ProtocolIP : Internet Protocol
But with “1st Class - Principles of Network Algorithms Subject“, we focusing only on ‘TCP/IP Reference Model’ from Routing side of view.
![Page 106: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/106.jpg)
TCP/IP protocol (also called IP Protocol Stack) is a set of communication protocols used for the Internet and other similar networks.
It is commonly known as TCP/IP, because of its most important protocols TCP and IP, which were the first networking protocols defined in this standard.
TCP/IP protocol have 4 layers:1. Application Layer2. Transport Layer3. Internet Layer4. Network Interface Layer
2. TCP/IP Reference Model :
![Page 107: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/107.jpg)
HTTP FTP SMTP RTP DNS BGP RIP
Web
Browsing
Upload Files
between Devic
es
Multimedia
VoIP , Video
nslooku
p
Router Command
Line In
terface
TCP
ICMP
UDP
IP
OSPF
ping
App
licat
ion
Laye
rT
rans
port
Laye
rIn
tern
etLa
yer
Net
wor
kLa
yer
Network Interface
![Page 108: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/108.jpg)
2.1. The Application Layer:The Application Layer is a top TCP/IP layer, it’s contains all the higher-level protocols which involve user interaction, like HTTP , FTP , SMTP , RTP , DNS , BGP , RIP , and other protocols.
2. TCP/IP Reference Model (Cont.):
HTTP FTP SMTP RTP DNS BGP RIP
HTTP (Hyper Text Transfer Protocol): It’s an application
protocol for transfer hypertext,
hypermedia, over web information
systems
FTP (File Transfer Protocol):
It’s an application protocol which
provides a way to move data efficiently from
one machine to another.
SMTP (Simple Mail Transfer Protocol): It’s an application protocol for e-mail
transmission between devices.
RTP (Realtime Transport Protocol):
It’s an application protocol to
delivering audio and video over networks
DNS (Domain Name System):
It’s an application protocol to
translates domain name to IP address
BGP (Border Gateway Protocol):
It’s an application protocol to backing the core routing decisions
on the Internet
RIP (Routing Information Protocol):
It’s an application protocol to adds routs to the routing table automatically (based Distance-
Vector Routing Algorithm)
![Page 109: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/109.jpg)
HTTP FTP SMTP RTP DNS BGP RIP
Web
Browsing
Upload Files
between Devic
es
Multimedia
VoIP , Video
nslooku
p
Router Command
Line In
terface
App
licat
ion
Laye
r
![Page 110: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/110.jpg)
Network CertificationRouter Command Line Interface
![Page 111: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/111.jpg)
HTTP FTP SMTP RTP DNS BGP RIP
Web
Browsing
Upload Files
between Devic
es
Multimedia
VoIP , Video
nslooku
p
App
licat
ion
Laye
r
BGP RIP
nslooku
pping
ICMP OSPF
Router Command
Line In
terface
DNS
![Page 112: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/112.jpg)
The Transport Layer is located above the Internet Layer in the TCP/IP model, it’s allow peer entities on the source and destination hosts to carryon a conversation, and provides the port number.
It’s used to exchange data between systems.
2. TCP/IP Reference Model (Cont.): 2.2. The Transport Layer (Host-to-Host) (End-to-End):
There are two Transport Layer (Host-to-Host) (End-to-End) core protocols:
1. TCP (Transmission Control Protocol)2. UDP (User Datagram Protocol)
![Page 113: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/113.jpg)
HTTP FTP SMTP RTP DNS BGP RIP
Web
Browsing
Upload Files
between Devic
es
Multimedia
VoIP , Video
nslooku
p
Router Command
Line In
terface
TCP UDP
App
licat
ion
Laye
rT
rans
port
Laye
r
TCP is a reliable connection-oriented protocol, that offers error
correction when deliver the stream originating on one machine to the
other machine in the network.
UDP is an unreliable connectionless protocol, that deliver stream
originating on one machine to the other machine in the network based one-shot philosophy.
![Page 114: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/114.jpg)
TCP (Transmission Control Protocol) is a reliable connection-oriented protocol, that offers error correction when deliver the stream originating on one machine to the other machine in the network. It used to send important data such as webpages, database information, etc;
2. TCP/IP Reference Model (Cont.): 2.2. The Transport Layer (Host-to-Host) (End-to-End):
UDP (User Datagram Protocol) is an unreliable connectionless protocol, that deliver stream originating on one machine to the other machine in the network based one-shot philosophy. It used to send streaming audio and video (like Windows Media audio files (.WMA) , Real Player (.RM)).
![Page 115: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/115.jpg)
The UDP is faster than TCP (UDP offers speed).
2. TCP/IP Reference Model (Cont.): 2.2. The Transport Layer (Host-to-Host) (End-to-End):
The reason UDP is faster than TCP is because there is no traffic-of ‘flow control’ or ‘error correction’ used (unreliable connectionless protocol).
The data sent over the network is affected by collisions, and errors will be present. So the TCP uses ‘flow control’ or ‘error correction’ traffic (reliable connection-oriented protocol) which need more time to finish the data sending, while UDP not doing that.
UDP is only concerned with speed. This is the main reason why streaming
media is not high quality.
![Page 116: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/116.jpg)
The Internet Layer is located above the Transport Layer in the TCP/IP model, it’s defines an official packet format and provides the IP Addressing (using core IP Protocol), to deliver after that independently through the network between the sender and receiver.
2. TCP/IP Reference Model (Cont.): 2.3. Internet Layer:
The Internet Layer delivers “IP packets” (where they are supposed here) as is avoiding congestion.
For these reasons…The TCP/IP Internet Layer is very similar in functionality to the OSI Network Layer.
Remember that the Lecture Title is
Packet Classification
![Page 117: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/117.jpg)
HTTP FTP SMTP RTP DNS BGP RIP
Web
Browsing
Upload Files
between Devic
es
Multimedia
VoIP , Video
nslooku
p
Router Command
Line In
terface
TCP UDP
IP
App
licat
ion
Laye
rT
rans
port
Laye
rIn
tern
etLa
yer
IP defines an official packet format and
provides IP Addresses
![Page 118: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/118.jpg)
The Host-to-Network Layer interfaces the TCP/IP protocol stack to the physical network.
It’s a point out connect to the network using TCP/IP protocol, so it can send IP packets over it.
2. TCP/IP Reference Model (Cont.): 2.4. Network Layer (Host-To-Network) (Link):
![Page 119: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/119.jpg)
HTTP FTP SMTP RTP DNS BGP RIP
Web
Browsing
Upload Files
between Devic
es
Multimedia
VoIP , Video
nslooku
p
Router Command
Line In
terface
TCP UDP
IP
App
licat
ion
Laye
rT
rans
port
Laye
rIn
tern
etLa
yer
Net
wor
kLa
yer
Network Interface
![Page 120: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/120.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs
![Page 121: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/121.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 6:Packet Classification
(Cont.)
available at: www.uotechnology.edu.iq/dep-cs
![Page 122: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/122.jpg)
Lecture 6:Packet Classification (Cont.)
Contents: 1. Network Reference Models 2. TCP/IP Reference Model (IP Protocol Stack)
2.1. The Application Layer2.2. The Transport Layer (Host-to-Host) (End-to-End)
2.3. Internet Layer2.4. Network Layer (Host-To-Network) (Link)
3. ICMP and OSPF Core Protocols 4. IP v4 and IP v6 Packets 5. TCP and UDP Packets 6. Simplified Network Packet Format 7. Screening Router
122
![Page 123: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/123.jpg)
There are another important core protocols (which works inside TCP/IP protocol) like:
• ICMP (Internet Control Message Protocol)• OSPF (Open Shortest Path First )
3. ICMP and OSPF Core Protocols:
ICMP is used by the computer operating systems to send error messages indicating, for example, that a requested service is not available or that a host or router could not be reached.
OSPF is one of group of interior routing protocols, it’s an adaptive network routing protocol which operating within a single autonomous system .
![Page 124: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/124.jpg)
HTTP FTP SMTP RTP DNS BGP RIP
Web
Browsing
Upload Files
between Devic
es
Multimedia
VoIP , Video
nslooku
p
Router Command
Line In
terface
TCP
ICMP
UDP
IP
OSPF
ping
App
licat
ion
Laye
rT
rans
port
Laye
rIn
tern
etLa
yer
Net
wor
kLa
yer
Network Interface
It’s an adaptive network routing protocol which
operating within a single autonomous system
It’s used by the computer Oss to
send error messages indicating
![Page 125: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/125.jpg)
IP
ping
App
licat
ion
Lay
erT
rans
port
Laye
rIn
tern
etLa
yer
Net
wor
kLa
yer
Network Interface
Ping is a useful tool for testing, it’s dealing with ICMP to test the reachability of a host on a network and to measure the round-trip time for messages sent from the host to a destination computer.
ICMP
![Page 126: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/126.jpg)
On any machines running Windows x, ping can be accessed via a DOS prompt. Select "Run..." from the Start menu and type command "cmd". Once you're at the DOS prompt, type "ping Host-Address".
ping yahoo.com
# ping yahoo.com PING yahoo.com (204.71.202.160): 56 data bytes 64 bytes from 204.71.202.160: icmp_seq=0 ttl=246 time=108.0 ms 64 bytes from 204.71.202.160: icmp_seq=1 ttl=246 time=102.3 ms 64 bytes from 204.71.202.160: icmp_seq=2 ttl=246 time=102.6 ms 64 bytes from 204.71.202.160: icmp_seq=3 ttl=246 time=105.5 ms 64 bytes from 204.71.202.160: icmp_seq=4 ttl=246 time=103.9 ms --- yahoo.com ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 102.3/104.4/108.0 ms
Your PC
Yahoo Server
![Page 127: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/127.jpg)
HTTP FTP SMTP RTP DNS BGP RIP
Web
Browsing
Upload Files
between Devic
es
Multimedia
VoIP , Video
nslooku
p
Router Command
Line In
terface
TCP
ICMP
UDP
IP
OSPF
ping
App
licat
ion
Laye
rT
rans
port
Laye
rIn
tern
etLa
yer
Net
wor
kLa
yer
Network Interface
BGP RIP
Router Command
Line In
terface
OSPF
3 Well-Known Routing ProtocolsBGP , RIP , OSPF
DNS
ICMP
nslooku
pping
2 Well-Known Utility-Application Protocols
DNS , ICMP
![Page 128: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/128.jpg)
The Internet Layer defines an official packet format (using core IP Protocol), to deliver after that independently through the network between the sender and receiver.
4. IP v4 and IP v6:
Application LayerHTTP , FTP , SMTP , RTP , DNS ,
BGP , RIP , …
Transport LayerTCP , UDP
Internet LayerIP , OSPF , ICMP , …
Network Layer
There are two types of core IP protocol, IP v4 (version 4) (32 bits) and IP v6 (version 6) (128 bits).
Internet LayerIP v4 32 bits , OSPF , ICMP , …
Internet LayerIP v6 128 bits , OSPF , ICMP , …
![Page 129: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/129.jpg)
HTTP FTP SMTP RTP DNS BGP RIP
Web
Browsing
Upload Files
between Devic
es
Multimedia
VoIP , Video
nslooku
p
Router Command
Line In
terface
TCP
ICMP
UDP
IP
OSPF
ping
App
licat
ion
Laye
rT
rans
port
Laye
rIn
tern
etLa
yer
Net
wor
kLa
yer
Network Interface
IP defines an official packet format and
provides IP Addresses
There are 2 Types:IP v4 - 32bits
IP v6 - 128 bits
![Page 130: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/130.jpg)
IP v4 Packet Format:Consists of 32 bits, so can distribute approximately 4.2 billion IPs around the world. Its developed in 1970s.
4. IP v4 and IP v6 (Cont.):
![Page 131: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/131.jpg)
Since the 4.2 billion IPs of IPv4 will not be enough in the near future with the development and the rapid increase of users of computer, phones, gaming consoles and many other devices which connected to Internet.
This has been the development of the IPv6, which can distribute approximately 6 trillion IPs.
4. IP v4 and IP v6 (Cont.):
![Page 132: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/132.jpg)
IP v6 Packet Format:Consists of 128 bits, so can distribute approximately 6 trillion IPs around the world. Its developed in 1993.
4. IP v4 and IP v6 (Cont.):
![Page 133: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/133.jpg)
4. IP v4 and IP v6 (Cont.):
While IPv6 use and management is similar to IPv4, but its not backwards compatible.
It will eventually replace IPv4, but the transition could take long time to complete. Full IPv6 adoption has been slower than anticipated.
Application LayerHTTP , FTP , SMTP , RTP , DNS ,
BGP , RIP , …
Transport LayerTCP , UDP
Internet LayerIPv4 / IPv6 , OSPF , ICMP , …
Network Layer
In the meantime, all of Servers must be available over both IPv4 and IPv6, and much of Internet devices will run IPv4 and IPv6 simultaneously (this called Dual-Stack approach).
![Page 134: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/134.jpg)
4. IP v4 and IP v6 (Cont.):
![Page 135: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/135.jpg)
IP v6 Packet Format:
IP v4 Packet Format:X
To learn more, plz visit the following pages: - www.networkset.net/2010/05/05/ipv4-vs-ipv6/ - www.youtube.com/watch?v=-oQ4JYBjhVc&feature=related
![Page 136: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/136.jpg)
5. TCP and UDP Packets:
TCP and UDP protocols are most communication over the Internet.
TCP Packet Format:
![Page 137: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/137.jpg)
5. TCP and UDP Packets (Cont.):
TCP and UDP protocols are most communication over the Internet.
UDP Packet Format:
![Page 138: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/138.jpg)
6. Simplified Network Packet Format:
In simply, each network packet consist of the 5 important parts, which used as a keys for packet classification.
DataIP Destination32 bits
IP Source32 bits
Sour. Port16 bits
Des. Port16 bitsP
roto
col
8 bi
ts
According to “Protocol Type” we can classify the packet either unreliable / reliable protocol (UDP / TCP).
According to “Des/Sou Port” we can classify the packet based on Application Layer Protocols (HTTP , FTP , SMTP , RTP , DNS , BGP , RIP , …).
According to “IP Des/Sou” we can classify the packet either IP v4/ v6, and the addressing schema.
1 2 3 4 5
![Page 139: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/139.jpg)
7. Screening Router:
Screening Router: it’s a router that performs packet filtering to see whether a packet is part of an existing stream of traffic. Also, it can filters each packet based only on information contained in the packet itself.
Screening Router
A
B C
Each router do packet classification, when the packet addressed to it.
![Page 140: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/140.jpg)
7. Screening Router (Cont.):
Screening Router: it’s a router that performs packet filtering to see whether a packet is part of an existing stream of traffic. Also, it can filters each packet based only on information contained in the packet itself.
Screening Router
A
B C
TO: AUDP: Video
TO: CTCP: Email
TO: BTCP: Web
TO: C
UDP: VoP
TO: AUDP: #bxsa?t^q1 In some cases a
screening router may be used as
perimeter protection for the
internal network as a filtering solution
![Page 141: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/141.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs
![Page 142: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/142.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 7:Switching Theory and Architecture
available at: www.uotechnology.edu.iq/dep-cs
![Page 143: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/143.jpg)
Lecture 7:Switching Theory
Contents: 1. Short Reviewing 2. Switching Theory 3. Crossbar Switch Architecture 4. Crossbar Switch Models IQ Switch OQ Switch CIOQ Switch
143
![Page 144: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/144.jpg)
1. Short Reviewing:
Switch Device: is a central network device that connects all nodes in a star topology. Also it is concentrator (a device that can have multiple inputs and outputs all active at one time).
Revi
ew
Interconnection Switching Fabric: is a fabric which connects the router's input ports to its output ports.
Revi
ew
Router - Switching can be accomplished in a number of ways (Switching via Memory , Switching via Bus , and Switching via Crossbar).Re
view
![Page 145: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/145.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
Router
![Page 146: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/146.jpg)
Compressed 1-Bit Trie Algorithm
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
Router
![Page 147: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/147.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
Compressed 1-Bit Trie Algorithm
1100
1100
f
Router
![Page 148: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/148.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
1100
Centralized Switching
Router
![Page 149: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/149.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
00
Decentralized Switching
Router
![Page 150: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/150.jpg)
Switch
Forwarding Table
Processor
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
Router
110011
11010
11001111010
1010
101100100 010100
101100
11100101010
1100111
110010 101100
110011
00011001000100
110100
1100
001100
111110
011001
01 1100111
Switch
![Page 151: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/151.jpg)
Switching
110011
11010
1010
101100100 010100
101100
11100101010
1100111
110010 101100
110011
00011001000100
110100
1100
001100
111110
011001
01 1100111
Switch
![Page 152: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/152.jpg)
2. Switching Theory:
Switching theory is the mathematical study of the properties of networks of idealized switches.
Switch design is mainly influenced by “Cost” and “Heat”.
Key technological factors affecting cost and heat– Memory bandwidth (not the size of memory, but its
speed)– Complexity of algorithms– Number of off-chip operations (this affects speed)
![Page 153: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/153.jpg)
153
3. Crossbar Switch Architecture
One way to overcome the bandwidth limitation of a single, shared bus is to use a crossbar.A crossbar switch is an interconnection network consisting of 2N busses that connect N input ports to N output ports.
A packet arriving at an input port travels along the horizontal bus attached to the input port until it intersects with the vertical bus leading to the desired output port.
![Page 154: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/154.jpg)
4. Crossbar Switch Models
There are three Crossbar Switch Models, these are: IQ Switch Model OQ Switch Model CIOQ Switch Model
![Page 155: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/155.jpg)
155
4. Crossbar Switch Models (Cont.)
If the vertical bus is free, the packet is transferred to the output port.
If the vertical bus is being used to transfer a packet from another input port to this same output port, the arriving packet is blocked and must be queued at the input port, to enhance the performance.
Switc
hing
Fab
ric
Line Termination
Function
Data Link Processing
Lookup, Forwarding,
Input Port
Queuing
![Page 156: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/156.jpg)
156
4. Crossbar Switch Models (Cont.)
Switc
hing
Fab
ric
Line Termination
Function
Data Link Processing
Lookup, Forwarding,
Input Port
Queuing
If the vertical bus is free, the packet is transferred to the output port.
If the vertical bus is being used to transfer a packet from another input port to this same output port, the arriving packet is blocked and must be queued at the input port, to enhance the performance.
Input Queued (IQ) Switches
![Page 157: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/157.jpg)
157
4. Crossbar Switch Models (Cont.)
Also we can use the same strategy at the output port, so we can queued at the output port, to enhance the performance.
Line Termination
Function
Data Link Processing
Queuing
Output Port
Output Queued (OQ)
Switches
![Page 158: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/158.jpg)
158
4. Crossbar Switch Models (Cont.)
Switching Fabric
Routing Processor
Input Ports Output Ports
Queuing
IQ
Queuing
OQ
Combined Input and Output Queued (CIOQ) Crossbar Switches
![Page 159: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/159.jpg)
4. Crossbar Switch Architecture (Cont.)
We use Combined Input and Output Queued (CIOQ) Crossbar Switches to get great performance.
When the vertical bus (in switch fabric) is being used to transfer a packet. It’s not free it’s busy. We will useful from IQ Crossbar Switch model
When the backbound network traffic was slower than the traffic on the switch fabric. We will useful from OQ Crossbar Switch model
Combined Input and Output Queued (CIOQ) Crossbar Switch Model
![Page 160: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/160.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs
![Page 161: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/161.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 8:Switching Theory
and Architecture (Cont.)
available at: www.uotechnology.edu.iq/dep-cs
![Page 162: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/162.jpg)
Lecture 8:Switching Theory (Cont.)
Contents: 1. Review 2. Speed Up and Delay Control in CIOQ 3. Stable Marriage Algorithms for CIOQ Gale-Shapley Algorithm (GSA) 4. Scheduling Algorithms for CIOQ First In First Out Scheduling Algorithm (FIFO) Most Urgent Cell First Scheduling Algorithm (MUCF) Randomized Switch Scheduling
162
![Page 163: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/163.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
1. Review
![Page 164: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/164.jpg)
Compressed 1-Bit Trie Algorithm
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
Router
![Page 165: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/165.jpg)
Input Links Output LinksSwitch
Forwarding Table
Processor
a
b
c
f
i
a
b
c
f
i
Prefix Output Link0 a 00 b01 c1 d10 e1100 f1101 g 1110 h 1111 i
00
Decentralized Switching
Router
![Page 166: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/166.jpg)
2. Speed Up and Delay Control in CIOQ Switch:
The fabric speedup for an IQ switch equals 1 The fabric speedup for an OQ switch equals N
Suppose we consider switches with fabric speedup of S, so the fabric speedup for CIOQ equles 1 < S N≪
The Probabilisitc Analyses (Assume trafic model) and the Numerical Methods (Use simulated and actual traffic traces) approaches showed that switches which use a speedup of between 2 and 5 achieve the same mean delay and throughput.
![Page 167: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/167.jpg)
1. Speed Up and Delay Control in CIOQ Switch:
The fabric speedup for an IQ switch equals 1 The fabric speedup for an OQ switch equals N
Suppose we consider switches with fabric speedup of S, so the fabric speedup for CIOQ equles 1 < S N≪
IQ CIOQ OQ
Speedup = 1Inexpensive
Poor performance
Speedup = 2--5 ?Inexpensive
Good performance
Speedup = NExpensive
Great performance
![Page 168: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/168.jpg)
3. Stable Marriage Algorithms for CIOQ:
Most, if not all, switch scheduling algorithms use stable marriage algorithms (SMAs) like “Gale-Shapley Algorithm (GSA)”.
This is because of the following equivalence:-- request = proposal- grant and accept = engagement- final matching = marriage
![Page 169: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/169.jpg)
3. Scheduling Algorithms for CIOQ:
The CIOQ schedule his queued work by the scheduling algorithm like:
1. Queuing the packets as packet-by-packet under a stable FIFO (First In First Out) schedule algorithm.
2. Queuing the packets based their most urgent packets under a unstable MUCF (Most Urgent Cell First) schedule algorithm.
![Page 170: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/170.jpg)
3. Scheduling Algorithms for CIOQ:
The CIOQ schedule his queued work by the scheduling algorithm like:
1. Queuing the packets as packet-by-packet under a stable FIFO (First In First Out) schedule algorithm.
2. Queuing the packets based their most urgent packets under a unstable MUCF (Most Urgent Cell First) schedule algorithm.
3. Randomized Switch schedule algorithm, base decisions upon a small, randomly chosen sample of the inputs, instead of the complete inputs.
![Page 171: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/171.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs
![Page 172: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/172.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 9:Bandwidth Partitioning
available at: www.uotechnology.edu.iq/dep-cs
![Page 173: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/173.jpg)
Lecture 9:Bandwidth Partitioning
Contents: 1. Review 2. Network Bandwidth 2.1. Network Bandwidth – Network Centric Approach 2.2. Network Bandwidth – User Centric Approach
173
![Page 174: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/174.jpg)
Network Bandwidth (bit rate, channel capacity, or throughput) is a measure of communication channel usage (available or consumed of communication path) in bits/second “pbs” or multiples of it (kilobits/s “Kbps”, megabits/s “Mbps”, etc.).
174
1. Review:
![Page 175: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/175.jpg)
175
How to congested network with many users?
![Page 176: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/176.jpg)
2. Network Bandwidth:
The basic idea is how to congested network with many users.
So there are 2 problems will be appears:- How can allocate bandwidth fairly between the users- How can control queue size and hence delay
To solve the problems we need to partitioning the bandwidth, however we have 2 approaches, can select any one of them:- Approach 1: Network-Centric- Approach 2: User-Centric
BandwidthPartitioning
![Page 177: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/177.jpg)
2. Network Bandwidth (Cont.):
The basic idea is how to congested network with many users.
S1
S1
S1
S1
::
D1
D1
D1
D1
D1. . . .
10Mpbs
1Mpbs
10Mpbs
![Page 178: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/178.jpg)
2.1. Network Bandwidth – Network Centric Approach
We can divide the bandwidth depending on number of users (frequency division).
Switch
![Page 179: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/179.jpg)
2.1. Network Bandwidth – Network Centric Approach
We can divide the bandwidth depending on number of users (frequency division).
Switch
In this approach we partitioning the bandwidth depend on the number of users.
This approach perfect fairness, but its responsive to number of users.
![Page 180: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/180.jpg)
2.1. Network Bandwidth – User Centric Approach
We can divide the bandwidth depending on time (time division).
Switch
In this approach we partitioning the bandwidth depend on the time of packet arrival, as a FIFO.
This approach also fairness, but its responsive to congestion.
![Page 181: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/181.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs
![Page 182: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/182.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Principles of Network Algorithms
Lecture 10:IPv4 Addressing
available at: www.uotechnology.edu.iq/dep-cs
![Page 183: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/183.jpg)
Lecture 10:IP Addressing
Contents: 1. IPv4 Addresses 2. Classful IPv4 Addressing Scheme 3. Public and Private IP Addresses 4. Reserved IP Addresses 5. Subnetting / Netmask 6. NAT (Network Address Translation)
183
![Page 184: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/184.jpg)
IP Address (Internet Protocol address) is a numerical. label assigned to each device (e.g., computer, printer) participating in a computer network.
With IPv4, it's 32bits long and unique; and with IPv6, it’s 128bits long and also unique.
184
1. IPv4 Addresses:
The IPv4 Address has two parts:The Network Part(netid)(also called IP prefix) and Host Part(hostid)
to identify the host on that network
to identify the network to which host is attached
![Page 185: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/185.jpg)
185
1. IPv4 Addresses (Cont.):
192
. 168
. 0
. 1
192
. 168
. 0
. 2
192
. 168
. 0
. 3
192
. 168
. 0
. 4
192
. 168
. 0
. 5
192 . 168 . 0 . x
192 . 168 . 0
. 0
![Page 186: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/186.jpg)
186
1. IPv4 Addresses (Cont.):
32bits IP address divides into 4 group of 8bits.
0 8 16 24 32
2 = 8
256 (0 … 255)
0 … 255 0 … 255 0 … 255 0 … 255
To provide the flexibility to support different sized networks, with each network containing different number of hosts.
IP address space of 2 addresses was divided into three different classes for networks and hosts, as Class A, Class B, Class C, and Class D.
32
![Page 187: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/187.jpg)
187
2. Classful IPv4 Addressing Scheme:
Classful IPv4 Addressing Scheme
![Page 188: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/188.jpg)
188
2. Classful IPv4 Addressing Scheme (Cont.):
Classful IP Addressing Scheme
0 8 16 24 32
0 8 16 24 32
0 8 16 24 32
0 8 16 24 32
0
1 0
1 1 0
1 1 1 0
27 = 128
214= 16 384
2 21= 2 097 152
Multicast Address
2 = 16 777 21624
2 = 65 53616
2 = 2568
A host can use a , multicast address as the destination address for packet generated to indicate the packet is meant for any hosts on the Interne
Class A
Class B
Class C
Class D
![Page 189: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/189.jpg)
189
2. Classful IPv4 Addressing Scheme (Cont.):
Classful IP Addressing Scheme0 8 16 24 32
128 16 777 216
0 8 16 24 32
16 384 65 536
0 8 16 24 32
2 097 152 256
0
1 0
1 1 0
Class A
Class B
Class C
netid hostid0
netid hostid1 0
netid hostid1 1 0
![Page 190: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/190.jpg)
Imagine, if we had a company has 1000 Computers, It is illogical to buy 1000 IP addresses, this exploitation of the amount of IP addresses. So we can buy 1 or 2 IP addresses (as a Public IP Addresses) and distributed them (using NAT) between the computers (as a Private IP Addresses).
190
3. Public and Private IP Addresses:
Private IP Addresses
Class A
Class B
Class C
10 . 0 . 0 . 0 - 10 . 255 . 255 . 255
172 . 16 . 0 . 0 - 172 . 31 . 255 . 255
192 . 168 . 0 . 0 - 192 . 168 . 255 . 255
These addresses are commonly used for homes, offices, and enterprise LANs.
![Page 191: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/191.jpg)
191
3. Public and Private IP Addresses (Cont.):
Private IP Addresses
Class A
Class B
Class C
10 . 0 . 0 . 0 - 10 . 255 . 255 . 255
172 . 16 . 0 . 0 - 172 . 31 . 255 . 255
192 . 168 . 0 . 0 - 192 . 168 . 255 . 255
Just for speed observation (for Private or Public IP Addresses):each class started with specific range as shown
Class A : 1 - 126Class B: 128 - 190Class C: 191 - 223 192.168.0.3
Class C
![Page 192: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/192.jpg)
There are certain IP addresses are reserved by the IANA for special use.
192
4. Reserved IP Addresses:
Reserved for IP broadcast messages to the
current network 0 . 0 . 0 . 0- 0 . 255.255.255
the "limited broadcast" destination address
255.255.255.255
loopback addresses to the local host (troubleshooting)
127.0.0.0- 127.255.255.255
Network ID Host : All 0’s
broadcast Host: All 255’s
future use Started 224 - 255
![Page 193: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/193.jpg)
A Subnet is a logically subdivision of an IP network. The practice of dividing a network into two or more networks is called Subnetting.
193
5. Subnetting / Netmask:
For example:192 . 168 . 40 . 3
Class C
255 . 255 . 255 . 0
11000000 10101000 00101000 00000011
11 111111 11111 111 111111 11 00000000
11000000 10101000 00101000 00000000AND
192 . 168 . 40 . 0
IP Address
Subnet Mask (/24)
Gateway
![Page 194: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/194.jpg)
194
5. Subnetting / Netmask (Cont.):
10 . 0 . 0 . 2
Class A
255 . 0 . 0 . 0
AND
10 . 0 . 0 . 0
IP Address
Subnet Mask (/8)
Gateway
![Page 195: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/195.jpg)
NAT (Network Address Translation) is the process of modifying IP address information in IP packet headers while in transit across a traffic routing device.
It’s use to translate the Private IP to Public IP and vice versa.
195
6. NAT (Network Address Translation):
yahoo.com
192.168.0.7
Public IP Request Private IP
: : :68.143.77.1
5yahoo.com 192.168.0.7
: : :
68.143.77.15
NAT
![Page 196: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/196.jpg)
There are three types of NAT: 1- Static NAT 2- Dynamic NAT 3- Overloading NAT
196
6. NAT (Network Address Translation) (Cont.):
68.143.77.1568.143.77.1668.143.77.17
192.168.0.7
![Page 197: University of Technology Computer Science Department Network Administration Branch First Class](https://reader038.fdocuments.us/reader038/viewer/2022110103/56814342550346895dafb9bd/html5/thumbnails/197.jpg)
University of TechnologyComputer Science DepartmentNetwork Administration Branch
First Class
Q & A
Principles of Network AlgorithmsSecond Semester – 2012
Prepare by: Dr. Mazin S. Aliavailable at: www.uotechnology.edu.iq/dep-cs