Scaling the Network Chapters 3-4 Part 1

Slides:



Advertisements
Similar presentations
NETWORK LAYER (1) T.Najah AlSubaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
Advertisements

IP Suite© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
IP: The Internet Protocol
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
10 - Network Layer. Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
CS335 Networking & Network Administration Tuesday, May 11, 2010.
1 Network Layer: Host-to-Host Communication. 2 Network Layer: Motivation Can we built a global network such as Internet by extending LAN segments using.
Spring 2002CS 4611 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
Chapter 19 Binding Protocol Addresses (ARP) Chapter 20 IP Datagrams and Datagram Forwarding.
IP Address 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to
26-Aug-154/598N: Computer Networks Recap SBC UUNET Comcast Sprint End Users Internet First mile problem Last mile problem.
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
The Network Layer. Network Projects Must utilize sockets programming –Client and Server –Any platform Please submit one page proposal Can work individually.
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
Introduction to Network Layer. Network Layer: Motivation Can we built a global network such as Internet by extending LAN segments using bridges? –No!
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 18 Omar Meqdadi Department of Computer Science and Software Engineering University.
FALL, 2005CSI Part 2.3 Internetworking & Addressing (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution Robert L. Probert, SITE,
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
7-1 Last time □ Wireless link-layer ♦ Introduction Wireless hosts, base stations, wireless links ♦ Characteristics of wireless links Signal strength, interference,
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 21.
CS470 Computer Networking Protocols Huiping Guo Department of Computer Science California State University, Los Angeles 4. Internetworking.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
1 Internetworking: IP Packet Switching Reading: (except Implementation; pp )
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
Chapter 3 Part 1 Switching and Bridging
Scaling the Network: Subnetting and Protocols
INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723
Scaling the Network: Subnetting and Other Protocols
Chapter 9 Introduction To Data-Link Layer 9.# 1
Computer Communication Networks
NAT – Network Address Translation
Scaling the Network Chapters 3-4 Part 2
IP: Addressing, ARP, Routing
Chapter 4 Network Layer All material copyright
Network Layer, and Logical Addresses
A quick intro to networking
Scaling the Network: The Internet Protocol
CS4470 Computer Networking Protocols
ARP and RARP Objectives Chapter 7 Upon completion you will be able to:
ICMP ICMP – Internet Control Message Protocol
IP.
CS4470 Computer Networking Protocols
Chapter 5: Network Layer (Part I)
TCP/IP Transmission Control Protocol / Internet Protocol
CS4470 Computer Networking Protocols
Internetworking & Address Resolution
Net 323: NETWORK Protocols
CS 457 – Lecture 10 Internetworking and IP
8PM – Quickly Overview Final Project
Dr. John P. Abraham Professor UTPA
Internetworking Outline Best Effort Service Model
Chapter 20 Network Layer: Internet Protocol
Dr. John P. Abraham Professor UTRGV, EDINBURG, TX
Network Layer I have learned from life no matter how far you go
Dr. John P. Abraham Professor UTPA
TCP/IP Protocol Suite: Review
Net 323 D: Networks Protocols
1 ADDRESS RESOLUTION PROTOCOL (ARP) & REVERSE ADDRESS RESOLUTION PROTOCOL ( RARP) K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University,
Scaling the Network: Subnetting and Other Protocols
CS4470 Computer Networking Protocols
Scaling the Network: The Internet Protocol
Introduction to Networks
Presentation transcript:

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

Network Layer: Introduction How does it all fit? Data link layer Delivers frames between two physically connected hosts Network layer Delivery of packets from machine to machine Hop by hop between hosts and routers Transport layer Between two end hosts

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

Today Finish network forwarding Internet Protocol (IP) Start addressing

Network Layer Forwarding Forwarding input port to appropriate output port in a router We already talked about forwarding over the network layer Datagram / Connectionless Virtual Circuit Switching Which one is used with IP?

Datagram vs Virtual Circuit Datagram (example: IP) Data exchange among computers “Elastic” service, no strict timing req. “Smart” end systems (computers) Can adapt, perform control, error recovery Simple inside network, complexity at “edge” Many link types Different characteristics Uniform service difficult

Datagram vs Virtual Circuit Virtual Circuit (Example: ATM) Evolved from telephony Human conversation: Strict timing, reliability requirements Need for guaranteed service Quality of service “Dumb” end systems Telephones Complexity inside network

The University of Adelaide, School of Computer Science 27 April 2018 Internetworking What is an internetwork? An arbitrary collection of networks interconnected to provide some sort of host-host packet delivery service A simple internetwork where H represents hosts and R represents routers Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 27 April 2018 IP IP stands for Internet Protocol Key tool used today to build scalable, heterogeneous internetworks It runs on all the nodes in a collection of networks and defines the infrastructure that allows these nodes and networks to function as a single logical internetwork Chapter 2 — Instructions: Language of the Computer

IP A IP router is a gateway from one network to another Can interface with many network types Ethernet Token Ring FDDI Sonet Wireless ... more

[TCP/UDP]/IP Two well-known transport level protocols that run on top of IP at the hosts are UDP and TCP TCP Connection-based protocol Error recovery Packets arrive in order UDP Connectionless protocol No error recovery Packets can arrive in any order, or not at all

Internetworking A simple internetwork showing the protocol layers IP connects them all!

The University of Adelaide, School of Computer Science 27 April 2018 IP Service Model Packet Delivery Model Connectionless model for data delivery Best-effort delivery (unreliable service) packets are lost packets are delivered out of order duplicate copies of a packet are delivered packets can be delayed for a long time Global Addressing Scheme Provides a way to identify all hosts in the network Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 27 April 2018 Packet Format Version (4): currently 4 Hlen (4): number of 32-bit words in header TOS (8): type of service (not widely used) Length (16): number of bytes in this datagram Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 27 April 2018 Packet Format Ident (16): used by fragmentation Flags/Offset (16): used by fragmentation TTL (8): number of hops this datagram has traveled Protocol (8): (TCP=6, UDP=17) Checksum (16): of the header only DestAddr & SrcAddr (32) TTL commonly set to 64. Chapter 2 — Instructions: Language of the Computer

IP Fragmentation and Reassembly The University of Adelaide, School of Computer Science 27 April 2018 IP Fragmentation and Reassembly Each network has some MTU (Maximum Transmission Unit) Ethernet (1500 bytes), FDDI (4500 bytes) Strategy Fragmentation occurs in a router when it receives a datagram that it wants to forward over a network which has (MTU < datagram) Reassembly is done at the receiving host All the fragments carry the same identifier in the Ident field Fragments are self-contained datagrams IP does not recover from missing fragments Chapter 2 — Instructions: Language of the Computer

IP Fragmentation and Reassembly The University of Adelaide, School of Computer Science 27 April 2018 IP Fragmentation and Reassembly IP datagrams traversing the sequence of physical networks Chapter 2 — Instructions: Language of the Computer

IP Fragmentation and Reassembly The University of Adelaide, School of Computer Science 27 April 2018 IP Fragmentation and Reassembly Header fields used in IP fragmentation. (a) Unfragmented packet; (b) fragmented packets. Chapter 2 — Instructions: Language of the Computer

IP Addressing Globally unique logical address for a host Address resolution Logical to physical address mapping Is possible to address any host in the network Even if on different physical network There are so many networking technologies such as Ethernet, Token Ring etc. No single technology is best for all needs. Just like traffic control example, Ethernet may be good in some cases and Token Ring in some. But the problem is these technologies may not be compatible and may not be able to communicate with each other. They may not even be able to address each other. The job of IP is to interconnect different network technologies and provide universal connectivity in a heterogeneous world. IP creates the illusion of a single uniform network. There is no such physical network. Actual network consists of many networks with different technologies. IP overlays a virtual network on top of physical network and hides the details of underlying network from users and application programs. It assigns a globally unique logical address to each host. This makes it possible to address any host in the network even if it is on a different physical network. Also, this logical addressing helps in finding a path to a host based on its address. However, it has to map from these logical addresses to physical addresses to actually deliver the packet. We will see how this is done.

IP Addressing A 32-bit number that uniquely identifies a location Written using dotted decimal notation Common form: 134.161.240.211 Binary representation: 10000110 10100001 11110000 11010011 Two-level hierarchy: network id and host id Network IDs administered by Internet Assigned Number Authority (IANA) Host IDs administered locally IP address is a 32-bit number. We can use an IP address to uniquely identify a location. Normally we write an IP address as dotted decimals instead of integer values. IP addresses are organized in a two-level hierarchy, that is, each IP address has two parts: network id part and host id part. A network gets the network id part from a central authority (IANA), individual networks then allocate the host id part to their own machines.

IP Addressing IP address is assigned to each network interface (NIC) Routers connect two or more physical networks Each interface has its own address Multi-homed host A host having multiple connections to Internet Multiple addresses identify the same host Does not forward packets between its interfaces IP address is a 32-bit, 4-byte identifier for an interface of a host. An interface is the connection between host and the physical link. This is commonly referred to as network interface card (NIC). Though we normally refer to IP address of a machine, actually the address is associated with the interface, not the machine. Routers typically have multiple interfaces since they connect to more than one network and transfer packets between networks. Some hosts may have multiple interfaces but they do not route packets from one interface to the other.

IP Addressing Classful addressing scheme separates groups of addresses into classes Class A 8 bits used for network (256) 24 bits used for hosts and network devices (16,777,216) Binary address starts with 0 Class B 16 bits for networks (65,536) 16 bits for hosts and network devices (65,536) binary address starts with 10 Class C 24 bits for the network (16,777,216) 8 bits for the host (256) Binary address starts with 110

IP “Classful” Addressing Scheme Three unicast address classes: A, B, and C One multicast: class D network host 10 110 1110 multicast address A B C D class 1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 32 bits In the early days of the Internet development, a so-called classful addressing scheme was used on the Internet. In classful addressing, we can determine the class and hence the network id from the first few bits of the address. The network part can only be 8, 16 or 24 bits. Depending on the how big a network is and will be, a suitable class network id is allotted for that network.

Classless Inter-Domain Routing Classful addressing scheme wasteful IP address space exhaustion Class B net allocated enough for 65K hosts Even if only 2K hosts in that network Solution: Classless Inter Domain Routing (CIDR) Eliminate class distinction No A,B,C Keep multicast class D Good thing about classful address is that we can separate the address into network part and host part by inspecting the address alone. But it wastes address space. Suppose we want to assign a network id to a network of size 2000 hosts. We can not assign class C network id, because in class C host part is only 8 bits and so we can not have more than 256 hosts in a class C network. So we will be forced to assign a class B address with 16 bits for host part that can have around 65536 (216). So we end up wasting 63536 addresses. Allocating more class C address blocks is also not a good choice, as each class C address block will occupy one routing table entry, which will inflate the routing table, which forwarding lookup longer. This might have been ok if we had lots of address space. Due to rapid growth of internet, the IP address space was getting exhausted quickly. So classless inter domain routing (CIDR) is proposed to address this problem. As the name suggests, under CIDR there is no class distinction.

Classless Addressing Addresses allocated in contiguous blocks Number of addresses assigned always power of 2 Network portion of address is of arbitrary length Address format: a.b.c.d/x x is number of bits in network portion of address Unlike in classfull addressing, under classless addressing, the length of the network portion of an address can be arbitrary. Consequently, it is not possible to figure out the network part from the address alone. We need to supply an additional information (network address mask) for that purpose. Now going back to the previous example, by allotting 11 bits for the host portion and 21 bits for the network portion, we can accommodate 2000 hosts without wasting much address space. 11001000 00010111 0001000 0 00000000 network part host 200.23.16.0/23

IP Addressing first 24 bits are network address LAN 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 LAN Here is an example to illustrate how to decide who belongs to which network. Suppose that first 24 bits are the network part. Then these four machines are on the same network 223.1.1. These three are on 223.1.2 and similarly these three 223.1.3. Here router has three interfaces and belongs to three networks. All the other machines are only on a single network.

IP Addressing Interconnected system consisting of six networks first 24 bits are network address 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.2 223.1.2.1 223.1.2.6 223.1.1.2 223.1.7.0 223.1.7.1 223.1.8.0 223.1.8.1 223.1.9.1 223.1.9.2 Interconnected system consisting of six networks Here is another example to illustrate IP addressing. Once again let us assume that first 24 bits correspond to network part. How many networks are there? Six networks. What happens if the network part is only 16 bits. This whole thing belongs to a single network as per IP addressing. It is important to remember that IP addressing is logical and it is not necessary that they all belong to same physical network.

Special IP Addresses Network address: host id = all 0’s Directed broadcast address: host id = all 1’s Local broadcast address: all 1’s Local host address (this computer): all 0’s Loopback address network id = 127, any host id (e.g. 127.0.0.1) When a packet is sent to a network’s directed broadcast address, a single copy of the packet travels across the internet until it reaches the specified network. The packet is then delivered to all hosts on the network. Local broadcast is limited to a local physical network and is used during system startup by a computer that does not yet know the network number. Address of all 0’s is used to refer to this computer when using startup protocols to figure out its own address. Loopback address is used for testing network applications without sending packets into the network.

Private IP Addresses Some addresses are not globally routable IP packets created by these addresses cannot be transmitted into the public domain Commonly used for home, office, and enterprise LANS

Private IP Addresses Address Range CIDR Number of Addresses 10.0.0.0 – 10.255.255.255 10.0.0.0/8 16,777,216 172.16.0.0 – 172.31.255.255 172.16.0.0/12 1,048,576 192.168.0.0 – 192.168.255.255 192.168.0.0/16 65,535

Private IP addresses Router uses Network Address Translation (NAT) to send IP packets from private IP addresses onto public networks Router places it’s own IP address as destination Maintains table, knows which host to route addresses Router keeps translation table

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.

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 192.168.10.1 tell node31.ceee.lab arp reply 192.168.10.1 is-at 00:60:08:ce:9d:3b arp who-has node31.ceee.lab tell 192.168.10.254 arp reply node31.ceee.lab is-at 00:02:3f:b4:cd:87

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.

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.

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.

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.