Advanced Lab in Computer Communications Meeting 4 Network Layer. Instructor: Tom Mahler

Similar documents
Network layer: Overview. Network layer functions IP Routing and forwarding

Distance Vector Routing Protocols. Routing Protocols and Concepts Ola Lundh

Chapter 4 Network Layer

Dynamic Routing Protocols II OSPF. Distance Vector vs. Link State Routing

Chapter 4. Distance Vector Routing Protocols

Internet Packets. Forwarding Datagrams

Classful IP Addressing. Classless Addressing: CIDR. Routing & Forwarding: Logical View of a Router. IP Addressing: Basics

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

IP addressing and forwarding Network layer

IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

Introduction to TCP/IP

RARP: Reverse Address Resolution Protocol

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Route Discovery Protocols

Internet Protocols Fall Lectures 7-8 Andreas Terzis

IP - The Internet Protocol

Router and Routing Basics

Internetworking. Problem: There is more than one network (heterogeneity & scale)

8.2 The Internet Protocol

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

CS 43: Computer Networks IP. Kevin Webb Swarthmore College November 5, 2013

Based on Computer Networking, 4 th Edition by Kurose and Ross

Computer Networks. Main Functions

Cisco CCNP Optimizing Converged Cisco Networks (ONT)

Internetworking and Internet-1. Global Addresses

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

CS335 Sample Questions for Exam #2

Network Layer: Network Layer and IP Protocol

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

Transport and Network Layer

Internet Protocols. Addressing & Services. Updated:

Routing Protocols (RIP, OSPF, BGP)

The Internet. Internet Technologies and Applications

Lecture Computer Networks

Introduction to IP v6

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Chapter 10 Link-State Routing Protocols

Internet Protocols Fall Outline

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

Cisco Configuring Commonly Used IP ACLs

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

Interconnection of Heterogeneous Networks. Internetworking. Service model. Addressing Address mapping Automatic host configuration

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

IP Addressing Introductory material.

Routing Protocols. Interconnected ASes. Hierarchical Routing. Hierarchical Routing

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

: Interconnecting Cisco Networking Devices Part 1 v2.0 (ICND1)

Internet Protocol version 4 Part I

Lecture 8: Routing I Distance-vector Algorithms. CSE 123: Computer Networks Stefan Savage

Link-State Routing Protocols

IP Multicasting. Applications with multiple receivers

IP Addressing. IP Addresses. Introductory material.

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks

ICS 351: Today's plan

Scaling the Network: Subnetting and Other Protocols. Networking CS 3470, Section 1

Layer 3 Routing User s Manual

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Introduction to LAN/WAN. Network Layer (part II)

- IPv4 Addressing and Subnetting -

DHCP, ICMP, IPv6. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley DHCP. DHCP UDP IP Eth Phy

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Internet Protocol (IP) IP - Network Layer. IP Routing. Advantages of Connectionless. CSCE 515: Computer Network Programming IP routing

Internet Control Message Protocol (ICMP)

IP Address Classes (Some are Obsolete) Computer Networking. Important Concepts. Subnetting Lecture 8 IP Addressing & Packets

Internet Control Protocols Reading: Chapter 3

Internet Protocol Version 6 (IPv6)

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

IP address format: Dotted decimal notation:

CHAPTER 10 IP MULTICAST

Network Security TCP/IP Refresher

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Interconnecting Cisco Networking Devices Part 2

OSPF Version 2 (RFC 2328) Describes Autonomous Systems (AS) topology. Propagated by flooding: Link State Advertisements (LSAs).

Introduction to LAN/WAN. Network Layer

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

ISOM3380 Advanced Network Management. Spring Course Description

Future Internet Technologies

Chapter 4 Network Layer

GregSowell.com. Mikrotik Routing

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

CSE331: Introduction to Networks and Security. Lecture 8 Fall 2006

Routing with OSPF. Introduction

Mobile Routing. When a host moves, its point of attachment in the network changes. This is called a handoff.

OSPF Routing Protocol

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

Answers to Sample Questions on Network Layer

CCNA Exploration 4.0: (II) Routing Protocols and Concepts. Chapter 1: Introduction to Routing and Packet Forwarding

