Presentation is loading. Please wait.

Presentation is loading. Please wait.

Scaling the Network Chapters 3-4 Part 2

Similar presentations


Presentation on theme: "Scaling the Network Chapters 3-4 Part 2"— Presentation transcript:

1 Scaling the Network Chapters 3-4 Part 2
Networking CS 3470, Section 1

2 Network Layer Functions
Addressing Globally unique address for each routable device Logical address, unlike MAC address Assigned by network operator Need to map to MAC address Forwarding From input port to appropriate output port in a router Routing Which path to use to forward packets from src to dest

3 Today Subnetting Forwarding with CIDR ARP and DHCP Protocols

4 The University of Adelaide, School of Computer Science
16 April 2018 Subnetting Add another level to address/routing hierarchy: subnet Subnet masks define variable partition of host part of class A and B addresses Subnets visible only within site Chapter 2 — Instructions: Language of the Computer

5 The University of Adelaide, School of Computer Science
16 April 2018 Subnetting R1 Routing Table Chapter 2 — Instructions: Language of the Computer

6 The University of Adelaide, School of Computer Science
16 April 2018 Subnetting Forwarding Algorithm D = destination IP address for each entry < SubnetNum, SubnetMask, NextHop> D1 = SubnetMask & D if D1 = SubnetNum if NextHop is an interface deliver datagram directly to destination else deliver datagram to NextHop (a router) Chapter 2 — Instructions: Language of the Computer

7 Longest-Prefix Match Suppose two network IDs exist:
1) /16 2) /24 Suppose you have destination IP of Both subnet mask & IP of 1 and 2 will yield match – what to do? Longest-prefix match – route to network with the most matching host bits.

8 The University of Adelaide, School of Computer Science
16 April 2018 Subnetting Notes Would use a default router if nothing matches Not necessary for all ones in subnet mask to be contiguous Can put multiple subnets on one physical network Subnets not visible from the rest of the Internet Chapter 2 — Instructions: Language of the Computer

9 Routing with CIDR Choices: A, B, C, D, E, F
The first thing we should do is convert the destination to hex: BA.DB.EE.F2 The first 8 bits of the host’s network ID do not match choices A, B, or C, so we can drop those. The remaining networks have 27 bits (for D) and 28 bits (for E) for the network address, so we know at least the first 24 bits in our destination address should match the first 24 bits of D or E. We see that’s only true for E. Now, let’s make sure E is right. Let’s get E’s subnet mask. E has 28 bits for the network ID, which is a subnet mask of FF.FF.FF.F0. We need to perform subnet mask “&” destination IP address. If it equals the net mask, we know we can route to E. FF.FF.FF.F0 & BA.DB.EE.F2 = BA.DB.EE.F0 It’s good! Our next hop is E.

10 Address Resolution IP address is virtual
Not understood by underlying physical networks IP packets need to be transmitted by the underlying physical network Address resolution Translating IP address to physical address Address Resolution Protocol (ARP) As mentioned earlier, IP address is virtual and need to be mapped to a physical address for delivering packets by a physical network. This translation of IP to physical addresses is called address resolution and this is achieved by ARP.

11 ARP A router has to know where to deliver packets on the local network
ARP is used to discover MAC addresses based on IP addresses arp who-has tell node31.ceee.lab arp reply is-at 00:60:08:ce:9d:3b arp who-has node31.ceee.lab tell arp reply node31.ceee.lab is-at 00:02:3f:b4:cd:87

