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

Similar documents
Broadcast Routing. Multicast. Flooding. In-network duplication. deliver packets from source to all other nodes source duplication is inefficient:

DATA COMMUNICATOIN NETWORKING

Exercises to Communication Systems

Router Architecture Overview

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

Review. Some slides are in courtesy of J. Kurose and K. Ross

Network layer: Overview. Network Layer Functions

Chapter 4: Network Layer

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

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

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

CSCE 463/612 Networks and Distributed Processing Spring 2018

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

Lecture 6. TCP/IP Network Layer (4)

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

internet technologies and standards

Chapter 4: network layer

Multicast Communications

Master Course Computer Networks IN2097

CMPE 80N: Introduction to Networking and the Internet

The Internet network layer

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

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

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

Chapter 4 Network Layer: The Data Plane

Master Course Computer Networks IN2097

Chapter 4: Network Layer

Network Layer PREPARED BY AHMED ABDEL-RAOUF

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

CS555, Spring /5/2005. April 12, 2005 No classes attend Senior Design Projects conference. Chapter 4 roadmap. Internet AS Hierarchy

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

COMP211 Chapter 4 Network Layer: The Data Plane

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

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

List of groups known at each router. Router gets those using IGMP. And where they are in use Where members are located. Enhancement to OSPF

internet technologies and standards

Network Layer: Internet Protocol

Advanced Network Training Multicast

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

Chapter 4 Network Layer

Chapter 4: outline. Network Layer 4-1

TDTS06: computer Networks

CSCI Topics: Internet Programming Fall 2008

Internet Multicast Routing

Chapter 4 Network Layer: The Data Plane

CSC 401 Data and Computer Communications Networks

What is Multicasting? Multicasting Fundamentals. Unicast Transmission. Agenda. L70 - Multicasting Fundamentals. L70 - Multicasting Fundamentals

Multicast Communications. Slide Set were original prepared by Dr. Tatsuya Susa

Chapter 4 Network Layer: The Data Plane

CS 3516: Advanced Computer Networks

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

Department of Computer and IT Engineering University of Kurdistan. Network Layer. By: Dr. Alireza Abdollahpouri

Computer Networking Introduction

CSC 4900 Computer Networks: Network Layer

Why multicast? The concept of multicast Multicast groups Multicast addressing Multicast routing protocols MBONE Multicast applications Conclusions

CS 3516: Computer Networks

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

Network Layer: Data Plane 4-2

Chapter 4 Network Layer: The Data Plane

Network Layer: Router Architecture, IP Addressing

ITEC310 Computer Networks II

Routing in the Internet

DATA COMMUNICATOIN NETWORKING

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer

ETSF05/ETSF10 Internet Protocols Network Layer Protocols

Inter-AS routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

Chapter 4: Network Layer. Chapter 4: Network Layer

Chapter 4 Network Layer

Topic: Multicast routing

COMPUTER NETWORKS CHAP 4 : NETWORK LAYER

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

CSCI Computer Networks Fall 2016

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

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

Network Layer: Control/data plane, addressing, routers

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

Chapter 4 Network Layer

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

Chapter 4 Network Layer. Chapter 4: Network Layer. Chapter 4: Network Layer. Chapter goals: understand principles behind network layer services:

Chapter 4 Network Layer

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

Chapter IV: Network Layer

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

Multicast. Midterm. EECS 122: Lecture 16. University of California Berkeley. Exam was not meant to be easy

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

ETSF10 Internet Protocols Routing on the Internet

IP Multicast Technology Overview

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer

Chapter 4 Network Layer

Chapter 4 Network Layer. Network Layer 4-1

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Internet Protocol, Version 6

Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Chapter 4 Network Layer

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

EEC-684/584 Computer Networks

Transcription:

Network Layer II Still chapter 4 in the textbook C compiler You writing assignment 2 Getting IP addresses ARP is the simplest way, which we will barely discuss (now) It s a mapping between Ethernet MAC addresses and IP addresses It s pretty static and not very interesting No one would manage a modern network this way 51 DHCP client-server scenario A B 223.1.1.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 DHCP server 223.1.3.27 223.1.2.1 223.1.2.2 E 223.1.3.2 arriving DHCP client needs address in this network CS357b 52 DHCP client-server scenario DHCP server: 223.1.2.5 DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 DHCP server: 223.1.2.5 DHCP request Lifetime: 3600 secs src: 0.0.0.0, 68 dest: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 time DHCP server: 223.1.2.5 Lifetime: 3600 secs DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 DHCP server: 223.1.2.5 Lifetime: 3600 secs arriving client CS357b 53

