Introduction to routing in the Internet

Similar documents
Introduction to routing in the Internet

(Chapters 2 3 in Huitema) E7310/Internet basics/comnet 1

Introduction to Internetworking

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

IP Protocols. ALTTC/Oct

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

The Internetworking Problem. Internetworking. A Translation-based Solution

The Internet. The Internet is an interconnected collection of netw orks.

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Internet Protocol (IP) Lecture 2: Prof. Shervin Shirmohammadi CEG

Internet Protocols (chapter 18)

Introduction to IPv6. IPv6 addresses

ROUTING INTRODUCTION TO IP, IP ROUTING PROTOCOLS AND PROXY ARP

The Internet Protocol (IP)

Network Layer (4): ICMP

Dongsoo S. Kim Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

Computer Networks ICS 651. IP Routing RIP OSPF BGP MPLS Internet Control Message Protocol IP Path MTU Discovery

ET4254 Communications and Networking 1

TSIN02 - Internetworking

(ICMP), RFC

Table of Contents. Cisco TCP/IP

ECE4110 Internetwork Programming. Introduction and Overview

SEN366 (SEN374) (Introduction to) Computer Networks

Internetwork Protocols

TSIN02 - Internetworking

Topics for This Week

Vorlesung Kommunikationsnetze

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

EEC-684/584 Computer Networks

Exercise Sheet 4. Exercise 1 (Routers, Layer-3-Switches, Gateways)

Internetworking Terms. Internet Structure. Internet Structure. Chapter 15&16 Internetworking. Internetwork Structure & Terms

Internet Protocol, Version 6

Internetworking. different kinds of network technologies that can be interconnected by routers and other networking devices to create an internetwork

To make a difference between logical address (IP address), which is used at the network layer, and physical address (MAC address),which is used at


Introduction to IPv6. IPv6 addresses

Internet Control Message Protocol (ICMP), RFC 792. Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC

CHAPTER-2 IP CONCEPTS

Agenda L2 versus L3 Switching IP Protocol, IP Addressing IP Forwarding ARP and ICMP IP Routing First Hop Redundancy

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

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

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

The Network Layer. Internet solutions. Nixu Oy PL 21. (Mäkelänkatu 91) Helsinki, Finland. tel fax.

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

Internet Control Message Protocol (ICMP)

Data Communication Prof. A. Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 34 TCP/ IP I

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Introduction to IPv6. IPv6 addresses

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Auxiliary Protocols

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

NET2-2 Internet Protocol and Routing Network Science Certificate George Mason University

Solution of Exercise Sheet 4. Exercise 1 (Routers, Layer-3-Switches, Gateways)

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

Router Architecture Overview

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

The Internet. 9.1 Introduction. The Internet is a global network that supports a variety of interpersonal and interactive multimedia applications.

ICS 451: Today's plan

Auxiliary protocols. tasks that IP does not handle: Routing table management (RIP, OSPF, etc.). Congestion and error reporting (ICMP).

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

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

ARP, IP. Chong-Kwon Kim. Each station (or network interface) should be uniquely identified Use 6 byte long address

TCP/IP Networking. Training Details. About Training. About Training. What You'll Learn. Training Time : 9 Hours. Capacity : 12

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

Network Layer. The Network Layer. Contents Connection-Oriented and Connectionless Service. Recall:

Network Layer. Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control

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

K2289: Using advanced tcpdump filters

Networking: Network layer

ICMP (Internet Control Message Protocol)

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

HY 335 Φροντιστήριο 8 ο

Network layer: Overview. Network Layer Functions

EEC-484/584 Computer Networks

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

CS 457 Lecture 11 More IP Networking. Fall 2011

Configuring IP Unicast Routing

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

ICS 351: Today's plan. OSPF BGP Routing in general routing protocol comparison encapsulation network dynamics

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

CS610 Computer Network Final Term Papers Solved MCQs with reference by Virtualians Social Network

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

Internetworking Part 2

