CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12

Similar documents
Quiz. Segment structure and fields Flow control (rwnd) Timeout interval. Phases transition ssthresh setting Cwnd setting

CSC 401 Data and Computer Communications Networks

Master Course Computer Networks IN2097

CS 3516: Advanced Computer Networks

Chapter 4: network layer

Subnets. IP datagram format. The Internet Network layer. IP Fragmentation and Reassembly. IP Fragmentation & Reassembly. IP Addressing: introduction

CMPE 80N: Introduction to Networking and the Internet

Chapter 4: Network Layer

Chapter 4: network layer. Network service model. Two key network-layer functions. Network layer. Input port functions. Router architecture overview

1-1. Switching Networks (Fall 2010) EE 586 Communication and. October 25, Lecture 24

Computer Networking Introduction

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

COMP211 Chapter 4 Network Layer: The Data Plane

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

Chapter 4 Network Layer: The Data Plane

Router Architecture Overview

internet technologies and standards

TDTS06: computer Networks

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

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

Network layer: Overview. Network Layer Functions

Chapter 4 Network Layer: The Data Plane

internet technologies and standards

Network Layer: Router Architecture, IP Addressing

Network Layer: Data Plane 4-2

Lecture 8. Network Layer (cont d) Network Layer 1-1

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Network Layer: Internet Protocol

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

CSCI Computer Networks Fall 2016

CSC 4900 Computer Networks: Network Layer

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat no true in practice. administrative autonomy

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

Introduction to Computer Networking. Guy Leduc. Chapter 4 Network Layer: The Data Plane. Chapter 4: Network Layer Data Plane

Data Communications & Networks. Session 7 Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

RSC Part II: Network Layer 3. IP addressing (2nd part)

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Chapter 4 Network Layer

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

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

CSC358 Week 6. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

CSCE 463/612 Networks and Distributed Processing Spring 2018

Network Layer: Control/data plane, addressing, routers

Network Layer: Chapter 4. The Data Plane. Computer Networking: A Top Down Approach

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

CS 3516: Advanced Computer Networks

Chapter 4 Network Layer

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

NETWORK LAYER DATA PLANE

EPL606. Internetworking. Part 2a. 1Network Layer

Chapter 4 Network Layer

The Network Layer Forwarding Tables and Switching Fabric

CSC 401 Data and Computer Communications Networks

Course on Computer Communication and Networks. Lecture 6 Network Layer part 1: Data Plane Chapter 4 (7/e) (6/e Ch4-first part)

Lecture 16: Network Layer Overview, Internet Protocol

ECE 4450:427/527 - Computer Networks Spring 2017

Lecture 17: Network Layer Addressing, Control Plane, and Routing

HW3 and Quiz. P14, P24, P26, P27, P28, P31, P37, P43, P46, P55, due at 3:00pm with both soft and hard copies, 11/11/2013 (Monday) TCP), 20 mins

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

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 11

Δίκτυα Υπολογιστών ΙΙ. Κώστας Μαγκούτης Επίκουρος Καθηγητής Τμήμα Μηχανικών Η/Υ και Πληροφορικής Πανεπιστήμιο Ιωαννίνων

CS 3516: Computer Networks

Network layer overview

Distributed Systems. 7. Network Layer. Werner Nutt

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

Network Layer: DHCP, ICMP, NAT, IPv6

IPv4. Christian Grothoff.

Chapter 4 Network Layer: The Data Plane

IPv4 addressing, NAT. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 13

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Internetworking With TCP/IP

Chapter 4: Network Layer

CSCD58 WINTER 2018 WEEK 6 - NETWORK LAYER PART 1. Brian Harrington. February 13, University of Toronto Scarborough

Lecture 11: Middleboxes and NAT (Duct tape for IPv4)

Chapter 4 Network Layer: The Data Plane. Part A. Computer Networking: A Top Down Approach

Network Layer: outline

3.7 TCP congestion. reliable data transfer. sliding window. Lecture 4: Transport layer III: flow control and congestion control & Network layer I: IP

Chapter 4 Network Layer

Network Layer II. Getting IP addresses. DHCP client-server scenario. DHCP client-server scenario. C compiler. You writing assignment 2

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

Internet Network Protocols IPv4/ IPv6

RSC Part II: Network Layer. 3. IP addressing. II.5 Network routing. II. 1 Basic Network layer concepts II.2 Introduction to IP

CSE 3214: Computer Network Protocols and Applications Network Layer

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

CMSC 332 Computer Networks Network Layer

ECE 158A: Lecture 7. Fall 2015

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

Summary Chapter 4. Smith College, CSC 249 March 2, q IP Addressing. q DHCP dynamic addressing

Chapter 4 Network Layer

EECS 3214: Computer Networks Protocols and Applications

Network layer. Key Network-Layer Functions. Network service model. Interplay between routing and forwarding. CSE 4213: Computer Networks II

