Internet Foreleser Carsten Griwodz Email griffifi uio no

  • Slides: 41
Download presentation
Internet Foreleser: Carsten Griwodz Email: griff@ifi. uio. no 06. Apr. 2005 1 INF-3190: Internet

Internet Foreleser: Carsten Griwodz Email: griff@ifi. uio. no 06. Apr. 2005 1 INF-3190: Internet

TCP NF S TELNET FTP TP TP HT SM UDP ATM 06. Apr. 2005

TCP NF S TELNET FTP TP TP HT SM UDP ATM 06. Apr. 2005 LLC & MAC physical Application layer Transport layer Network layer IP + ICMP + ARP WANs RT P Internet Protocol Stack and Some Well-known Protocols LANs Data link and Physical layer MANs 2 INF-3190: Internet

IP Routing 06. Apr. 2005 3 INF-3190: Internet

IP Routing 06. Apr. 2005 3 INF-3190: Internet

IP Routing n Routing tables Networ k 10. 0 20. 0. 0. 5 40.

IP Routing n Routing tables Networ k 10. 0 20. 0. 0. 5 40. 0. 0. 7 30. 0. 0. 6 Networ k k k F G H 20. 0. 0. 30. 0. 0. 40. 0 0 0 10. 0. 0. 5 30. 0. 0. 7 20. 0. 0. 6 Routing table of G n To reach host Route to this on network address 20. 0 Deliver direct 30. 0 Deliver direct 10. 0 20. 0. 0. 5 40. 0 30. 0. 0. 7 Routers may have incomplete information Default paths 06. Apr. 2005 4 INF-3190: Internet

IP Routing: Historical Original implementation ARPANET G 1 Local net 1 n … Local

IP Routing: Historical Original implementation ARPANET G 1 Local net 1 n … Local net 2 Gn Local net n Routers: “Core Gateways” n n n Connect LANs to the backbone, know the routes to all networks Exchange routing information with each other Gateway-to-Gateway Protocol (GGP): n n n G 2 Distance vector routing metric: physical distance Problems n n n Today several backbones Today not all networks are connected directly to the backbone In GGP all gateways communicate with each other 06. Apr. 2005 5 INF-3190: Internet

IP Routing: Autonomous Systems n Hidden networks Core gateways AS boundary router G 1

IP Routing: Autonomous Systems n Hidden networks Core gateways AS boundary router G 1 Local net 1 G 2 Local net 2 Autonomous System G 3 Local net 3 G 4 Local net 4 Core gateways have to be informed about hidden networks Autonomous systems (AS) Internet domains n Boundary routers are also called Exterior gateways n 06. Apr. 2005 6 INF-3190: Internet

IP Routing: Autonomous Systems AS AS AS n n AS AS Many autonomous systems

IP Routing: Autonomous Systems AS AS AS n n AS AS Many autonomous systems (~70000) n n AS AS AS Have different sizes Exchange services with each other as equals or as provider/customer Have different relations to each other Every AS has a unique number Every AS must know a route to every network 06. Apr. 2005 7 INF-3190: Internet

IP Routing: Autonomous Systems AS AS n AS AS Stub domain n AS AS

IP Routing: Autonomous Systems AS AS n AS AS Stub domain n AS AS AS One AS, several networks Networks may have different owners, but in the same AS Multiconnected domain n Like stub domain Connected to more than one other AS No through traffic 06. Apr. 2005 8 INF-3190: Internet

IP Routing: Autonomous Systems AS AS n AS AS Peering n n AS AS

IP Routing: Autonomous Systems AS AS n AS AS Peering n n AS AS AS Bi-lateral agreement between two directly connected ASes Exchange routes to all subnetworks Typically don’t offer global routes to each other Transit domains n n Offer connection service to customer ASes Offer global routes to customer AS 06. Apr. 2005 9 INF-3190: Internet

IP Routing: Autonomous Systems AS AS n AS AS Tier-1 domain n n AS

IP Routing: Autonomous Systems AS AS n AS AS Tier-1 domain n n AS AS AS Top level networks Advertise all global routes Customer to no-one No-pay agreements with their peers Internet Exchange Point n n n Non-profit organisation Large centers for interconnecting ASes Keeps peering costs low for smaller ASes 06. Apr. 2005 10 INF-3190: Internet

IP Routing: Autonomous Systems n n Every AS has a unique number Every AS