Top-Down Network Design, Ch. 7: Selecting Switching and Routing Protocols. Top-Down Network Design. Selecting Switching and Routing Protocols

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

Introduction to Information Science and Technology 2017 Networking II. Sören Schwertfeger 师泽仁

Introduction to Computer Networks

Network Layer. Goals of This Lecture. Internet Reference Model. Outline of the Class

ICMP, ARP, RARP, IGMP

Chapter 4: Network Layer

Why dynamic route? (1)

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

Written and provided by. Expert Reference Series of White Papers. TCP/IP Overview COURSES.

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

TCP/IP Protocol Suite

IP: Addressing, ARP, Routing

Chapter 5 Network Layer

IPv4. Christian Grothoff.

ETSF05/ETSF10 Internet Protocols Network Layer Protocols

RIP Version 2. The Classless Brother

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

Transcription:

Introduction to routing in the Internet Internet architecture IPv4, ICMP, ARP Addressing, routing principles (Chapters 2 3 in Huitema) Internet-1

Internet Architecture Principles End-to-end principle by Dave Clark Hop-by-hop control vs. InX.25 Error and flow control on each hop End-to-end control InIP Error and flow control in end station The network can not be trusted The user must in any case check for errors ÿ Network control is redundant Error checking and flow control by TCP in the end stations No state information in the network The network is not aware of any connections Packets routed independently If a link fails, another route is used Same principle as in distributed systems Internet-3

Internet Architecture Principles IP over everything Internet connects different types of networks Each with different framing, addressing, Interconnection based on translation Mapping through a gateway Never perfect Translation still needed in many cases E.g. signaling interworking, IPv4 to IPv6 mapping by Vinston Cerf Interconnection based on overlay ApproachusedbyIP Single protocol over all underlying networks Simple to adapt to new technologies Define framing or encapsulation Define address resolution: IPaddress ÿ network address Unique IP-address Internet-4

Internet Architecture Principles IP over everything HTTP,FTP,IMAP,SMTP,... TCP, UDP,... IP IEEE-802, ATM, X.25,... Internet-5

