Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

Similar documents
Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi).

CS 457 Networking and the Internet. Problems. Mechanisms 9/21/16. Fall 2016 Indrajit Ray

Internetworking Part 2

Inter-networking. Problem. 3&4-Internetworking.key - September 20, LAN s are great but. We want to connect them together. ...

Chapter 3 Internetworking

Internetworking Part 2

L10: Simple Internetworking. Hui Chen, Ph.D. Department of Engineering & Computer Science Virginia State University Petersburg, VA 23806

UNIT III. 3.1 Circuit switching vs. packet switching / Packet switched networks. Figure 3.1.1: Switching Techniques

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

C14a: Internetworks and The Internet

ECE 4450:427/527 - Computer Networks Spring 2017

TSIN02 - Internetworking

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

Department of Computer and IT Engineering University of Kurdistan. Network Layer. By: Dr. Alireza Abdollahpouri

IP - The Internet Protocol

Recap. Recap. Internetworking. First mile problem. Internet. End Users. Last mile problem. Direct link networks Packet switching.

CIS 551 / TCOM 401 Computer and Network Security. Spring 2006 Lecture 16

Basic Internetworking (IP)

CSE/EE 461 The Network Layer. Application Presentation Session Transport Network Data Link Physical

Internet Protocol. Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

Network Layer: Internet Protocol

Network layer: Overview. Network Layer Functions

CS 457 Lecture 11 More IP Networking. Fall 2011

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

Internet Protocol (IP)

2/22/2008. Outline Computer Networking Lecture 9 IP Protocol. Hop-by-Hop Packet Forwarding in the Internet. Internetworking.

End-to-End Communication

Vorlesung Kommunikationsnetze

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

CS 356: Computer Network Architectures. Lecture 14: Switching hardware, IP auxiliary functions, and midterm review. [PD] chapter 3.4.1, 3.2.

CIS 551 / TCOM 401 Computer and Network Security

Outline. IP Address. IP Address. The Internet Protocol. o Hostname & IP Address. o The Address

TSIN02 - Internetworking

CH. 3 IP FORWARDING AND ROUTING

EEC-684/584 Computer Networks

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

Chapter 19 Network Layer: Logical Addressing

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Aside: Interaction with Link Layer Computer Networking. Caching ARP Entries. ARP Cache Example

CS 356: Computer Network Architectures. Lecture 15: DHCP, NAT, and IPv6. [PD] chapter 3.2.7, 3.2.9, 4.1.3, 4.3.3

ETSF10 Internet Protocols Network Layer Protocols

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca Instructor: Nicholas DeMarinis

1. IPv6 is the latest version of the TCP/IP protocol. What are some of the important IPv6 requirements?

Introduction to Internetworking

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

OSI Network Layer. Network Fundamentals Chapter 5. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

The Internetworking Problem. Internetworking. A Translation-based Solution

Network Layer: Control/data plane, addressing, routers

IPv4. Christian Grothoff.

Chapter 4 Network Layer

Lecture 2: Basic routing, ARP, and basic IP

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964

ICS 451: Today's plan

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

TCP/IP Protocol Suite

EPL606. Internetworking. Part 2a. 1Network Layer

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

Master Course Computer Networks IN2097

CSCI-1680 Network Layer:

Copyright 2010, Elsevier Inc. All rights Reserved

Chapter 4: Network Layer

Lecture 3. The Network Layer (cont d) Network Layer 1-1

CS 348 Computer Networks. IP and Routing. Indian Institute of Technology, Bombay

Lecture 8 Network Layer: Logical addressing

University of Toronto Faculty of Applied Science and Engineering. Final Exam, December ECE 461: Internetworking Examiner: J.

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

CSEP 561 Internetworking. David Wetherall

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12

McGraw-Hill The McGraw-Hill Companies, Inc., 2000

Internet Technology 3/23/2016

IPv6: An Introduction

The Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly

IPv6 Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land

IPv6. IPv4 & IPv6 Header Comparison. Types of IPv6 Addresses. IPv6 Address Scope. IPv6 Header. IPv4 Header. Link-Local

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite

Router Architecture Overview

CS-435 spring semester Network Technology & Programming Laboratory. Stefanos Papadakis & Manolis Spanakis

Information Network Systems The network layer. Stephan Sigg