IP Routing: Autonomous Systems n n Every AS has a unique number Every AS must know a route to every network Stub domain Multiconnected domain AS AS AS Peering AS AS AS AS Tier-1 domains Transit domains 06. Apr. 2005 Internet Exchange Point 11 INF-3190: Internet

IP Routing: Internal and External Routing n Direct Routing/ Interior Protocols: n n n

IP Routing: Internal and External Routing n Direct Routing/ Interior Protocols: n n n N 0 Both source and destination end systems are located in the same subnetwork source end system sends datagram to the destination end system identification done by the local address mapping routing is completely defined by the subnetwork routing algorithm N 1 N 2 N 4 N 3 N 5 Indirect Routing/Exterior Protocols: n Source and destination end system are located on different networks n n n source end system sends datagram to the next router each router determines the next router on the path to the destination end system routing decision is based only on n 06. Apr. 2005 the network and subnetwork part of the Internet address, i. e. host part not used 12 INF-3190: Internet

IP Routing: Autonomous Systems EGP Autonomous System x Gx G 1 Autonomous System 1

IP Routing: Autonomous Systems EGP Autonomous System x Gx G 1 Autonomous System 1 Place physically close to each other n ASs are administrative entities n n n Collects routing information on networks in the AS Defines boundary routers that transmit routing information to other ASs Boundary routers will filter routes n n Expose information about network reachability to other ASs May transmit information about other reachable ASs (tier-1 domains, transit domains) ISP will offer customers access to routes its sees via peerings and transits ISP will offer peers routes to customers, no routes from transits or other peers 06. Apr. 2005 13 INF-3190: Internet

Exterior Gateway Protocol n Requirements, basic conditions n n n AS AS political economical

Exterior Gateway Protocol n Requirements, basic conditions n n n AS AS political economical security-related AS AS AS Requirement examples n n n AS AS AS to avoid certain autonomous systems to avoid certain countries to stay within one country (before going via foreign country) data of company A should not to pass through company B 06. Apr. 2005 14 INF-3190: Internet

Border Gateway Protocol (BGP) n Previously: Internet Exterior Gateway Protocol (RFC 1654) Now: Border

Border Gateway Protocol (BGP) n Previously: Internet Exterior Gateway Protocol (RFC 1654) Now: Border Gateway Protocol (RFC 1771, 1772, 1773) is de-facto standard n BGP uses distance path mechanism n n Related to distance vector routing n But without count-to-infinity problem n IS sends periodically a list to its neighbours containing n Receiving IS evaluates path estimated distance and preferred Path from itself to each destination for a specified block of reachable IP addresses n n Distance Policy compliance notion of a path / of how to reach other routers is distributed but, no criteria for selecting a route is distributed n n Each BGP router must have its own criteria, i. e. policy Remarks n n Big updates But only a limited number of routers 06. Apr. 2005 15 INF-3190: Internet

Interior Gateway Protocol IGPx Autonomous System x IGPx n Gx G 1 Autonomous System

Interior Gateway Protocol IGPx Autonomous System x IGPx n Gx G 1 Autonomous System 1 IGP 1 In general: intradomain routing n n EGP IGP 1 individual solutions possible Presently preferred procedures n n Routing Information Protocol (RIP): old, retiring Intermediate System – Intermediate System (IS-IS): long time favorite Open Shortest Path First (OSPF): scales better than IS-IS Interior Border Gateway Protocol (i. BGP): combined with IS-IS and OSPF 06. Apr. 2005 16 INF-3190: Internet

Routing Information Protocol (RIP) n Background (regarding the originally used protocol) n n n

Routing Information Protocol (RIP) n Background (regarding the originally used protocol) n n n Principle n n developed as a part of Berkeley UNIX since 1988, RIP Version 1, RFC 1058 Distance Vector Routing Distance in number of hops, 15 is ∞ Periodic updates: 30 sec cycle, 180 sec with update ∞ RIP Version 2 n G. Malkin, RFC 1387, 1388 and 1389 (RIP-MIB) n n n Uses multicast if necessary to distribute data Not broadcast Networks without broadcast or multicast (ISDN, ATM) n n 06. Apr. 2005 “Triggered" updates To be sent only if the routing table changes 17 INF-3190: Internet

Open Shortest Path First (OSPF) n Background: since 1990 Internet Standard, RFCs 1247, 2178