6.263 Data Communication Networks

CS 348: Computer Networks. - IP addressing; 21 st Aug Instructor: Sridhar Iyer IIT Bombay

IPV6 流 量 分 析 探 讨 北 京 大 学 计 算 中 心 周 昌 令

IT-AD08: ADD ON DIPLOMA IN COMPUTER NETWORK DESIGN AND INSTALLATION

College 5, Routing, Internet. Host A. Host B. The Network Layer: functions

Transcription:

Advanced Lab in Computer Communications Meeting 4 Network Layer Instructor: Tom Mahler

Routing How do packets get from A to B in the Internet? A Internet B

Network Layer: Routing Layers model Application Transport Network Data Link Physical Each router makes a LOCAL decision to forward the packet towards destination using Internet routing protocols.

Network layer functions Host addressing: numerical label of each device participating in a computer network that uses the Internet Protocol. Path determination: route taken by packets from source to dest. Routing algorithms: Global: link state algorithms (OSPF, IS-IS) Decentralized: distance vector algorithms (RIP, IGRP, EIGRP, BGP) Switching: move packets from router s input to appropriate router output Lookup and Forwarding : Forwarding Table Longest prefix matches

IP IP (Internet Protocol) is a Network Layer Protocol. TCP UDP Transport Layer ICMP IP IGMP Network Layer ARP Network Access Link Layer Media IP s current version is Version 4 (IPv4). It is specified in RFC 891. IPv6 is the latest revision of the IP. September 2013 IPv6 surpassed 2% for the first time. IPv6 uses a 128-bit address

IP IP is the highest layer protocol which is implemented at both routers and hosts Application Application protocol Application TCP TCP protocol TCP IP IP protocol IP IP protocol IP IP protocol IP Data Link Data Link Data Link Data Link Data Link Data Link Data Link Data Link Network Access Host Router Router Host

IP Service IP provide provides an unreliable connectionless best effort service. Unreliable: IP does not make an attempt to recover lost packets Connectionless: Each packet ( datagram ) is handled independently. IP is not aware that packets between hosts may be sent in a logical sequence Best effort: IP does not make guarantees on the service (no throughput guarantee, no delay guarantee, ) Consequences: Higher layer protocols have to deal with losses or with duplicate packets Packets may be delivered out-of-sequence

IP Addresses 32 bits version (4 bits) header length TTL Time-to-Live (8 bits) Identification (16 bits) Type of Service/TOS (8 bits) Protocol (8 bits) flags (3 bits) Total Length (in bytes) (16 bits) Fragment Offset (13 bits) Header Checksum (16 bits) Source IP address (32 bits) Destination IP address (32 bits) Ethernet Header IP Header TCP Header Application data Ethernet Trailer Ethernet frame

IPv4 Header Identification Original packet ID in case of fragmentation Flags Don't Fragment (DF)/More Fragments (MF) Fragment Offset - specifies the offset of a particular fragment relative to the beginning of the original unfragmented IP datagram. Protocol upper layer protocol e.g. TCP(6), UDP(17), OSPF(89), ICMP(1)

IPv4 addresses class-full addressing: 1981-1993 Routing between networks Routing within a network

IP addressing: CIDR classfull addressing: inefficient use of address space, address space exhaustion e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network CIDR: Classless Inter Domain Routing network portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in network portion of address network part host part 11001000 00010111 00010000 00000000 200.23.16.0/23

IP addresses: how to get one? Hosts (host portion): hard-coded by system admin in a file DHCP: Dynamic Host Configuration Protocol: dynamically get address: plug-and-play host broadcasts DHCP discover msg DHCP server responds with DHCP offer msg host requests IP address: DHCP request msg DHCP server sends address: DHCP ack msg

IP Addressing: introduction IP address: 32-bit identifier for host, router interface interface: connection between host, router and physical link router s typically have multiple interfaces host may have multiple interfaces IP addresses associated with interface, not host, or router 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 223.1.3.27 223.1.2.2 223.1.3.2 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1

IP Addressing IP address: network part high order bits host part low order bits What s a network? (from IP address perspective) device interfaces with same network part of IP address can physically reach each other without intervening router 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 223.1.3.27 LAN 223.1.2.2 223.1.3.2 network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address)

