NATs and UDP Victor Norman CS322 Spring 2014. NAPT Suppose we have a router doing NAT: half is the “public side”, IP address 77.78.79.80; other half is.

Slides:



Advertisements
Similar presentations
Ch. 23, 25 Q and A (NAT and UDP) Victor Norman IS333 Spring 2014.
Advertisements

CS332 Victor Norman Spring 2014
CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Q and A for Ch. 1, 2, 3 CS 332 Spring Structure of the class Q: Comer describes five aspects of networking around which he has structured his text.
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Chapter 5 The Network Layer.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
CSCI 4550/8556 Computer Networks Comer, Chapter 21: IP Encapsulation, Fragmentation, and Reassembly.
Shivkumar KalyanaramanRensselaer Q1-1 ECSE-6600: Internet Protocols Quiz 1 Time: 60 min (strictly enforced) Points: 50 YOUR NAME: Be brief, but DO NOT.
Internet Networking Spring 2003
TCP/IP Protocol Suite 1 Chapter 11 Upon completion you will be able to: User Datagram Protocol Be able to explain process-to-process communication Know.
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 27 Q and A Victor Norman IS333 Spring 2015.
Q and A, Ch. 21 IS333, Spring 2015 Victor Norman.
23-Support Protocols and Technologies Dr. John P. Abraham Professor UTPA.
CS 5565 Network Architecture and Protocols
CS 3214 Computer Systems Godmar Back Lecture 24 Supplementary Material.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
IP Tutorial 1. 2 An IP address is a unique number used to identify your computer on the internet. Every system has it’s own unique IP address. IP addresses.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
ECE 526 – Network Processing Systems Design Networking: protocols and packet format Chapter 3: D. E. Comer Fall 2008.
Chapter 22 Q and A Victor Norman IS333 Spring 2015.
User Datagram Protocol (UDP) Chapter 11. Know TCP/IP transfers datagrams around Forwarded based on destination’s IP address Forwarded based on destination’s.
Chapter 22 Q and A Victor Norman CS 332 Spring 2014.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
Private Network Addresses IP addresses in a private network can be assigned arbitrarily. – Not registered and not guaranteed to be globally unique Generally,
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.
IP addresses IPv4 and IPv6. IP addresses (IP=Internet Protocol) Each computer connected to the Internet must have a unique IP address.
Protocol Layering Chapter 11.
1 Transport Layer: Basics Outline Intro to transport UDP Congestion control basics.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
1 Network Address Translation. 2 Network Address Translation (NAT) Extension of original addressing scheme Motivated by exhaustion of IP address space.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
TCP/IP Illustrated, Volume 1: The Protocols Chapter 6. ICMP: Internet Control Message Protocol ( 월 ) 김 철 환
1 Kyung Hee University Chapter 11 User Datagram Protocol.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Q and A, Ch. 21 IS333, Spring 2016 Victor Norman.
Ch. 23, 25 Q and A (NAT and UDP) Victor Norman IS333 Spring 2015.
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
Ch. 25, 26 UDP, TCP CS332, Spring 2016 Victor Norman, Professor Extraordinaire.
Process-to-Process Delivery:
Chapter 23: ARP, ICMP, DHCP CS332 Spring 2016 Victor Norman.
Network Layer/IP Protocols 1. Outline IP Datagram (IPv4) NAT Connection less and connection oriented service 2.
Kittiphan Techakittiroj (25/06/59 19:10 น. 25/06/59 19:10 น. 25/06/59 19:10 น.) Network Address Translation Kittiphan Techakittiroj
UDP. User Datagram Protocol (UDP)  Unreliable and unordered datagram service  Adds multiplexing  No flow control  Endpoints identified by ports 
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Quality and Value for the Exam 100% Guarantee to Pass Your Exam Based on Real Exams Scenarios Verified Answers Researched by Industry.
Supplementary Material
Chapter 11 User Datagram Protocol
Victor Norman IS333 Spring 2016
The Transport Layer Implementation Services Functions Protocols
Chapter 9: Transport Layer
Instructor Materials Chapter 9: Transport Layer
Supplementary Material
5. End-to-end protocols (part 1)
CS 3700 Networks and Distributed Systems
Chapter 22 Q and A Victor Norman CS332 Fall 2017.
CS 457 – Lecture 10 Internetworking and IP
EEC-484/584 Computer Networks
CS 3700 Networks and Distributed Systems
EEC-484/584 Computer Networks
Advanced Computer Networks
Chapter 5 Transport Layer Introduction
Presentation transcript:

NATs and UDP Victor Norman CS322 Spring 2014

NAPT Suppose we have a router doing NAT: half is the “public side”, IP address ; other half is the “private side”, Host sends packet to , port 80. – Host chooses source port NAPT makes entry in its table when first packet is sent.

Why need to use port? Q: Why do you need to use the port in the algorithm? What if you used something beside UDP/TCP behind a NAPT? A: The port is used in a NAPT to disambiguate when multiple machines behind the NAPT send to the same machine outside the NAT. If you use another protocol you might not be able to use the NAT, or you might have to program the NAT to handle it.

NAT Translation Table Timeout? Q: Do the translation table entries on a NAT time out like the entries on a learning switch? A: Yes, I think they must have to be timed out.

Most common address block Q: According to Comer, the most common address block used is the /8 block. Is this because it allows for the most hosts on a site? A: I don’t know that that is true, and I don’t know why it is true if it is true…

# of port numbers Q: NAPT uses a set of cycling port numbers. What is the size of that set and would it be possible to overrun the set? A: The port numbers in UDP and TCP are 16 bits, so possibilities.

Servers behind a NAT Q: How does the NAT allow multiple machines to run servers visible to the outside? A: Twice NAT explains how this can be done (but I don’t know if anyone does that). In general, I think that servers are just run on public IP addresses.

Sub-NAT? Q: Can you subNAT, that is a NAT inside a NAT?Would each embedded NAT have to use an equivalent or smaller mask than the main NAT, so, ultimately, using the most general NAT, /8 allows for the most diversity in the NAT? A: The masks don’t come into play in this… but I think you could sub-NAT.

NAT solves address depletion? Q: If we (being everyone in the known universe) used NATs, do we really need IPv6? A: We probably would still run out of IP addresses and thus need to go to IPv6.

Calvin using a NAT? Q: With Calvin’s network size, would it be possible to move away from the class B network and use a NAT instead (or reducing to a /24 network and using several NATs)? A: I don’t know… Let’s think about this…

UDP Checksum and NAT Q: Does a NAT have to recompute the UDP checksum? A: Yes! Because it changes the IP source address and because it changes the UDP source port.

UDP Functionality? Q: UDP does not seem to provide any functionality! It is just best-effort, like IP. Why have it at all? A: It provides really one thing: a way to demultiplex layer 5 protocols, via the port numbers.

UDP as endpoint Q: Does a UDP port mostly serve as an endpoint for sending and receiving messages, rather than creating direct lines of communication as TCP does? A: Yes. When you open a UDP socket and get a message, you get the source address/port as well as the data, because the message could have come from anywhere.

UDP Pseudo-header Q: Comer mentions that UDP header does not provide a checksum, so UDP extends the checksum to include the IP datagram? How does this work, and how does this help to reduce errors in IP? A: In your code when you compute the checksum, you first add in the fields from the IP header that you need. Not hard to implement. Does it really help reduce errors? Theoretically yes. Practically? I doubt it.

Pseudo-header: where? Q: Regarding UDP, is the pseudo header only appended to the UDP message on the receiving end? A: No. The pseudo-header is built on the sending side in order to compute the checksum. It is also built on the receiving side, for the same reason. Note: the pseudo-header is NOT transmitted.

Layer violation? Q: Does the use of a pseudo-header mean that UDP does not support layer 3 protocols other than IP? What about IPv6? The pseudo-header seems like a bad idea to me because it destroys the separation of concerns between layers. Do the benefits outweigh these problems? A: Amen! And bless you for this observation. I think it is a bad idea. You have to assume *something* from your lower layers…

Message ordering… Q: How do applications that use UDP keep track of message order? A: They put a message # in each packet, usually.

UDP packet fragmentation Q: In Chapter 25, the author mentions that in using the UDP protocol programmers must be sure to keep the message sizes small or risk loss of efficiency due to fragmentation. In practice, do UDP packets typically remain small enough to avoid fragmentation, or is there some amount of these messages that just plain have to be bigger than that? A: A typical MTU is 1500 bytes, so most messages can be contained in that. NFS is over UDP (and TCP) but can contain long filenames. If they don’t fit in the MTU, they don’t fit, and the packet gets fragmented.

TCP vs. UDP ports Q: Are all layer 4 port number protocols the same? (TCP vs UDP, etc.) A: TCP ports are totally different from UDP ports. They are both 16 bits, but a UDP port could be used for XYZ protocol and the same TCP port could be for a totally different protocol. NOTE: an application can send a broadcast UDP message – to any machine on the network listening on a certain UDP port. Cannot do this in TCP.