Network Layer 1 Goals:  Understand Internet network layer concepts  Understand Internet routing  Understand Internet network layer protocols Content:

Slides:



Advertisements
Similar presentations
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
Advertisements

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.
4a-1 CSE401: Computer Networks Hierarchical Routing & Routing in Internet S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
4: Network Layer4b-1 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time.
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,
4: Network Layer4b-1 Network Layer Protocols CSIT435 Spring 2002.
1 Routing Protocols and Forwarding  The IP protocol  Routing Protocols o Intra-domain (inside an AS) o Inter-domain (between ASes)  Forwarding: inside.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
Announcement r Project 3 out, due 3/10 r Homework 3 out last week m Due next Mon. 3/1.
1 Announcement r Project #2 due midnight r Homework #3 due Friday midnight r Project #3 is out.
14 – Inter/Intra-AS Routing
Routing in Wired Nets CS 215 W 01 - Mario Gerla. Routing Principles Routing: delivering a packet to its destination on the best possible path Routing.
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
Routing Algorithms & Routing Protocols  Shortest Path Routing  Flooding  Distance Vector Routing  Link State Routing  Hierarchical Routing  Broadcast.
Routing Protocols Chapter 25. Static Routing Typically used in hosts –Enter subnet mask, router (gateway), IP address –Perfect for cases with few connections,
1 ECE453 – Introduction to Computer Networks Lecture 10 – Network Layer (Routing II)
Computer Networks The Network Layer
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.
4: Network Layer4a-1 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time.
14 – Inter/Intra-AS Routing Network Layer Hierarchical Routing scale: with > 200 million destinations: can’t store all dest’s in routing tables!
Network Layer Lecture # 2 MAHS. 4: Network Layer 4b-2 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables!
Lecture 14 ICMP: Internet Control Message Protocol r used by hosts, routers, gateways to communication network-level information m error reporting: unreachable.
Routing in the Internet The Global Internet consists of Autonomous Systems (AS) interconnected with eachother: Stub AS: small corporation Multihomed AS:
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 &
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 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Routing in the Internet The Global Internet consists of Autonomous Systems (AS) interconnected with eachother: Stub AS: small corporation Multihomed AS:
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.
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.
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
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.
ICT 6621 : Advanced NetworkingKhaled Mahbub, IICT, BUET, 2008 Lecture 5 TCP/IP Network Layer (3)
Network Layer4-1 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection”
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
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.
IP. Classless Inter-Domain Routing Classful addressing scheme wasteful – IP address space exhaustion – A class B net allocated enough for 65K hosts Even.
The Internet Network layer
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
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 Protocols 1 ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
Routing in the Internet
14 – Inter/Intra-AS Routing
Homework 4 Out: Fri 2/24/2017 In: Fri 3/10/2017.
Computer Communication Networks
Chapter 4: Network Layer
NAT – Network Address Translation
Homework 4 Out: Fri 2/26/2016 In: Fri 3/11/2016.
ICMP ICMP – Internet Control Message Protocol
Chapter 4: Network Layer
Chapter 5: Network Layer (Part III)
Hierarchical Routing Our routing study thus far – an idealization
CS 457 – Lecture 10 Internetworking and IP
Wide Area Networks and Internet CT1403
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 Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
Chapter 4: Network Layer
32 bit destination IP address
Presentation transcript:

Network Layer 1 Goals:  Understand Internet network layer concepts  Understand Internet routing  Understand Internet network layer protocols Content:  IP addressing  Getting packet from source to destination  Internet Protocol (IP)  ICMP  Intra- & Inter-AS routing  Multicast routing

Network Layer 2 The Internet Network layer routing table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router “signaling” Transport layer: TCP, UDP Link layer Physical layer Network layer

Network Layer 3 IP Addressing  IP address: 32-bit identifier for host, router interface  interface: connection between host/router and physical link  routers typically have multiple interfaces  host may have multiple interfaces  IP addresses associated with interface, not host or router =

Network Layer 4 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 network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address) LAN

Network Layer 5 IP Addresses 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to to to bits What is POSTECH’s network address? What is your research lab’s subnet address?

Network Layer 6 Getting a packet from source to dest. IP packet: A B E header fields source IP addr dest IP addr data  packet remains unchanged, as it travels source to destination  addr fields are of interest here Dest. Net. next router Nhops routing table in A

Network Layer 7 Getting a packet from source to dest A B E Starting at A, given IP packet addressed to B:  look up net. address of B  find B is on same net. as A using subnet mask  link layer will send packet directly to B inside link-layer frame  B and A are directly connected Dest. Net. next router Nhops header fields data

Network Layer 8 Getting a packet from source to dest A B E Dest. Net. next router Nhops Starting at A, dest. E:  look up network address of E  E on different network  A, E not directly attached  routing table: next hop router to E is  link layer sends packet to router inside link- layer frame  packet arrives at  continued….. header fields data

