06-Internetworking (1) PDF - SLIIT UNI
Document Details
Uploaded by AdulatoryChalcedony7148
SLIIT
2024
null
Nimal Ratnayake
Tags
Summary
This document is lecture material for a course on data communication networks. The lecture covers different concepts like intranet, extranet and internet concepts, and discusses routing, routing table and longest prefix matching concepts. It also explores static and dynamic routing, autonomous systems , and distance vector and link state protocols.
Full Transcript
IE1030 – Data Communication Networks 06 – Internetworking Year 1 – Semester 1 – 2024 October Lesson outline Intranet, Extranet and Internet Routing Routing table Static routing Dynamic routing Dynamic routing protocol classification Behavior of Distance Vector and Link State pro...
IE1030 – Data Communication Networks 06 – Internetworking Year 1 – Semester 1 – 2024 October Lesson outline Intranet, Extranet and Internet Routing Routing table Static routing Dynamic routing Dynamic routing protocol classification Behavior of Distance Vector and Link State protocols IE1030 Data Communication Networks – Internet Protocol 6-2 Key terms and concepts Intranet Extranet Routing table Static and Dynamic Routing Autonomous systems Interior Gateway and Exterior Gateway routing protocols Distance vector routing protocols Link state routing protocols IE1030 Data Communication Networks – Internet Protocol 6-3 What is Internetworking? Internetworking means connecting two or more networks to create a larger network Interconnected networks may be of various size: such as local area networks (LANs), or networks of different organizations (campus networks), wide area networks (WANs), … Interconnection of IP networks happens at Layer 3, using routers The Internet is the most prominent example of internetworking, as it connects millions of smaller networks worldwide The Internet is not owned by any individual or group Two other terms similar to Internet are intranet and extranet IE1030 Data Communication Networks – Internet Protocol 6-4 Intranet and Extranet Intranet: A private network that may consist of LANs and WANs that belongs to a single organization An intranet is designed to be accessible only by the organization’s members, employees, or others with authorization An organization may use an extranet to provide secure and safe access to individuals who work for a different organization but require access to the organization’s data. Some examples: A company that is providing access to outside suppliers and contractors A hospital that is providing a booking system to doctors so they can make appointments for their patients A district education office that is providing budget and personnel information to the schools in its district IE1030 Data Communication Networks – Internet Protocol 6-5 Levels of access Access to an intranet is provided only to the organization’s members or other authorized users An organization might use an extranet to provide secure access to their network for individuals who work for a different organization The Internet is meant to be public and therefore has no access restrictions usually IE1030 Data Communication Networks – Internet Protocol 6-6 Lesson outline Intranet, Extranet and Internet Routing Routing table Static routing Dynamic routing Dynamic routing protocol classification Behavior of Distance Vector and Link State protocols IE1030 Data Communication Networks – Internet Protocol 6-7 Routing A router interconnects two or more networks at Layer 3 In this example, we have two networks 111.111.111.0/24 and 222.222.222.0/24 The hosts A and B cannot talk to each other directly IP datagrams between A and B must go through the router R How does the router R forward an IP datagram from A to B? A B R 111.111.111.111 222.222.222.222 222.222.222.220 111.111.111.112 111.111.111.110 222.222.222.221 IE1030 Data Communication Networks – Internet Protocol 6-8 Routing to another subnet: addressing walkthrough: sending a datagram from A to B via R ▪ focus on addressing – at IP (datagram) and MAC layer (frame) levels ▪ assume that: A knows B’s IP address A knows IP address of first hop router, R (how?) A knows R’s MAC address (how?) A B R 111.111.111.111 74-29-9C-E8-FF-55 222.222.222.222 49-BD-D2-C7-56-2A 222.222.222.220 1A-23-F9-CD-06-9B 111.111.111.112 111.111.111.110 CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F IE1030 Data Communication Networks – Internet Protocol 6-9 Routing to another subnet: addressing ▪ A creates IP datagram with IP source A, destination B ▪ A creates link-layer frame containing A-to-B IP datagram R's MAC address is frame’s destination MAC src: 74-29-9C-E8-FF-55 MAC dest: E6-E9-00-17-BB-4B IP src: 111.111.111.111 IP dest: 222.222.222.222 IP Eth Phy A B R 111.111.111.111 74-29-9C-E8-FF-55 222.222.222.222 49-BD-D2-C7-56-2A 222.222.222.220 1A-23-F9-CD-06-9B 111.111.111.112 111.111.111.110 CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F IE1030 Data Communication Networks – Internet Protocol 6-10 Routing to another subnet: addressing ▪ frame sent from A to R ▪ frame received at R, datagram extracted, passed up to IP MAC src: 74-29-9C-E8-FF-55 IP src: 111.111.111.111 MAC dest: E6-E9-00-17-BB-4B IP dest: 222.222.222.222 IP src: 111.111.111.111 IP dest: 222.222.222.222 IP IP Eth Eth Phy Phy A B R 111.111.111.111 74-29-9C-E8-FF-55 222.222.222.222 49-BD-D2-C7-56-2A 222.222.222.220 1A-23-F9-CD-06-9B 111.111.111.112 111.111.111.110 CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F IE1030 Data Communication Networks – Internet Protocol 6-11 Routing to another subnet: addressing ▪ R determines outgoing interface, passes datagram with IP source A, destination B to link layer ▪ R creates link-layer frame containing A-to-B IP datagram. Frame destination address: B's MAC address MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP src: 111.111.111.111 IP dest: 222.222.222.222 IP Eth Phy A B R 111.111.111.111 74-29-9C-E8-FF-55 222.222.222.222 49-BD-D2-C7-56-2A 222.222.222.220 1A-23-F9-CD-06-9B 111.111.111.112 111.111.111.110 CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F IE1030 Data Communication Networks – Internet Protocol 6-12 Routing to another subnet: addressing ▪ R determines outgoing interface, passes datagram with IP source A, destination B to link layer ▪ R creates link-layer frame containing A-to-B IP datagram. Frame destination address: B's MAC address MAC src: 1A-23-F9-CD-06-9B ▪ transmits link-layer frame MAC dest: 49-BD-D2-C7-56-2A IP src: 111.111.111.111 IP dest: 222.222.222.222 IP IP Eth Eth Phy Phy A B R 111.111.111.111 74-29-9C-E8-FF-55 222.222.222.222 49-BD-D2-C7-56-2A 222.222.222.220 1A-23-F9-CD-06-9B 111.111.111.112 111.111.111.110 CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F IE1030 Data Communication Networks – Internet Protocol 6-13 Routing to another subnet: addressing ▪ B receives frame, extracts IP datagram destination B ▪ B passes datagram up protocol stack to IP MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP src: 111.111.111.111 IP dest: 222.222.222.222 IP IP Eth Eth Phy Phy A B R 111.111.111.111 74-29-9C-E8-FF-55 222.222.222.222 49-BD-D2-C7-56-2A 222.222.222.220 1A-23-F9-CD-06-9B 111.111.111.112 111.111.111.110 CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F IE1030 Data Communication Networks – Internet Protocol 6-14 Lesson outline Intranet, Extranet and Internet Routing Routing table Static routing Dynamic routing Dynamic routing protocol classification Behavior of Distance Vector and Link State protocols IE1030 Data Communication Networks – Internet Protocol 6-15 Routing table In this example, the router R’s task was easy, because destination IP address 222.222.222.222 was on a directly connected network In general, routers have to do a bit more work to determine how to forward the datagram A router maintains a Routing Table that it can look up Actually, even a host must have a routing table (usually with a few rows) Columns in the Routing Table: Destination, Next Hop, Interface, … A B R 111.111.111.111 222.222.222.222 222.222.222.220 111.111.111.112 111.111.111.110 222.222.222.221 IE1030 Data Communication Networks – Internet Protocol 6-16 223.1.1.2 Routing tables A eth0 223.1.1.1 223.1.1.0/24 Routing table at Host A 223.1.1.4 Destination Next Hop Interface 223.1.1.3 eth0 223.1.1.0/24 Connected eth0 eth1 eth2 default 223.1.1.3 eth0 223.1.9.2 R1 223.1.7.0 Destination Next Hop Interface 223.1.1.0/24 Connected eth0 Link to 0.0.0.0/0 223.1.1.3 eth0 223.1.9.1 R2 R3 223.1.7.1 Internet 223.1.8.1 223.1.8.0 default = 0.0.0.0/0 223.1.2.6 223.1.8.0/24 223.1.3.27 223.1.2.0/24 223.1.3.0/24 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2 IE1030 Data Communication Networks – Internet Protocol 6-17 223.1.1.2 Routing tables A eth0 223.1.1.1 223.1.1.0/24 Routing table at Router R1 223.1.1.4 Destination Next Hop Interface 223.1.1.3 eth0 223.1.1.0/24 Connected eth0 eth1 eth2 223.1.2.0/24 223.1.9.1(R2) eth1 223.1.9.2 R1 223.1.7.0 223.1.3.0/24 223.1.7.1(R3) eth2 223.1.7.0/24 Connected eth2 Link to 223.1.8.0/24 223.1.7.1(R3) eth2 223.1.9.1 R2 R3 223.1.7.1 Internet 223.1.9.0/24 Connected eth1 223.1.8.1 223.1.8.0 223.1.8.0/24 default 223.1.7.1(R3) eth2 223.1.2.6 223.1.3.27 223.1.2.0/24 223.1.3.0/24 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2 IE1030 Data Communication Networks – Internet Protocol 6-18 223.1.1.2 Routing at R1 A eth0 223.1.1.1 223.1.1.0/24 Destination Next Hop Interface 223.1.1.4 223.1.1.0/24 Connected eth0 223.1.1.3 223.1.2.0/24 223.1.9.1(R2) eth1 eth0 223.1.3.0/24 223.1.7.1(R3) eth2 eth1 eth2 223.1.7.0/24 Connected eth2 223.1.9.2 R1 223.1.7.0 223.1.8.0/24 223.1.7.1(R3) eth2 223.1.9.0/24 Connected eth1 default 223.1.7.1(R3) eth2 223.1.9.1 R2 R3 223.1.7.1 Link to Internet What should R1 do if it receives an 223.1.8.1 223.1.8.0 IP datagram from A destined to 223.1.2.6 223.1.8.0/24 223.1.3.27 223.1.2.1 ? 223.1.2.0/24 223.1.3.0/24 223.1.3.2 ? 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2 8.8.8.8 ? IE1030 Data Communication Networks – Internet Protocol 6-19 Routing process at a router Compare the destination IP address against ALL entries in the routing table Select the Next Hop / Interface that results in the longest prefix match with the destination IP address For an address to match with an entry W.X.Y.Z/P the first P bits of the address must match with the first P bits of W.X.Y.Z Examples: 223.1.3.2 does not match with 223.1.2.0/24 because only the first 23 bits match 223.1.2.2 matches with 223.1.2.0/24 because all of the first 24 bits match IE1030 Data Communication Networks – Internet Protocol 6-20 Longest prefix match - examples Consider the following routing table at a router Destination Next hop Interface 200.23.16.0/21 11001000 00010111 00010*** ******** R1 eth0 200.23.24.0/21 11001000 00010111 00011*** ******** R2 eth1 200.23.24.0/24 11001000 00010111 00011000 ******** R3 eth2 0.0.0.0/0 ******** ******** ******** ******** R4 eth3 Which entry would have the longest prefix match for the following destination IP addresses? 200.23.16.5 11001000 00010111 00010000 00000101 R1 eth0 200.23.26.1 11001000 00010111 00011010 00000001 R2 eth1 200.23.24.4 11001000 00010111 00011000 00000100 R3 eth2 8.8.8.8 00001000 00001000 00001000 00001000 R4 eth3 IE1030 Data Communication Networks – Internet Protocol 6-21 Lesson outline Intranet, Extranet and Internet Routing Routing table Static routing Dynamic routing Dynamic routing protocol classification Behavior of Distance Vector and Link State protocols IE1030 Data Communication Networks – Internet Protocol 6-22 Static vs Dynamic Routing How do the entries in Routing tables get created? Static Routing: An administrator enters them manually Dynamic Routing: Routers exchange routing information and learn routes dynamically Static routing Fixed path from a given network to another Suitable only for small networks (i.e. 3 or 4 routers) Not suitable for large networks Time consuming to manually configure static routes on all the routers Routers and links can go down or links can become congested, and packets may need to be routed via alternate paths depending on the status of the network IE1030 Data Communication Networks – Internet Protocol 6-23 Dynamic Routing Routers exchange routing information using a Routing Protocol Routing protocol characteristics What routing information is exchanged? With which routers does a particular router exchange routing information? How often are the routing information exchanged? Protocol classification Distance vector protocols vs Link state protocols Interior gateway protocols vs Exterior gateway protocols IE1030 Data Communication Networks – Internet Protocol 6-24 Dynamic Routing protocols mobile network Routing protocol goal: determine national or global ISP “good” paths (routes), from a sending hosts to receiving host, through network of routers application transport network path: sequence of routers packets link physical network traverse from given initial source network link link physical physical network to final destination network network link network physical link physical network “good”: least “cost”, “fastest”, link datacenter physical network “least congested” application Routing is a major networking enterprise transport network challenge! link network physical IE1030 Data Communication Networks – Internet Protocol 6-25 Autonomous systems Typically, an organization would have several routers within its network and at least one connection to the outside world A group of networks and routers controlled by a single administrative entity is called an Autonomous System (AS) An autonomous system is connected to the rest of the world via one or many gateways A gateway is a router within an AS with a link to the outside world Interior Gateway Protocols Routing protocols used for exchange of routing information within an AS Examples: RIP, OSPF, IS-IS, EIGRP (Cisco) Exterior Gateway Protocols Routing protocols used for exchange of routing information between ASs Examples: BGP, EGP IE1030 Data Communication Networks – Internet Protocol 6-26 Autonomous systems example IE1030 Data Communication Networks – Internet Protocol 6-27 223.1.1.2 Distance vector protocols A Each router tells other routers the 223.1.1.1 223.1.1.0/24 223.1.1.4 “shortest” distance it has for a particular destination 223.1.1.3 eth0 Example: R1 to others: Destination Distance eth1 eth2 223.1.1.0/24 10 223.1.9.2 R1 223.1.7.0 223.1.7.0/24 10 223.1.9.0/24 10 223.1.2.0/24 110 223.1.3.0/24 110 223.1.9.1 R2 R3 223.1.7.1 Link to 223.1.8.0/24 110 223.1.8.1 223.1.8.0 Internet Other routers use this information to 223.1.8.0/24 update their routing tables 223.1.2.6 223.1.3.27 Simple 223.1.2.0/24 223.1.3.0/24 223.1.2.1 Bad news travels slowly 223.1.2.2 223.1.3.1 223.1.3.2 (e.g. in RIP, a link going down would create a count-to-infinity problem) IE1030 Data Communication Networks – Internet Protocol 6-28 223.1.1.2 Link state protocols A 223.1.1.1 223.1.1.0/24 223.1.1.4 Each router tells others the state of each of the links that it is connected to 223.1.1.3 Example: R1 to others: eth0 Destination Router Cost (metric) eth1 eth2 223.1.1.0/24 --- 2 R1 223.1.9.2 223.1.7.0 223.1.7.0/24 R3 5 223.1.9.0/24 R2 5 Other routers maintain a link state Link to database which provides a map of the 223.1.9.1 R2 R3 223.1.7.1 Internet 223.1.8.1 223.1.8.0 entire network, and compute the best path for destinations using some 223.1.2.6 223.1.8.0/24 223.1.3.27 algorithm 223.1.2.0/24 Requires more memory and 223.1.2.1 223.1.2.2 223.1.3.0/24 223.1.3.1 processing power to compute paths 223.1.3.2 Faster convergence IE1030 Data Communication Networks – Internet Protocol 6-29 Exercises Determine the routing tables at R2 and R3 in slide 6-18 (Like the routing table of R1 shown in the slide) Determine the link state routing information that R2 and R3 would share with other routers in slide 6-29 (Like the routing information shared by R1 shown in the slide) IE1030 Data Communication Networks – Internet Protocol 6-30 Lesson summary Intranet, Extranet and Internet Routing: How does a router forward datagrams between networks Routing table Longest prefix match Static routing Dynamic routing Autonomous systems Distance Vector and Link State protocols IE1030 Data Communication Networks – Internet Protocol 6-31 References Chapter 5 - The Network Layer: Control Plane James F. Kurose and Keith W. Ross, Computer Networking – A Top-Down Approach, (8th Edition), Pearson, 2020 Chapter 1 – Networking Today Cisco Network Academy, Introduction to Networks Companion Guide (CCNAv7), Cisco Press, Pearson, 2020 IE1030 Data Communication Networks – Internet Protocol 6-32 Lecture slides prepared by Nimal Ratnayake Dept of Computer Systems Engineering SLIIT First version: 2024 July Revision 1: 2024 October 6-33