ECE 428 Internet Protocols (Network Layer: Layer 3)

Similar documents
Topics for This Week

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

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

Inter-AS routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

ROUTING INTRODUCTION TO IP, IP ROUTING PROTOCOLS AND PROXY ARP

Internet Routing Protocols, DHCP, and NAT

Chapter 4: outline. Network Layer 4-1

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

Networking: Network layer

Why dynamic route? (1)

Review for Chapter 4 R1,R2,R3,R7,R10,R11,R16,R17,R19,R22,R24, R26,R30 P1,P2,P4,P7,P10,P11,P12,P14,P15,P16,P17,P22,P24,P29,P30

Inter-Domain Routing: BGP

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

Computer Networking Introduction

Routing in the Internet

II. Principles of Computer Communications Network and Transport Layer

Chapter 4: Network Layer

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

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

Chapter IV: Network Layer

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

CSC 4900 Computer Networks: Routing Protocols

Department of Computer and IT Engineering University of Kurdistan. Computer Networks II Border Gateway protocol (BGP) By: Dr. Alireza Abdollahpouri

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

CS4/MSc Computer Networking. Lecture 4 The network layer: Forwarding, Routing, IP and Internet routing protocols

Chapter 4: Network Layer

DATA COMMUNICATOIN NETWORKING

CSc 450/550 Computer Networks Internet Routing

CSCI Topics: Internet Programming Fall 2008

CS4/MSc Computer Networking. Lectures 6-8 The network layer: Forwarding, Routing, IP and Internet routing protocols

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

Lecture 19: Network Layer Routing in the Internet

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Network Layer: Routing

Routing. Advanced Computer Networks: Routing 1

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

CS555, Spring /5/2005. April 12, 2005 No classes attend Senior Design Projects conference. Chapter 4 roadmap. Internet AS Hierarchy

IPv4. Christian Grothoff.

ECE 158A: Lecture 7. Fall 2015

Chapter 4: Network Layer, partb

ITEC310 Computer Networks II

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

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

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

Link State Routing & Inter-Domain Routing

Information Network Systems The network layer. Stephan Sigg

