Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Communication Networks P. Demeester Chapter 4 Network Layer Computer networking A top-down approach featuring the internet 4th Edition, 2008 Addison Wesley James F. Kurose, Keith W. Ross ISBN 0-321-49770-8 Network Layer Part of slides provided by J.F Kurose and K.W. Ross, All Rights Reserved 4-1 Chapter 4 outline 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol 4.5 Routing in the Internet 4.6 What’s Inside a Router 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility Network Layer 4-2 Network layer functions transport packet from sending to receiving hosts network layer protocols in every host, router three important functions: path determination: route taken by packets from source to dest. Routing algorithms forwarding: move packets from router’s input to appropriate router output call setup: some network architectures require router call setup along path before data flows application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical Network Layer 4-3 Network layer functions : IP forwarding C Router Link W A Y:to Y Y Routing Table Y:to B Z:to D Buffer B Y:to C Z:to E Store and Forward E X computer host terminal Source : X Destination : Y Content : TCP D Z Network Layer 4-4 Datagram networks: the Internet model no call setup at network layer routers: no state about end-to-end connections no network-level concept of “connection” packets forwarded using destination host address packets between same source-dest pair may take different paths application transport network data link 1. Send data physical application transport network 2. Receive data data link physical Network Layer 4-5 The IP Service End-to-end Packet delivery service Unreliable, but an honest attempt Best-effort, no Quality of Service (QoS) (no guarantee on delay or bandwidth) Designed for internetworking (over any L2) Connectionless Network Layer 4-6 Chapter 4 outline 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol 4.4.1 IPv4 addressing 4.4.2 Moving a datagram from source to destination 4.4.3 Datagram format 4.4.4 IP fragmentation 4.4.5 ICMP: Internet Control Message Protocol 4.4.6 DHCP: Dynamic Host Configuration Protocol 4.4.7 NAT: Network Address Translation 4.5 Routing in the Internet 4.6 What’s Inside a Router 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility Network Layer 4-7 Chapter 4 outline 4.4 The Internet (IP) Protocol 4.4.1 IPv4 addressing 4.4.2 Moving a datagram from source to destination 4.4.3 Datagram format 4.4.4 IP fragmentation 4.4.5 ICMP: Internet Control Message Protocol 4.4.6 DHCP: Dynamic Host Configuration Protocol 4.4.7 NAT: Network Address Translation Network Layer 4-8 The Internet Network layer Host, router network layer functions: Transport layer: TCP, UDP Network layer IP protocol •addressing conventions •datagram format •packet handling conventions Routing protocols •path selection •RIP, OSPF, BGP forwarding table ICMP protocol •error reporting •router “signaling” Link layer physical layer Network Layer 4-9 Address Format - Address Classes IP address format : 4 octets, decimal notation, separation by dot example : 157.193.122.10 range : 0 - 255 (corresponds to 0000 0000 - 1111 1111 or 00-FF) Two parts : network part and host part 157.193.122.10 network UGent network : 157.193 (64k hosts) host [0.0.0.0-128.0.0.0[ [128.0.0.0-192.0.0.0[ HP : 15.0.0.0 UGent : 157.193.0.0 Class A 0 Network Class B 10 Class C 110 Class D 1110 Class E 11110 Host Network 128 networks 16 million addr/network Host Network Multicast address Reserved for future use address space Host 16k networks 64k addr/network 2 M networks, 256 addr/network Network Layer 4-10 Special Addresses X.Y.0.0 : notation for a network examples : 15.0.0.0 (class A network), 157.193.0.0 (class B network), 193.125.97.0 (class C network) 127.X.Y.Z : loopback Interface (for debugging) in practice mainly 127.0.0.1 address used 0.0.0.0 : this host on this network (used for booting) only allowed as source address 0.0.X.Y : a host on this network (used for booting) only allowed as source address 255.255.255.255 : broadcast to all hosts on this network only allowed as destination address, no forwarding allowed X.Y.255.255 : broadcast to all hosts on a remote network only allowed as destination address 10.0.0.0-10.255.255.255; 172.16.0.0-172.31.255.255; 192.168.0.0192.168.255.255 : used for networks not connected to The Internet (e.g. private internets) A network, subnetwork or host can NEVER consist entirely of 0’s or 1’s Network Layer 4-11 Example : UGent network PC room Plateau ftwe01 157.193.103.1 ftwe02 157.193.103.2 ftwe51 157.193.103.51 157.193.103.254 Router Plateau (ftwe) Belnet backbone 157.193.227.2Router Belnet 157.193.227.1 157.193.234.2 157.193.60.31 157.193.234.1 (belnet) Router ARC (rtr-arc) 157.193.40.254 Router Technicum 157.193.60.254 (rtr-tech) eduserv1 eduserv2 157.193.40.9 157.193.40.10 Network Layer 4-12 Direct connected networks PC room Plateau ftwe01 157.193.103.1 ftwe02 157.193.103.2 ftwe51 157.193.103.51 direct connected network 157.193.103.254 Router Plateau (ftwe) 157.193.234.2 direct 157.193.60.31 direct connected connected 157.193.234.1 network network Router Technicum 157.193.60.254 (rtr-tech) Belnet backbone direct 157.193.227.2Router Belnet connecte (belnet) 157.193.227.1 d network Router ARC (rtr-arc) direct 157.193.40.254 connected network eduserv1 eduserv2 157.193.40.9 157.193.40.10 Network Layer 4-13 Subnetworks PC room Plateau ftwe01 157.193.103.1 ftwe02 157.193.103.2 Subnetwork 157.193.103.0 network host 157.193.103.254 subnetwork Router Plateau (ftwe) 157.193.227.2 Router Subnetwork 157.193.227.1 157.193.227.0 157.193.234.2 157.193.60.31 Subnetwork 157.193.60.0 157.193.60.254 Belnet backbone ftwe51 157.193.103.51 Subnetwork 157.193.234.0 157.193.234.1 Belnet (belnet) Router ARC (rtr-arc) Subnetwork 157.193.40.254 157.193.40.0 Router Technicum (rtr-tech) eduserv1 eduserv2 157.193.40.9 157.193.40.10 Network Layer 4-14 Subnet addressing in IP Without subnetting Network Host With subnetting Network Subnet mask 1 1 1 1 1 …1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0…0 0 0 0 Subnetwork : 157.193.103.0 (mask FF.FF.FF.00) network part : 157.193 (class B) subnetwork part : 103 (8 bits, 254 subnets) mask used : FF.FF.FF.0000 0000 # hosts : 254 (00 and FF not allowed) host range : 157.193.103.1 - 157.193.103.254 Subnet Host BORDER SUBNET | HOST Subnetwork : 158.78.42.64 (mask FF.FF.FF.C0) network part : 158.78 (class B) subnetwork part: 00101010.01 (10 bits, 1022 subnets) mask used : FF.FF.FF.1100 0000 # hosts : 62 (00 0000 and 11 1111 not allowed) host range : 158.78.42.65 - 158.78.42.126 Subnetwork : 158.78.01.00 (mask FF.FF.FF.C0) host range : 158.78.01.01 - 158.78.01.62 Note : binary, decimal and hexadecimal Network Layer 4-15 notation used where appropriate Subnet addressing in IP : class B Subnetwork : 157.193.0.0 (mask FF.FF.FF.00) : NOT ALLOWED subnetwork = all 0’s not allowed because no distinction with the class B address 157.193.0.0 (in practice : used) Subnetwork : 157.193.255.0 (mask FF.FF.FF.00) : NOT ALLOWED subnetwork = all 1’s not allowed (in practice : used) class B subnetworks SUBNET BITS 0 # OF HOST BITS SUBNETS 0 16 # OF HOSTS 65534 255.255.0.0 MASK 1 - 15 - not allowed 2 2 14 16382 255.255.192.0 3 6 13 8190 4 14 12 4096 255.255.240.0 5 30 11 2046 255.255.248.0 … … … … … 11 2046 5 30 12 4094 4 14 255.255.255.240 13 8190 3 6 255.255.255.248 14 16382 2 2 255.255.255.252 15 - 1 - not allowed 255.255.224.0 255.255.255.224 Network Layer 4-16 Subnet addressing in IP : class C subnetmask (CIDR) subnetmask (DEC) subnetmask (HEX) /24 /25 /26 /27 /28 /29 /30 0 .128 .192 .224 .240 .248 .252 .00 .80 .C0 .E0 .F0 .F8 .FC 0 255 0 127 0 63 0 31 0 15 0 7 0 3 4 7 8 15 8 11 12 15 16 31 16 23 16 19 20 23 24 31 24 27 28 31 32 63 32 47 32 39 32 35 36 39 40 47 40 43 44 47 48 63 48 55 48 51 52 55 56 63 56 59 60 63 64 127 64 95 64 79 64 71 64 67 68 71 72 79 72 75 76 79 80 95 80 87 80 83 84 87 88 95 88 91 92 95 96 127 96 111 96 103 96 99 100 103 104 111 104 107 108 111 112 127 112 119 112 115 116 119 120 127 120 123 124 127 128 255 128 191 128 159 128 143 128 135 128 131 132 135 136 143 136 139 140 143 144 159 144 151 144 147 148 151 152 159 152 155 156 159 160 191 160 175 160 167 160 163 164 167 168 175 168 171 172 175 176 191 176 183 176 179 180 183 184 191 184 187 188 191 192 255 192 223 192 207 192 199 192 195 196 199 200 207 200 203 204 207 208 223 208 215 208 211 212 215 216 223 216 219 220 223 224 255 224 239 224 231 224 227 228 231 232 239 232 235 236 239 240 255 240 247 240 243 244 247 248 255 248 251 Network Layer 252 4-17 255 Subnet addressing class C : example subnetmask (CIDR) subnetmask (DEC) subnetmask (HEX) /24 /25 /26 /27 /28 /29 /30 0 .128 .192 .224 .240 .248 .252 .00 .80 .C0 .E0 .F0 .F8 .FC 0 255 0 127 0 63 0 31 0 15 0 7 0 3 4 7 8 15 8 11 12 15 16 31 16 23 16 19 20 23 24 31 24 27 28 31 32 63 32 47 32 39 32 35 36 39 40 47 40 43 44 47 48 63 48 55 48 51 52 55 56 63 56 59 60 63 64 127 64 95 64 79 64 71 64 67 68 71 72 79 72 75 76 79 80 95 80 87 80 83 84 87 88 95 88 91 92 95 96 127 96 111 96 103 96 99 100 103 104 111 104 107 108 111 112 127 112 119 112 115 116 119 120 127 120 123 124 127 128 255 128 191 128 159 128 143 128 135 128 131 132 135 136 143 136 139 140 143 144 159 144 151 144 147 148 151 152 159 152 155 156 159 160 191 160 175 160 167 160 163 164 167 168 175 168 171 172 175 176 191 176 183 176 179 180 183 184 191 184 187 188 191 192 255 192 223 192 207 192 199 192 195 196 199 200 207 200 203 204 207 208 223 208 215 208 211 212 215 216 223 216 219 220 223 224 255 224 239 224 231 224 227 228 231 232 239 232 235 236 239 240 255 240 247 240 243 244 247 248 255 248 251 Network Layer 252 4-18 255 Subnet addressing in IP : Example IF (destination_address AND subnet_mask)==(my_address AND subnet_mask) THEN destination host is on a directly connected network ELSE the packet must be sent to a router first Packet to 157.193.102.51 AND with FF.FF.FF.00 gives : 157.193.102.0 == 157.193.102.3 AND with FF.FF.FF.00 gives : 157.193.102.0 ==> LOCAL HOST 157.193.103.12 Subnetwork 157.193.103.0 157.193.103.254 Subnetwork 157.193.102.0 router 157.193.102.254 157.193.102.51 subnet mask : FF.FF.FF.00 157.193.102.3 note : ARP Packet to 157.193.103.12 AND with FF.FF.FF.00 gives : 157.193.103.0 NOT == 157.193.102.3 AND with FF.FF.FF.00 gives : 157.193.102.0 ==> GO TO ROUTER Network Layer 4-19 IP addressing: CIDR Classful addressing: inefficient use of address space, address space exhaustion e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network CIDR: Classless InterDomain Routing network portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in network portion of address network part host part 11001000 00010111 00010000 00000000 200.23.16.0/23 Network Layer 4-20 IP addresses: how to get one? Q: How does host get IP address? hard-coded by system admin in a file Wintel: control-panel->network->configuration>tcp/ip->properties UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server “plug-and-play” (more shortly) Network Layer 4-21 IP addresses: how to get one? Q: How does network get network part of IP addr? A: gets allocated portion of its provider ISP’s address space ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 Organization 1 Organization 2 ... 11001000 00010111 00010000 00000000 11001000 00010111 00010010 00000000 11001000 00010111 00010100 00000000 ….. …. 200.23.16.0/23 200.23.18.0/23 200.23.20.0/23 …. Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23 Network Layer 4-22 Hierarchical addressing: route aggregation Hierarchical addressing allows efficient advertisement of routing information: Organization 0 200.23.16.0/23 Organization 1 200.23.18.0/23 Organization 2 200.23.20.0/23 Organization 7 . . . . . . ISP - Belnet “Send me anything with addresses beginning 200.23.16.0/20” Internet 200.23.30.0/23 ISP - Newnet “Send me anything with addresses beginning 199.31.0.0/16” Network Layer 4-23 Hierarchical addressing: more specific routes ISPs - Newnet has a more specific route to Organization 1 Organization 0 200.23.16.0/23 Organization 2 200.23.20.0/23 Organization 7 . . . . . . ISP - Belnet “Send me anything with addresses beginning 200.23.16.0/20” Internet 200.23.30.0/23 ISP - Newnet Organization 1 200.23.18.0/23 “Send me anything with addresses beginning 199.31.0.0/16 or 200.23.18.0/23” Network Layer 4-24 IP addressing: the last word... Q: How does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers allocates addresses manages DNS assigns domain names, resolves disputes Exc.1 www.icann.org Network Layer 4-25 Chapter 4 outline 4.4 The Internet (IP) Protocol 4.4.1 IPv4 addressing 4.4.2 Moving a datagram from source to destination : forwarding 4.4.3 Datagram format 4.4.4 IP fragmentation 4.4.5 ICMP: Internet Control Message Protocol 4.4.6 DHCP: Dynamic Host Configuration Protocol 4.4.7 NAT: Network Address Translation Network Layer 4-26 Router : Store and Forward Routing table : Destination A B Next hop LAN 2 LAN 3 LAN 2 A LAN 1 • • • • A LAN 3 A A B IP packet arrives in a router (store in a buffer) Header is analyzed : what is the destination IP address Look-up of the routing table : next hop (or local) Forward packet to the correct interface (or deliver to local application) Network Layer 4-27 Router Examples Cisco 12000 series Network Layer 4-28 Routing Table : example 157.193.103.254 157.193.102.253 157.193.102.254 Subnetwork 157.193.103.0 router B LAN 1 Subnetwork 157.193.102.0 157.193.102.1 router A 157.193.103.1 157.193.102.34 157.193.104.254 INTERNET Subnetwork 157.193.104.0 Routing table router A Destination Mask GatewayDestination InterfaceGateway 127.0.0.0 FF.00.00.00 127.0.0.1127.0.0.0/8 Lo0 0.0.0.0 0.0.0.0 157.193.102.253 0.0.0.0/0 LAN 1 157.193.102.253 157.193.102.254 157.193.102.0 FF.FF.FF.00 157.193.102.254 157.193.102.0/24 LAN 1 157.193.102.254 157.193.102.254 157.193.103.0 FF.FF.FF.00 157.193.103.254 157.193.103.0/24 LAN 2 157.193.104.0 FF.FF.FF.00 157.193.104.254 157.193.104.0/24 LAN 3 157.193.103.254 157.193.103.254 Network Layer 4-29 157.193.104.254 157.193.104.254 157.193.104.1 127.0.0.1 Interface 127.0.0.1 Routing Table : Example UGent network Routing table for an edge router (ftwe) PC room Plateau ftwe01 157.193.103.1 ftwe02 157.193.103.2 lan0 157.193.103.254 Router Plateau (ftwe) Destination 127.0.0.1 ftwe51 157.193.103.0 157.193.103.51 157.193.60.0 default Routing table for a host (eduserv2) Destination 127.0.0.1 157.193.40.0 default 157.193.234.2 157.193.60.31 157.193.234.1 lan1 Gateway Interface 127.0.0.1 lo0 Belnet backbone 157.193.103.254 lan0 157.193.60.31 lan1 157.193.60.254 lan1 Router Technicum 157.193.60.254 (rtr-tech) Gateway Interface 157.193.227.2 Router Belnet 127.0.0.1 lo0 (belnet) 157.193.227.1 157.193.40.10 hme0 157.193.40.254 hme0 Router ARC (rtr-arc) 157.193.40.254 hme0 eduserv1 eduserv2 157.193.40.9 157.193.40.10 Network Layer 4-30 Routing Table : examples allserv:/staff/ftwe/pdemeest$ allserv:/staff/ftwe/pdemeest$ netstat netstat -rn -r Routing Table: Table: Routing Destination Gateway Destination Gateway --------------------------------------- --------------------------------------157.193.40.0 157.193.40.42 157.193.40.0 allserv.rug.ac.be 224.0.0.0 157.193.40.42 BASE-ADDRESS.MCAST.NET allserv.rug.ac.be default 157.193.40.254 default rtr-arc.rug.ac.be 127.0.0.1 127.0.0.1 localhost localhost Flags Use Interface Flags Ref Ref Use Interface --------- --------- ----------- ----------------U 3 U 3 63929 63857 hme0 hme0 U 3 0 U 3 0 hme0 hme0 UG 028820629 UG 028790639 UH 07349737 UH 07347592 lo0 lo0 Flags : U : route is up G : route to a gateway (if not set : directly connected destination) H : route to a host (if not set : route to a network) C:\WINDOWS>netstat Route Table Active Routes: Network Address 0.0.0.0 127.0.0.0 157.193.122.0 157.193.122.201 157.193.255.255 224.0.0.0 255.255.255.255 -r Netmask 0.0.0.0 255.0.0.0 255.255.255.0 255.255.255.255 255.255.255.255 224.0.0.0 255.255.255.255 Gateway Address 157.193.122.1 127.0.0.1 157.193.122.201 127.0.0.1 157.193.122.201 157.193.122.201 157.193.122.201 Interface Metric 157.193.122.201 1 127.0.0.1 1 157.193.122.201 1 127.0.0.1 1 157.193.122.201 1 157.193.122.201 1 4-31 Network Layer 157.193.122.201 1 The Forwarding Process Sanity checks: version number and header checksum decrement TTL (if reduced to 0 ==> discard) Match destination address with: own addresses (no forwarding needed) prefix(es) in the routing table (longest match) Send to outgoing interface: fragment if packet size > MTU (Maximum Transfer recalculate header checksum Unit) Routing table : 157.193.84.0 direct lan1 157.193.0.0 157.193.234.2 lan2 destination: 157.193.84.20: longest prefix match is 157.193.84 => lan1 (note : also 157.193 is a prefix match, but not the longest) Network destination: 157.193.85.20: longest prefix match is 157.193 => Layer lan2 4-32 The Routing Table in a Large Network European Backbone Router : • entries to directly attached networks (e.g. BELNET) • entries to every network attached to these directly attached networks (e.g.: BELNET : UGent, KULeuven, VUB, … backbone) • entries to every network in US (unless default) Dutch Backbone UGent Backbone RUGNET 157.193.0.0 KULeuven Backbone 134.58.0.0 UK Backbone Belgian Backbone BELNET 193.190.19x.0 R1 Transatlantic R2 Large Router : • up to 40.000 entries in routing table • long search for appropriate entry • stability of routing protocols (many routes to be advertised) European Backbone R4 R3 German Backbone French Backbone Network Layer UGent : 1997 Network Layer 4-34 UGent : 2000 .4 .6 .13 .5 subnet : 157.193.188.0 (FF.FF.FF.00) .9 .8 .10 .7 .2 .12 .1 .3 .11 rtr-urb .184.0 hera URBIS tacitus .122.0 Network Layer 4-35 UGent : 2003 Network Layer 4-36 BELNET Backbone Network Layer 4-37 BELNET Backbone Network Layer 4-38 GEANT Backbone Exc.2 Network Layer 4-39 Chapter 4 outline 4.4 The Internet (IP) Protocol 4.4.1 IPv4 addressing 4.4.2 Moving a datagram from source to destination 4.4.3 Datagram format 4.4.4 IP fragmentation 4.4.5 ICMP: Internet Control Message Protocol 4.4.6 DHCP: Dynamic Host Configuration Protocol 4.4.7 NAT: Network Address Translation Network Layer 4-40 IP Packet Format Type of Service Currently : IP version Number 4 or IPv4of 32 bit words3 bits for priority (if no options : 5) 4 bits for delay, BW, … also IPv6 Number of bytes in IP packet (including header) maximum of 65535 bytes typical few 100 to few 1000 1 bit reserved NOT USED 4-bit 4-bit 8-bitToS version header length 16-bit identification 8-bit TTL 16-bit total length of packet 3-bit flags 13-bit fragment offset 8-bit protocol 16-bit header checksum 32-bit source IP address 32 bit source and destination address Calculated over header 32-bit destination IP address similar to TCP Used for fragmentation Identification of each packet send by host Indicate higher layer protocol (increment each time packet Not often used (timestamp, route to follow, …) Options (if any) Internet Control Message Prot. is sent) Time-To-Live : start at 32 or 64 decrement at each hop discard packet if TTL=0 1 2 4 6 17 46 89 ICMP Internet Group Management Prot. IGMP IP-in-IP tunnelling IP-in-IP Transmission Data Control Protocol TCP User Datagram Protocol UDP Resource Reservation Protocol RSVP Open Shortest Path First OSPF Network Layer 4-41 Chapter 4 outline 4.4 The Internet (IP) Protocol 4.4.1 IPv4 addressing 4.4.2 Moving a datagram from source to destination 4.4.3 Datagram format 4.4.4 IP fragmentation 4.4.5 ICMP: Internet Control Message Protocol 4.4.6 DHCP: Dynamic Host Configuration Protocol 4.4.7 NAT: Network Address Translation Network Layer 4-42 IP Fragmentation & Reassembly network links have MTU (max.transfer size) - largest possible link-level frame. different link types, different MTUs large IP datagram divided (“fragmented”) within network one datagram becomes several datagrams “reassembled” only at final destination IP header bits used to identify, order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly Network Layer 4-43 IP Fragmentation and Reassembly Example 4000 byte datagram MTU = 1500 bytes length ID fragflag offset =4000 =x =0 =0 One large datagram becomes several smaller datagrams Header (20 bytes) length ID fragflag offset =1500 =x =1 =0 length ID fragflag offset =1500 =x =1 =1480 length ID fragflag offset =1040 =x =0 =2960 Note : - offset should be multiple of 8 (because encoded in 13 bits) Network Layer - for offset : do not take header into account 4-44 Chapter 4 outline 4.4 The Internet (IP) Protocol 4.4.1 IPv4 addressing 4.4.2 Moving a datagram from source to destination 4.4.3 Datagram format 4.4.4 IP fragmentation 4.4.5 ICMP: Internet Control Message Protocol 4.4.6 DHCP: Dynamic Host Configuration Protocol 4.4.7 NAT: Network Address Translation Network Layer 4-45 ICMP : Internet Control Message Protocol ICMP resolves the following questions : • What happens after a router crashed and disrupted the network • What notice is given that datagrams are wandering around until their Time-To-Live (TTL) expires ? • What warning is given to the application when sending information to an unreachable host ? • How to know neighbors (routers) ? • ... • How can we know that a host is up and running ? • ... IP-datagram IP-header ICMP message protocol =1 ICMP is often considered part of the IP layer Network Layer 4-46 ICMP Message 0 15 16 8 9 type code 31 checksum message content (depends on type and code) ERROR : type = 3 : destination unreachable code code code code code … = 0 : network unreachable = 1 : host unreachable = 2 : protocol unreachable = 3 : port unreachable = 4 : fragmentation needed but don’t-fragment bit set type = 5 : redirect code = 0 : redirect for network code = 1 : redirect for host … QUERY : type = 0, code = 0 : echo reply (ping reply) type = 8, code = 0 : echo request (ping request) type = 9, code = 0 : router advertisement type = 10, code = 0 : router solicitation ... type = 11 : time exceeded code = 0 : TTL = 0 during transit code = 1 : TTL = 0 during reassembly Network Layer 4-47 ICMP query : Echo (and use in ping) 0 89 type code identifier 15 16 31 checksum sequence number data ICMP Ping Request ICMP Ping Reply C:\WINDOWS>ping www.kpn.com C:\WINDOWS>ping Usage: ping [-t] [145.7.233.150] [-a] [-n count] with [-l size] [-f]of[-i TTL] [-v TOS] Pinging www.kpn.com 32 bytes [-r count] [-s count] [[-j host-list] | [-k host-list] [-w timeout] destination-list Reply from 145.7.233.150: bytes=32 time=93ms TTL=239 Options: -t 145.7.233.150: Pingbytes=32 the specifed host TTL=239 until interrupted. Reply from time=55ms -a Resolve addresses to hostnames. Reply from 145.7.233.150: bytes=32 time=54ms -n count Number of echo requestsTTL=239 to send. -l size Sendbytes=32 buffer size. Reply from 145.7.233.150: time=59ms TTL=239 -f Set Don't Fragment flag in packet. -i TTL Time To ping Live.-s www.kpn.com allserv:/staff/ftwe/pdemeest$ -v TOS Type Of Service. PING www.kpn.com: bytes -r count 56 data Record route for count hops. count Timestamp for count hops. 64 bytes-sfrom www.kpn.com (145.7.233.150): icmp_seq=0. time=24. ms -j host-list Loose source route along host-list. 64 bytes-kfrom www.kpn.com (145.7.233.150): icmp_seq=1. time=28. ms host-list Strict source route along host-list. Network Layer 4-48 64 bytes-wfrom www.kpn.com (145.7.233.150): icmp_seq=2. time=28. ms timeout Timeout in milliseconds to wait for each reply. ICMP error : Redirect INTERNET 157.193.138.2 Routing Table : default 157.193.138.0 157.193.122.0 157.193.184.0 157.193.138.2 157.193.138.1 157.193.122.1 157.193.122.2 157.193.184.0 157.193.138.1 B A .1 .2 2 : forward first packet 157.193.122.0 1 : first packet .51 4 : next packets 3 : ICMP redirect Send IP packet to 157.193.184.24 Routing Table : default 157.193.122.0 157.193.184.24 157.193.122.1 157.193.122.51 157.193.122.2 0 15 16 8 9 type = 5 code 31 checksum 157.193.122.2 address of router to be used a.o.: 157.193.184.24 IP header + 8 data octets Network Layer 4-49 of original datagram ICMP error : Time Exceeded use in traceroute GOAL : find-out the route to a destination (and some additional info) • host running traceroute sends UDP IP-packet to destination with TTL = 1 • first router : decrement TTL to 0, discard packet, ICMP time exceeded back • hosts sends UDP IP-packet to destination with TTL = 2 • first router : decrement TTL to 1, second router : decrement TTL to 0, discard packet, ICMP time exceeded back • ... allserv:/staff/ftwe/pdemeest$ traceroute www.intec.rug.ac.be traceroute to intecsrv.rug.ac.be (157.193.92.92), 30 hops max, 40 byte packets 1 rtr-arc.rug.ac.be (157.193.40.254) 1 ms 1 ms 1 ms 2 rtr-tech.rug.ac.be (157.193.138.10) 1 ms 1 ms 1 ms 3 intecsrv.rug.ac.be (157.193.92.92) 4 ms 1 ms 3 ms TTL router name allserv IP/UDP TTL=1 router IP-address rtr-arc ICMP Time Exceeded rtr-arc roundtrip time (3x) rtr-tech intecsrv Network Layer 4-50 Chapter 4 outline 4.4 The Internet (IP) Protocol 4.4.1 IPv4 addressing 4.4.2 Moving a datagram from source to destination 4.4.3 Datagram format 4.4.4 IP fragmentation 4.4.5 ICMP: Internet Control Message Protocol 4.4.6 DHCP: Dynamic Host Configuration Protocol 4.4.7 NAT: Network Address Translation Network Layer 4-51 Home Network : single PC HOME ADSL (Belgacom) / Cable Modem (Telenet) 145.122.201.1 IP address : 157.193.0.1 gateway : 157.193.0.254 DNS 1 : 145.122.201.1 Ethernet public gateway router or dynamic configuration : DHCP (Dynamic Host Control Protocol) DNS INTERNET 157.193.0.254 157.193.0.1 Network Layer 4-52 Home Network : multiple PC’s HOME IP address : 192.168.0.2 gateway : 192.168.0.1 DNS 1 : 145.122.201.1 ADSL (Belgacom) / Cable Modem (Telenet) private network 192.168.0.0 145.122.201.1 192.168.0.2 switch private gateway router public gateway router DNS INTERNET 192.168.0.3 192.168.0.1 157.193.0.254 157.193.0.1 192.168.0.4 Network Layer 4-53 NAT : Network Address Translation WWW server 157.193.0.1:2012 => 202.87.122.4:80 192.168.0.2:1093 => 202.87.122.4:80 202.87.122.4:80 => 157.193.0.1:2012 202.87.122.4:80 => 192.168.0.2:1093 202.87.122.4 Port 2012 == 192.168.0.2:1093 192.168.0.2 Port 2015 == 192.168.0.4:1212 INTERNET NAT only known address in Internet ! 192.168.0.1 192.168.0.3 157.193.0.254 157.193.0.1 202.87.122.4:80 => 192.168.0.4:1212 192.168.0.4 192.168.0.4:1212 => 202.87.122.4:80 202.87.122.4:80 => 157.193.0.1:2015 157.193.0.1:2015 => Network Layer 4-54 202.87.122.4:80 NAT: Network Address Translation Motivation: local network uses just one IP address as far as outside world is concerned: no need to be allocated range of addresses from ISP: - just one IP address is used for all devices can change addresses of devices in local network without notifying outside world can change ISP without changing addresses of devices in local network devices inside local net not explicitly addressable, visible by outside world (a security plus). Network Layer 4-55 NAT: Network Address Translation 16-bit port-number field: >60,000 simultaneous connections with a single LAN-side address! NAT is controversial: routers should only process up to layer 3 violates end-to-end argument • NAT possibility must be taken into account by app designers, e.g., P2P applications address IPv6 shortage should instead be solved by Network Layer 4-56 NAT : Network Address Translation User PC No packets may enter unless in table Example : WWW server on 192.168.0.2:1321 NAT should open port to enter ! 202.87.122.4 202.87.122.4:4520 => 157.193.0.1:80 192.168.0.2 Port 80 == 192.168.0.3:1321 WWW server at port 1321 192.168.0.3 INTERNET 202.87.122.4:4520 => 192.168.0.3:1321 NAT 192.168.0.1 157.193.0.254 157.193.0.1 !!! NAT works as firewall !!! 192.168.0.4 Network Layer 4-57 DHCP : Dynamic Host Configuration Protocol IP : 192.168.0.13 gateway : 192.168.0.1 DNS : 145.122.201.1 192.168.0.13 DHCP request 145.122.201.1 192.168.0.13 DHCP server DNS 192.168.0.23 192.168.0.42 INTERNET 192.168.0.23 192.168.0.1 157.193.0.254 157.193.0.1 Easy configuration of PCs 192.168.0.42 Network Layer 4-58 How do the PCs know the DHCP server ? ==>DHCP discover DHCP : Dynamic Host Configuration Protocol 157.193.0.5 157.193.0.1 157.193.0.5 157.193.0.1 145.122.201.1 DNS DHCP server INTERNET IP : 157.193.0.1 gateway : 157.193.0.254 DNS : 145.122.201.1 157.193.0.254 reuse of limited number of IP numbers Network Layer 4-59 DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from network server when it joins network Can renew its lease on address in use Allows reuse of addresses (only hold address while connected and “on”) Support for mobile users who want to join network DHCP overview: host broadcasts “DHCP discover” msg DHCP server responds with “DHCP offer” msg host requests IP address: “DHCP request” msg DHCP server sends address: “DHCP ack” msg Network Layer 4-60 DHCP client-server scenario DHCP server: 223.1.2.5 src : 0.0.0.0, 68 dest.: 255.255.255.255,67 DHCPDISCOVER yiaddr: 0.0.0.0 transaction ID: 654 arriving client src: 223.1.2.5, 67 dest: 255.255.255.255, 68 DHCPOFFER yiaddrr: 223.1.2.4 transaction ID: 654 DHCP server ID : 233.1.2.5 Lifetime: 3600 secs time src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 DHCPREQUEST yiaddrr: 223.1.2.4 transaction ID: 655 DHCP server ID : 233.1.2.5 Lifetime: 3600 secs Standard ports : 67, 68 yiaddrr : Your Internet Address src: 223.1.2.5, 67 dest: 255.255.255.255, 68 DHCPACK yiaddrr: 223.1.2.4 transaction ID: 655 DHCP server ID : 233.1.2.5 Lifetime: 3600 secs Network Layer 4-61 Chapter 4 outline 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol 4.5 Routing in the Internet 4.5.1 Intra-AS routing: RIP and OSPF 4.5.2 Inter-AS routing: BGP 4.6 What’s Inside a Router? 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility Network Layer 4-62 Routing <> Forwarding Routing : fill in the routing tables of a router, based on centralized or distributed calculation of a shortest route or distance between router and destination network Forwarding : forward the packets, based on the destination IP address and the routing table content A W C Y Routing Table ? B Y:to B Destination : Y shortest route Forward D X distance to Y : 5 distance to Y : 3 E Network Layer 4-63 Routing in the Internet (hierarchical) scale: with 200 million destinations: can’t store all dest’s in routing tables! routing table exchange would swamp links! The Global Internet consists of Autonomous Systems (AS, aggregation of routers in regions) interconnected with each other: Stub AS: small corporation: one connection to other AS’s Multihomed AS: large corporation (no transit): multiple connections to other AS’s Transit AS: provider, hooking many AS’s together Two-level routing: Intra-AS: administrator responsible for choice of routing algorithm within network (administrative autonomy), may be different in different AS’s Network Layer 4-64 Inter-AS: unique standard for inter-AS routing: BGP Intra-AS and Inter-AS routing Gateways: C.b a C B.a A.a b A.c d A a b inter-AS, intra-AS routing in gateway A.c c a c B b •perform inter-AS routing amongst themselves •perform intra-AS routing with other routers in their AS network layer data link layer physical layer Network Layer 4-65 Intra-AS and Inter-AS routing C.b a Host h1 C b A.a Inter-AS routing between A and B A.c a d c b A Intra-AS routing within AS A B.a a c B Host h2 b Intra-AS routing within AS B Network Layer 4-66 Intra-AS Routing Also known as Interior Gateway Protocols (IGP) Most common Intra-AS routing protocols: RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gateway Routing Protocol (Cisco proprietary) Network Layer 4-67 RIP ( Routing Information Protocol) Distance vector algorithm Distributed Bellman-Ford algorithm Distance metric: # of hops (max = 15 hops) Distance vectors: exchanged among neighbors every 30 sec via Response Message (also called advertisement) Each advertisement: list of up to 25 destination nets within AS Included in BSD-UNIX Distribution in 1982 Network Layer 4-68 Principle RIP From B to C: [(A,1);(B,0);(C,1);(D,1);(E,2)] A B E D C destination A B D E Next hop B direct direct D Interface Distance BC 2 BC 1 CD 1 CD 2 Network Layer General Characteristics RIP Simple protocol, easy to implement Often used, even today Slow convergence Acceptable for small networks or networks with a simple topology Some routing anomalies that cause very slow convergence: like counting to infinity (see next slide) Network Layer RIP Problem : Counting to Infinity R1 R1R R2L R2/R1R/1 R3/R1R/2 R2 R1/R2R/5 R1/R2L/1 R1/R2R/3 R3/R2R/1 R3/R2R/1 R2R R3L [(R1,2);(R2,1);(R3,0)] [(R1,3);(R2,0);(R3,1)] [(R1,4);(R2,1);(R3,0)] [(R2,0);(R3,1)] R3 R1/R3L/2 R1/R3L/4 R2/R3L/1 Every 30 sec : advertisement After 180 sec of no adv.: link down Due to “counting to infinity” problem : Maximum distance limited to 16 BUT : current large networks can have more than 16 hops ! ==> only for small networks (16 hops = “infinity”) router/interface/distance Network Layer RIP Table processing RIP routing tables managed by application-level process called route-d (daemon) advertisements sent in UDP packets, periodically repeated routed routed Transprt (UDP) network (IP) link physical Transprt (UDP) forwarding table forwarding table network (IP) link physical Network Layer 4-72 Link-State Routing Protocol : OSPF Each router obtains an overview of the network topology in a link state database (exchange of link-state (LS) packets) From this topology (link state database) each node calculates the shortest path (Dijkstra) to all destinations From the shortest path the next hop is known to reach a certain destination This next hop is used to build the routing table OSPF : Open Shortest Path First “open”: publicly available OSPF advertisement carries one entry per neighbor router Advertisements disseminated to entire AS (via flooding) Network Layer Carried in OSPF messages directly over IP (rather than TCP or UDP) Link-State Packets Compose link-state packets Same source router and same sequence number ==> discard Same source router and older sequence number ==> discard Flood the link-state packets Use sequence numbers [(BC,1),(BD,1),(AB,1)] A B E D C Network Layer Link-State Routing Protocol Overview Router C : Link-State Database [AB,AE] incoming link state packets [AB,BD,BC] [BD,CD,DE] [AE,DE] Link AB AE BD BC CD DE Cost 1 1 1 1 1 1 knowledge of network topology From A A B B D D Dijkstra : shortest paths A B C Router C : Routing Table Dest. E D A B D E Next hop B Direct Direct D Interface BC BC CD CD Network Layer OSPF “advanced” features (not in RIP) Security: all OSPF messages authenticated (to prevent malicious intrusion) Multiple same-cost paths allowed (only one path in RIP) For each link, multiple cost metrics for different TOS (e.g., satellite link cost set “low” for best effort; high for real time) Integrated uni- and multicast support: Multicast OSPF (MOSPF) uses same topology data base as OSPF Hierarchical OSPF in large domains. Network Layer 4-76 Hierarchical OSPF backbone routers area border routers (AS) boundary router BACKBONE [(10.25.11.0/24,3);(10.20.15.0/24,3)] [(10.10.0.0/16,3)] AREA 3 AREA 1 internal routers 10.10.6.0 /24 AREA 2 10.10.2.0 /24 10.10.3.0 /24 aggregation possible Backbone = AREA 0 Between areas : always via backbone (“tree”) One border router may serve multiple areas One area may use multiple border routers 10.25.11.0 /24 10.20.15.0 /24 NO aggregation possible Network Layer 4-77 Hierarchical OSPF Two-level hierarchy: local area, backbone. Link-state advertisements only in area each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. Internal Routers Area border routers: “summarize” distances to nets in own area, advertise to other Area Border routers. Backbone routers: run OSPF routing limited to backbone. Boundary routers: connect to other AS’s. Network Layer 4-78 Chapter 4 outline 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol 4.5 Routing in the Internet 4.5.1 Intra-AS routing: RIP and OSPF 4.5.2 Inter-AS routing: BGP 4.6 What’s Inside a Router? 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility Network Layer 4-79 Internet inter-AS routing: BGP Autonomous System (has AS Number) OSPF BGP BGP BGP BGP RIP RIP OSPF BGP OSPF Stub AS Multi connected AS (but no transit allowed) Alternative : Use of default route (no BGP required) AS Belnet = multiple domains Network Layer 4-80 (e.g. UGent, KULeuven, VUB, …) I-BGP and E-BGP E-BGP I-BGP E-BGP I-BGP E-BGP E-BGP E-BGP I-BGP : used to distribute BGP information between Border gateways from single AS only edge routers involved in BGP Network Layer 4-81 BGP : Example 12 77/8 132.2/16 AS numbers : 1-65535 (65412-65535 : private) Example : Belnet : 2611 AS 54 E-BGP I-BGP 12/8 AS 54, 88 133.12/16 157.193/16 201.12.12/24 146.123/16 12/8 133.12/16 201.132.15/24 201.12.12/24 54 AS 88 157.193/16 146.123/16 88 201.132.15/24 Stub AS : in general no AS number 157.193/16 146.123/16 201.132.15/24 NLRI : Network Layer Reachability Information Network Layer 4-82 Internet inter-AS routing: BGP BGP4 (Border Gateway Protocol): the de facto standard Path Vector protocol: similar to Distance Vector protocol each Border Gateway broadcasts to neighbors (peers) entire path (i.e., sequence of AS’s) to destination (more general : NLRI information) BGP announces routes to networks (CIDR enabled!), not individual hosts Network Layer 4-83 BGP operation What does a BGP router do? Receiving and filtering route advertisements from directly attached neighbor(s). Sending route advertisements to neighbors Route selection. To route to destination X, which path (of several advertised) will be taken? Filling routing table complex : based on AS_path, weight attribute, local preference attribute, … Network Layer 4-84 BGP operation Suppose: gateway X send its path to peer gateway W W may or may not select path offered by X cost, policy (don’t route via competitors AS), loop prevention reasons. If W selects path advertised by X, then: Path (W,Z) = W, Path (X,Z) Note: X can control incoming traffic by controlling its route advertisements to peers: e.g., don’t want to route traffic to Z -> don’t advertise any routes to Z Network Layer 4-85 BGP messages BGP messages exchanged using TCP. BGP messages: OPEN: opens TCP connection to peer and authenticates sender UPDATE: advertises new path (or withdraws old) KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request NOTIFICATION: reports errors in previous msg; also used to close connection Network Layer 4-86 Policy based routing : example 1 12 54 12/8 133.12/16 201.12.12/24 AS 54 12/8 88 133.12/16 201.12.12/24 AS 88 : Dual homed but no transit do not forward info from AS 54 Network Layer 4-87 Policy based routing : example 2 77/8 132.2/16 12 54 88 134 12/8 AS 54 133.12/16 12/8 AS 54, 12 201.12.12/24 133.12/16 77/8 AS 54, 12 AS 54 201.12.12/24 132.2/16 77/8 12/8 132.2/16 133.12/16 201.12.12/24 AS 54 transit but only when paid do not forward AS 12 AS 134 Network Layer 4-88 BGP in practice: BNIX peering point Belnet : - support of research/education networks - support of BNIX BNIX : Belgian National Internet eXchange - place where ISP’s can peer - connected to >40 ISP’s (see below) - peering not full mesh (see next) - other examples : AMS-IX (Nl), SFINX (Fr), LINX (UK), … Organization KPN Nederland Versatel UUnet BELNET AT&T Arcor AG & Co Tiscali PSInet NETnet T-Systems Level3 Easynet BT Ignite Europe X-router Skynet Perceval Opentransit BNIX 194.53.172.71 194.53.172.115 194.53.172.78 194.53.172.65 194.53.172.77 194.53.172.109 194.53.172.97, 194.53.172.105 194.53.172.82 194.53.172.75 194.53.172.113 194.53.172.102 194.53.172.96,194.53.172.98 194.53.172.112 194.53.172.124 194.53.172.81 194.53.172.80 194.53.172.99 MBNIX BNIX6 194.53.172.254 3FFE:80B0:1000:0:2E0:F7FF:FE25:582B 3FFE:80B0:1000:0:230:96FF:FEE6:DC00 3FFE:80B0:1000:0:204:DDFF:FE08:F10 Network Layer 4-89 3FFE:80B0:1000:0:2D0:BBFF:FE28:7800 BGP : example of peering table BNIX Not a full mesh ! 4: IPv4 peering 6: IPv6 peering M: Multicast peering # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ISP AS BELNET 2611 UPC/chello 6830 Belgacom 6774 Wanadoo 8277 Easynet 4589 RealROOT 28747 ProServe B.V. 21155 Perceval 5463 Cybernet 13226 XS4ALL Belgium 8201 Openweb 20650 AT&T 2686 Mobistar 12493 Planet Technologies 8737 Brutele 12392 Skynet 5432 LambdaNet 13237 EDPNet 9031 C&W Belgium 6696 Colt 8220 Tiscali 3257 HostIt 9166 M/6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 M6 M6 M6 M6 4 6 4 4 4 4 4 4 4 4 4 4 4M 4 6 4 4 M6 M6 M6 M6 6 M6 6 4 4 4 4 4 4 4 4 4 4 4 M 4M 4 M6 M6 M6 M 6 4 4 4 4 4 4 4M 4 4 4 4 4 4 4 4 4 M6 M6 M6 M 6 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 6 4 6 6 6 4 6 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 M6 M6 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 6 6 6 4 4 6 4 4 4 4 4 4 4 4 4 4 4 4 4 6 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 M 4 4M 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 M 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 M M M 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 6 6M 4 4 4 6 4 4 4 4 4 4 4 4-90 Network Layer 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 BGP : traffic in BNIX > 100% traffic increase in one year Network Layer 4-91 Active BGP entries BGP : active BGP entries 100.000 90 Date 00 (information from Australian BGP router : bgp.potaroo.net) Trends : - increase : smaller domains used (more AS’s), more meshed, … Network Layer - improved by CIDR (introduced in 1994-1995) 4-92 AS’s used BGP : number of AS’s 10.000 97 00 Date 03 If this continues, in a few years time no more AS numbers available switch to 32 bit addresses for AS’s (now 16 bit) ?Network Layer 4-93 total address space advertised BGP : total address space advertised 109 00 Date 03 Network Layer 4-94 total address space advertised (%) BGP : total address space advertised (%) 25% 00 Date About 30% of all IPv4 addresses advertised 03 Network Layer 4-95 Why different Intra- and Inter-AS routing ? Policy: Inter-AS: admin wants control over how its traffic is routed, who routes through its net. Intra-AS: single admin, so no policy decisions needed Scale: hierarchical routing saves table size, reduced update traffic Performance: Intra-AS: can focus on performance Inter-AS: policy may dominate over performance Network Layer 4-96 Chapter 4 outline 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol 4.5 Routing in the Internet 4.6 What’s Inside a Router 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility Network Layer 4-97 Table of contents 4.1 Introduction and Network Service Models 4.4 The Internet (IP) Protocol 4.4.1 IPv4 addressing 4.4.2 Moving a datagram from source to destination 4.4.3 Datagram format 4.4.4 IP fragmentation 4.4.5 ICMP: Internet Control Message Protocol 4.4.6 DHCP: Dynamic Host Configuration Protocol 4.4.7 NAT: Network Address Translation 4.5 Routing in the Internet 4.5.1 Intra-AS routing: RIP and OSPF 4.5.2 Inter-AS routing: BGP Outline Table of contents 2 7 8 26 40 42 45 51 51 62 62 79 97 98 Network Layer 4-98