Homework 4 r Out: Fri 2/27/2015 r In: Fri 3/13/2015.

Slides:



Advertisements
Similar presentations
CPSC Network Layer4-1 IP addresses: how to get one? Q: How does a host get IP address? r hard-coded by system admin in a file m Windows: control-panel->network->configuration-
Advertisements

CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
Network Layer4-1 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables! r routing table exchange would.
Lecture 9 Overview. Hierarchical Routing scale – with 200 million destinations – can’t store all dests in routing tables! – routing table exchange would.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 22 Omar Meqdadi Department of Computer Science and Software Engineering University.
Announcement r Recitation tomorrow on Project 2 r Midterm Survey at the end of this class.
Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol –Datagram format.
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
Lecture 8 Overview. Graph abstraction u y x wv z Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v),
4a-1 CSE401: Computer Networks Hierarchical Routing & Routing in Internet S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Network Layer4-1 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol.
Announcement r Project 3 out, due 3/10 r Homework 3 out last week m Due next Mon. 3/1.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
1 Announcement r Project #2 due midnight r Homework #3 due Friday midnight r Project #3 is out.
The Internet Network layer
14 – Inter/Intra-AS Routing
Network Layer4-1 Chapter 4 Network Layer A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers).
Routing Algorithms & Routing Protocols  Shortest Path Routing  Flooding  Distance Vector Routing  Link State Routing  Hierarchical Routing  Broadcast.
12 – NAT, ICMP, IPv6 Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
1 ECE453 – Introduction to Computer Networks Lecture 10 – Network Layer (Routing II)
The Network Layer: IP, subnets, NAT and Routing Based on slides from the Computer Networking: A Top Down Approach Featuring the Internet by Kurose and.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012  CPSC.
14 – Inter/Intra-AS Routing Network Layer Hierarchical Routing scale: with > 200 million destinations: can’t store all dest’s in routing tables!
CSC 450/550 Part 4: Network Layer Part B: The Internet Routing Protocols.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
12 – IP, NAT, ICMP, IPv6 Network Layer.
Network Layer introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4.
RSC Part II: Network Layer 6. Routing in the Internet (2 nd Part) Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are,
Introduction 1 Lecture 19 Network Layer (Routing Protocols) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science &
10-1 Last time □ Transitioning to IPv6 ♦ Tunneling ♦ Gateways □ Routing ♦ Graph abstraction ♦ Link-state routing Dijkstra's Algorithm ♦ Distance-vector.
Network Layer4-1 Chapter 4 Network Layer All material copyright J.F Kurose and K.W. Ross, All Rights Reserved.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer4-1 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Routing in the Internet The Global Internet consists of Autonomous Systems (AS) interconnected with eachother: Stub AS: small corporation Multihomed AS:
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
4: Network Layer4a-1 Routing in the Internet r The Global Internet consists of Autonomous Systems (AS) interconnected with each other: m Stub AS: small.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
Network Layer4-1 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols: m RIP: Routing Information.
Sharif University of Technology, Kish Island Campus Internet Protocol (IP) by Behzad Akbari.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
4: Network Layer4b-1 OSPF (Open Shortest Path First) r “open”: publicly available r Uses Link State algorithm m LS packet dissemination m Topology map.
Transport Layer3-1 Network Layer Every man dies. Not every man really lives.
Network Layer4-1 Routing Algorithm Classification Global or decentralized information? Global: r all routers have complete topology, link cost info r “link.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
4: Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Application Layer 2-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
Network Layer 4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note.
Routing in the Internet
14 – Inter/Intra-AS Routing
Homework 4 Out: Fri 2/24/2017 In: Fri 3/10/2017.
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
Homework 4 Out: Fri 2/26/2016 In: Fri 3/11/2016.
Chapter 4: Network Layer
CS4470 Computer Networking Protocols
Part 4: Network Layer Part B: The Internet Routing Protocols
Chapter 4: Network Layer
Overview The Internet (IP) Protocol Datagram format IP fragmentation
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4: Network Layer
DHCP: Dynamic Host Configuration Protocol
Presentation transcript:

Homework 4 r Out: Fri 2/27/2015 r In: Fri 3/13/2015

2 NAT: Network Address Translation r 16-bit port-number field: m 60,000 simultaneous connections with a single LAN-side address! r NAT is controversial: m routers should only process up to layer 3 m violates end-to-end argument NAT possibility must be taken into account by app designers, eg, P2P applications m address shortage should instead be solved by IPv6

3 NAT traversal problem r client wants to connect to server with address m server address local to LAN (client can’t use it as destination addr) m only one externally visible NATed address: r solution 1: statically configure NAT to forward incoming connection requests at given port to server m e.g., ( , port 2500) always forwarded to port NAT router Client ?