Network Layer 9 Getting a packet from source to dest A B E Arriving at , destined for  look up network address of E  E on same network as router’s interface  router, E directly attached  link layer sends packet to inside link-layer frame via interface  packet arrives at !!! header fields data network router Nhops interface Dest. next

Network Layer 10 IP packet format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service “type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit.

Network Layer 11 IP Fragmentation and Reassembly  network links have MTU (max. transfer unit) - largest possible link-level frame.  different link types, different MTUs  large IP packet divided (“fragmented”) within net  one packet becomes several packet  “reassembled” only at final destination  IP header bits used to identify, order related fragments fragmentation: in: one large packet out: 3 smaller packets reassembly

Network Layer 12 IP Fragmentation and Reassembly ID =x offset =0 fragflag =0 length =4000 ID =x offset =0 fragflag =1 length =1500 ID =x offset =1500 fragflag =1 length =1500 ID =x offset =3000 fragflag =0 length =1000 One large packet becomes several smaller packets

Network Layer 13  Internet Control Message Protocol (ICMP), RFC792  The purpose of ICMP messages is to provide feedback about problems in the IP network environment  Delivered in IP packets  ICMP message format  4 bytes of ICMP header and optional message ICMP: Internet Control Message Protocol

Network Layer 14 ICMP Functions  To announce network errors  If a network, host, port is unreachable, ICMP Destination Unreachable Message is sent to the source host  To announce network congestion  When a router runs out of buffer queue space, ICMP Source Quench Message is sent to the source host  To assist troubleshooting  ICMP Echo Message is sent to a host to test if it is alive - used by ping  To announce timeouts  If a packet’s TTL field drops to zero, ICMP Time Exceeded Message is sent to the source host - used by traceroute

Network Layer 15 ICMP Problems  ICMP has also received bad press from denial of service (DoS) attacks and because of the number of sites generating monitoring traffic  ICMP messages may be blocked (i.e., dropped) by firewall or processed at low priority by router  As a consequence some ISPs disable ICMP even though this potentially causes poor performance and does not comply with RFC1009 (Internet Gateway Requirements)  In spite of these limitations, ICMP is still most widely used in active network measurements

Network Layer 16 ICMP Messages 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

Network Layer 17 Routing in the Internet  The Global Internet: A hierarchy of Autonomous Systems (ASs) (enterprise ASs interconnected through ISP’s ASs)  Two level routing: Intra-AS: each enterprise is responsible for its intranet routing policy Inter-AS: uses the standard routing protocol (e.g., BGP)

Network Layer 18 Intra-AS Routing  Also known as Interior Gateway Protocol (IGP)  Most common IGPs:  RIP: Routing Information Protocol (IETF)  OSPF: Open Shortest Path First (IETF)  IGRP: Interior Gateway Routing Protocol (Cisco)

Network Layer 19 RIP (Routing Information Protocol)  Distance vector type scheme  Included in BSD-UNIX Distribution in 1982  Distance metric: # of hops (maximum 15 hops)  Distance vector: exchanged every 30 sec via a Response Message (also called Advertisement)  Each Advertisement contains up to 25 destination nets  IETF RFC

Network Layer 20 RIP Example Dest. Net. next router Nhops 1 A 2 20 B 2 30 B D’s Table before A’s Advertisement Dest. Net. next router Nhops 30 C A’s Advertisement Dest. Net. next router Nhops 1 A 2 20 B 2 30 A D’s table after A’s advertisement Routers labeled A, B, C, D, … Networks labeled 1, 10, 20, 30,...

Network Layer 21 RIP: Link Failure and Recovery  If no advertisement heard after 180 sec, neighbor/link is assumed to be dead  Routes via the neighbor are invalidated; new advertisements sent to neighbors  Neighbors in turn send out new advertisements if their tables changed  Link failure info quickly propagates to the entire net

Network Layer 22 RIP Table processing  RIP routing tables managed by an application process called routed (daemon)  advertisements encapsulated in UDP packets (reliability not required; advertisements are periodically repeated)

Network Layer 23 RIP Table example Destination Gateway Flags Ref Use Interface UH lo U 2 13 fa U le U 2 25 qaa U 3 0 le0 default UG  To get routing table on Unix/Win, type netstat -rn  e.g., a Router RIP table:  3 attached class C networks (LANs) via fa0, le0 and qaa0 m Router only knows routes to attached LANs  default is the default gateway “to go up” m Route multicast address: m 1st entry: Loopback interface (for debugging)  Learn to use Netstat by examples:

Network Layer 24 OSPF (Open Shortest Path First)  “open”: publicly available protocol (IETF)  uses the Link State (LS) algorithm, i.e.,  LS packet dissemination;  topology map at each node;  route computation using the Dijkstra’s algorithm  OSPF advertisement carries one entry per neighbor router (gives link state)  Advertisements disseminated to the ENTIRE AS (via flooding)

