250 likes | 256 Views
Internet. Foreleser: Carsten Griwodz Email: griff@ifi.uio.no. Address Resolution. Address Resolution. Addressing levels. Logical address e.g. www.ifi.uio.no. Domain Name System. Address resolution. Internet address e.g. 129.31.65.7. ?. Netadapter address
E N D
Internet Foreleser: Carsten Griwodz Email: griff@ifi.uio.no 1
Address Resolution • Addressing levels Logical address e.g. www.ifi.uio.no Domain Name System Address resolution Internet address e.g. 129.31.65.7 ? Netadapter address e.g. Ethernet address 00:08:74:35:2b:0a • Host identification and routing specification within a subnetwork • based on the (local) physical network addresses of the end systems • e.g. station address of the adapter card • Problem • Different address styles for different layer 2 protocols • IP address must be mapped onto the physical network address, 48 bit for Ethernet • Direct mapping possible for IPv6 • But impossible for IPv4
Address Resolution: Methods • Address resolution in • Source ES, if destination ES is local (direct routing) • Gateway, if destination ES is not local • Solutions • Direct homogeneous Addressing • if the physical address can be changed by the user • physical address = Hostid of the IP address • Only possible if physical address is also longer than hostid • If the physical address is pre-defined or if it has to have a different format, one of the following has to be used • a mapping table from the configuration data base (IPaddr HWaddr), • e.g. in the Gateway, • may become maintenance nightmare • the Address Resolution Protocol (ARP) • mainly applied in LANs with broadcasting facility
Address Resolution Protocol (ARP) • Process • Broadcast ARP request datagram on LAN • including receiver’s IP address (desired value) • sender’s physical (HW) and IP address (IP) • Every machine on LAN receives this request and checks address • Reply by sending ARP response datagram • machine which has requested address responses • including the physical address • Enter the pair (I,P) into buffer for future requests
ARP Request ARP Response source source @IP: 9.228.50.8 @IP: 9.228.50.3 @IP: 9.228.50.3 @HW: 0xaa @HW: 0xa3e @HW: 0xa3e target target @IP: 9.228.50.8 @IP: 9.228.50.3 @HW: @HW: 0xaa Address Resolution Protocol (ARP) H H H H H H
Address Resolution Protocol (ARP) • Process • Broadcast ARP request datagram on LAN • including receiver’s IP address (desired value) • sender’s physical (HW) and IP address (IP) • Every machine on LAN receives this request and checks address • Reply by sending ARP response datagram • machine which has requested address responses • including the physical address • Enter the pair (I,P) into buffer for future requests • Refinement • The receiver of the ARP request stores the sender’s (I,P) pair in its cache • Send own table during the boot process (but may be too old) • Entries in ARP cache should time out after some time (few minutes)
Address Resolution Protocol (ARP) • End system not directly available by broadcast • Example: ES 1 to ES 4 • ARP would not receive a response • Ethernet broadcast is not rerouted over a router • Solution 1: proxy ARP • the local router knows all remote networks with their respective routers • responds to local ARP • local ES 1 sends data for ES 4 always to the local router, this router forwards the data (by interpreting the IP address contained in the data) • Solution 2: remote network address is known • local ES 1 sends data to the appropriate remote router • local router forwards packets
RARP Request RARP Response source source @IP: @IP: 9.228.50.3 @IP: 9.228.50.3 @IP: unknown @HW: 0xa3e @HW: 0xaa @HW: 0xa3e @HW: 0xaa target target @IP: @IP: 9.228.50.8 @HW: 0xaa @HW: 0xaa Reverse Address Resolution Protocol (RARP) • Retrieve Internet address from knowledge of hardware address H H H H H H • RARP server responds • RARP server has to be available on the LAN • Application: diskless workstation boots over the network
Dynamic Host Configuration Protocol (DHCP) • DHCP has largely replaced RARP (and BOOTP) • extends functionality • DHCP • simplifies installation and configuration of end systems • allows for manual and automatic IP address assignment • may provide additional configuration information (DNS server, netmask, default router, etc.) • Client broadcasts DHCP DISCOVER packet • server answers • DHCP server is used for assignment • request can be relayed by DHCP relay agent, if server on other LAN • Address is assigned for limited time only • before the ’lease’ expires, client must renew it • allows to reclaim addresses of disappearing hosts
IP Routing 11
IP Routing: Internal and External Routing • Direct Routing/ Interior Protocols: • Both source and destination ES are located in the same subnetwork • source ES sends datagram to the destination ES • identification done by the local address mapping • routing is completely defined by the subnetwork routing algorithm N0 N1 N4 N5 N2 N3 • Indirect Routing/Exterior Protocols: • Source and destination ES are located on different networks • source ES sends datagram to the next router • each router determines the next router on the path to the destination ES • routing decision is based only on • the netid part of the Internet address, i.e. hostid is not used
40.0.0.7 30.0.0.6 20.0.0.5 20.0.0.6 30.0.0.7 10.0.0.5 To reach hoston network Route to this address Routing table of G 20.0.0.0 Deliver direct 30.0.0.0 Deliver direct 10.0.0.0 20.0.0.5 Network 10.0.0.0 Network 20.0.0.0 40.0.0.0 Network 30.0.0.0 30.0.0.7 Network 40.0.0.0 F G H IP Routing • Routing tables • Routers may have incomplete information • Default paths
IP Routing: Initial Gateway-to-Gateway Protocol (GGP) • Core Gateways • connect LANs to the backbone, know the routes to all networks • exchange routing information with each other • Gateway-to-Gateway Protocol (GGP): • distributed routing definition (group "Distance-Vector-Procedure") • metrics: simply by distance • Problems: particularly poor scalability • several backbones • not all networks are connected directly to the backbone • all Gateways communicate with each other Original implementation ARPANET G1 Gn G2 … Local net n Local net 1 Local net 2
IP Routing: Autonomous Systems • Hidden networks Core gateways AS boundary router G1 Autonomous System Local net 1 G2 G3 Local net 4 Local net 2 Local net 3 G4 • Core gateways have to be informed about hidden networks • Autonomous systems (AS) • Internet domains
Gi IP Routing: Autonomous Systems • Types of ASs • Stub domains • source & sink only • Multiconnected domain • No through traffic • Transit domains • interconnect domain Core gateways G1 G2 Gn Autonomous system Autonomous system Autonomous system … • Autonomous systems are administrative entities • Collects routing information on networks in the AS • Defines boundary routers (also called Exterior Gateways) • that transmit routing information to other autonomous sys. • Boundary routers • Transmits information about network reachability only into its own AS • Reason: each AS shall control exactly, to whom the information about reachability is given to
Other variants e.g. HELLO by Dave Mills distributed routing algorithm distance: Delay requires synchronized clocks In general: intradomain routing individual solutions possible Presently preferred procedures Routing Information Protocol (RIP), old Open Shortest Path First (OSPF) Interior Gateway Routing Protocol (IGRP) and Enhanced IGRP (EIGRP) Interior Gateway Protocol IGP1 IGPx EGP G1 Autonomous System x Autonomous System 1 Gx IGP1 IGPx
Routing Information Protocol (RIP) • Background (regarding the originally used protocol) • developed as a part of Berkeley UNIX • since 1988, RIP Version 1, RFC 1058 • Principle • Distributed routing algorithm: Distance-Vector-Procedure • i.e. • IS periodically sends a listcontaining estimated distances to each destination to its neighbors • distance • number of hops: 0 .. 15 (15 corresponds to infinite) • periodical • every 30 sec; after 180 sek without packet distance infinite • RIP Version 2 • G. Malkin, RFC 1387, 1388 and 1389 (RIP-MIB) • Uses multicast if necessary to distribute data • Not broadcast (so that all ES also receive this) • Networks without broadcast or multicast (ISDN, ATM) • “Triggered" updates • To be sent only if the routing table changes
OSPF no. Meaning 0 Normal service 2 Minimize financial cost 4 Maximize reliability 8 Maximize throughput 16 Minimize delay Open Shortest Path First (OSPF) • Background: since 1990 Internet Standard, RFCs 1247, 2178 • Transition from vector-distance to link-state-protocol • Principle (link-state-protocol) • IS measures "distance" to the immediately adjacent IS, distributes the information, calculates the optimal route • determine the address of adjacent IS • measure the "distance" (delay, ..) to adjacent IS • OSPF permits differing metrics • selection per packet possible (RFC 1349) • process local link-state information as a packet • distribute information to all adjacent IS by flooding • compute route from the information of all IS e.g. with Dijkstra’s "shortest path first" algorithm name "Open Shortest Path First“
For large autonomous systems AS substructure AS AS backbone area Area Router classes AS boundary routers Backbone routers Area border routers Internal routers To other AS To other AS Open Shortest Path First (OSPF)
transform to graph H H H D D E E D E G G G B B H I I B I D E G B A C C I A A C F F A C F LAN N F Open Shortest Path First (OSPF) • Adjacency • LSR measures distance to all neighbours • OSPF measures distance to all adjacent nodes • If several routers are connected by a LAN • One is designated router • All other routers on the LAN are adjacent only to it • It is adjacent to all others LAN are represented as star configurations
Core gateways AS3 AS1 AS2 IG1 IG2 NW Exterior Gateway Protocol: Circumstances • Requirements, basic conditions • political • economical • security-related • Requirement examples • 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 • Exchange information on accessibility • including at least one Core Gateway • possibly with other AS
Exterior Gateway ProtocolBorder Gateway Protocol (BGP) • Previously: Internet Exterior Gateway Protocol (RFC 1654) • Now: Border Gateway Protocol (RFC 1771, 1772, 1773) is de-facto standard • Configurations • Possibility to have several Exterior Gateways per AS • Variations • Branch (topology): • all of the external traffic is routed over this/a single, external router • Multiconnected networks • linked to many end systems • can pass on traffic if necessary • Transit networks • networks with increased capacity and • often linked to many AS • Demands • To allow for routing path decisions • e.g. to prefer to send traffic via own country • e.g. not to send traffic through certain companies • Routing policy can not only be based on a "minimal distance"
Exterior Gateway ProtocolBorder Gateway Protocol (BGP) • Algorithm • Fundamentals: based on distance vector mechanism, where • IS sends periodically to its neighbours a list containing • the estimated distances from itself to all known destinations • BGP uses distance path mechanism • Related to distance vector • But without count-to-infinity problem • IS sends periodically a list to its neighbours containing • estimated distance and preferred Path from itself to each destination for a specified block of reachable IP addresses • Receiving IS evaluates path • Distance • Policy compliance notion of a path / of how to reach other routers is distributed but, no criteria for selecting a route is distributed • each BGP router must have its own criteria, i.e. policy • e.g. never send using certain AS • Remarks • Big updates • But only a limited number of routers
IP Protocol Support in an IP Router BGP RIP SNMP • Network layer protocols • IP (Internet Protocol) • ARP (Address Resolution Protocol), • RARP (Reverse ARP) • ICMP (Internet Control Message Protocol) • IGMP (Internet Group Management Protocol) TCP UDP EGP OSPF ICMP IGMP ARP RARP SNAP LLC-1 • Routing protocols • RIP (Routing Information Protocol) • BGP (Border Gateway Protocol) • EGP (Exterior Gateway Protocol) • OSPF (Open Shortest Path First) • Network management protocols • SNMP (Simple Network Management Protocol) • Transport protocols • UDP (User Datagram Protocol) • TCP (Transmission Control Protocol) • and • SNAP (Subnet Access Point) • LLC (Logical Link Control)