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!

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.
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
Introduction 1-1 1DT066 Distributed Information System Chapter 4 Network Layer.
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.
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
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.
IP Address 1. 2 Network layer r Network layer protocols in every host, router r Router examines IP address field in all IP datagrams passing through it.
Announcement r Project 2 due Fri. midnight r Homework 3 out m Due 2/29 Sun. r Advertisement for my CS395/495 course next quarter: Computer Network Security:
Chapter 5 The Network Layer.
NAT: Network Address Translation local network (e.g., home network) /24 rest of Internet Datagrams.
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.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
IP Addressing: introduction
IP Address 1. 2 Network layer r Network layer protocols in every host, router r Router examines IP address field in all IP datagrams passing through it.
The Internet Network layer
Announcement r Project 2 Extension ? m Previous grade allocation: Projects 40% –Web client/server7% –TCP stack21% –IP routing12% Midterm 20% Final 20%
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).
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,
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,
The Routing & the IP network data link physical network data link physical network data link physical network data link physical network data link physical.
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.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Network LayerII-1 RSC Part II: Network Layer 3. IP addressing (2nd part) Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides.
Adapted from: Computer Networking, Kurose/Ross 1DT066 Distributed Information Systems Chapter 4 Network Layer.
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.
CS 3214 Computer Systems Godmar Back Lecture 24 Supplementary Material.
Network Layer4-1 DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from network server when it joins network.
1DT066 Distributed Information System Chapter 4 Network Layer.
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.
CIS 3360: Internet: Network Layer Introduction Cliff Zou Spring 2012.
1 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.
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.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
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.
Lectu re 1 Recap: “Operational” view of Internet r Internet: “network of networks” m Requires sending, receiving of messages r protocols control sending,
Sharif University of Technology, Kish Island Campus Internet Protocol (IP) by Behzad Akbari.
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.
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”
1 Network Layer Lecture 11 Imran Ahmed University of Management & Technology.
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 Layer by peterl. forwarding table routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling.
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 All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
IP Fragmentation. Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side,
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
12 – IP, NAT, ICMP, IPv6 Network Layer.
Chapter 4: Network Layer
Network Address Translation
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4: Network Layer
CS 1652 Jack Lange University of Pittsburgh
Wide Area Networks and Internet CT1403
Chapter 4: Network Layer
Overview The Internet (IP) Protocol Datagram format IP fragmentation
Chapter 4: Network Layer
DHCP and NAT.
Chapter 4: Network Layer
Chapter 4: Network Layer
DHCP: Dynamic Host Configuration Protocol
Presentation transcript:

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! r routing table exchange would swamp links! administrative autonomy r internet = network of networks r each network admin may want to control routing (cost metrics, etc.) in its own network Our routing study thus far - idealization r all routers identical r network “flat” … not true in practice Why?

4: Network Layer 4b-3 Hierarchical Routing r Organization: aggregate routers into regions, called “autonomous systems” (AS) r routers in same AS run same routing protocol m “intra-AS” routing (i.e., within an AS) protocol m routers in different AS can run different intra- AS routing protocol r special routers in (on the edge of) an AS r run intra-AS routing protocol with all other routers in AS r also responsible for routing to destinations outside AS m run inter-AS routing (i.e., between AS) protocol with other gateway routers gateway routers

4: Network Layer 4b-4 Intra-AS and Inter-AS routing Gateway routers: perform inter-AS routing amongst themselves perform intra-AS routing with other routers in their AS inter-AS, intra-AS routing in gateway A.c network layer data link layer physical layer a b b a a C A B d A.a A.c C.b B.a c b c

4: Network Layer 4b-5 Intra-AS and Inter-AS routing Host h2 a b b a a C A B d c A.a A.c C.b B.a c b Host h1 Intra-AS routing within AS A Inter-AS routing between A and B Intra-AS routing within AS B r We’ll examine specific inter-AS and intra-AS Internet routing protocols shortly (section 4.5)

4: Network Layer 4b-6 IP datagram format ver length 32 bits data (variable length, typically a TCP segment, a UDP segment, or an ICMP message) 16-bit identifier Header checksum time to live 32 bit source IP address IP protocol version number header length (4-byte multiples) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to (RFC 1700, 3232) head. len type of service DS codepoint, ECN 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. how much overhead with TCP? r 20 bytes of TCP r 20 bytes of IP r = 40 bytes + app layer overhead

4: Network Layer 4b-7 IP Fragmentation & Reassembly r network links have MTU (Max. Transfer Unit) size - largest possible link-level frame. m different link types, different MTUs r large IP datagram is divided (“fragmented”) within network m one datagram becomes several datagrams m “reassembled” only at the final destination m IP header bits are used to identify and order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly

4: Network Layer 4b-8 IP Fragmentation and Reassembly ID =x offset =0 More bit =0 bytes* =3980 ID =x offset =0 More bit =1 bytes* =1480 ID =x offset =1480 More bit =1 bytes* =1480 ID =x offset =2960 More bit =0 bytes* =1020 One large datagram becomes several smaller datagrams Note: Offset is actually specified as number of 8-byte (64-bit) units. Example r 4000 byte datagram r MTU = 1500 bytes * This is the number of data bytes in the IP datagram. The IP length field would show this Why?

4: Network Layer 4b-9 DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from network server when it joins a network Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an “on” Support for mobile users who want to join network (more shortly) DHCP overview: m host broadcasts “DHCP discover” msg m DHCP server responds with “DHCP offer” msg m host requests IP address: “DHCP request” msg m DHCP server sends address: “DHCP ack” msg

4: Network Layer 4b-10 DHCP client-server scenario A B E DHCP server arriving DHCP client needs address in this network

4: Network Layer 4b-11 DHCP client-server scenario DHCP server: arriving client time DHCP discover src : , 68 dest.: ,67 yiaddr: transaction ID: 654 DHCP offer src: , 67 dest: , 68 yiaddrr: transaction ID: 654 Lifetime: 3600 secs DHCP request src: , 68 dest:: , 67 yiaddrr: transaction ID: 655 Lifetime: 3600 secs DHCP ACK src: , 67 dest: , 68 yiaddrr: transaction ID: 655 Lifetime: 3600 secs

4: Network Layer 4b-12 NAT: Network Address Translation local network (e.g., home network) /24 rest of Internet Datagrams with source or destination in this network have /24 address for source, destination (as usual) All datagrams leaving local network have same single source NAT IP address: , different source port numbers

4: Network Layer 4b-13 NAT: Network Address Translation r Motivation: local network uses just one IP address as far as outside word is concerned: m no need to be allocated range of addresses from ISP: - just one IP address is used for all devices m can change addresses of devices in local network without notifying outside world m can change ISP without changing addresses of devices in local network m devices inside local net not explicitly addressable, visible by outside world (a security plus).

4: Network Layer 4b-14 NAT: Network Address Translation Implementation: NAT router must: m outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #)... remote clients/servers will respond using (NAT IP address, new port #) as destination addr. m remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair m incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table

4: Network Layer 4b-15 NAT: Network Address Translation S: , 3345 D: , : host sends datagram to , 80 NAT translation table WAN side addr LAN side addr , , 3345 …… S: , 80 D: , S: , 5001 D: , : NAT router changes datagram source addr from , 3345 to , 5001, updates table S: , 80 D: , : Reply arrives dest. address: , : NAT router changes datagram dest addr from , 5001 to , 3345

4: Network Layer 4b-16 NAT: Network Address Translation r 16-bit port-number field: m 60,000 simultaneous connections with a single LAN-side address! r Reserved address space (rfc 1918)rfc 1918 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

4: Network Layer 4b-17 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common IGPs: m RIP: Routing Information Protocol (legacy, RIPv2 still in use) m OSPF: Open Shortest Path First (common) m EIGRP: Enhanced Interior Gateway Routing Protocol (proprietary – Cisco Systems)

4: Network Layer 4b-18 RIP ( Routing Information Protocol) r Distance vector algorithm r Included in BSD-UNIX Distribution in 1982 m RFC 1058 (version 1), RFC 2453 (version 2) r Distance metric: # of hops (max = 15 hops) m Can you guess why? r Distance vectors: exchanged every 30 seconds via Response Message (also called advertisement) r Each advertisement: routing info for maximum of 25 destination nets within the AS r Uses UDP transport, port 520

4: Network Layer 4b-19 Problems/limitations with RIP r Good for small systems, but doesn’t scale well r Count-to-infinity problem… poisoned reverse only r Comparatively slow convergence r 1979 – RIP version 1 r 1988 – IETF initiates work on replacement r 1990 – OSPF became new standard r 1990’s – RIP version 2

4: Network Layer 4b-20 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 However…. r OSPF advertisement carries only one entry per neighbor router r Advertisements disseminated to entire AS (via flooding) r Sent as payload in IP datagram

4: Network Layer 4b-21 EIGRP (Enhanced Interior Gateway Routing Protocol) r CISCO proprietary; successor of RIP (mid 80’s) r uses Distance Vector, like RIP r several cost metrics (delay, bandwidth, reliability, load etc) r uses TCP (!) to exchange routing updates r Loop-free routing via a distributed update routing algorithm (called DUAL) based on diffused computation

4: Network Layer 4b-22 Inter-AS routing