Transcription:

CMPE 150/L : Introduction to Computer Networks Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12 1

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 2

Datagram forwarding table routing algorithm local forwarding table dest address output link address-range 1 address-range 2 address-range 3 address-range 4 3 2 2 1 4 billion IP addresses, so rather than list individual destination address list range of addresses (aggregate table entries) IP destination address in arriving packet s header 1 3 2 Network Layer 3

Datagram forwarding table Destination Address Range 11001000 00010111 00010000 00000000 through 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 11001000 00010111 00011111 11111111 otherwise Link Interface 0 1 2 3 Q: but what happens if ranges don t divide up so nicely? Network Layer 4

Longest prefix matching longest prefix matching when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range 11001000 00010111 00010*** ********* 11001000 00010111 00011000 ********* 11001000 00010111 00011*** ********* otherwise examples: DA: 11001000 00010111 00010110 10100001 DA: 11001000 00010111 00011000 10101010 Link interface 0 1 2 3 which interface? which interface? Network Layer 5

Datagram or VC network: why? Internet (datagram) data exchange among computers elastic service, no strict timing req. many link types different characteristics uniform service difficult smart end systems (computers) can adapt, perform control, error recovery simple inside network, complexity at edge ATM (VC) evolved from telephony human conversation: strict timing, reliability requirements need for guaranteed service dumb end systems telephones complexity inside network Network Layer 6

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 4-7

The Internet network layer host, router network layer functions: transport layer: TCP, UDP network layer routing protocols path selection RIP, OSPF, BGP forwarding table link layer physical layer IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router signaling Network Layer 4-8

IP datagram format IP protocol version number header length (bytes) type of data max number remaining hops (decremented at each router) upper layer protocol to deliver payload to how much overhead? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead ver head. len 16-bit identifier time to live type of service upper layer 32 bits flgs length fragment offset header checksum 32 bit source IP address 32 bit destination IP address options (if any) data (variable length, typically a TCP or UDP segment) total datagram length (bytes) for fragmentation/ reassembly e.g. timestamp, record route taken, specify list of routers to visit. Network Layer 4-9

IP fragmentation, reassembly network links have MTU (max.transfer size) - largest possible link-level frame different link types, different MTUs large IP datagram divided ( fragmented ) within net one datagram becomes several datagrams reassembled only at final destination IP header bits used to identify, order related fragments reassembly fragmentation: in: one large datagram out: 3 smaller datagrams Network Layer 4-10

IP fragmentation, reassembly example: 4000 byte datagram MTU = 1500 bytes length =4000 ID =x fragflag =0 offset =0 one large datagram becomes several smaller datagrams 1480 bytes in data field length =1500 ID =x fragflag =1 offset =0 offset = 1480/8 length =1500 ID =x fragflag =1 offset =185 length =1040 ID =x fragflag =0 offset =370 Network Layer 4-11

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 4-12

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 typically has one or two interfaces (e.g., wired Ethernet, wireless 802.11) IP addresses associated with each interface 223.1.1.2 223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.9 223.1.3.27 223.1.3.1 223.1.2.1 223.1.2.2 223.1.3.2 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1 Network Layer 4-13

IP addressing: introduction Q: how are interfaces actually connected? A: we ll learn about that in chapter 5, 6. 223.1.1.2 223.1.1.1 223.1.1.4 223.1.2.9 223.1.2.1 223.1.1.3 223.1.3.27 223.1.2.2 A: wired Ethernet interfaces connected by Ethernet switches 223.1.3.1 223.1.3.2 For now: don t need to worry about how one interface is connected to another (with no intervening router) A: wireless WiFi interfaces connected by WiFi base station Network Layer 4-14

Subnets IP address: subnet part - high order bits host part - low order bits what s a subnet? device interfaces with same subnet part of IP address can physically reach each other without intervening router 223.1.1.1 223.1.1.2 223.1.2.1 223.1.1.4 223.1.2.9 223.1.2.2 223.1.1.3 223.1.3.27 subnet 223.1.3.1 223.1.3.2 network consisting of 3 subnets Network Layer 4-15

Subnets recipe to determine the subnets, detach each interface from its host or router, creating islands of isolated networks each isolated network is called a subnet 223.1.1.0/24 223.1.2.0/24 223.1.1.1 223.1.1.2 223.1.2.1 223.1.1.4 223.1.2.9 223.1.2.2 223.1.1.3 223.1.3.27 subnet 223.1.3.1 223.1.3.2 223.1.3.0/24 subnet mask: /24 Network Layer 4-16

Subnets 223.1.1.2 how many? 223.1.1.1 223.1.1.4 223.1.1.3 223.1.9.2 223.1.7.0 223.1.9.1 223.1.8.1 223.1.8.0 223.1.7.1 223.1.2.6 223.1.3.27 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2 Network Layer 4-17