Open Shortest Path First (OSPF) n Background: since 1990 Internet Standard, RFCs 1247, 2178 n n Transition from DVR to LSR Principle n n n Link State Routing Several possible distance metrics Metric selection per update packet possible (RFC 1349) OSPF no. 0 2 4 8 16 n n Meaning Normal service Minimize financial cost Maximize reliability Maximize throughput Minimize delay Distribute updates using flooding Routing tables created using Dijkstra’s "shortest path first" algorithm Name "Open Shortest Path First“ 06. Apr. 2005 18 INF-3190: Internet

Open Shortest Path First (OSPF) n n For large autonomous systems AS substructure n

Open Shortest Path First (OSPF) n n For large autonomous systems AS substructure n n To other AS AS AS backbone area Area Router classes n n AS boundary routers Backbone routers Area border routers Internal routers 06. Apr. 2005 To other AS 19 INF-3190: Internet

Open Shortest Path First (OSPF) n Adjacency n n LSR measures distance to all

Open Shortest Path First (OSPF) n Adjacency n n LSR measures distance to all neighbors OSPF measures distance to all adjacent nodes If several routers are connected by a LAN n n n One is designated router All other routers on the LAN are adjacent only to it It is adjacent to all others Abstraction leads to point-to-point links Required for Dijkstra’s algorithm H D E B A C H D G I F transform to graph A G I C F LAN 06. Apr. 2005 B E 20 INF-3190: Internet

Final remarks n IS-IS is similar to OSPF without n i. BGP is often

Final remarks n IS-IS is similar to OSPF without n i. BGP is often used to distribute tables for routing among ASs inside an AS n n areas Separate the issue from dynamics of IGP Not all routers inside an AS must carry the full external routing table n n n (working support for) Some routers talk i. BGP and have the full routing table Called route reflectors All route reflectors of an AS must be connected at all times They have route reflector clients that route all external traffic through them Multiconnected ASs want to save resources If two routes to a target AS exist … n … and policies allow it Hot potato routing n 06. Apr. 2005 21 INF-3190: Internet

Internet Protocol n IP n Defined for the first time in 1981 n n

Internet Protocol n IP n Defined for the first time in 1981 n n n J. Postel RFC 791, September 1981 Connectionless service n n Provide best-efforts service Without regard to whether n n n these machines are on the same network there are other networks in between Packet length n n 06. Apr. 2005 In theory: up to 64 k. Bytes In real life mostly approx. 1500 Bytes 22 INF-3190: Internet

IPv 4 Datagram Format Internet Network Layers Headers Version Protocol specific fields 0 1

IPv 4 Datagram Format Internet Network Layers Headers Version Protocol specific fields 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 06. Apr. 2005 Not in use Internet Protocol, version 4 Stream Protocol (ST, ST-II) Internet Protocol, version 6 IPv 77, TP/IX, CATNIP PIP n TUBA Not in use Not in use Version n n 23 IPv 4: dominant version IPv 6: upcoming successor to IPv 4 INF-3190: Internet

IPv 4 Datagram Format Version IHL Type of service D T R C n

IPv 4 Datagram Format Version IHL Type of service D T R C n n n 1 bit unused C (1 bit): low cost R (1 bit): high reliability T (1 bit): high throughput D (1 bit): low delay n Precedence (3 bit) n n 06. Apr. 2005 priority 0 (normal). . . 7 (network control) influences the queuing scheme (and not routing) 24 OLD definition n n Was ignored by routers Redefined by Diff. Serv INF-3190: Internet

IPv 4 Datagram Format Version IHL DS n DS Field n n Differentiated Services

IPv 4 Datagram Format Version IHL DS n DS Field n n Differentiated Services Field New definition 0 0 n Class selector codepoints n n If of the form xxx 000 Differentiated Services Codepoint n n n 06. Apr. 2005 n xxxxx 0 reserved for standardization xxxx 11 reserved for local use xxxx 01 open for local use, may be standardized later 25 NEW definition n Diff. Serv compliant n Not widely deployed yet INF-3190: Internet

IPv 4 Datagram Format Version IHL DS Total length Identification DM Fragment offset Time

IPv 4 Datagram Format Version IHL DS Total length Identification DM Fragment offset Time to live Protocol Header checksum Source address Destination Address n Protocol type of higher level protocol for transmission n n n 1– 2– 3– 4– 5– 6– … 06. Apr. 2005 ICMP Internet Control Message Protocol IGMP Internet Group Management Protocol GGP Gateway to Gateway Protocol IP IP in IP tunneling ST ST–II in IP tunneling TCP 26 INF-3190: Internet