12 ARP Cache Each computer maintains a cache table Exchanges ARP messages
IP address  hardware address mapping Only about computers on the same network Try out “/usr/sbin/arp –a” command Exchanges ARP messages To resolve IP addresses with unknown hardware addresses Encapsulated in DLL frame (e.g., Ethernet data frame) Let’s start the study of ARP by first introducing the concept of ARP cache. ARP cache is essentially a mapping table between IP address and the corresponding MAC address. In the simplest form, it is maintained by each individual machine. It is important to note that, the ARP cache only contains the IP addresses on the same network (and the similarly, ARP is only used to translate IP address on the same network to its corresponding MAC address. When a host needs to translate an IP address to the corresponding MAC address, it firsts check the ARP cache to see if the table contains the mapping, if it does, then the work is done. Otherwise, the machine needs to use the ARP protocol to find out the corresponding MAC address.

13 ARP Protocol When a node sends an IP packet
To another node on the same physical network Look up destination address in the ARP table If not found Broadcast a request to the local network Whose IP address is this? What info should the request message contain? When we want to deliver an IP packet to another node on the same physical network, we need to map the destination IP address to corresponding hardware address. First, we look up the arp cache. If an entry is found, then we can encapsulate the IP packet into local link layer packet with destination hardware address and transmit. If there is no entry found, in that case we need to broadcast an ARP request specifying the target IP address for which we don’t know the corresponding hardware address.

14 ARP Response The target node responds to sender (unicast?)
With its physical address Adds the requester into its ARP table (why?) On receiving the response Requester updates its table Other nodes upon receiving the request Refresh the requester entry if already there No action otherwise (why?) Table entries deleted if not refreshed for a while We can categorize the nodes in the local network into requester node, target node and all others. Lets see what each of them do in turn. The target node responds only to the sender with its hardware address. Why not broadcast the reply also? All others may not necessarily be interested in communicating with target node and a broadcast incurs processing overhead at every node in the network. The target node adds the requester’s IP and hardware addresses into its ARP cache (if not already there). Why? It is likely that target node would also send IP packets to the requester node later and so it makes sense to avoid an ARP request broadcast by the target node that time. The requester node on receiving the response, updates its ARP table. All other nodes, receive only the request not the reply. They check if the requester has an entry in their caches. If found, they refresh that entry. Otherwise, no action taken. Why not add an entry for the requester? We don’t want to grow the ARP table unnecessarily. Finally, a lifetime is associated with each entry in the ARP cache and an entry is deleted if it not refreshed within that time.

15 ARP Example ARP broadcast by W requesting hardware address of Y
Here is an illustration of ARP broadcast by W requesting hardware address of Y. As you can see, every node in the local physical network receive this request. Only Y sends the reply and also only to W.

16 Dynamic Host Configuration Protocol (DHCP)
The University of Adelaide, School of Computer Science 16 April 2018 Dynamic Host Configuration Protocol (DHCP) DHCP server is responsible for providing configuration information to hosts There is at least one DHCP server for an administrative domain DHCP server maintains a pool of available addresses Chapter 2 — Instructions: Language of the Computer

17 DHCP State Protocol DHCPDISCOVER (client) DHCPOFFER (server)
DHCPREQUEST (client) DHCPACK (server) DHCPNAK (server) DHCPINFORM (client)

18 The University of Adelaide, School of Computer Science
16 April 2018 DHCP Newly booted or attached host sends DHCPDISCOVER message to a special IP address ( ) DHCP relay agent unicasts the message to DHCP server and waits for the response Chapter 2 — Instructions: Language of the Computer

19 DHCP IP leases are valid for a predefined period of time (T1)
Leases are renewed at T1/2 Leases are released if they have not been renewed at the expiration of the lease time

20 Internet Control Message Protocol (ICMP)
The University of Adelaide, School of Computer Science 16 April 2018 Internet Control Message Protocol (ICMP) Defines a collection of error messages that are sent back to the source host whenever a router or host is unable to process an IP datagram successfully Destination host unreachable due to link /node failure Reassembly process failed TTL had reached 0 (so datagrams don't cycle forever) IP header checksum failed ICMP-Redirect From router to a source host With a better route information The ping application is a very common ICMP-message- generator Chapter 2 — Instructions: Language of the Computer


Download ppt "Scaling the Network Chapters 3-4 Part 2"

Similar presentations


Ads by Google