4 NAT traversal problem r solution 2: Universal Plug and Play (UPnP) Internet Gateway Device (IGD) Protocol. Allows NATed host to:  learn public IP address ( )  add/remove port mappings (with lease times) i.e., automate static NAT port map configuration NAT router IGD

5 NAT traversal problem r solution 3: relaying (used in Skype) m NATed client establishes connection to relay m External client connects to relay m relay bridges packets between two connections Client NAT router 1. connection to relay initiated by NATed host 2. connection to relay initiated by client 3. relaying established

6 Chapter 4: Network Layer r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Hierarchical routing

7 ICMP: Internet Control Message Protocol r used by hosts & routers to communicate network-level information m error reporting: unreachable host, network, port, protocol m echo request/reply (used by ping) r network-layer “above” IP: m ICMP msgs carried in IP datagrams r ICMP message: type, code plus first 8 bytes of IP datagram causing error Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header

8 Traceroute and ICMP r Source sends series of UDP segments to dest m First has TTL =1 m Second has TTL=2, etc. m Unlikely port number r When nth datagram arrives to nth router: m Router discards datagram m And sends to source an ICMP message (type 11, code 0) m Message includes name of router& IP address r When ICMP message arrives, source calculates RTT r Traceroute does this 3 times Stopping criterion r UDP segment eventually arrives at destination host r Destination returns ICMP “port unreachable” packet (type 3, code 3) r When source gets this ICMP, stops.

9 Chapter 4: Network Layer r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Hierarchical routing

10 IPv6 r Initial motivation: 32-bit address space soon to be completely allocated. r Additional motivation: m header format helps speed processing/forwarding m header changes to facilitate QoS IPv6 datagram format: m fixed-length 40 byte header m no fragmentation allowed

11 IPv6 Header (Cont) Priority: identify priority among datagrams in flow Flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). Next header: identify upper layer protocol for data

12 Other Changes from IPv4 r Checksum: removed entirely to reduce processing time at each hop r Options: allowed, but outside of header, indicated by “Next Header” field r ICMPv6: new version of ICMP m additional message types, e.g. “Packet Too Big” m multicast group management functions

13 Transition From IPv4 To IPv6 r Not all routers can be upgraded simultaneously m no “flag days” m How will the network operate with mixed IPv4 and IPv6 routers? r Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers

14 Tunneling A B E F IPv6 tunnel Logical view: Physical view: A B E F IPv6 C D IPv4 Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Src:B Dest: E Flow: X Src: A Dest: F data Src:B Dest: E A-to-B: IPv6 E-to-F: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4

15 Chapter 4: Network Layer r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Hierarchical routing

16 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables! r routing table exchange would swamp links! administrative autonomy r internet = network of networks r each network admin may want to control routing in its own network Our routing study thus far - idealization  all routers identical  network “flat” … not true in practice

17 Hierarchical Routing r aggregate routers into regions, “autonomous systems” (AS) r routers in same AS run same routing protocol m “intra-AS” routing protocol m routers in different AS can run different intra- AS routing protocol gateway router r at “edge” of its own AS r has link to router in another AS

18 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b Intra-AS Routing algorithm Inter-AS Routing algorithm Forwarding table 3c Interconnected ASes r forwarding table configured by both intra- and inter-AS routing algorithm m intra-AS sets entries for internal dests m inter-AS & intra-As sets entries for external dests

19 Inter-AS tasks r suppose router in AS1 receives datagram destined outside of AS1: m router should forward packet to gateway router, but which one? AS1 must: 1. learn which dests are reachable through AS2, which through AS3 2. propagate this reachability info to all routers in AS1 job of inter-AS routing! AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks

20 Example: Setting forwarding table in router 1d r suppose AS1 learns (via inter-AS protocol) that subnet x reachable via AS3 (gateway 1c) but not via AS2. m inter-AS protocol propagates reachability info to all internal routers r router 1d determines from intra-AS routing info that its interface I is on the least cost path to 1c. m installs forwarding table entry (x,I) AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks x …

21 Example: Choosing among multiple ASes r now suppose AS1 learns from inter-AS protocol that subnet x is reachable from AS3 and from AS2. r to configure forwarding table, router 1d must determine which gateway it should forward packets towards for dest x m this is also job of inter-AS routing protocol! AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks x …… … ?

22 Learn from inter-AS protocol that subnet x is reachable via multiple gateways Use routing info from intra-AS protocol to determine costs of least-cost paths to each of the gateways Hot potato routing: Choose the gateway that has the smallest least cost Determine from forwarding table the interface I that leads to least-cost gateway. Enter (x,I) in forwarding table Example: Choosing among multiple ASes r now suppose AS1 learns from inter-AS protocol that subnet x is reachable from AS3 and from AS2. r to configure forwarding table, router 1d must determine towards which gateway it should forward packets for dest x. m this is also job of inter-AS routing protocol! r hot potato routing: send packet towards closest of two routers.

23 Chapter 4: Network Layer 4.6 Routing in the Internet m RIP m OSPF m BGP