Internet Architecture Principles Connectivity is its own reward The value of a network increases in proportion to the square of the number of nodes on the network (Robert Metcalf's law) Be liberal with what you receive, conservative with what you send try to make your best to understand what you receive maximum adherance to standard when sending Snowballing effect keeps all interested in connectivity thus keeps adhering to standards by Jon Postel Internet-6

Routing is divided into interior and exterior autonomous system (AS) border router exterior neighbors interior neighbors In this course we only deal with interior routing Internet-7

Routing is divided into interior and exterior Autonomous system, AS Networks operated by a single organization and having a common routing strategy Border router At least one neighbor belongs to another autonomous system Internet-9

Routing is divided into interior and exterior Interior routing protocols Routing Information Protocol (RIP), RIP-2 Open Shortest Path First (OSPF) Interior Gateway Routing Protocol (IGRP), EIGRP Intermediate System-to-Intermediate System (IS-IS) Exterior routing protocols External Gateway Protocol (EGP) Border Gateway Protocol version 4 (BGP-4) Internet-10

By connecting Ethernet segments with routers the traffic of the segments can be separated Host 1 Host 3 Ethernet 1 Host 2 does not receive packets sent by Host 1 to other hosts on Ethernet 1 Bridge Router Ethernet ATM 2 Arouter Host 2 operates on the network layer can interconnect networks of different technology Internet-11

Two functions of a router: 1. Packet forwarding On which interface should this packet be forwarded? Which is the following destinationonthatnetwork? Host 3 address C address B Router address D address E address F address A Look in the routing table! Host 2 Host 1 Internet-12

Two functions of a router: 2. Construction and maintenance of the routing table Routers exchange routing information with routing protocols (e.g. RIP, OSPF, BGP) Router Router Router Internet-13

Internet routing is based on routing protocols, which collect information Routing is completely automatic No offline route planning Only dimensioning is made offline The routers communicate with a routing protocol Therouting algorithm finds the shortest (cheapest) route to every destination Internet-14

Routing in the Internet is generally dynamic, but static routing is used in some cases Dynamic routing is based on routing protocols which create and maintain the routing tables automatically examples of routing protocols are RIP, OSPF, BGP... E.g. to connect an organization with multiple links to the Internet Static routing is based on manually configured routing tables. Static routing is used when e.g. two peer providers do not trust each other To connect an organization to a service provider with a single connection Static routing is difficult to maintain Internet-15

The IP address defines the interface (not the host) Host 3 IP address C IP address F IP address B Router IP address D IP address E IP address A Host 2 Host 1 Internet-16

Every interface also has a media specific MAC address Host 3 IP address C MAC c IP address B MAC b Router IP address D MAC d IP address E MAC e IP address F MAC f IP address A MAC a Host 2 Host 1 Internet-17

Internet layer model hosts and routers Host 1 Router Host 2 Application Application TCP/ UDP TCP/ UDP IP MAC IP MAC IP MAC Network 1 Network 2 Internet-18

Layers and message forwarding Host 1 Router IP address B MAC b IP address A MAC a IP address C MAC c Host 2 IP address D MAC d Application Application TCP/UDP Router TCP/UDP IP A B a b IP C D MAC MAC MAC network 1 network 2 c d IP Encapsulation: a b, IP Ethernet header A D, TCP IP header TCP header Data Encapsulation: c d, IP Ethernet header A D, TCP IP header TCP header Data Internet-19

IPv4 address formats Originally a two-level (network, host) hierarchy 32 bits 1981 MSB Network Host Class 0 7bits 24 bits 10 1110 14 bits 16 bits 110 21 bits 8bits 1111 28 bits - multicast address For experimental and future use A B C D E Internet-20

IPv4 address formats A new level for easier network administration 1984 Example: Network Subnet Host Address: 10.38.154.117 00001010 00100110 10011010 01110101 Mask: 255.255.192.0 11111111 11111100 00000000 00000000 Network: first bit 0 00001010 = 10 Subnet: address* AND mask 001001 = 9 (36) Host: address AND NOT mask 10 10011010 01110101 = 2.154.117 address* = address with network part zeroed Also written as 10.38.154.117/14 Internet-21

IPv4 address formats Examples: Mask 0xFFFF0000 0xFFFFFE00 0xFFFFFFC0 IP IPaddress Network Subnet Host 10.27.32.100 136.27.33.100 136.27.34.141 193.27.32.197 A: 10 B: 136.27 136.27 C: 193.27.32 27 16 (32) 17 (34) 3 (192) 32.100 1.100 0.141 5 High order bits: 0... 0-127. ÿ A-class 10... 128. - 191. ÿ B-class 110...192. - 223. ÿ C-class Without right zeroes (and with right zeroes) Later updated by CIDR (discussed later) Internet-22

Routers maintain routes to networks (not to hosts) Example Host 3 Network 10.29.0.0 / 16 Network 10.31.0.0 / 16 10.31.0.35 10.29.0.1 10.30.0.2 Network 10.30.0.0 / 16 Router 10.30.0.254 10.30.0.1 10.31.0.30 Host 2 Host 1 Internet-23

Special purpose addresses An unknown network is replaced by 0 Only used as source address (e.g. a booting host) 0.0.0.0 = this host in this network 0.X.Y.Z = host X.Y.Z in this network Limited broadcast address 255.255.255.255 To all host in the local network Directed broadcast addresses A.255.255.255, B.B.255.255, C.C.C.255 To all hosts in a specified network Loopback-address 127.X.X.X (usually 127.0.0.1) Internal in one host Multicast-addresses (e.g. 224.0.0.2 = all routers on this subnet) Internet-24

IPv4 packet header 4 4 8 16 RFC-791 Version IHL Type of service Total length Identification Flag Fragment offset Time-to-live (TTL) Protocol Header checksum Source IP Address Destination IP Address Optional Padding 32 bits We assume that the sender knows its own IP address. If not: self configuration protocols such as RARP, BOOTP, DHCP (dynamic host configuration protocol) are used Internet-26

IPv4 packet header 4 4 8 16 Version IP version number. The current version is 4. IHL Time-to-live (TTL) Type of service Identification Flag Fragment offset Protocol Internet header length. Expressed as number of 32-bit words. 5-16. Optional Source IP Address Destination IP Address 32 bits Total length Contains 2 fields: packet priority and service type. (DSCP is proposed use for Differentiated Services) Header checksum Expressed as number of octets in the payload and in the header Padding Internet-27

IPv4 packet header 4 4 8 16 Version IHL Time-to-live (TTL) Time-to-live. The value is decremented with an integer representing the quality of the network on each router along the path of the packet. The packet is deleted when TTL reaches 0. Type of service Identification Flag Fragment offset Protocol Optional Source IP Address Destination IP Address Total length Expressed Used whenas large number packets are of octets in fragmented the payload when and underlying network 32 bits the has header maximum packet length. Header checksum Padding Internet-28

Protocol, that the receiving host should use to process the packet, e.g. 6=TCP, 17=UDP, 1=ICMP, 89=OSPF. IHL IPv4 packet header 4 4 8 16 Version Time-to-live (TTL) Type of service Identification Flag Fragment offset Protocol Optional The header checksum is calculated as 16 bit one s complement sum Source IP Address Destination IP Address Total length Header checksum Padding IP address of the sender of the packet. IP address of the receiver of the packet 32 bits Used for special types of information or tricks. One packet can carry many option fields. Internet-29

The most important fields in routing are the destination address and the time-to-live Version IHL Type of service Total length Identification Flag Fragment offset Time-to-live (TTL) Protocol Source IP Address Destination IP Address Options Header checksum Padding Every router decrements the TTL ÿ must calculate new checksum Options (e.g. source routing, record route, timestamp) rarely/never used in practice. Internet-30

Type of service Precedence D T R C Route selection criteria D minimization of delay T maximization of transmission capacity R maximization of reliability C minimization of cost Only one can be selected. Precedence Packet with the highest precedence is first taken from the queue to be routed. In practice, these are not used DiffServ uses the field in another way Internet-31

Source routing Type Length Pointer Address 1 Address 2... Address N Implemented with the source routing option Loose source routing (type 131, 10000011) The packet is sent to the next address in the list using normal routing. Strict source routing (type 137, 10001001) The packet is sent to the next address in the list. If there is no direct link to the address, the packet is destroyed. Slow Rarely used Can be replaced by encapsulation: AÿC, IP-IP AÿB, TCP TCP Data Internet-32

ICMP Internet Control Message Protocol Gives feedback about the network operation. ICMP packet is sent backwards if e.g. The destination is unreachable The router destroys a packet TTL expires All hosts and routers must support ICMP. ICMP messages are transported in IP packets If a ICMP message is dropped, a new one is not generated to avoid the snowballing effect. Internet-33

ICMP messages Type 0 - Echo reply (used for ping ) 3 - Destination unreachable 4 - source quench (= slow down ) (dropped from recommendations) 5 - Redirect 8-Echo(used for ping ) 9 - Router advertisement 10 - Router solicitation 11 - Time exceeded 12 - Parameter problem 13 - Timestamp 14 - Timestamp reply 15 - Information request 16 - Information reply 8 8 8 8 Type Code Header checksum 0-field IP header + leading 8 octets of original datagram 32 bits Code 0 - net unreachable 1 - host unreachable 2 - protocol unreachable 3 - port unreachable 4 - fragmentation needed and DF set 5 - source route failed Internet-34

Packet sending how to determine the next hop The sender checks if the destination address is in the same subnetwork by comparing the masked values of the source and destination address. If same, the destination is in the same subnet (next hop=destination). Otherwise, the packet must be sent to a router (next hop=router). It then obtains the media address (MAC-address) of the next hop using the ARP-protocol. Sender ARP request (broadcast) ARP reply The destination recognizes its own address The media address is stored in the cache. Note: All hosts in the same subnet stores the address in their cache. Internet-35

ARP Address Resolution Protocol ARP maps IP to the underlying protocol IP-address ÿ MAC-address Each network technology requires its own ARP adaptation. Easy if the network supports broadcast or multicast. E.g. Ethernet, Token Ring, FDDI ATM requires a special ARP-server Manually defined address for point-to-point links E.g. X.25, ISDN, Frame-Relay Works on top of Ethernet (not on top of IP) RFC-826 Internet-36

Router discovery How to know the address of the router? Configure manually default gateway Obtain with DHCP Configured by administrator, still needs manual work Listen to routing protocols Uses resources of the host, too many routing protocols ÿ not used today Automatic router discovery with ICMP network X Y LAN1 LAN2 B Internet-37

ICMP router discovery (1) The routers send router advertisements to all hosts periodically (e.g. in 7 minute intervals) ICMP messages: Y Router advertisement (to all hosts) network The advertisement contains a list of the router s addresses. the preference of the addresses, which are used to identify the normal, reserve, etc. router or router address (the preference of the default router is highest) lifetime of the information (e.g. 30 min) X LAN1 LAN2 B Internet-38

ICMP router discovery (2) The host would have to wait up to 7 minutes before it can send packets outside its sub-network. Using a router solicitation, the host gets the advertisement immediately network X ICMP messages: Y Router solicitation (to all routers) Router advertisement LAN1 B LAN2 Internet-39

ICMP router discovery (3) The host chooses the router with the highest priority as its default router. All packets for destinations outside the sub-network are then sent to the default router. Any advertisement from a router outside the sub-network is discarded Internet-40

A network may have many routers, the closest to the destination must be found A packet sent through the default router reaches the destination, but may waste resources A Packet A ÿ B(aÿx) Y network X Default router Packet A ÿ B(xÿy) Packet A ÿ B(yÿb) B Internet-41

A network may have many routers, the closest The router can send a redirect to indicate a shorter route to the destination to the destination must be found A Packet A ÿ B Y network ICMP redirect use router Y instead X Default router B Type Code Header checksum IP address ÿ router=y IP header + 8 octets of the original datagram Type 5 redirect Code 0 redirect for the network (no mask!) 1 redirect for the host 2 redir. for type of service and network 4 redir. for type of service and host Internet-42

Host must have feedback from the first router to avoid sending to a black hole Feedback may be TCP acknowledgements Router advertisements ARP-replies ICMP echo reply (ping) Between routers, routing protocols provide similar feedback and help in detecting failed router neighbors. Internet-44

DNS Domain Name Service Hostname ÿ IP address Why DNS? Easier to remember names than addresses Allows address changes without changing the name Several addresses per host Extensions: service location, ENUM DNS does not affect routing, routers only deal with IP addresses Internet-45

Routing algorithms Internet-46

Proactive Routing algorithms Proactive vs. reactive The router creates and maintains routes to all destinations ÿ The routes are available in advance The routing algorithms in the Internet are proactive Reactive Routes are created only when they are needed Used in e.g. ad hoc networks (discussed later in this course) Internet-47

Distance vector Routing algorithms Distance vector vs. link state Distance vectors are sent, until the state of the network is stable The routers cooperate to generate the routes Example:RIP Link state Topology descriptions are sent periodically and nodes generate a map over the network Every router generates the routes independently of the other routers Example: OSPF Internet-48

Routing algorithms Distance vector vs. link state Distance vector + Simple and lightweight - Slow convergence - Only one route per destination - Only one metric Link state - Complex and heavy + Fast convergence + Several routes per destination + Supports different metrics Internet-49