IPv4 addressing, NAT. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

ECE 158A: Lecture 7. Fall 2015

ECE 461 Internetworking Fall Quiz 1

Lecture 10: Addressing

Introduction to Internetworking

EEC-484/584 Computer Networks

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

internet technologies and standards

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

The Internet Protocol (IP)

Lecture 8. Network Layer (cont d) Network Layer 1-1

ETSF05/ETSF10 Internet Protocols Network Layer Protocols

The IP and Related Protocols

CS 458 Internet Engineering Spring First Exam

Subnets. IP datagram format. The Internet Network layer. IP Fragmentation and Reassembly. IP Fragmentation & Reassembly. IP Addressing: introduction

Review of Internet Architecture and Protocols

Transcription:

Lecture 8 Basic Internetworking (IP) Reminder: Homework 3, Programming Project 2 due on Tuesday. An example internet is shown at right. Routers or gateways are used to connect different physical networks. Tuesday, September 20 CS 475 Networks - Lecture 8 1 Tuesday, September 20 CS 475 Networks - Lecture 8 4 Outline Basic Internetworking (IP) Chapter 3 - Internetworking 3.1 Switching and Bridging 3.2 Basic Internetworking (IP) 3.3 Routing 3.4 Implementation and Performance 3.5 Summary Tuesday, September 20 CS 475 Networks - Lecture 8 2 The figure above illustrates how host H1 and H8 are logically connected in an internet. While switches operate only at the physical layer, routers operate at the higher networking layer of the protocol stack. Tuesday, September 20 CS 475 Networks - Lecture 8 5 Basic Internetworking (IP) Service Model Bridges and LAN switches from last section have limited ability to scale and to handle heterogeneity. An internetwork (or just internet - with lowercase i) is a logical network built out of a collection of physical networks. Each physical network uses one technology (e.g., Ethernet or Wi-Fi). The Internet protocol (IP) service model is unreliable (best-effort) and connectionless. This simple model allows IP to run over almost any physical link. It also keeps router design simple. Reliable, connection-oriented services can use IP. These services just need to be implemented at a higher layer in the protocol stack. Tuesday, September 20 CS 475 Networks - Lecture 8 3 Tuesday, September 20 CS 475 Networks - Lecture 8 6

Service Model - Packet Format Service Model - Fragmentation and Reassembly The IP Version 4 packet format is shown at right. The HLen field is the size of the header (number of 32 bit words). The Type Of Service (TOS) field allows for differentiated service. The IP packet is treated as a collection of 32 byte words. Tuesday, September 20 CS 475 Networks - Lecture 8 7 To allow sending IP packets over links with different Maximum Transmission Units (MTUs) IP allows packets to be fragmented while in route to the destination. Fig 3.17 IP packet fragmentation Tuesday, September 20 CS 475 Networks - Lecture 8 10 Service Model - Packet Format The Length fields contains the entire packet size in bytes (up to 65,535 bytes). The Ident, Flags and Offset support fragmentation and reassembly and will be discussed shortly. The Time To Live (TTL) field is decremented at each router. When it reaches 0 the packet can be dropped. It is intended to prevent an endlessly circulating packet. An initial value of 64 is the default. Tuesday, September 20 CS 475 Networks - Lecture 8 8 Service Model - Fragmentation and Reassembly The Ident field is the same in each fragment (it is the same as in the original packet). The M bit in the Flags field is 1 except in the last fragment. The Offset is the byte offset divided by 8.(Fragmentation is on an 8 byte boundary only.) Notice that the fragments are not reassembled until they reach the destination. Tuesday, September 20 CS 475 Networks - Lecture 8 11 Service Model - Packet Format Global Addresses The Protocol field is a demux key (TCP is 6, UDP is 17). The Checksum is a 16 bit checksum over the header. Packets with checksum errors are dropped. The SourceAddr and DestinationAddr are 32 bit IP addresses (not MAC addresses!) There may be any number of Options. These are rarely used. IP addresses are globally unique. Each host has a unique IP (actually each interface has a unique IP, hosts with multiple NICs and routers will have multiple IP addresses). IP addresses are hierarchical. They consist of a network part and a host part. Fig 3.19 IP Addresses (a) class A address (b) class B address (c) class C address The network and host parts of the IP address are not fixed-size. Tuesday, September 20 CS 475 Networks - Lecture 8 9 Tuesday, September 20 CS 475 Networks - Lecture 8 12