Network Layer 25 OSPF “advanced” features (not in RIP)  Security. All OSPF messages are authenticated (to prevent malicious intrusion); TCP connections used  Multiple same-cost paths allowed (only one path must be chosen to carry all traffic in RIP)  Multiple cost metrics for different TOS for each link (e.g., satellite link cost set “low” for best effort; high for real time)  Integrated uni- and multicast support. Multicast OSPF (MOSPF) uses the same topology database as OSPF  Hierarchical OSPF in single AS (large routing domain)

Network Layer 26 Hierarchical OSPF  An OSPF AS: Two level hierarchy (local area and backbone)  Link state advertisements do not leave respective areas  Nodes in each area have detailed area topology; they only know direction (shortest path) to networks in other areas  “Internal routers” perform intra- AS routing only  “Area Border routers” route packets to other areas  “Backbone routers” run an OSPF routing alg. limited to the backbone  “Boundary routers” connect to other ASs

Network Layer 27 IGRP (Interior Gateway Routing Protocol)  CISCO proprietary; successor of RIP (mid 80’s)  Distance Vector, like RIP  Several cost metrics (delay, bandwidth, reliability, load, etc.)  Uses TCP to exchange routing updates  Routing tables exchanged only when costs change  Loop free routing achieved by using a Distributed Updating ALgorithm (DUAL)  In DUAL, after a distance increase, the routing table is frozen until all affected nodes have learned of the change  aper09186a00800c8ae1.shtml

Network Layer 28  BGP (Border Gateway Protocol): the de facto standard  Each Border Gateway broadcasts to neighbors (peers) the entire path (i.e., sequence of AS’s) to destination  For example, gateway X may store the following path to destination Z: Path (X,Z) = X,Y1,Y2,Y3,…,Z Inter-AS Routing

Network Layer 29 Border Gateway Protocol (BGP)  Now, suppose Gwy X sends its path (X,Y1,Y2,Y3,…,Z) to peer Gwy W  Gwy W may or may not select the path offered by Gwy X, because of cost, policy or loop prevention reasons  If Gwy W selects the path advertised by Gwy X, then: Path (W,Z) = W, Path (X,Z) Note: path selection based not so much on cost (e.g.,# of AS hops), but mostly on administrative and policy issues (e.g., do not route packets through competitor’s AS)

Network Layer 30 Border Gateway Protocol (BGP)  Peers exchange BGP messages using TCP  BGP defines 4 types of messages:  OPEN: opens a TCP connection to peer and authenticates sender  UPDATE: advertises new path (or withdraws old)  KEEPALIVE: keeps connection alive in absence of UPDATES; also serves as ACK to an OPEN request  NOTIFICATION: reports errors in previous msg; also used to close a connection  IETF RFC

Network Layer 31 Why Intra- and Inter-AS routing different? (1/2)  Policy:  Inter: concerned with policies (eg, which provider to select/avoid)  Intra: under same administrative control, so, policy- based routing is less important  Scaleability  Inter: ability of routing alg. and table to scale for routing among large numbers of networks  Intra: scalability is less of a concern within an AS. A large AS can be divided into two ASs, e.g., “areas” in OSPF

Network Layer 32 Why Intra- and Inter-AS routing different? (2/2)  Performance:  Inter: routing is policy-oriented; quality of routes is secondary. Also, it is difficult to propagate performance metrics efficiently (latency, privacy, etc.).  Intra: focused on performance metrics; needs to keep costs low.  We need BOTH!

Network Layer 33 Multicast Routing  Multicast: delivery of a packet to a group of receivers  Multicasting is becoming increasingly popular in the Internet (e.g., video on demand, IPTV, multi-player online games)  Multiple unicast vs. multicast

Network Layer 34 Multicast Group Address  M-cast group address “delivered” to all receivers in the group  Internet uses Class D ( to ) for m-cast  M-cast address distribution, etc. managed by IGMP (Internet Group Management Protocol)

Network Layer 35 IGMP Protocol (RFC 2236)  IGMP (Internet Group Management Protocol) operates between router and local hosts, typically on a LAN  Router queries the local hosts for m-cast group membership info  Router “connects” active hosts to m-cast tree via m- cast protocol  Hosts respond with membership reports: actually, the first host which responds (at random) speaks for all  Host issues “leave-group” msg to leave; this is optional since router periodically polls anyway

Network Layer 36 IGMP message types IGMP Message type Sent by Purpose membership query: general router query for current active multicast groups membership query: specific router query for specific m-cast group membership report hosthost wants to join group leave group hosthost leaves the group

Network Layer 37 Summary You now hopefully have:  a good understanding of the Internet network protocols and issues  IP addressing, format & issues  Intra-AS routing protocols  RIP  OSPF  IGRP  Inter-AS routing  BGP  Multicast routing  IGMP