DHCP is weird NAT It s an application-level protocol (i.e., it sits 2 levels above the network level) But it s used to set up the network level Thank goodness for 255.255.255.255 :P NAT is a necessity NAT is a necessity China has 38.4 million IP addresses China s 3 largest cities alone (Shanghai, Beijing, Guangzhou) have over 39 million people Uh oh You have three people at home Everyone wants Internet access and your ISP has only given you one IP address to share Uh oh Private Internet spaces 10.0.0.0/8 (~16 million addresses) 172.16.0.0/12 (~1 million addresses) 192.168.0.0/16 (~65000 addresses) These three address blocks are reserved for private use They will never be assigned NAT: Network Address Translation rest of Internet 138.76.29.7 All datagrams leaving local network have same single source NAT IP address: 138.76.29.7, different source port numbers 10.0.0.4 local network (e.g., home network) 10.0.0/24 Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) 10.0.0.1 10.0.0.3 CS357b 54

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 address 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 CS357b 56 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 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 10.0.0.4 S: 10.0.0.1, 3345 D: 128.119.40.186, 80 1 S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 1: host 10.0.0.1 sends datagram to 128.119.40, 80 10.0.0.1 10.0.0.3 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345 CS357b 57 NAT: Network Address Translation 16-bit port-number field: " 60,000+ simultaneous connections with a single LANside address NAT is controversial: " port numbers should address processes and not hosts " routers should only process up to layer 3 " violates end-to-end argument hosts should talk directly with each other, without this kind of interference and translation going on N AT possibility must be taken into account by app designers, eg, P2P applications " address shortage should instead be solved by IPv6 NAT traversal The end-to-end principle is a big one Essentially it says we should be able to send a packet from one host to another host NAT breaks this :( It s used all over the place: Skype, instant messaging, anything that accepts incoming packets CS357b 58 NAT traversal People have come up with a few ways to get around this Most popular one focus around variations of UDP hole-punching

I d like to listen for traffic on port 1000 S:, 1000 S:, 1000 D:, D:, S: D:, S: D:,

, S:, 3333 D: S:, 3333 D:,, S:, 3333 D:, 1000 S:, 3333 D:, 1000,,

UDP hole-punching We still require a public, visibly addressable server It has to tell everyone else which port number you re using, NAT NAT offers a very weak form of security since hosts behind a NAT are not publicly addressable Why is this not very good security? Multicasting Generally what we ve talked about has either been Unicasting: sending a packet from one place to another place Broadcasting (e.g., DHCP): sending a packet from one place to EVERYWHERE Multicasting is sending a packet from one place to a BUNCH of places (but not everywhere) Multicast: one sender to many receivers Multicast: act of sending datagram to multiple receivers with single transmit operation " analogy: one teacher to many students Question: how to achieve multicast Multicast: one sender to many receivers Multicast: act of sending datagram to multiple receivers with single transmit operation " analogy: one teacher to many students Question: how to achieve multicast routers forward unicast datagrams Multicast via unicast source sends N unicast datagrams, one addressed to each of N receivers multicast receiver (red) not a multicast receiver (red) CS357b 121 Multicast routers (red) duplicate and forward multicast datagrams Network multicast s actively participate in multicast, making copies of packets as needed and forwarding towards multicast receivers CS357b 122

Multicast: one sender to many receivers Multicast: act of sending datagram to multiple receivers with single transmit operation " analogy: one teacher to many students Question: how to achieve multicast Application-layer multicast end systems involved in multicast copy and forward unicast datagrams among themselves Internet Multicast Service Model 128.119.40.186 128.59.16.12 multicast group 226.17.30.197 multicast group concept: use of indirection 128.34.108.63 128.34.108.60 hosts addresses IP datagram to multicast group routers forward multicast datagrams to hosts that have ed that multicast group CS357b 123 CS357b 124 Multicast groups Wait class D Internet addresses reserved for multicast: host group semantics: o anyone can (receive) multicast group o anyone can send to multicast group o no network-layer identification to hosts of members needed: infrastructure to deliver mcast-addressed datagrams t o all hosts that have ed that multicast group Multicasting at the network level is very rare Typically multicasting is done at the application level Fire off multiple copies of the packets to everyone in your audience Why? CS357b 125 Joining a mcast group: two-step process local: host informs local mcast router of desire to group: IGMP (Internet Group Management Protocol) wide area: local router interacts with other routers to receive mcast datagram flow " many protocols (e.g., DVMRP, MOSPF, PIM) IGMP wide-area multicast routing IGMP IGMP: Internet Group Management Protocol host: sends IGMP report when application s mcast group " IP_ADD_MEMBERSHIP socket option " host need not explicitly un group when leaving router: sends IGMP query at regular intervals " host belonging to a mcast group must reply to query query report IGMP CS357b 126 CS357b 127

