Mapping Internet to Physical Addresses 2 machines on


















- Slides: 18
Mapping Internet to Physical Addresses ¬ ¬ 2 machines on a physical network can only communicate if they know each other’s physical address (PA) How does a router or host map an IP addr. to a PA? 2 machines with IP addresses IA and IB and physical addresses PA and PB Devise a scheme so that high level programs can only work with IP address © MMII JW Ryder CS 428 Computer Networks 1
Address Mapping ¬ ¬ Must be done all along path from source to destination 2 cases Last step of delivering a packet v Delivery to host on physical network v All other steps v Delivery to router on physical network Problem known as the ‘address resolution problem’ v ¬ © MMII JW Ryder CS 428 Computer Networks 2
Physical Addresses ¬ ¬ ¬ 2 types Ethernet type - large fixed address Pro. Net type - token ring - small easily configurable Resolution difficult for Ethernet, easy for Pro. Net uses small intergers, allows user to choose the PA when installing the board © MMII JW Ryder CS 428 Computer Networks 3
Physical Addresses ¬ ¬ ¬ Key - choose IP and PA that have some part of them overlapping User has choice when configuring card! Example: 192. 5. 48. 3 and PA 3 Computing PA from IP becomes easy PA = f (IA) © MMII JW Ryder CS 428 Computer Networks 4
Dynamic Binding - ARP ¬ ¬ No hope of encoding 48 bit addr into 32 bit IP addr Use the Ethernet broadcast ability to solve the problem No central DB and new hosts can be dynamically added Host A wants to resolve IP addr IB © MMII JW Ryder CS 428 Computer Networks 5
ARP ¬ ¬ Host A broadcasts a special packet that asks the host with IP addr IB to respond with its PA PB All hosts receive the packet. Only B recognizes its IP addr Sends a reply with its PA Host A uses the received PA to send the packet to host B © MMII JW Ryder CS 428 Computer Networks 6
ARP ¬ ¬ ¬ See figure 5. 1 on page 80 To reduce communication costs hosts keep ‘ARP caches’ to maintain recently acquired IP to PA binding information Cache information can become ‘stale’ Assume hosts A and B. Over time B crashes or leaves No indication that host B not there Use timeouts, typically 20 mins. © MMII JW Ryder CS 428 Computer Networks 7
IP Addressing ¬ ¬ ¬ All hosts on a given physical network share same prefix network + host Splitting IP addrs keep routing tables reasonable sizes Class A - 8 network + 24 host Class B - 16 network + 16 host Class C - 24 network + 8 hosts © MMII JW Ryder CS 428 Computer Networks 8
Addressing ¬ Important - Individual sites have the right to modify addresses and routes within their intranet as long as it remains invisible to other sites © MMII JW Ryder CS 428 Computer Networks 9
Addressing ¬ ¬ Very important to have multiple physical networks use the same IP network address To minimize the use of class B addresses we need to use as many class C addresses as possible © MMII JW Ryder CS 428 Computer Networks 10
Transparent Routers ¬ ¬ A network using a class A addr can be extended through a simple trick Arrange a physical network to multiplex several host connections through a single host port See figure 10. 1 on page 149 LAN does NOT have its own IP prefix © MMII JW Ryder CS 428 Computer Networks 11
Transparent Routers ¬ ¬ ¬ Hosts attached to it are assigned addresses as if they are directly connected to the WAN Transparent router de-multiplexes datagrams that arrive from the WAN assigning them to appropriate hosts Uses a table of addresses © MMII JW Ryder CS 428 Computer Networks 12
Transparent Routers ¬ ¬ ¬ Divide IP addresses into parts and encode information into unused parts ARPANET is 10. 0 ==> 10. p. u. i Network (10) Port on destination (p) Destination (i) (u) is UNUSED !!! © MMII JW Ryder CS 428 Computer Networks 13
Transparent Routers ¬ ¬ Transparent router can assign one host 10. 1. 1. 5 and 10. 1. 2. 5 “Same” IP addr for 2 hosts on 2 separate networks Advantage - Require fewer network addresses because LANs can share IP prefix Disadvantage - Only works with class A on ARPANET © MMII JW Ryder CS 428 Computer Networks 14
Proxy ARP ¬ ¬ aka promiscuous ARP, the ARP hack Maps single IP prefix into 2 physical networks See figure 10. 2 on page 150 Applies only to networks that use ARP to bind internet addresses to PAs © MMII JW Ryder CS 428 Computer Networks 15
Proxy ARP ¬ ¬ With 2 networks A and B and 1 router R R answers ARP requests on each network for hosts on the other network It gives its PA as the addr matching PB then routes datagrams correctly “In essence, R lies about IP to physical address binding” © MMII JW Ryder CS 428 Computer Networks 16
Subnet Addresses ¬ ¬ ¬ Subnetting most common of 3 techniques Subnetting is a required part of IP addressing Main router is interface to WAN Routes datagrams to specific internal physical networks See figure 10. 3 on page 152 © MMII JW Ryder CS 428 Computer Networks 17
Subnets ¬ ¬ Example class B addr 128. 10. 0. 0 Break internal network into several ‘independent’ class C networks 128. 10. 1. 0 - 128. 10. 2. 0 - 128. 10. n. 0 Gateway to WAN upon receiving datagram discerns which local network gets packet © MMII JW Ryder CS 428 Computer Networks 18