Network Systems Routing - QUT Lecture Notes PDF
Document Details
Uploaded by FlourishingSolarSystem7054
QUT School of Computer Science
Tags
Summary
These are lecture notes on network systems routing. They cover routing protocols, supernetting, and other related topics. The notes are from QUT and contain diagrams, examples, and explanations.
Full Transcript
Network Systems Routing QUT School of Computer Science Preview Routers and routing Routing protocols Supernetting This lecture covers part of Ch1, Ch8, and Ch9 of the textbook Network Systems - CS @QUT 2 Routers A router joins two or more networks and pas...
Network Systems Routing QUT School of Computer Science Preview Routers and routing Routing protocols Supernetting This lecture covers part of Ch1, Ch8, and Ch9 of the textbook Network Systems - CS @QUT 2 Routers A router joins two or more networks and passes packets from one network to another Routers can do the following: Connect dissimilar networks (LANs and WANs) ISP, business, and consumer Interpret Layer 3 and often Layer 4 routers addressing Determine the best path for data to follow from point A to point B Re-route traffic if the Network pathSystems of -first CS @QUT 3 Functions of routers Routers may perform any of the following optional functions: Filter broadcast transmissions Prevent certain types of traffic from getting to a network Support simultaneous local and remote connectivity Provide high network fault tolerance through redundant components such as power supplies Monitor network traffic and report statistics Diagnose internal or other connectivity Network Systems - CS @QUT problems and 4 Categories of routers Core (interior) routers Direct data between networks Core, edge, and exterior router within the same autonomous system (AS) Edge routers, or border routers They connect an autonomous system with an outside network Exterior routers: any routers outside the organization’s A S Network Systems - CS @QUT 5 Routing tables Routing table—A database that maintains information about where hosts are located and the most efficient route to reach them Routers rely on them to identify which router is the next hop to reach a particular destination host Routing tables contain IP addresses and network masks −A network mask identifies a network that a host or Routers rely on routing tables to locate destination another router belongs to Network Systems - CS @QUT 6 Static Routing vs Dynamic Routing Static routing—Network administrators configure a routing table to direct messages along specific paths Example—A static route between a small business and its ISP Dynamic routing—Automatically calculates the best path between two networks and maintains this information in a routing table A router can detect problems with failed or congested routes and reroute messages through a different path Network Systems - CS @QUT 7 The route command The route command allows you to view a host’s routing table: On a Linux or UNIX system, use the command "route” On MacOS, use command “netstat –r” (also try “route get 8.8.8.8”) On a Windows-based system, use the command “route Comments: In Windows, you need administrator’s privilege to run some commands (such as “route print”) in a print” command (cmd) window. In Windows “search program and files”, search “cmd”. When the search result is displayed, On right click a Cisco over IOS, the “cmd” anduse selectthe “run command "show as administrator” ip aroute” option. Then, command window pops up. In this command window, you may run “route print” command. You may also try “arp –a”, “ifconfig /all” and other commands in this command window. Network Systems - CS @QUT 8 Demonstration of route command in Windows Network Systems - CS @QUT 9 Routing metrics Routing metrics—Properties of a route used by routers to determine the best path to a destination: Hop count Theoretical bandwidth and actual throughput Delay, or latency, on a potential path Load, or the traffic or processing burden MTU (maximum transmission unit) or the largest I P packet size in bytes allowable without fragmentation Routing cost, or a value assigned to a particular route Reliability of a potential path Topology of a network Network Systems - CS @QUT 10 Determining the Best Routing Paths Routing protocols—Used by routers to communicate with each other to determine the best path Routers rate the reliability and priority of a routing protocol’s data based on these criteria: Administrative distance (AD)—A number indicating the protocol’s reliability Convergence time—Time it takes to recognize a best path in the event of a change or network outage Overhead—The burden placed on the underlying network to support the protocol Network Systems - CS @QUT 11 Summary of Common Routing Protocols Routing Protocol Type Algorithm Used R I P (Routing Information IGP Distance-vector Protocol) R I Pv2 (Routing Information IGP Distance-vector Protocol, version 2) O S P F (Open Shortest Path IGP Link-state First) I S-I S (Intermediate System IGP Link-state to Intermediate System) E I G R P (Enhanced Interior IGP Advanced distance- Gateway Routing Protocol) vector B G P (Border Gateway EGP Advanced distance- Protocol) vector or path vector Network Systems - CS @QUT 12 IGP and EGP IGP (interior gateway protocols)— in core routers and edge routers within autonomous systems, often grouped according to the algorithms they use to calculate best paths: Distance-vector routing protocols—Calculate path on the basis of the distance to that destination Link-state routing protocols—Enables routers to communicate beyond neighboring routers in order to independently map the network and determine the best path EGP (exterior gateway protocols)— in edge routers and exterior routers to distribute data outside of autonomous systems The only EGP currently Network in use is- CS Systems BG P @QUT 13 BGP (Border Gateway Protocol) – Protocol of the Internet The only EGP in use at the moment. It can span multiple autonomous systems A path-vector routing protocol that communicates via B G P- specific messages Determines that the best travel paths between based on routers many different factors Can be configured to follow policies that might avoid a certain router or instruct a group of routers to prefer BGP is the only EGP in use at the mome a particular route The most complex of the routing protocols Network Systems - CS @QUT 14 Growth of EGP https://bgp.potaroo.net/ Accessed on 27 Mar 2022 Network Systems - CS @QUT 15 OSPF (Open Shortest Path First) OSPF is an IGP and a link-state protocol used on interior or border routers Introduced as an improvement to R IP (Routing Information Protocol) Characteristics of OSPF: Supports large networks—Imposes no hop limits (unlike R I P) Uses a more complex algorithm for determining best paths Shared data—Maintains a database of other routers’ links Low overhead, fast convergence—Demands more memory and C P U power for calculations, but keeps network bandwidth to a minimum and provides a very fast convergence time Stability—Uses algorithms that prevent routing loops Multi-vendor routers—Supported by all modern routers Network Systems - CS @QUT 16 I S-I S (Intermediate System to Intermediate System) IS-IS is an IGP and link-state routing protocol: Uses a best-path algorithm similar to OSPF Is designed for use on core routers only (unlike OSPF) Not handcuffed to IPv4 (like OSPF) so it’s easy to adapt to IPv6 Service providers generally prefer IS-IS because it is more scalable than OSPF Network Systems - CS @QUT 17 E I G R P (Enhanced Interior Gateway Routing Protocol) EIGRP is an advanced distance-vector protocol that combines some of the features of a link-state protocol Often referred to as a hybrid protocol Fast convergence time and low network overhead Easier to configure and less CPU-intensive than OSPF Supports multiple protocols and limits unnecessary network traffic between routers Originally proprietaryNetwork to Cisco routers Systems - CS @QUT 18 Summary of Dynamic Routing Protocols Routing Routing Routing category algorithm protocol Distance Vector RIP algorithm EIGRP Dynamic Routing Interior Gateway protocol Protocols (IGP) Link State OSPF Algorithm Exterior Gateway Path vector BGP Protocol algorithm (EGP) Network Systems - CS @QUT 19 Command-Line Utilities for Routing and other Information Command Common uses arp Provides a way of obtaining information from and manipulating a device’s ARP table dig Queries DNS servers with more advanced options than nslookup ipconfig (windows) or Provides information about TCP/IP network connections and the ability to ifconfig (MacOS, manage some of those settings Linux) netstat Displays TCP/IP statistics and details about TCP/IP components and connections on a host nmap Detects, identifies, and monitors devices on a network nslookup Queries DNS servers and provides the ability to manage the settings for accessing those servers pathping (mtr on Sends multiple pings to each hop along a route, then compiles the information Linux/UNIX/mac O S) into a single report ping Verifies connectivity between two nodes on a network (in Unix/Linux, use ping with option -c) route Show host’s routing table (In windows, route print. In MacOS, netstat -r) Network Systems - CS @QUT 20 tcpdump Captures traffic that crosses a computer’s network interface netstat options netstat command Description netstat Lists all active T C P/IP connections on the local machine, including the Transport layer protocol used, messages sent, and received, I P address, and state of those connections netstat -n Lists current connections, including I P addresses and ports netstat -f Lists current connections, including I P addresses, ports, and F Q D N s netstat -a Lists all current T C P connections and all listening T C P and U D P ports netstat -e Displays statistics about messages sent over a network interface, including errors and discards netstat -s Displays statistics about each message transmitted by a host, separated according to protocol type (T C P, U D P, IP, or I C MP) netstat -r Displays routing table information netstat -o Lists the PID (process identifier) for each process using a connection and information about the connection netstat -b Lists the name of each process using a connection and information about that connection Network Systems - CS @QUT 21 Examples in Windows Command Window (as Administrator) ipconfig /all nslookup apr -a netstat netstat –r; netstat -e; netstat –f; netstat -n tracert qut.edu.au ping www.usyd.edu.au (‘ping’ is normally blocked) pathping -n google.com Network Systems - CS @QUT 22 Supernetting It is also called Network Summarisation To combine a group of continuous subnets to form a single network It is used for route aggregation to reduce the size of routing tables A way of reducing the number of routes in the routing table To consolidate continuous routes into a single route for route advertisement Network Systems - CS @QUT 23 Supernetting examples A network 193.2.1.0/24 is seen externally as a whole network 193.2.1.0/24 193 = 128 + 64 110 00001 Subnet 193.2.1.0/25 Subnet 193.2.1.128/25 Class C 193.2.1.0/24 Subnet Subnet Subnet Subnet 193.2.1.0/26 193.2.1.64/26 193.2.1.128/26 193.2.1.192/26 0 00 000000 64 01 000000 128 10 000000 192 11 000000 Network Systems - CS @QUT 24 Supernetting in Comparison with Subnetting Opposite of subnetting “borrow” bits from the network portion combine group of continuous network addresses to form a single larger network Manipulate subnet (supernet) mask to form a supernet Key lies in (supernet) mask: Masks distinguish network bits from host bits When mask is applied to any address in any of the NWs making up the supernet: resultant network address is the same (first network) Routers need only know one address for the entire supernet Reduces load on Internet routers Network Systems - CS @QUT 25 “Giving Away” Bits for Supernetting Supernetting involves giving away network bits from left of default mask boundary Example: 11000000.10101000.00100000.00000000 Subnetting involves borrowing host bits from right of default mask boundary 11000000.10101000.00100000.00000000 Network Systems - CS @QUT 26 Supernet – Smaller Routing Table The 1st byte 210: 11010010 Class Routing table for Router B The 2nd byte 78: 1001110 210.78.168.0255.255.255.0210.78.168.1 The 3rd byte: 210.78.169.0255.255.255.0210.78.168.1 168: 10101 000 210.78.170.0255.255.255.0210.78.168.1 169: 10101 001 210.78.171.0255.255.255.0210.78.168.1 170: 10101 010 210.78.172.0255.255.255.0210.78.168.1 171: 10101 011 210.78.173.0255.255.255.0210.78.168.1 172: 10101 100 210.78.174.0255.255.255.0210.78.168.1 173: 10101 101 210.78.175.0255.255.255.0210.78.168.1 174: 10101 110 175: 10101 111 Address: 11010010. 1001110. 10101xxx. xxxxxxxx After supernetting (210.78.168.?) 210.78.168.0 255.255.248.0 Mask: 11111111. 11111111. 11111000. 00000000 Network Systems - CS @QUT 210.78.168.0/21 27 (255.255.248.0) Supernetting (continued) The network 193.0.0.0/22 is seen as a whole network externally ISP ISP Destination Network Next hop Destination Network Next hop 200.0.0.0/24 Directly Connected Directly 200.0.0.0/24 200.0.0.1 Connected 192.0.0.0/24 192.0.1.0/24 200.0.0.1 192.0.0.0/22 = 192.0.2.0/24 200.0.0.1 (192.0.0.0/24+192.0.1.0/24+ 200.0.0.1 192.0.2.0/24+192.0.3.0/24) 192.0.3.0/24 200.0.0.1Network Systems - CS @QUT 28 Benefits of Superneting To minimize the latency in a complex network structure To reduce the overhead for routing process, since the reduced number of route entries in the routing table To improve network stability by reducing or eliminating unnecessary routing updates after part of the network undergoes a change in topology To reduce processor workloads, memory requirements and Network Systems - CS @QUT 29 Example and Solution Example: a medium-size organization requires 1,000 addresses. How many C class addresses are required? What is the subnet mask? Solution: 1,000 addresses would normally require a Class B network Instead, a range of 4 class-C addresses is allocated and supernetted so the organisation can be reached through a single network address Each class-C address has 254 host addresses 4 networks = 2^n => n = -2 Network Systems CS @QUT nnnnnnnn. nnnnnnnn 30. Example Continued Suppose the 4 class-C addresses allocated to our organisation are: 212.5.4.0 = 11010100.00000101.00000100.00000000 212.5.5.0 = 11010100.00000101.00000101.00000000 212.5.6.0 = 11010100.00000101.00000110.00000000 212.5.7.0 = 11010100.00000101.00000111.00000000 Applying the mask 255.255.252.0 to an address in any of these networks will then resolve to 212.5.4.0 The bits borrowed for the supernet are masked off with the host bits leaving the id of the first network only Network Systems - CS @QUT 31 To verify the network ID with the mask To internal network Network address 212 5 6 12 Binary 11010100 00000101 00000110 00001100 Supernet mask 11111111 11111111 11111100 00000000 AND Result 11010100 00000101 00000100 00000000 Decimal 212 5 4 0 To the Internet Network Systems - CS @QUT THE END 32