IPv 4 Segmentation/Reassembly IP routers n n n Transparent segmentation Non-transparent segmentation Used in

IPv 4 Segmentation/Reassembly IP routers n n n Transparent segmentation Non-transparent segmentation Used in the Internet 06. Apr. 2005 27 INF-3190: Internet

IPv 4 Segmentation/Reassembly n Total length n n n Identification n n Unique for

IPv 4 Segmentation/Reassembly n Total length n n n Identification n n Unique for all segments of a datagram with same src/dst pair Flags n n n Length of the unsegmented datagram in bytes ≥ 576 bytes ≤ 65535 bytes DF (1 bit): don’t fragment MF (1 bit): more fragments Fragment offset n Offset of this fragment in the datagram in multiples of 8 bytes 06. Apr. 2005 28 INF-3190: Internet

IPv 4 Datagram Format Version IHL DS Total length Identification DM Fragment offset Time

IPv 4 Datagram Format Version IHL DS Total length Identification DM Fragment offset Time to live Protocol Header checksum Source address Destination Address Options (0 or more) Padding Data 06. Apr. 2005 29 INF-3190: Internet

IP Version 6 Objectives n To support billions of end systems n n n

IP Version 6 Objectives n To support billions of end systems n n n To reduce routing tables To simplify protocol processing n n simplified header security means integrated To support real-time data traffic n n n To be open for change (future) n n Addressing IPv 4 limitations flow label, traffic class To provide multicasting To support mobility (roaming) n Scalability To increase security n n longer addresses extension headers To coexist with existing protocols 06. Apr. 2005 30 Coexistance INF-3190: Internet

IPv 6 vs. IPv 4 Header Version IHL Type PRE of service To. S

IPv 6 vs. IPv 4 Header Version IHL Type PRE of service To. S Total length Identification DM Fragment offset Time to live Protocol Header checksum Source address (32 bit) Destination Address (32 bit) Options (0 or more) Version Priority Payload length Flow label Next header Hop Limit Source address (128 bit) Destination Address (128 bit) IPv 6 Header 06. Apr. 2005 31 INF-3190: Internet

IPv 6 Header Fields Version Priority Payload length Flow label Next header IPv 6

IPv 6 Header Fields Version Priority Payload length Flow label Next header IPv 6 Header Hop Limit n Priority n Source address n differentiation of sources lower number < lower priority Destination Address With flow control 0 1 2 3 4 5 6 7 Not characterized Filler Unattended Reserved Attended bulk transfer Reserved Interactive Internet management 06. Apr. 2005 Without flow control 8 9 10 11 12 13 14 15 Continuous rate traffic 32 INF-3190: Internet

Internet Control Message Protocol (ICMP) n History n n n J. Postel RFC 792,

Internet Control Message Protocol (ICMP) n History n n n J. Postel RFC 792, Sept. 1981 Purpose n to communicate network layer information n n mostly error reporting e. g. in ftp, telnet, http appears "destination network unreachable" ICMP origin, e. g. : n n n a router was unable to find the given destination address router sent back ICMP (Type 3) packet sending host received the packet, returned error code to TCP returned error code to application (e. g. ftp, telnet, http) between hosts, routers (and gateways) ICMP messages are sent as IP packets n i. e. the first 32 bits of the IP data field are ICMP headers 06. Apr. 2005 33 INF-3190: Internet

Internet Control Message Protocol (ICMP) n Header structure n Type n Code Checksum 16

Internet Control Message Protocol (ICMP) n Header structure n Type n Code Checksum 16 types, a. o. n n n Type destination or port or protocol unreachable fragmentation necessary but DF (don’t fragment) DF is set source route failed, redirect (for routing) echo-request and echo-reply (e. g. for "ping" program) source quench (packet for congestion control) Code n states cause if type is "destination unreachable" n n 06. Apr. 2005 e. g. net, host, protocol, port unreachable or fragmentation needed, source route failed 34 INF-3190: Internet

IPv 4 Addresses and Internet Subnetworks n Original global addressing concept for the Internet

IPv 4 Addresses and Internet Subnetworks n Original global addressing concept for the Internet n n n For addressing end systems and intermediate systems each network interface (not end system) has its own unique address 5 classes 7 Network A 0 B 10 C 11 0 1 1 11 06. Apr. 2005 24 Host 14 Network 16 Host 21 Network 8 Host 28 Multicast address 28 Reserved 35 INF-3190: Internet