What is the difference between unicast and multicast? (P# 114)

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

CS BGP v4. Fall 2014

ICMP, ARP, RARP, IGMP

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

Internetworking Part 2

Introduction to routing in the Internet

Planning for Information Network

Routing Protocols --- Exterior Gateway Protocol

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Routing Unicast routing protocols

EEC-484/584 Computer Networks

CS 640: Introduction to Computer Networks. Intra-domain routing. Inter-domain Routing: Hierarchy. Aditya Akella

Overview. Problem: Find lowest cost path between two nodes Factors static: topology dynamic: load

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 14, 2013

CS 43: Computer Networks. 24: Internet Routing November 19, 2018

Chapter 09 Network Protocols

Vendor: Alcatel-Lucent. Exam Code: 4A Exam Name: Alcatel-Lucent Interior Routing Protocols and High Availability.

Network Layer PREPARED BY AHMED ABDEL-RAOUF

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

Chapter 4 Network Layer

Introduction to routing in the Internet

Lecture 12. Introduction to IP Routing. Why introduction? Routing

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

Basic Idea. Routing. Example. Routing by the Network

Routing Protocols. Autonomous System (AS)

Internet. Organization Addresses TCP/IP Protocol stack Forwarding. 1. Use of a globally unique address space based on Internet Addresses

BGP Configuration. BGP Overview. Introduction to BGP. Formats of BGP Messages. Header

Routing by the Network

Routing. Jens A Andersson Communication Systems

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

Internet Routing Protocols Part II

Inter-domain Routing. Outline. Border Gateway Protocol

PART III. Implementing Inter-Network Relationships with BGP

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

5.1 introduction 5.5 The SDN control 5.2 routing protocols plane. Control Message 5.3 intra-as routing in Protocol the Internet

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

Inter-AS routing and BGP. Network Layer 4-1

Routing. Outline. Algorithms Scalability

COM-208: Computer Networks - Homework 6

Review. Some slides are in courtesy of J. Kurose and K. Ross

Unit 3: Dynamic Routing

Network Protocols. Routing. TDC375 Winter 2002 John Kristoff - DePaul University 1

Network Protocols. Routing. TDC375 Autumn 03/04 John Kristoff - DePaul University 1

BGP. Daniel Zappala. CS 460 Computer Networking Brigham Young University

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

CSCE 463/612 Networks and Distributed Processing Spring 2018

Intra-AS Routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

Routing on the Internet. Routing on the Internet. Hierarchical Routing. Computer Networks. Lecture 17: Inter-domain Routing and BGP

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

Overview 4.2: Routing

Transcription:

ECE 428 Internet Protocols (Network Layer: Layer 3) 1

Done so far MAC protocols (with PHYsical layer) Transport bits from one node to another. Key element: Determine WHEN to transmit DLC protocol (running on top of MAC) Establish a reliable link between two nodes Flow control (determined by the receiver) Error control (retransmission) Fragmentation/reassembly Summary: DLC/MAC support 1-hop comm. 2

Links: OC-192 (10 Gbps) The Canadian Network 3

ORION (Ontario Research and Innovation Optical Network) ORION Office 34 King Street East, Suite 800, 8th Floor Toronto, Ontario, M5C 2X8 4

COGENT Network 5

Network Connection to UW 6

UW Network 7

The Internet at a glance Border/edge router AS AS 8

The Internet Cloud Routers + DHCP & DNS servers 9

Multi-hop communication Host1 R R R R R R R Host2 Computer A Computer B Application + Others Router Application + Others Transport Transport Network (IP) Network (IP) Network (IP) DLC1 DLC1 DLC2 DLC2 MAC1/PHY1 MAC1/PHY1 MAC2/PHY2 MAC2/PHY2 Medium 1 Medium2 10

Key question in multi-hop comm. Packet forwarding through a set of routers? How hosts and routers discover each other? How packets are routed to their destinations? 11

Routing protocols What is routing? Routers exchange information about the networks and hosts to which they are connected. Allow routers to build routing tables (RT). An incoming packet to a router is put on an outgoing link based on RT information. Hop-by-hop routing Each router makes an individual, one-hop forwarding decision. 12

What is Routing? OSPF RIP UDP BGP TCP ICMP Network layer Routing Table IP DLC1 DLC2 DLC3 DLC4 MAC1 MAC2 MAC3 MAC4 2 1 3 4 OSPF: Open Shortest Path First BGP: Border Gateway Protocol RIP: Routing Information Protocol TCP: Transmission Control Protocol UDP: User Datagram Protocol ICMP: Internet Control Message Protocol 13

IP Packet Format: Header + Payload 4 bits 8 bits 8 bits 3 bits 13 bits 16 bits 16 bits Bit 0 V=4 IHL SERVICE TYPE TOTAL LENGTH 31 H IDENTIFICATION F FRAGMENT OFFSET e TIME TO LIVE PROTOCOL HEADER CHECKSUM a d SOURCE ADDRESS e DESTINATION ADDRESS r IP OPTIONS IP PAYLOAD V = Version, IHL = Internet Header Length, F = Flags 14

IP Address Length: 32 bits in IPv4 (128 bits in IPv6) <= Unique How many addresses for a node Host: one (common) Router: Many (1 for each link connected to the router) Notation Dotted decimal notation Each of the four bytes is respectively written as a decimal integer separated by periods. Ex.: (81 61 5C 2B) Hex => 129.97.92.43 15

IP Address IP address: 2 logical components of variable length Network prefix (leftmost p = 32 h bits Identical for all hosts connected to the same link Host ID (rightmost h bits) Unique for hosts connected to the same link p = 32-h bits h bits Network-prefix Host 16

IP Address Notation for IP address and prefix length Address/prefix-length (129.97.92.43/24) Usefulness of network prefix Packet forwarding is done using network prefix Routing tables keep an entry for each network prefix -- and not for each host computer Smaller RT size 17

Other header fields Version: 4 for IPV4 IHL (Internet Header Length) Gives IP header length in units of 4-bytes Without the options field (IHL = 5) Service type How the packet is to be handled by the routers Lowest delay, highest reliability, Largely ignored by router manufacturers Total length Length of the entire IP packet including the header in bytes 18

Other header fields Flags, Fragment Offset, ID Used to chop up large IP packets into small chunks If the network can t handle large IP packets. ID A unique value chosen by the sender to allow a recipient to reassemble a packet that had to be chopped up All fragments from the same IP packet have the same ID Offset Position of the fragment in the IP packet Flag: 3 bits <Don t fragment, More fragment to follow, Not used> 19

Other header fields Time To Live (TTL): in # of hops Each time a packet is forwarded: TTL = TTL 1 Idea: Drop a packet if it goes into a routing loop. Protocol: Receiving protocol ID 1: ICMP 6: TCP Header Checksum: To protect Tx error in header IP Options Route Record can be gathered 20

How does IP routing work? A router forwards packets based on Fields within the IP header Entries in its routing table (RT) Classification of packets Packets for which the node is the ultimate destination Give the packet to the upper layer entity identified by Protocol field. Packets for which ANOTHER node is the ultimate destination Forward the packet to another router 21

Structure of a Routing Table Target/Prefixlength Next Hop Interface 129.97.92.43/32 Router 1 x 120.97.92.0/24 Router 2 y Host-specific route Network-prefix route 125.86.55.70/32 directly z 0.0.0.0/0 Router 3 w Default route 22

How does IP routing work? When a node receives an IP packet to forward, Search the RT for an entry whose Target Address/Prefix Length fields MATCH the IP Destination Address in the packet. If a matching entry is found, forward the packet to the node identified by the Next Hop field via the specified Interface. Address matching Given: an IP address and a Target Address/Prefix length Matching occurs if the leftmost Prefix-length bits of Target Address are equal to those same bits in the packet s IP address. If more than one matching is found Select the route with the largest Prefix-length. 23

How does IP routing work? The Next Hop fields in an RT For a Target that is NOT connected to one of the node s directly attached links, the NH field contains the IP. address of a router that can be used to reach that Target. Otherwise, the NH field contains a special value ( directly ) indicating that the Target is connected to one of the node s directly attached links. 24

How does IP routing work? Three categories of RT entries Host-specific route: Denoted by Prefix-length of 32 Provides matching for exactly one IP address. Network-prefix route: Denoted by Prefix-length of 1 31 Default route: Prefix-length = 0 Provides matching for all IP addresses. Used when the first alternatives are absent. 25

How does IP routing work? Summary of matching If a host-specific route is available, use it. If no host-specific route is available, but there is a network-prefix route, use the network-prefix route. If neither a host-specific nor a network-prefix route is available, choose a default router, if one exists Finally, if a packet can not be forwarded, send an ICMP Unreachable message to the source of the packet. 26

Three ways Statically Creating Routing Tables Network-prefix routes to all hosts connected to an attached link. Default route for the rest of the destinations Routers can still update their tables using the following approaches. Dynamically By running routing protocols (OSPF, RIP, BGP) Dynamically When ICMP Redirect messages are received 27

Creating Routing Tables ICMP Redirect Message Two nodes are neighbors if they are on the same link. If a router finds that a neighboring host is using a non-optimal Next Hop to reach a certain destination. The router can inform the host by sending an ICMP Redirect message The Redirect message contains the IP address of the desired router. All the three entities must be on the same link. 28

Autonomous System (AS) Transit AS Multi-homed AS Border/edge router AS Stub AS AS 29

Autonomous System Each AS has a 16-bit unique ID: Max #65,000 By 2004: 10,000 AS AS Number used in Inter-AS routing (BGP) Get an ASN from ARIN (American Registry for Internet Numbers) in NA RIPE (Reseaux IP Europeens ) in Europe APNIC (Asia Pacific Network Info. Center) in Asia 30

Protocols for Constructing RT Intra-Domain (within an AS) RIP (Routing Information Protocol) OSPF (Open Shortest Path First) Inter-Domain (Among AS) BGP (Border Gateway Protocol) 31

RIP Uses the distance-vector (DV) algorithm Metric for computation of shortest path Hop Count Max# of hops is limited to 15 (scope of RIP is an AS) 32

A router RIP Update message Sends an Update msg to each neighbor/30sec. Does not receive an Update for 180sec link down Contains 25 entries of the form <Destination, Cost>. Destination: Network Address (IP/Prefix-length) Behavior: Let X receive entry <Z, C1> from Y Meaning: Y can reach network Z with a cost C1 Let X has an entry in its RT: <Z, NH, C2> If C2 <= C1 + 1: No action is taken (X s RT has the best path.) If C2 > C1 + 1: Replace <Z, NH, C2> with <Z, Y s IP, C1+1> If X has no entry <Z, NH, C2>, create one: <Z, Y s IP, C1+1> 33

RIP: Description A B C 34

RIP Steady state: Shortest paths established. Routers learns from neighbors only local knowledge Local knowledge => routing loop A A B B C C 35

Disadvantages RIP Routing loop Long convergence time Bad news (link failure) propagates slowly. Advantages Routers know this in an indirect manner. Simple Low message overhead 36

OSPF (Link-State Protocol) Types of Link Point-to-Point: two routers directly connected Type 1 (Router link) Transient: Two routers connected to a LAN. Type 2 (Network link) Stub: a router connected to a LAN Type 3 (Summary link to network) Link State: <Type, Cost> Cost: Delay, hop count,. (define your metric..) A router knows the states of all its links: measure cost All routers exchange their knowledge All know the entire topology central idea in OSPF 37

OSPF (Link-State Protocol) Creation of states of the links by each router In the form of Link State Packets (LSP) Dissemination of LSPs to every other router (flood) In an efficient and reliable manner Formation of a shortest path tree for each node Use Dijkstra s Algorithm Calculation of a RT based on shortest paths 38

OSPF (Link-State Protocol) Creation of Link State Packets LSP: <Sender s ID, List of links(link, Cost), Seq#, Age> First two: for topology creation Third: Facilitates flooding, distinguishes new LSPs from old. Fourth: Prevents LSPs from remaining for a long time. LSPs are generated in two ways: When there is a change in the topology of the domain. On a periodic basis: 1-2 hours. 39

OSPF (Link-State Protocol) Flooding of LSPs: 1-to-all The creating node sends a copy of LSP to all neighbors. A node that receives an LSP If the LSP is an old one (check seq #) => drop it. If the LSP is a new one Replace the old one with the new one Send a copy to all neighbors except one from which it was received» Better: wait; send it to those who did not give you a copy. 40

OSPF (Link-State Protocol) Formation of shortest paths (Dijkstra s Alg.) Input: A weighted graph and a source node S Output: All shortest paths from S to all other nodes Process Labeling each node X with <cost, Y, status> Cost: Sum of all edge-weights from S to X Y: Node immediately preceding X on shortest path from S to X Status: T (tentative) or P (permanent) Idea Uses the idea of a working node. Nodes are marked P as computation progresses. Stop: When all are marked P. 41

OSPF (Link-State Protocol) Process (contd.) (S1) Initially: Node S: <0, --, T>; Others: <, --, T> (S2) If all nodes have been marked as P, go to S4 Else{Select a node with smallest cost in its <cost,?, T> Mark the selected node as P; call it working node(w) Go to S3.} (S3) For each T labeled neighbor Z of W, do fol. and go to S2. Let the label of W be <Wc, Wp, P> and of Z be <Zc, Zp, T> Let the cost of W Z link be C If (Wc + C < Zc), replace <Zc, Zp, T> with <Wc+C, W, T> (S4) For each node V in the graph, let <Vc, Vp, P> be its label. Vc: Cost of going from S to V on a shortest path Vp: The node immediately preceding V on the shortest path from S to V. 42

OSPF: Dijkstra s Algorithm B 2 2 7 C 3 3 A E 2 F D 6 1 2 2 G 4 H 43

Border Gateway Protocol 44

Main ideas BGP Allow two ASs to exchange routing information so that IP packets can flow across AS border. Enforce policies, rather than go for shortest paths. All BGP routers on an AS have identical routing info. Supported by all-to-all persistent TCP connections 45

Example Routing AS7 AS4 AS6 AS5 AS2 BGP router TCP connection AS3 AS1 N1, N2 46

Autonomous System (AS) Transit AS R2 R1 Multi-homed AS R4 R3 R5 R6 Stub AS Border/edge router AS4 AS3 N1 47

Example BGP R4 in AS3 knows that it can reach N1. R4 informs R3 in AS2 that it can reach N1. R2 knows whatever R3 knows. => R2 knows that it can reach N1 via R3. Now R2 informs R1 by sending a message as follows. The sequence of AS {AS2, AS3} to reach N1 The next hop router address (of R3) A list of metrics indicating the degree of preferences for the route 48

BGP Routing A BGP router advertises a route to a destination only if it is actively using the route. BGP routers exchange reachability information containing a path vector (AS path) a seq. of AS Path vector information is used to prevent loops When a router receives a path vector, it ensures that its AS number does not appear in the path vector. A path is discarded if its AS number appears on the received path. 49

Policy BGP Policy The attribute (AS path) info. allows policies to be enforced. Example Never use AS X Never use AS X to get to destination Y» Ex.: Never route IP packets originating and terminating at US hosts via Canada Never use AS X and AS Y on the same path. 50

Import policy BGP Routing: Enforce Policy Influence the selection of paths to destinations. Apply import policy to accept, deny or set preferences on the route advertisement received from neighbors. An ISP may reject a path if it includes an untrustworthy AS. Export policy Control the distribution of routing information. Apply export policy to determine which routes should be advertised. An ISP may have agreements to carry transit traffic from certain ISPs and not from all. 51

BGP Protocol at a Glance Initially, BGP peers exchange the entire BGP RT. Subsequently, only incremental updates are sent. An update contains an NLRI (Net. Layer Routing Info) field An AS path A list of IP/PL that can be reached by the above AS path The NH: Sender s IP corresponding to the end-point The receiving router of an update message puts its AS number at the beginning of the received AS path before forwarding the message. (The NH is different for each msg ) Each router constructs an AS-path graph. A BGP router routes packets using its own policies and connectivity information, such as cost. BGP peers exchange keepalive messages every 30s. 52