Datagram Forwarding in IP Datagram Forwarding in IP Hosts or routers that have the same network part are on the same physical network. Every physical network connected to the Internet contains at least one router. The network part uniquely identifies a single physical network on the Internet. Every IP datagram contains the IP address of the destination. Tuesday, September 20 CS 475 Networks - Lecture 8 13 A network may have multiple routers. If the forwarding table does not contain an entry for a desired network, the packet can be sent to the default router (or gateway). The forwarding table for many end nodes (hosts) may contain only an entry for a single default router. Note that forwarding tables used in routers contain entries for network addresses, not individual hosts. Tuesday, September 20 CS 475 Networks - Lecture 8 16 Datagram Forwarding in IP Every node in the path (including the source) looks at the network part of the destination address to determine if it is on the same physical network as the destination. If the node is on the same physical network it sends it directly to the destination If not, it sends the packet to the next hop router by consulting its forwarding table. Tuesday, September 20 CS 475 Networks - Lecture 8 14 The original IP classes (A, B, C) resulted in a lot of wasted IP address. Every network, no matter how small, required at least a class C network address with up to 255 hosts. A fairly large network of 1000 hosts would require a class B network address leaving 64000 IP addresses unusable. allows for much more efficient use of the IP address space by allowing a network number to be split and the pieces assigned to different subnets. Tuesday, September 20 CS 475 Networks - Lecture 8 17 Datagram Forwarding in IP Conceptually the forwarding table for router R2 could appear as shown at R2 forwarding table right. Network NextHop 1 R1 2 Int 1 3 Int 0 4 R3 Tuesday, September 20 CS 475 Networks - Lecture 8 15 works by using a portion of the host number as a subnet ID. The subnet ID and network number together form a subnet number (address). A subnet mask is used to define which bits of an address are part of the subnet address and which bits are used to identify a host on the subnet. Tuesday, September 20 CS 475 Networks - Lecture 8 18

Classless Addressing In the example at right a subnet mask with 24 leading 1s allows a Class B address to be subnetted into 256 subnets with 255 hosts on each subnet. All hosts on the same subnet have the same subnet address and subnet mask. Externally the subnetted network still appears as a single Class B network. Tuesday, September 20 CS 475 Networks - Lecture 8 19 Classless Interdomain Routing (CIDR) drops the classful addresses discussed previously and allows the network part of an IP address to be any length. In CIDR, network addresses are represented using a /X after the network prefix. 192.4.16/24 would include all IP addresses in the range 192.4.16.0 192.4.16.255 (256 IP numbers), while 192.4.16/20 would include all IP addresses in the range 192.4.16.0 192.4.31.255 (4096 IP numbers). Tuesday, September 20 CS 475 Networks - Lecture 8 23 Classless Addressing A host now ANDs a destination IP with its own subnet mask to see if the destination subnet is the same as the source's subnet. If it is, the packet is sent directly to the destination. If it is not, the packet is sent to the default router. Note that it is not necessary that the 1s in the subnet mask be contiguous, but this is highly recommended. Tuesday, September 20 CS 475 Networks - Lecture 8 21 Fig. 3.22 Route Aggregation The ISP advertises a 21 bit CIDR address that is used externally for routing. Routers within the ISP route traffic to 8 different networks. Tuesday, September 20 CS 475 Networks - Lecture 8 24 Classless Addressing Forwarding tables for the internal routers must also include a subnet mask. Forwarding table for Router R1 Subnet # SubnetMask Next 128.96.34.0 255.255.255.128 intf0 128.96.34.128 255.255.255.128 intf1 128.96.33.0 255.255.255.0 R2 Tuesday, September 20 CS 475 Networks - Lecture 8 22 With CIDR the network portion of an IP address may match multiple entries in a router's forwarding table. Forwarding is then based on the longest match. Entries for both 171.69/16 and 171.69.10/24 match an IP destination of 171.69.10.100. The second entry is the longest, so the packet would be routed to 171.69.10/24. A packet addressed to 171.69.12.5 would be routed to 171.69/16 (assuming that there are no other matching entries). Tuesday, September 20 CS 475 Networks - Lecture 8 25