IPv 4 Address and Internet Subnetworks n Networks grow and should be somehow structured

IPv 4 Address and Internet Subnetworks n Networks grow and should be somehow structured n n several networks instead of one preferable but getting several address areas is hard n n n since address space is limited e. g. , university may have started with class B address, doesn’t get second one Problem n class A, B, C refer to one network, not collection of LANs Allow a network to be split into several parts n n for internal use still look like single network to outside world 06. Apr. 2005 36 INF-3190: Internet

IPv 4 Address and Internet Subnetworks n Idea n e. g. address 129. 8.

IPv 4 Address and Internet Subnetworks n Idea n e. g. address 129. 8. 7. 2: Subnet mask: Subnet address: n n local decision for subdividing host share into subnetwork portion and end system portion 10 14 Network 6 Subnet 16 10 Host 1 00 0 0 00 1 0 00 0 1 00 0 0 11 10 0 0 00 0 1 0 & & 1 11 1 1 11 1 1 10 00 0 0 0 1 00 0 0 00 1 0 00 0 1 00 0 0 10 00 0 0 0 To write down subnet address with subnet mask use either 129. 8. 4. 0/255. 252. 0 or 129. 8. 4. 0/22 Use “subnet mask” to distinguish network and subnet part from host part Routing with 3 levels of hierarchy n Algorithm in router (by masking bits: AND between address and subnet mask): n n n 06. Apr. 2005 packet to another network (yes, then to this router) packet to local end system (yes, then deliver packet) packet to other subnetwork (yes, then reroute to appropriate router) 37 INF-3190: Internet

CIDR: Classless Inter. Domain Routing n Subnetting not good enough n Too many organizations

CIDR: Classless Inter. Domain Routing n Subnetting not good enough n Too many organizations require addresses n n in principle many addresses due to 32 -bit address space but inefficient allocation due to class-based organization n n class A network with 16 million addresses too big for most cases class C network with 256 addresses is too small most organizations are interested in class B network, but there are only 16384 (in reality, class B too large for many organizations) Large number of networks leads to large routing tables Introduction of CIDR (Classless Inter. Domain Routing) (RFC 1519) n CIDR Principle n to allocate IP addresses in variable-sized blocks n n e. g. , request for 2000 addresses would lead to n n (without regard to classes) assignment of 2048 address block starting on 2048 byte boundary but, dropping classes makes forwarding more complicated 06. Apr. 2005 38 INF-3190: Internet

CIDR: Classless Inter. Domain Routing n Search for longest matching prefix n if several

CIDR: Classless Inter. Domain Routing n Search for longest matching prefix n if several entries with different subnet mask length may match n n n then use the one with the longest mask i. e. , AND operation for address & mask must be done for each table entry Entries may be aggregated to reduce routing tables 194. 24. 0. 0/21 Router 194. 24. 8. 0/22 194. 24. 0. 0/19 Router Unassigned 194. 24. 16. 0/20 06. Apr. 2005 39 194. 24. 12. 0/22 Router INF-3190: Internet

IPv 6 Addresses 06. Apr. 2005 Prefix (binary) Usage Fraction 0000 0001 0000 010

IPv 6 Addresses 06. Apr. 2005 Prefix (binary) Usage Fraction 0000 0001 0000 010 0000 011 0000 1 0001 010 011 100 101 110 1111 110 1111 1110 11 1111 Reserved (including IPv 4) Unassigned OSI NSAP address Novell Netware IPX addresses Unassigned Provider-based addresses Unassigned Geographic-based addresses Unassigned Unassigned Link local use addresses Site local use address Multicast 1/256 1/128 1/32 1/16 1/8 1/8 1/8 1/16 1/32 1/64 1/128 1/512 1/1024 1/256 40 INF-3190: Internet

IPv 6 Addresses and Anycast n n n Provider based: approx. 16 mio. companies

IPv 6 Addresses and Anycast n n n Provider based: approx. 16 mio. companies allocate addresses Geographically based: allocation as it is today Link, site-used: address has only local importance (security, Firewall concept) n n Should make NAT (network address translation) useless Anycast definition n previously n n now (new) n n anycast send data to one member of a group n n n unicast, broadcast and multicast for example to the member which is the nearest one geographically i. e. a system within a pre-defined group is to be accessed Anycast application n n To search for the nearest web-server To locate the nearest router of a multicast group n 06. Apr. 2005 in order to participate in group communication 41 INF-3190: Internet