CS 5565 Network Architecture and Protocols Godmar Back Lecture 14.

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.
CS 4700 / CS 5700 Network Fundamentals Lecture 15: NAT (You Better Forward Those Ports) Revised 3/9/2013.
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.
What we will cover… Home Networking: Network Address Translation (NAT) Mobile Routing.
Chapter 5 The Network Layer.
NAT: Network Address Translation local network (e.g., home network) /24 rest of Internet Datagrams.
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 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.
Network Layer4-1 Data Communication and Networks Lecture 6 Networks: Part 1 Circuit Switching, Packet Switching, The Network Layer October 13, 2005.
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 Layer session 1 TELE3118: Network Technologies Week 4: Network Layer Basics, Addressing Some slides have been taken from: r Computer Networking:
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.
Chapter 19 Network Layer: Logical Addressing
Computer Networks The Network Layer
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.
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!
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.
CS 5565 Network Architecture and Protocols
12 – IP, NAT, ICMP, IPv6 Network Layer.
19-1 Last time □ TCP ♦ Throughput ♦ Fairness ♦ Delay modeling □ TCP socket programming.
CS 3214 Computer Systems Godmar Back Lecture 24 Supplementary Material.
1 NAT Network Address Translation Motivation for NAT To solve the insufficient problem of IP addresses IPv6 –All software and hardware need to be updated.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 16.
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.
RSC Part II: Network Layer 3. IP addressing Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are, mainly, part of the.
Network Layer4-1 Chapter 4 Network Layer All material copyright J.F Kurose and K.W. Ross, All Rights Reserved.
Chapter 4, slide: 1 Chapter 4: Network Layer r Introduction r IP: Internet Protocol  IPv4 addressing  NAT  IPv6 r Routing algorithms  Link state 
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.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
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.
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.
Page 1 Network Addressing CS.457 Network Design And Management.
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.
Wide Area Networks and Internet CT1403 Lecture-7: Internet Network Layer (Part-2) 1.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r Understand principles behind network layer services: m Routing (path selection) m dealing with.
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 All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Wide Area Networks and Internet CT1403 Lecture-5: Internet Network Layer (Part 3) 1.
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.
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.
12 – IP, NAT, ICMP, IPv6 Network Layer.
Data Communication and Networks
Some slides have been taken from:
CS 3214 Computer Systems Lecture 25 Godmar Back.
Supplementary Material
Network Address Translation
Chapter 4: Network Layer
Chapter 4: Network Layer
Supplementary Material
CS 3700 Networks and Distributed Systems
CS 3700 Networks and Distributed Systems
CS 5565 Network Architecture and Protocols
Overview The Internet (IP) Protocol Datagram format IP fragmentation
DHCP and NAT.
CS4470 Computer Networking Protocols
DHCP: Dynamic Host Configuration Protocol
Presentation transcript:

CS 5565 Network Architecture and Protocols Godmar Back Lecture 14

Announcements Project 2A due Apr 8 –Reminder: can be done as a team, can switch teams between projects, use forum if you’re looking for team members Midterm April 1 (no joke) –Will provide overview sheet and sample exams on Wednesday Required Reading: –DCCP by Koehler et al, SIGCOMM /27/2016CS 5565 Spring 20092

Network Address Translation TCP Hole Punching & Simultaneous Open

1/27/2016CS 5565 Spring 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

1/27/2016CS 5565 Spring NAT: Network Address Translation Motivation: local network uses just one IP address as far as outside word is concerned: –no need to be allocated range of addresses from ISP: - just one IP address is used 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 huge security plus).

1/27/2016CS 5565 Spring 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

1/27/2016CS 5565 Spring 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

1/27/2016CS 5565 Spring NAT Disadvantages 16-bit port-number field: –Only 60,000 simultaneous connections with a single LAN-side address! NAT is controversial: –routers should only process up to layer 3 –violates end-to-end argument NAT possibility must be taken into account by app designers, eg, P2P applications –address shortage should instead be solved by IPv6 –really annoying if you time out on rlogin.cs.vt.edu

NAT Challenges Considering that most Internet hosts are behind NAT these days – how should applications be written to deal with that? No problem as long as server has public IP and client knows where to connect (HTTP, XMPP, SMTP, POP) What about P2P applications? –Could relay through server, but that would defeat purpose of P2P –Instead, a technique called “hole punching” is widely used (e.g., in Skype) –Discussed in [Ford/Srisuresh/Kegel 2005]Ford/Srisuresh/Kegel 2005 UDP hole punching is widely used, but TCP hole punching is possible as well 1/27/2016CS 5565 Spring 20099

NAT Relaying All traffic goes through S Source: [Ford/Srisuresh/K egel 2005]Ford/Srisuresh/K egel /27/2016CS 5565 Spring

1/27/2016CS 5565 Spring Aside: TCP Hole Punching External server S records & provides private & public IP both behind-NAT hosts must punch holes with outgoing SYN – allows TCP connection

1/27/2016CS 5565 Spring Simultaneous Open (cont’d) Vint Cerf, 1987: Not invented for hole punching in NAT – coincidental use Distributed systems with symmetric processes that automatically seek to link to each other (no master/slave relationship) would use the simul-OPEN style. It was designed into TCP for that purpose; I do not know, however, whether any actual applications have made use of this feature.

1/27/2016CS 5565 Spring Simultaneous Open (a) TCP connection establishment in the normal case. (b) Call collision – one connection is established (“client-client” connection)

1/27/2016CS 5565 Spring TCP Connection FSM The heavy solid line is the normal path for a client. The heavy dashed line is the normal path for a server. The light lines are unusual events. Each transition is labeled by the event causing it and the action resulting from it, separated by a slash.

1/27/2016CS 5565 Spring TCP Hole Punching Must bind multiple sockets to same port (SO_REUSEADDR) Manage to identify which scenario has occurred Must handle case where both clients are behind the same NAT!

Remote Procedure Calls

1/27/2016CS 5565 Spring RPC: Remote Procedure Call (Birrell/Nelson 1984) CallerCallee arguments results CallerClient Stub arguments results Transport Callee arguments results Server Stub request/reply msgs

1/27/2016CS 5565 Spring RPC – Client & Server Stubs

1/27/2016CS 5565 Spring codea0a1a2a3.lena3.buf proc example_procedure = code takes int32 a0 int16 a1 int16 a2 bytearray a3 returns int32 32bit code argument #0 32bit int argument #1 16bit int argument #2 16bit int argument #3 of type bytearray 32bit length field followed by a3.len bytes RPC Encoding

1/27/2016CS 5565 Spring Architecture of Distributed Simulator in Project 2 Simulator Node 0 Node 1 Node n-1 … Outbound TCP Stream Inbound TCP Stream Outbound Request Reply Inbound Request Reply