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.

Slides:



Advertisements
Similar presentations
Firewalls and Network Address Translation (NAT) Chapter 7.
Advertisements

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-
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.
An Analysis of the Skype Peer-to-Peer Internet Telephony Protocol Salman Baset and Henning Schuzrinne INFOCOMM 2006 Presenter - Bob Kinicki Presenter -
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.
1 Network Address Translation (NAT) Relates to Lab 7. Module about private networks and NAT.
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
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
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.
CS 3214 Computer Systems Godmar Back Lecture 24 Supplementary Material.
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.
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 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.
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.
IPv4 Fragmentation, PMTU Discovery and NAT
CS 5565 Network Architecture and Protocols Godmar Back Lecture 14.
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.
Chapter 5. An IP address is simply a series of binary bits (ones and zeros). How many binary bits are used? 32.
@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.
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.
Chapter 4-2 IP address.
Some slides have been taken from:
Supplementary Material
Network Address Translation
Chapter 4: Network Layer
Chapter 4: Network Layer
Supplementary Material
CS 3700 Networks and Distributed Systems
Network Address Translation (NAT)
Introducing To Networking
CS 3700 Networks and Distributed Systems
Overview The Internet (IP) Protocol Datagram format IP fragmentation
DHCP and NAT.
Network Address Translation (NAT)
DHCP: Dynamic Host Configuration Protocol
Presentation transcript:

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 –High cost Virtual IP Gateway –Used on IPv4 –Let more hosts connect to Internet

NAT Example local network (e.g., home network) /24 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 NAT gateway

Private IP Addresses The following addresses are reserved for the private network –Class A : * –Class B : *.* to *.* –Class C : * to * Closed local network /24

Connection with Socket Pairs IP address + Port number = Socket address Socket pairs define a unique Internet connection. –( ,3044) and ( ,80) is a socket pair. telnet server telnet client Destination: Port Number: 80 Source: Port Number: 3044 Source: Port Number: 5001 Web page 1 Web page 2

Implementation (1/3) Outgoing datagrams –Replace (source IP address, port no.1) of every outgoing datagram to (NAT IP address, port no.2) Internt NAT gateway :80  : :8  :3345 Web server PC in LAN d: :80  s: :3345 original socket pair d: :80  s: :5001 new socket pair

Implementation (2/3) Create NAT translation table –Every (source IP address, port no.1) to (NAT IP address, port no.2) translation pair NAT translation table WAN side addr LAN side addr , , 3345 …… Internt NAT gateway :80  : :80  :3345 Web server PC in LAN

Implementation (3/3) Incoming datagrams –Replace (NAT IP address, port no.2) in the destination field with corresponding (source IP address, port no.1) stored in NAT translation table Internt NAT gateway :80  :5001 Web server PC in LAN s: :80  d: :5001 original socket pair s: :80  d: :3345 new socket pair :80  :3345

NAT Translation Table 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

Advantages of NAT (1/2) Local network uses just one IP address as far as outside world is concerned –16-bit port-number field; 60,000 simultaneous connections with a single LAN-side address! 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

Advantages of NAT (2/2) 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).

Controversial Issues NAT is controversial: –Cost and performance –Outside client cannot create a connection to the host in local network NAT traversal problem –Violates end-to-end argument NAT possibility must be taken into account by application designers, eg, P2P applications –Address shortage should instead be solved by IPv6 IPv6

Problems of IPv6 IPv6 and IPv4 are not compatible. All software at many layers need to be modified for IPv6 (ex: TCPv6, UDPv6, etc.) All hardware such as gateways and routers must be updated. The IPv6 header which is larger than IPv4 header will increase the traffic overhead 。

NAT Traversal Problem (1/3) Client want to connect to server with address Solution 1: statically configure NAT to forward incoming connection requests at given port to server –e.g., ( , port 5001) always forwarded to port NAT gateway Client ? server

NAT Traversal Problem (2/3) Solution 2: Universal Plug and Play (UPnP) Internet Gateway Device (IGD) Protocol.  Learn public IP address ( ) + port mappings (with lease times)  Automate static NAT port map configuration NAT gateway IGD :5001  :3345

NAT Traversal Problem (3/3) Solution 3: relaying (used in Skype)Skype –NATed server establishes connection from peer 1 to relay –Peer 2 connects to relay –Relay bridges packets between to connections NAT gateway peer 2 1. connection to relay initiated by NATted host 2. connection to relay initiated by client 3. relaying established peer1 NAT gateway

Making A Call on Skype Skype Client (SC) registers with Super Node (SN) –List of SNs SC contacts SN with callee ID –SN contacts other SNs to find callee SC directly contacts callee, overTCP Skype login server

Summary By using Network Address Translation (NAT), we manage networks in a simple way: –Security, insufficient IP address, cost … NAT traversal is a big problem Homework: To find and explain the method for NAT Traversal