IP addressing: CIDR CIDR: Classless InterDomain Routing subnet portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in subnet portion of address subnet part 11001000 00010111 00010000 00000000 200.23.16.0/23 host part Network Layer 4-18

IP addresses: how to get one? Q: How does a host get IP address? hard-coded by system admin in a file Windows: control-panel->network->configuration- >tcp/ip->properties UNIX: /etc/rc.config : Dynamic Host Configuration Protocol: dynamically get address from as server plug-and-play Network Layer 4-19

: Dynamic Host Configuration Protocol goal: allow host to dynamically obtain its IP address from network server when it joins network can renew its lease on address in use allows reuse of addresses (only hold address while connected/ on ) support for mobile users who want to join network (more shortly) overview: host broadcasts discover msg [optional] server responds with offer msg [optional] host requests IP address: request msg server sends address: ack msg Network Layer 4-20

client-server scenario 223.1.1.0/24 223.1.1.1 server 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.1.3 223.1.3.27 arriving client needs address in this network 223.1.2.0/24 223.1.3.1 223.1.3.2 223.1.3.0/24 Network Layer 4-21

client-server scenario server: 223.1.2.5 discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 arriving client request offer src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 lifetime: 3600 secs src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 lifetime: 3600 secs ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 lifetime: 3600 secs Network Layer 4-22

: more than IP addresses can return more than just allocated IP address on subnet: address of first-hop router for client name and IP address of DNS sever network mask (indicating network versus host portion of address) Network Layer 4-23

: example UDP IP Eth Phy UDP IP Eth Phy 168.1.1.1 router with server built into router connecting laptop needs its IP address, addr of first-hop router, addr of DNS server: use request encapsulated in UDP, encapsulated in IP, encapsulated in 802.1 Ethernet Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running server Ethernet demuxed to IP demuxed, UDP demuxed to Network Layer 4-24

: example UDP IP Eth Phy UDP IP Eth Phy router with server built into router DCP server formulates ACK containing client s IP address, IP address of first-hop router for client, name & IP address of DNS server encapsulation of server, frame forwarded to client, demuxing up to at client client now knows its IP address, name and IP address of DSN server, IP address of its first-hop router Network Layer 4-25

IP addresses: how to get one? Q: how does network get subnet part of IP addr? A: gets allocated portion of its provider 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 Network Layer 4-26

Hierarchical addressing: route aggregation hierarchical addressing allows efficient advertisement of routing information: Organization 0 200.23.16.0/23 Organization 1 200.23.18.0/23 Organization 2 200.23.20.0/23 Organization 7.... Fly-By-Night-ISP Send me anything with addresses beginning 200.23.16.0/20 Internet 200.23.30.0/23 ISPs-R-Us Send me anything with addresses beginning 199.31.0.0/16 Network Layer 4-27

Hierarchical addressing: more specific routes ISPs-R-Us has a more specific route to Organization 1 Organization 0 200.23.16.0/23 Organization 2 200.23.20.0/23 Organization 7 200.23.30.0/23 Organization 1 200.23.18.0/23.... Fly-By-Night-ISP ISPs-R-Us Send me anything with addresses beginning 200.23.16.0/20 Send me anything with addresses beginning 199.31.0.0/16 or 200.23.18.0/23 Internet Network Layer 4-28

IP addressing: the last word... Q: how does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers http://www.icann.org/ allocates addresses manages DNS assigns domain names, resolves disputes Network Layer 4-29

NAT: network address translation rest of Internet 138.76.29.7 10.0.0.4 local network (e.g., home network) 10.0.0/24 10.0.0.1 10.0.0.2 10.0.0.3 all datagrams leaving local network have same single source NAT IP address: 138.76.29.7,different source port numbers datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) Network Layer 4-30

NAT: network address translation motivation: local network uses just one IP address as far as outside world is concerned: range of addresses not needed from ISP: just one IP address for all devices can change addresses of devices in local network without notifying outside world can change ISP without changing addresses of devices in local network devices inside local net not explicitly addressable, visible by outside world (a security plus) Network Layer 4-31

NAT: network address translation implementation: NAT router must: 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 remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair 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 Network Layer 4-32

NAT: network address translation 2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.29.7, 5001, updates table 2 NAT translation table WAN side addr LAN side addr 138.76.29.7, 5001 10.0.0.1, 3345 S: 138.76.29.7, 5001 D: 128.119.40.186, 80 10.0.0.4 S: 10.0.0.1, 3345 D: 128.119.40.186, 80 1 1: host 10.0.0.1 sends datagram to 128.119.40.186, 80 10.0.0.1 10.0.0.2 138.76.29.7 S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 3: reply arrives dest. address: 138.76.29.7, 5001 S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 4: NAT router 10.0.0.3 changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345 Network Layer 4-33

Next class Please read Chapter 4.4-4.5 of your textbook BEFORE Class 34