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

Similar documents
CS 455 Internet Architecture, Page 3 ffl By 1985, the ARPANET was heavily used and congested; the National Science Foundation (NSF) initiated the NSFN

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

IP Protocols. ALTTC/Oct

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

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided.

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

Network Layer, Part 1 Internet Architecture. History

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Introduction to Internetworking

Topics for This Week

Introduction to routing in the Internet

Chapter 09 Network Protocols

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

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

Introduction to routing in the Internet

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

Networking interview questions

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

EEC-684/584 Computer Networks

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

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

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

Vorlesung Kommunikationsnetze

The Internetworking Problem. Internetworking. A Translation-based Solution

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

IP : Internet Protocol

The Internet Protocol (IP)

ROUTING INTRODUCTION TO IP, IP ROUTING PROTOCOLS AND PROXY ARP

TCPIP Protocol Suite & Utilities. Revision no.: PPT/2K403/02

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

Internetworking Part 2

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

Chapter 12 Network Protocols

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

Table of Contents. Cisco TCP/IP

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

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

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

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

EEC-484/584 Computer Networks

Administrivia CSC458 Lecture 4 Bridging LANs and IP. Last Time. This Time -- Switching (a.k.a. Bridging)

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

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

Need For Protocol Architecture

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

Need For Protocol Architecture

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

Telecommunication Protocols Laboratory Course. Lecture 3

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

Open Shortest Path First (OSPF)

Lecture 11: Networks & Networking

ECE 428 Internet Protocols (Network Layer: Layer 3)

ET4254 Communications and Networking 1

SEN366 (SEN374) (Introduction to) Computer Networks

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

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

Chapter 7 Routing Protocols

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

ICMP, ARP, RARP, IGMP

II. Principles of Computer Communications Network and Transport Layer

ETSF05/ETSF10 Internet Protocols Network Layer Protocols

TSIN02 - Internetworking

Basic Idea. Routing. Example. Routing by the Network

Router Architecture Overview

ICMP (Internet Control Message Protocol)

Routing by the Network

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

Routing. Advanced Computer Networks: Routing 1

Chapter 7. Local Area Network Communications Protocols

Interconnecting Networks with TCP/IP. 2000, Cisco Systems, Inc. 8-1

Why dynamic route? (1)

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

ETSF05/ETSF10 Internet Protocols. Routing on the Internet

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

Routing, Routing Algorithms & Protocols

Internetworking - We are heterogeneity to our network (variable network technologies, bandwidth, MTU, latency, etc. etc.)

Networking: Network layer

ECE 4450:427/527 - Computer Networks Spring 2017

Network layer: Overview. Network Layer Functions

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

Internetwork Protocols

Date: June 4 th a t 1 4:00 1 7:00

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

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

Chapter 4: Network Layer

ICS 351: Networking Protocols

COMP/ELEC 429/556 Introduction to Computer Networks

ECE4110 Internetwork Programming. Introduction and Overview

Internet Protocols (chapter 18)

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

Network and Security: Introduction

ICS 451: Today's plan

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

Telecom Systems Chae Y. Lee. Contents. Overview. Issues. Addressing ARP. Adapting Datagram Size Notes

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

Internet Control Message Protocol (ICMP)

cs/ee 143 Communication Networks

Defining Networks with the OSI Model. Module 2

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

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

Transcription:

NEC/NSC-NET2 NET2-2 Internet Protocol and Routing - - - Network Science Certificate 0 George Mason University The author of these slides is Dr. Mark Pullen of George Mason University s NEC program. Students registered in Dr. Pullen s NEC courses at GMU may make a single machine-readable copy and print a single copy of each slide for their own reference, so long as each slide contains the copyright statement, and GMU facilities are not used to produce paper copies. Permission for any other use, either in machine-readable or printed form, must be obtained from the author in writing. 2-98 998 J. Mark Pullen Seven Layer Model Application Presentation Session Transport Network DLC Physical Peer Connection Application Presentation Session Transport Network DLC Physical 2-98 998 J. Mark Pullen 2

