Slides of the course was made by TAs of this and previous semesters 1 Internet Networking Spring 2003 Tutorial 1 Subnets, Proxy ARP
2 Administrative Information Course site: webcourse.technion.ac.il/ Assistants: Tsur Doron, Taub 205, (829) Galperin Vadim, Taub 441, (829)
3 Reminding – IP Addressing (Original Classful Scheme) IP Address – 32-bit integer globally unique address Dotted Notation: IP Classes – dividing an address to net id and host id prefix of an IP address (net id) identifies a network and a suffix (host id) identifies a host on this network
4 Reminding – IP Addressing (Original Classful Scheme) Class A – 7 bits to net id, 24 bits to host id – Class B – 14 bits to net id, 16 bits to host id – Class C – 21 bits to net id, 8 bits to host id – Class D – for multicasting Class E – reserved for future use
5 Weaknesses of Classful Scheme Growth!!! Tens of thousands small networks. Extremely large routing tables Address space will be eventually exhausted Complex administration How can one minimize the number of assigned network addresses, especially class B, without abandoning 32-bit addressing scheme?
6 Subnet Addressing A site has a single IP network address assigned to it, but has two or more physical networks From outside it looks like a single network Only local routers know about multiple physical networks inside and how to route traffic among them Host ID is divided into a subnet ID and host ID Accepted as a standard by RFC 950, 1985
7 How a Router Perform Routing Usual Routing When a router gets a packet, it isolates by Net mask the packet net id address - if the packet is destined to other network then the router sends it to another router; otherwise according to host id, the router sends the packet to the appropriate host on its network.
8 How a Router Perform Routing Routing with subnetting When a router gets a packet, it isolates by Net mask the packet net id address - if the packet is destined to other network then the router sends it to another router; otherwise the router isolates by Subnet mask at subnet id address of the packet – if it destined to another sub network then it sent to another internal router; otherwise according to host id, the router sends the packet to the appropriate host on its network.
9 Subnetting - Example R. Network H1H1 H2H2 Network H3H3 H4H Rest of the Internet All traffic to A site with two physical networks using subnet addressing to label them with a single class B network address. Router R accepts all traffic for net and chooses a physical network based on the third octet of the address.
10 Subnet Addressing Subnetting is hierarchical addressing scheme and it accommodates large growth because a given router doesn’t need to know as much detail about distant destinations as it does about local ones. It’s up to local policy to decide how to partition the local part of the IP address between subnet id and host id. When there is a compromise between large number of subnets with small number of hosts and the opposite.
11 Variable-Length Subnetting When we choose the subnet partitioning, we actually define constant number of possible physical subnetworks with maximum number of hosts on them. Difficult to keep small (waist of subnet numbers) and big (the host id needs more bits) subnetworks and there could be unnecessary spending of address space. Solution is Variable-Length Subnetting – when a subnet partition is selected on a per-network basis.
12 Example – Configuring a Network with Variable-Length Subnetting We have a network with IP We need to support next sub networks: –6 networks with 26 hosts –3 networks with 10 hosts –4 networks with 2 hosts
13 Example – Configuring a Network with Variable-Length Subnetting The given network is of Class C Its Net Mask is: (the network id is 24 bits and local part is 8 bits) If we take subnet mask of /27 bits then we can get 8 sub networks of 30 hosts (all 0’s and all 1’s of host addresses are reserved). – We need only 6 such sub networks
14 Example – Configuring a Network with Variable-Length Subnetting The rest 2 sub networks we will partition by subnet mask of /28 bits. We will get 4 sub networks of 14 hosts in each – (all 0’s and all 1’s of host addresses are reserved). We need only 3 such sub networks
15 Example – Configuring a Network with Variable-Length Subnetting The rest we will partition by subnet mask of /30 bits. We will get 4 sub networks of 2 hosts in each – and that is all what we needed!
16 Example – Configuring a Network with Variable-Length Subnetting Subnet mask #1 = /27 – Subnet mask #2 = /28 – Subnet mask #3 = /30 –
17 Reminding - ARP ARP (Address Resolution Protocol) serves for mapping from high-level IP address into low level MAC address. Two machines on a given network can communicate only if they know each other’s physical network address
18 Reminding – ARP – MAC address resolving protocol When host A wants to resolve IP address I b, it broadcasts a special packet that asks the host with IP address I b to respond with its physical address, P b. All hosts, including B, receive the request, but only host B recognizes its IP address and sends a reply that contains its physical address. When A receives the reply, it uses the physical address to send the internet packet directly to B.
19 Proxy ARP Proxy ARP (also called promiscuous ARP or ARP hack) is a technique used to map a single IP network prefix into two physical addresses. Assume that there are 2 networks A and B connected by router R that runs Proxy ARP R knows IP addresses from both sides (knows where each host is located) R uses ARP to hide one of networks or PPPs
20 Proxy ARP. H1H1 H2H2 H4H4 H5H5 H3H3 Network A Network B R Router running proxy ARP Router R answers ARP requests on the network for each hosts on PPP connection, giving its hardware address and then routing datagrams correctly when they arrive. PPP
21 Proxy ARP - Example Assume that host H 1 from network A wants to send a packet to host H 4 from network B. –H 1 sends ARP request to get MAC address of H4. –Router R will catch this ARP request –R knows that H 4 is on PPP and answers with its own MAC address –H 1 will store this address in its cash and from now. H 1 will send to R packets which are destined to H 4. –R according to its routing table will send the packets to H 4.