Address Translation (ARP) The Address Resolution Protocol (ARP) enables a host to dynamically construct a table (known as the ARP table or cache) of IP addresses to physical address mappings. Since the mappings may change over time (NIC card replacement) the entries time-out and are removed periodically (15 minutes is typical). ARP relies on the fact that most link-level technologies support broadcast. Address Translation (ARP) Wireshark capture of an ARP request by 10.10.0.200 for 10.10.0.21 Tuesday, September 20 CS 475 Networks - Lecture 8 26 Tuesday, September 20 CS 475 Networks - Lecture 8 29 Address Translation (ARP) Host Configuration (DHCP) If a host wants to send an IP datagram to a node on the same network it first checks its ARP cache for a mapping. If there is no entry, the host broadcasts an ARP query. The query contains the target IP, the source IP and source link-layer address. The target adds or refreshes its ARP cache with a source entry and then sends an ARP reply to the source. Tuesday, September 20 CS 475 Networks - Lecture 8 27 Ethernet addresses are hardwired into the adaptor. IP addresses can not be hardwired since all hosts on the same physical network must have a common network address. Most operating systems allow the IP address and the IP address of the default router/ gateway to be manually configured. Manual configuration is time consuming and error prone. The primary method of automatic configuration is known as Dynamic Host Configuration Protocol (DHCP). Tuesday, September 20 CS 475 Networks - Lecture 8 30 Address Translation (ARP) Host Configuration (DHCP) The ARP packet format used on Ethernet is shown above. HLen and PLen are the lengths of the hardware and protocol addresses in bits. Operation is 1 for a query and 0 for a reply. Tuesday, September 20 CS 475 Networks - Lecture 8 28 A DHCP server sends out IP addresses to hosts when they boot. The server can be configured to always give the same IP address to the same interface (based on its MAC address) or the server can hand out IP addresses from a pool of IP addresses. The DHCP server might be a standard computer server or a router. The DHCP server might also be setup to provide other network services (DNS, email, etc). Tuesday, September 20 CS 475 Networks - Lecture 8 31

Host Configuration (DHCP) Virtual Networks and Tunnels When a host on the network boots, it sends a DHCPDISCOVER message to the IP broadcast address (255.255.255.255). Routers will pass IP broadcasts to other subnetworks (subnets) but not to other networks. The DCHP server replies with an IP address that can be used by the hosts. It is possible to use DHCP relay agents so that one DHCP server can provide IP addresses to multiple networks. Virtual circuit networks can be used to create virtual private networks (VPNs) that act very much like separate private networks. VPNs use a shared network to create private networks. Tuesday, September 20 CS 475 Networks - Lecture 8 32 Tuesday, September 20 CS 475 Networks - Lecture 8 35 Host Configuration (DHCP) Virtual Networks and Tunnels The Internet can be used to create VPNs via the use of an IP tunnel. An IP tunnel is a virtual pointto-point link between two endpoint routers. A DHCP relay agent receives a broadcast DHCPDISCOVER message and sends a unicast to a DHCP server on another network. DHCP packet format (See the text for details.) Tuesday, September 20 CS 475 Networks - Lecture 8 33 Tuesday, September 20 CS 475 Networks - Lecture 8 36 Error Reporting (ICMP) Virtual Networks and Tunnels IP networks support a companion protocol Internet Control Message Protocol (ICMP) - that is used for reporting errors back to the source host whenever a router (or host) is unable to process a datagram successfully (destination host unreachable, failed reassembly, TTL decremented to 0, checksum error, etc.) An ICMP-Redirect control message can be used to send a better route back to a host so that it can update its forwarding table. Tuesday, September 20 CS 475 Networks - Lecture 8 34 If router R1 receives a packet containing an address in network 2, it encapsulates the packet in an IP packet destined for router R2. R2 strips the added header and forwards the packet to network 2. VPNs can be used for security or to carry non-ip packets across an IP network. Tunnels can also be used to connect two routers that may have special capabilities. Tuesday, September 20 CS 475 Networks - Lecture 8 37

In-class Exercises Explore the following commands: 1) arp -a 2) route 3) ping and traceroute (Unix)/tracert(Windows) Tuesday, September 20 CS 475 Networks - Lecture 8 38