Seven Layer ISO Reference Model. Physical - communications medium: wire, fiber, radio, etc. 2. Data Link Control - framing, link error & flow control medium access control (MAC) sublayer used for multi-access e.g. Ethernet 3. Network - routing, congestion control internet sublayer - interconnects networks 4. Transport - end-to-end error and flow control 5. Session - connection management 6. Presentation - recoding transmitted form to display form e.g. compression, encryption 7. Application - doing what the user needs e.g. e-mail 2-98 998 J. Mark Pullen 3 Network Layer Switching Host Host 2-98 998 J. Mark Pullen 4 2 2

Network Service Models Connection Setup Destination Address Packet Sequencing Error and Flow Control Negotiation of Options Connection-oriented Before data flow At connection setup Ordering guaranteed Provided by Network Layer Possible during setup Connectionless Not required With each packet No assurance Provided by Transport Layer Not provided 2-98 998 J. Mark Pullen 5 Network Protocol Models Connection Setup Addressing State Routing Node Failure Virtual Circuit Before data flow Network address mapped to VC Required for each VC Selected at Connection Setup Terminates VCs Datagram Not required Source and Destination on each Packet No state storage needed Selected for each Packet Packets in Queues Lost Complexity Within Network Layer Within Transport Layer 2-98 998 J. Mark Pullen 6 3 3

TCP/IP History U.S. DoD Advanced Research Project Agency (ARPA, sometimes DARPA) created ARPANET starting 968 ARPANET was first wide-area general purpose packet network, served universities and ARPA contractors Original developers BBN, UCLA, SRI. Later USC/ISI, MIT. Standards evolved from Request for Comments (Now RFC) In the early 970 s the concept of internetworking (or internetting) was advanced. The ARPANET became the core of the Internet experiment and TCP/IP was developed as its protocol suite Today the IETF supports dozens of related open protocols that make up the Internet Protocol Suite (IPS) 2-98 998 J. Mark Pullen 7 Internetworking of 3 Subnetworks interconnected by intermediate systems to form an internet (note small i ). LAN X.25 STORE- AND- FORWARD NODES Token Ring Network = Internet or Subnet 2-98 998 J. Mark Pullen 8 4 4

Internetworking 2 of 3 Subnet: Physical network over which systems may communicate directly. Bridge: Datalink layer Relays frames on same subnet Router: Network layer Forwards packets to different subnets Requirements: Network interconnection - PL, DLL, NL Routing and data delivery among networks Services such that network differences are handled. 2-98 998 J. Mark Pullen 9 Internetworking 3 of 3 Addressing DL address - subnetwork point of attachment (SNPA) Different address (and possibly formats) for different subnet Assume that subnet physical has local (on subnet) significance only. MTU - Maximum transfer unit Maximum transfer unit Network access mechanism Error recovery Routing techniques Connection-oriented (VC) or connectionless (datagram) 2-98 998 J. Mark Pullen 0 5 5

Internet Protocol IP is a connectionless protocol-each packet is routed independent of all others IP packets are called datagrams IP delivers packets on a best effort basis - no guarantee of delivery IP does not guarantee ordered delivery Created as a protocol to link different networks, IP has has become increasingly popular to run directly on hosts 2-98 998 J. Mark Pullen IP Addresses There are four active classes of IP address. All are 32 bits long Class A - 28 nets with 6M hosts each 0nnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh Class B - 6K nets with 64K hosts each 0nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh Class C - 4M nets with 256 hosts each 0nnnnn nnnnnnnn nnnnnnnn hhhhhhhh Class D - Multicast, 256M groups 0gggg gggggggg gggggggg gggggggg Note: here K = 2 0 = 024, M = 2 20 = 048576 2-98 998 J. Mark Pullen 2 6 6