IP Addressing How to find the networks? Detach each interface from router, host create islands of isolated networks 223.1.1.1 223.1.1.2 223.1.1.3 223.1.9.2 223.1.7.0 223.1.1.4 223.1.9.1 223.1.8.1 223.1.8.0 223.1.7.1 223.1.2.6 223.1.3.27 Interconnected system consisting of six networks 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2

Routing Example Starting at A, given IP datagram addressed to B: look up network address of B, find B on same network as A link layer sends datagram to B inside link-layer frame frame source, dest. address A B datagram source, dest. address 223.1.1.1 223.1.1.2 223.1.2.1 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 223.1.3.27 223.1.2.2 223.1.3.2 E B s MAC addr A s MAC addr A s IP addr B s IP addr IP payload frame datagram

ARP: Address Resolution Protocol Question: how to determine MAC address of B given B s IP address? Each IP node (Host, Router) on LAN has ARP module and table ARP Table: IP/MAC address mappings for some LAN nodes < IP address; MAC address; TTL> <.. > TTL (Time To Live): time of day after which address mapping will be forgotten (typically 20 minutes)

ARP protocol A knows B's IP address, wants to learn physical address of B A broadcasts ARP query pkt, containing B's IP address all machines on LAN receive ARP query B receives ARP packet, replies to A with its (B's) physical layer address A caches (saves) IP-to-physical address pairs until information becomes old (times out)

IP addresses: how to get one? Network (network portion): get allocated portion of ISP s address space: ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23....... Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23

Datagram Forwarding Algorithm for router/hosts Every node (host/router) first checks to see if it is connected to the same physical network as the destination. Routers are connected to several physical networks, while hosts are only connected on a single network. If the destination address is in the same network, send the packet directly to the destination. If the destination address is in a different network, the node forwards the packet to a router that knows how to reach the destination.

Getting a datagram from source to dest. Starting at A, given IP datagram addressed to B: r r r misc fields 223.1.1.1 223.1.1.3 data look up net. address of B find B is on same net. as A link layer will send datagram directly to B inside link-layer frame m B and A are directly connected A B Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 223.1.3.27 223.1.2.2 223.1.3.2 E

Getting a datagram from source to dest. Starting at A, dest. E: r r r r look up network address of E E on different network m A, E not directly attached routing table: next hop router to E is 223.1.1.4 link layer sends datagram to router 223.1.1.4 inside linklayer frame r datagram arrives at 223.1.1.4 r misc fields 223.1.1.1 223.1.2.2 data continued.. A B Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 223.1.3.27 223.1.2.2 223.1.3.2 E

Getting a datagram from source to dest. Arriving at 223.1.4, destined for 223.1.2.2 r r r Dest. next misc fields 223.1.1.1 223.1.2.2 data network router Nhops interface 223.1.1-1 223.1.1.4 look up network address of E E on same network as router s interface 223.1.2.9 m router, E directly attached link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9 r datagram arrives at 223.1.2.2 223.1.2-1 223.1.2.9 223.1.3-1 223.1.3.27 A B 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 223.1.3.27 223.1.2.2 223.1.3.2 E

Routing Algorithm classification Global or decentralized information? Global: all routers have complete topology, link cost info link state algorithms Decentralized: router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors distance vector algorithms

RIP Routing Information Protocol Distributed with the popular Berkeley Software Distribution version of Unix. Richard Bellman Based on BF algorithm.

RIP Routing Information Protocol At start every node is familiar with it s immediate neighbors. Every node holds a distance vector containing the costs to all other nodes. Each node distributes it s distance vector to it s immediate neighbors. The nodes keep updating their distance vectors until convergence is reached. Routers keep sending distance vectors/ updates every 30 sec to handle changes in the network graph topology. Cost metric: number of hops (distance) RIP support 1-15 hops routes (with 16 hops representing infinity).

RIP - Example B A C D E Initial distances stored at each node Node Distance to reach a node A B C D E F G A 0 1 1 1 1 B 1 0 1 C 1 1 0 1 D 1 0 1 F G F 1 0 1 G 1 1 0 Initial routing table at node A Destination Cost Next Hop B 1 B C 1 C D - E 1 E F 1 F G -

RIP - Example B A C D E Final distances stored at each node Node Distance to reach a node A B C D E F G A 0 1 1 2 1 1 2 B 1 0 1 2 2 2 3 C 1 1 0 1 2 2 2 D 2 2 1 0 3 2 1 F G F 1 2 2 2 2 0 1 G 2 3 2 1 3 1 0 Final routing table at node A Destination Cost Next Hop B 1 B C 1 C D 2 C E 1 E F 1 F G 2 F

RIP Convergence Problem A 1 B Node Cost 1000 1 C A 1 C 1

IGRP (Interior Gateway Routing Protocol) CISCO proprietary; successor of RIP (mid 80s) Distance Vector, like RIP several cost metrics (delay, bandwidth, reliability, load etc) uses TCP to exchange routing updates Uses a combination of metrics Network delay, bandwidth, reliability and load all factored into the routing decision

IGRP Continued Provides a wide range for its metrics For example Reliability value between 1 and 255 Bandwidth values reflecting speeds from 1200 bps to 10 Gbps Delay value from 1 to 224 Contrast with RIP(does not weigh metrics) it only uses one Maximum hop count 255 Contrast with RIP 15 hops only

IGRP Metrics and routing Updates Bandwidth by default is given the most importance Router running IGRP sends updates every 90 seconds Declares route inaccessible if an update from first router is not sent within 3 update periods (270 seconds) after 5 update periods (450 seconds) router removes the route from the routing table Poison reverse to speed up convergence

Features that Enhance Stability of IGRP Split Horizons with Poison-Reverse Occur when router tries to send information about a route back in the direction that it came Helps prevent routing loops Implemented in IGRP

EIGRP EIGRP is a distance vector, classless routing protocol that was released in 1992 with IOS 9.21. As its name suggests, EIGRP is an enhancement of Cisco IGRP (Interior Gateway Routing Protocol). Both are Cisco proprietary protocols and only operate on Cisco routers. The main purpose in Cisco's development of EIGRP was to create a classless version of IGRP. Although EIGRP may act like a link-state routing protocol, it is still a distance vector routing protocol.

EIGRP The Algorithm EIGRP uses the Diffusing Update Algorithm (DUAL). EIGRP does not send periodic updates and route entries do not age out. Only changes in the routing information, such as a new link or a link becoming unavailable ("Hello" packet is not received from a neighbor) cause a routing update to occur. EIGRP routing updates are still vectors of distances transmitted to directly connected neighbors.

EIGRP EIGRP s 5 Packet Types Hello packets Used to discover & form adjacencies with neighbors Update packets Used to propagate routing information Query packets Used by DUAL for searching for networks Can use Unicast or Multicast Reply packets Reply packet Can use Unicast only Acknowledgement packets Used to acknowledge receipt of update, query & reply packets

EIGRP EIGRP Bounded Updates EIGRP only sends update when there is a change in route status Partial update A partial update includes only the route information that has changed the whole routing table is NOT sent Bounded update When a route changes, only those devices that are impacted will be notified of the change EIGRP s use of partial bounded updates minimizes use of bandwidth

OSPF- Open Shortest Path First At first, every node knows it s neighbors and the cost to reach them. Edsger Dijkstra Each router generates link state advertisements (LSAs) which are distributed to all routers LSA = (link id, state of the link, cost, neighbors of the link) Each router maintains a database of all received LSAs (topological database or link state database), which describes the network has a graph with weighted edges. Each router uses its link state database to run a shortest path algorithm (Dijikstra s algorithm) to produce the shortest path to each network

Features of OSPF Enables load balancing by allowing traffic to be split evenly across routes with equal cost Type-of-Service routing allows to setup different routes dependent on the TOS field Supports multicasting Allows hierarchical routing

Neighbor Discovery and Maintenance Hello Protocol Hello packets sent out every 10 seconds helps to detect failed neighbors RouterDeadInterval (default 40 seconds) neighboring routers agree on intervals hello interval set so that a link is not accidentally brought down

OSPF Areas An area is a set of routers that are configured to change link state information among themselves. Area Border Routers (ABRs) are connecting between the different areas. The result: improved scalability rather than absolute optimal shortest paths

END