24 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols: m RIP: Routing Information Protocol m OSPF: Open Shortest Path First m IGRP: Interior Gateway Routing Protocol (Cisco proprietary)

25 RIP ( Routing Information Protocol) r Distance vector algorithm r Included in BSD-UNIX Distribution in 1982 r Distance metric: # of hops (max = 15 hops) D C BA u v w x y z destination hops u 1 v 2 w 2 x 3 y 3 z 2

26 RIP advertisements r Distance vectors: exchanged among neighbors every 30 sec via Response Message (also called advertisement) r Each advertisement: list of up to 25 destination nets within AS

27 RIP: Example Destination Network Next Router Num. of hops to dest. wA2 yB2 zB7 x--1 ….…..... w xy z A C D B Routing table in D

28 RIP: Example Destination Network Next Router Num. of hops to dest. wA2 yB2 zB A7 5 x--1 ….…..... Routing table in D w xy z A C D B Dest Next hops w - - x - - z C 4 …. …... Advertisement from A to D

29 RIP: Link Failure and Recovery If no advertisement heard after 180 sec --> neighbor/link declared dead m routes via neighbor invalidated m new advertisements sent to neighbors m neighbors in turn send out new advertisements (if tables changed) m link failure info quickly propagates to entire net m poison reverse used to prevent ping-pong loops (infinite distance = 16 hops)

30 RIP Table processing r RIP routing tables managed by application-level process called route-d (daemon) r advertisements sent in UDP packets, periodically repeated physical link network forwarding (IP) table Transprt (UDP) routed physical link network (IP) Transprt (UDP) routed forwarding table

31 Chapter 4: Network Layer 4.6 Routing in the Internet m RIP m OSPF m BGP

32 OSPF (Open Shortest Path First) r “open”: publicly available r uses Link State algorithm m LS packet dissemination m topology map at each node m route computation using Dijkstra’s algorithm r OSPF advertisement carries one entry per neighbor router r advertisements disseminated to entire AS (via flooding) m carried in OSPF messages directly over IP (rather than TCP or UDP

33 OSPF “advanced” features (not in RIP) r security: all OSPF messages authenticated (to prevent malicious intrusion) r multiple same-cost paths allowed (only one path in RIP) r for each link, multiple cost metrics for different TOS (e.g., satellite link cost set “low” for best effort ToS; high for real time ToS) r integrated uni- and multicast support: m Multicast OSPF (MOSPF) uses same topology data base as OSPF r hierarchical OSPF in large domains.

34 Hierarchical OSPF boundary router backbone router Area 1 Area 2 Area 3 backbone area border routers internal routers

35 Hierarchical OSPF r two-level hierarchy: local area, backbone. m link-state advertisements only in area m each node has detailed area topology; only know direction (shortest path) to nets in other areas. r area border routers: “summarize” distances to nets in own area, advertise to other Area Border routers. r backbone routers: run OSPF routing limited to backbone. r boundary routers: connect to other AS’s.

36 Chapter 4: Network Layer 4.6 Routing in the Internet m RIP m OSPF m BGP

37 Internet inter-AS routing: BGP r BGP (Border Gateway Protocol): the de facto inter-domain routing protocol m “glue that holds the Internet together” r BGP provides each AS a means to: m eBGP: obtain subnet reachability information from neighboring ASs. m iBGP: propagate reachability information to all AS- internal routers. m determine “good” routes to other networks based on reachability information and policy. r allows subnet to advertise its existence to rest of Internet: “I am here”

38 BGP basics r when AS3 advertises a prefix to AS1: m AS3 promises it will forward datagrams towards that prefix m AS3 can aggregate prefixes in its advertisement AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks  BGP session: two BGP routers (“peers”) exchange BGP messages:  advertising paths to different destination network prefixes (“path vector” protocol)  exchanged over permanent TCP connections BGP message

39 BGP basics: distributing path information AS3 AS2 3b 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks r using eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1. m 1c can then use iBGP do distribute new prefix info to all routers in AS1 m 1b can then re-advertise new reachability info to AS2 over 1b-to-2a eBGP session r when router learns of new prefix, it creates entry for prefix in its forwarding table. eBGP session iBGP session

40 Path attributes & BGP routes r advertised prefix includes BGP attributes m prefix + attributes = “route” r two important attributes: m AS-PATH: contains ASs through which prefix advertisement has passed: e.g., AS 67, AS 17 m NEXT-HOP: indicates specific internal-AS router to next- hop AS. (may be multiple links from current AS to next-hop- AS) r gateway router receiving route advertisement uses import policy to accept/decline m e.g., never route through AS x m policy-based routing

41 BGP route selection r router may learn about more than 1 route to destination AS, selects route based on: 1. local preference value attribute: policy decision 2. shortest AS-PATH 3. closest NEXT-HOP router: hot potato routing 4. additional criteria