IP Number Notation 92. 27. 253. 000000 0 0 0000000 Domain Name System - - - cs.gmu.edu = 29.74.40.3 site.gmu.edu = 29.74.40.83 bacon.gmu.edu = 29.74.65. cne.gmu.edu = 29.74.20.40 dsigw.gmu.edu = 99.56.35.2 2-98 998 J. Mark Pullen 3 IP HEADER 0 4 8 6 9 24 3 VERS HLEN SERVICE TYPE TOTAL LENGTH IDENTIFICATION FLAGS FRAGMENT OFFSET TIME TO LIVE PROTOCOL HEADER CHEKSUM SOURCE IP ADDRESS DESTINATION IP ADDRESS IP OPTIONS (IF ANY) DATA... PADDING 2-98 998 J. Mark Pullen 4 7 7

IP Header Information of 4 VERS - protocol version (current = 4) (new = 6) HLEN - header length in 32 - bit words max. header length = 60 bytes SERVICE TYPE - precedence and handling options Telnet - low delay FTP data - high throughput??? - high reliability 3 bits: Precedence field 4 bits: TOS - min delay, max. throughput, max reliability bit : unused. 2-98 998 J. Mark Pullen 5 IP Header Information 2 of 4 TOTAL LENGTH - packet length in bytes 6 bits - > max = 64,535 bytes Field needed because link layer may add padding IDENTIFICATION, FLAGS, FRAGMENT OFFSET - used in fragmentation, i.e. passing a packet through a net where its length exceeds that net s Maximum Transmission Unit (MTU) TIME TO LIVE (TTL)- max number of routers through which datagram may be forwarded. Set by sender (e.g. 32 or 64) and decremented by each router that processed datagram. 2-98 998 J. Mark Pullen 6 8 8

IP Header Information 3 of 4 PROTOCOL - code for transport protocol HEADER CHEKSUM - error check for header (assuming zeros in this field). - Sender: Divide header into 6 bit pieces and calculate s compliment of sum) - Receiver: s compliment sum over entire header, including checksum. ALL s -> OK. SOURCE IP, DESTINATION IP - addresses of from/to hosts (32 bits each) 2-98 998 J. Mark Pullen 7 OPTIONS - Variable length IP Header Information 4 of 4 Security (not used in Internet) Record route: Each router records its IP address in the options data area Timestamp: Each router records the time and possibly its IP addr. Loose source route: List of routers (IP address) that must be visited by datagram in specified order. Other routers may be visited. Strict source route: Similar. Only listed routers may be visited. 2-98 998 J. Mark Pullen 8 9 9

IP Subnet Mechanisms Using IP, devices on a physically contiguous (or bridged) LAN will share the same high-order address bits typically, a class C network address Address Resolution Protocol (ARP) - broadcast to LAN does anybody out there use this IP address? builds table of Ethernet addresses corresponding to IP addresses. Reverse ARP (RARP) - used by diskless client to find its IP address at bootup, designated RARP host replies protocol BOOTP is used Dynamic Host Configuration Protocol (DHCP) allows IP numbers to be assigned from a server when needed rather than statically configured selected devices can still always receive same IP address 2-98 998 J. Mark Pullen 9 Address Resolution Protocol (ARP) How to map IP addresses to 48-bit link level addresses? Maintain a local mapping of IP addresses to link level addresses Techniques Encode hosts physical address into the host part of the IP address. Maintain Cache of mappings (the ARP approach). 2-98 998 J. Mark Pullen 20 0 0

ARP Packet 0 8 6 3 Hardware Type HLEN PLEN Protocol type Operation Source Hardware Address Source Hardware Address Source Protocol Address Source Protocol Address Target Hardware Address Target Hardware Address Target Protocol Address 2-98 998 J. Mark Pullen 2 ARP Packet 0 8 6 3 Hardware Type HLEN PLEN Protocol type Operation Source Hardware Address Source Hardware Address Source Protocol Address Source Protocol Address Target Hardware Address Target Hardware Address Target Protocol Address 2-98 998 J. Mark Pullen 22