Multicast Routing: Problem Statement Goal: find a tree (or trees) connecting routers having local mcast group members " tree: not all paths between routers used " source-based: different tree from each sender to rcvrs " shar ed-tree: same tree used by all group members Shared tree Source-based trees Internet Multicasting Routing: DVMRP DVMRP: distance vector multicast routing protocol, RFC1075 flood and prune: reverse path forwarding, source-based tree " RPF tree based on DVMRP s own routing tables constructed by communicating DVMRP routers " no assumptions about underlying unicast " initial datagram to mcast group flooded everywhere via RPF " routers not wanting group: send upstream prune msgs Tunneling Q: How to connect islands of multicast routers in a sea of unicast routers? PIM: Protocol Independent Multicast not dependent on any specific underlying unicast routing algorithm (works with all) two dif f er ent multicast distribution scenarios : physical topology logical topology mcast datagram encapsulated inside normal (non-multicastaddressed) datagram normal IP datagram sent thru tunnel via regular IP unicast to receiving mcast router receiving mcast router unencapsulates to get mcast datagram Dense: group members densely packed, in close proximity. bandwidth more plentiful Sparse: # networks with group members small wrt # interconnected networks group members widely dispersed bandwidth not plentiful Consequences of Sparse-Dense Dichotomy: Dense Sparse: group membership by no membership until routers assumed until routers explicitly routers explicitly prune receiver- driven data-driven construction construction of mcast on mcast tree (e.g., RPF) tree (e.g., center-based) bandwidth and nongroup-router processing router processing bandwidth and non-group- wasteful conservative PIM- Dense Mode flood-and-prune RPF, similar to DVMRP but underlying unicast protocol provides RPF info for incoming datagram less complicated (less efficient) downstream flood than DVMRP reduces reliance on underlying routing algorithm has protocol mechanism for router to detect it is a leaf-node router

PIM - Sparse Mode PIM - Sparse Mode center-based approach router sends msg to rendezvous point (RP) " intermediate routers update state and forward after ing via RP, router can switch to source-specific tree " increased performance: less concentration, shorter paths R3 R2 R1 all data multicast from rendezvous point R6 R4 R5 R7 rendezvous point sender(s): unicast data to RP, which distributes down RP-rooted tree RP can extend mcast tree upstream to source RP can send stop msg if no attached receivers " no one is listening R3 R2 R1 all data multicast from rendezvous point R6 R4 R5 R7 rendezvous point Route management Routing tables can be hard to maintain for complex networks Especially where redundant connections are made The Internet runs largely on BGP (Border Gateway Protocol) to maintain routing tables BGP: controlling who routes to you W A B C Figure 4.5-BGPnew: a simple BGP scenario A,B,C are provider networks X Y legend: provider network customer network: X,W,Y are customers (of provider networks) X is dual-homed: attached to two networks " X does not want to route from B via X to C ".. so X will not advertise to B a route to C CS357b 115 BGP: controlling who routes to you W A B C Figure 4.5-BGPnew: a simple BGP scenario X Y legend: A advertises to B the path AW B advertises to X the path BAW Should B advertise to C the path BAW? provider network customer network: " No way B gets no revenue for routing CBAW since neither W nor C are B s customers " B wants to force C to route to w via A " B wants to route only to/from its customers CS357b 116 BGP operation Q: What does a BGP router do? Receiving and filtering route advertisements from directly attached neighbor(s). Route selection. " To route to destination X, which path (of several advertised) will be taken? Sending route advertisements to neighbors. CS357b 117

BGP messages BGP messages exchanged using TCP. BGP messages: " OPEN: opens TCP connection to peer and authenticates sender " UPDATE: advertises new path (or withdraws old) " KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request " N O T I F I C A T I O N : r eports errors in previous msg; also used to close connection CS357b 118 Fragmentation One last thing before we talk about IPv6 (which will solve all our problems forever) A single IP packet sometimes gets fragmented and sent in smaller packets Why does this happen at the network layer? Because IPv4 is stupid :( (see above re: IPv6 not being stupid) IP Fragmentation & Reassembly IP Fragmentation and 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 Example 4000 byte datagram MTU = 1500 bytes length =4000 ID =x length =1500 length =1500 length =1040 fragflag =0 ID =x ID =x ID =x offset =0 One large datagram becomes several smaller datagrams fragflag =1 offset =0 fragflag offset =1 =1480 fragflag offset =0 =2960 CS357b 34 CS357b 35 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 with TCP? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead ver 32 bits 16-bit identifier flgs time to live head. type of len service upper layer length offset Internet checksum 32 bit source IP address data (variable length, typically a TCP or UDP segment) fragment 32 bit destination IP address Options (if any) total datagram length (bytes) for fragmentation/ reassembly E.g. timestamp, record route taken, specify list of routers to visit. CS357b 33