IP Control Message Protocol (ICMP) of 4 ICMP passes data among routers: - error statistics - reachability tests ( ping ) - source quench congestion control - routing loops - clock synchronization Part of Internet Layer Used to communicate errors and other conditions not handled by IP or higher layer protocols Carried in IP datagrams with Protocol = 0x0 IP header 20 bytes ICMP message 2-98 998 J. Mark Pullen 23 IP Control Message Protocol 2 of 4 ICMP Message Format 0 7 8 5 6 3 type code checksum message contents... Types include 0 Echo (ping) reply Query response 3 Destination unreachable Error Codes include: 0 Network unreachable Host unreachable 5 Redirect Error 8 Echo request Query 2-98 998 J. Mark Pullen 24 2 2

IP Control Message Protocol 3 of 4 Checksum Calculated over entire ICMP message (same algorithm as IP) Message contents Query: Depends on type Error: IP header and first 8 bytes data of diagram that caused ICMP message to be generated. ICMP error message never generated in response to ICMP error message Datagram destined to IP broadcast or IP multicast addr. Fragment other than first Datagram with source address <> single host 2-98 998 J. Mark Pullen 25 IP Control Message Protocol 4 of 4 ICMP Redirect used by router to inform datagram source of a better router ES R 3 4 2 R2 Allows good routing on subnet with minimal configuration in end systems. 2-98 998 J. Mark Pullen 26 3 3

IP Fragmentation Transparent to higher layers When IP recovers datagram, if MTU for outgoing interface < datagram (data) size, fragment Rough Algorithm: Divide data based on MTU Max size pieces from front Multiples of 8 except last. Copy original IP header to IP header of each frag. If options in original, all copied to first frag, only some copied to other frags. In each frag: If last, set more fragments bit to, else 0. Set fragment offset to position (in 8 byte units) in data area of original datagram. Set total length of frag, datagram. Compute IP checksum (over header) 2-98 998 J. Mark Pullen 27 More on IP Fragmentation Fragment may be further fragmented later. If don t fragment bit = and fragmentation required, drop datagram and send ICMP error message. Reassembly Performed at destination Straightforward using fragment offset and more flags. 2-98 998 J. Mark Pullen 28 4 4

Routing and Forwarding What is the difference? Routing is the process of determining what route a packet shall follow requires routers to exchange reachability information using a routing protocol Forwarding is the process of dealing with a newlyarrived packet by sending it to the place indicated by the routing this always amounts to deciding which interface to send it on in IP the routing is captured in a routing table that shows, for every network or group of networks, which interface receives the packet in X.25 the routing is captured in a table that shows, for each incoming VC, which VC and interface to use 2-98 998 J. Mark Pullen 29 A Real Routing Table from bacon.gmu.edu Destination Gateway Interface 27.0.0. 27.0.0. lo0 29.74.20.0 29.74.40. 3.82.2.0 99.56.35. 3.82.22.0 99.56.35. 29.74.42.29 29.74.40.5 29.74.89.0 29.74.40.83 29.74.9.0 29.74.40.83 204.29.6.0 99.56.35. 204.28.32.0 99.56.35. 92.253.06.0 99.56.35. 29.74.65.0 29.74.65. le0 29.74.40.0 29.74.40.25 le 99.56.35.0 99.56.35.2 le2 224.0.0.0 29.74.65. le0 default 29.74.40. S&T2 29.74.40 bacon lab LAN 29.74.65 DSI 99.56.35 2-98 998 J. Mark Pullen 30 5 5

IP Routing Some Basics A network may be a LAN or a WAN composed of packet switches Most WANs today are composed of IP routers acting as packet switches Routers exchange pathway information via a routing protocol Router may also have explicit table of next hop addresses and a default route Some routing protocols are: RIP - distributed with Berkeley Unix OSPF - open shortest-path-first BGP/EGP - exterior gateways exchange Internet-level routing 2-98 998 J. Mark Pullen 3 Methods for Routing Review Shortest - path: assign each path a length (link state metric); find the shortest path from source to destination. Optimal: collect data globally to optimize, if necessary assign multiple paths to share loads. 2-98 998 J. Mark Pullen 32 6 6

Primitive Routing Techniques Review Source routing - source inserts list of nodes for packet to follow - no change possible, even if path not workable (IP allows this) Variation loose source routing requires packet to go through certain nodes but allows dynamic routing between the designated must visit nodes Static routing - predetermined paths that do not change Flooding - source sends packet to neighbors, they propagate, so on throughout net - simple but inefficient 2-98 998 J. Mark Pullen 33 Flooding Every node sends a copy of each received packet on each other link to which it connects Care must be taken to avoid overwhelming the network with excessive retransmission of packets Provides a simple, yet expensive, mechanism to broadcast messages to all nodes Sometimes used to send control or management frames when the network topology is uncertain. 2-98 998 J. Mark Pullen 34 7 7

Internet Routing Protocols The major function is distributing the cost and reachability information. How this is done reflects the philosophy of routing and age of protocol Routing Information Protocol (RIP) distance vector, uses hop count, uses UDP has messages to exchange routing tables comes with Unix slow convergence Open Shortest Path First (OSPF) link state, multiple metrics, uses IP directly type of service routing (uses IP header TOS) load balancing info exchange among gateways 2-98 998 J. Mark Pullen 35 RIP Packet Format 0 8 6 3 Command Version Must be zero Family of Net Address of Net Address of Net Distance to Net Family of Net 2 Address of Net 2 Address of Net 2 Distance to Net 2 2-98 998 J. Mark Pullen 36 8 8

Border Gateway Protocol (BGP / EGP) Internet gateways exchange Internet routing information among administrative domains gateway advertises that it can reach certain IP networks and its distance to them distance metrics not standardized exterior routing through autonomous systems uses TCP to exchange routing information important to distinguish between: advertising: telling another administrative what nets are reachable through this one routing:setting up the tables to support forwarding 2-98 998 J. Mark Pullen 37 Autonomous Systems (AS) An AS is a region of the Internet under the administrative control of a single entity. each AS has a unique 6 bit identifier (ASN) provides for scalability through hierarchical routing allows different routing methods in different domains domains communicate through border routers established by system managers absent prior arrangements, default routes are used among the autonomous systems 2-98 998 J. Mark Pullen 38 9 9

Routing Algorithms Review A routing algorithm computes the path packets follow to their destination. Static Routing Algorithms Routes determined in advance, off-line Routes distributed to switching nodes at network startup Adaptive Routing Algorithms Routes chosen in real-time based on measurements or estimates of current traffic and topology Routes updated dynamically to adapt to changes in demand and topology Adaptive algorithms can be centralized or distributed 2-98 998 J. Mark Pullen 39 Open Shortest-Path First (OSPF) Inter-domain link-state routing Design considerations Needs to be open, non-proprietary. Must support a variety of distance metrics Needs to respond dynamically to changes Should allow TOS routing Should do load balancing Security 2-98 998 J. Mark Pullen 40 20 20

OSPF and Network Topologies Three kinds of connections and networks Point to point between two routers Multiaccess network with broadcasting. Multiaccess networks without broadcasting Above is achieved by abstracting the collection of routers, networks and links into a directed graph. Vertices are routers or networks Edges are connections 2-98 998 J. Mark Pullen 4 OSPF Protocols Hello Protocol Checks that links are operational, and elects designated routers and backups. Hello packets sent every hello interval Run distributed elections Exchange Protocol Used to synchronize routing databases Flooding Protocol Distributes updates. Includes acknowledgment mechanism. 2-98 998 J. Mark Pullen 42 2 2

Shortest Path Routing Requires a metric to measure path length One possible metric is the number of hops along a path; an alternative is the measured or estimated delay along a path Object of shortest path routing is to find a spanning tree whose branches provide the shortest path to a destination A 2 5 B 3 2 C 3 E 5 2 F D 2-98 998 J. Mark Pullen 43 Dijkstra s Algorithm DEPTH-FIRST SEARCH Finds the shortest path from a given node to all other nodes by constructing the path in order of increasing path length Initialize: R = {s} and C n = D ns (if unreachable the delay is infinite) Add to R the node with the least-cost path from node s Find h not in R such that C h = min C n Add h to R Update the least-cost paths: C n = min [C n, C h + D hn ] for all n not in R Repeat preceding two steps until R = N Where, N = set of all nodes, s = source node, R = set of nodes incorporated by algorithm, Cn = cost of the least-cost path from node n to node s, and D ij = link cost from node i to node j 2-98 998 J. Mark Pullen 44 22 22

Dijkstra s Algorithm In Operation Iteration R CB Path CC Path CD Path CE Path CF Path {A} 2 A-B 5 A-C A-D? -? - 2 {A,D} 2 A-B 4 A-D-C 2 A-D-E? - 3 {A,B,D} 4 A-D-C 2 A-D-E? - 4 {A,B,D,E} 3 A-D-E-C 4 A-D-E-F 5 {A,B,C,D,E} 4 A-D-E-F 6 {A,B,C,D,E,F} A 2 5 B 3 2 C 3 E 5 2 F D 2-98 998 J. Mark Pullen 45 The Bellman-Ford Algorithm BREADTH-FIRST SEARCH Principle of optimality Principle of optimality: from the current state, the optimal path is optimal independent of steps taken to reach this state Finds the shortest path from a given node to all other nodes by constructing the shortest path under the constraint that such a path includes at most h hops The algorithm iterates over the number of hops, h = 0,, 2,..., until the cost no longer changes Initialize: C n (h) = infinity For each successive h: C n (h+) = min [ C j (h) + D nj ] Where, h is the maximum number of hops on a path, s is the source node, D nj is the link cost from node n to node j, and C n (h) is the least-cost path from node s to node n with at most h hops 2-98 998 J. Mark Pullen 46 23 23

Bellman-Ford Algorithm In Operation h CB Path CC Path CD Path CE Path CF Path 0? -----? ------? ------? ------? ------- 2 A-B 5 A-C A-D? -------? ------ 2 2 A-B 4 A-D-C A-D 2 A-D-E 0 A-C-F 3 2 A-B 3 A-D-E-C A-D 2 A-D-E 4 A-D-E-F 4 2 A-B 3 A-D-E-C A-D 2 A-D-E 4 A-D-E-F A 2 5 B 3 2 C 3 E 5 2 F D 2-98 998 J. Mark Pullen 47 Comparison Of Dijkstra s Algorithm and the Bellman-Ford Algorithm Approach: Dijkstra depth-first, Bellman-Ford depth-first Computation complexity: Dijkstra O(N 2 ) Bellman-Ford O(N 3 ) Dijkstra s Algorithm requires knowledge of all costs and so is suitable for centralized routing calculations For Bellman-Ford Algorithm, each node requires only knowledge of link costs to its neighboring nodes; hence, it is suitable for distributed routing calculations. Both algorithms adapt to slowly changing link costs (e.g., link outages); however, if the link cost is a function of traffic (e.g., delay), which in turn is a function of the routes chosen, then instabilities can occur. 2-98 998 J. Mark Pullen 48 24 24

2-98 998 J. Mark Pullen 49 NET2-2 Homework email to mpullen@gmu.edu or fax to 703-993-3692. Briefly describe the following characteristics of IP: a. guarantee of packet delivery b. order of packet delivery 2. Briefly describe the following characteristics of IP subnets: a. MTU b. how different subnets are interconnected c. why they need ARP 3. Describe the role of the following in the Internet: a. class B addresses b. class C addresses c. class D addresses d. Domain Name System e. IP packet Time to Live 2-98 998 J. Mark Pullen 50 25 25

NET2-2 Homework 4. IP exists to pass data among processes on computers. ICMP is more specialized. What is the purpose of ICMP? 5. Briefly describe the following router functions: a. routing b. forwarding 6. Where would you expect to find the following protocols in use? a. RIP b. OSPF c. BGP 2-98 998 J. Mark Pullen 5 Homework. 7 a. For the network below, use Dijkstra s algorithm to find the shortest path from node to all other nodes. Show your work in a form similar to the examples in the slides. b. Repeat for the Bellman-Ford algorithm. 3 2 3 2 7 3 6 4 5 4 2-98 998 J. Mark Pullen 52 26 26

2-98 998 J. Mark Pullen 53 27 27