CS 540 Computer Networks II Sandy Wang

Slides:



Advertisements
Similar presentations
1 Network Address Translation (NAT) Relates to Lab 7. Module about private networks and NAT.
Advertisements

CST Computer Networks NAT CST 415 4/10/2017 CST Computer Networks.
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.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v2.3—4-1 Managing IP Traffic with ACLs Scaling the Network with NAT and PAT.
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
1 Internet Networking Spring 2004 Tutorial 13 LSNAT - Load Sharing NAT (RFC 2391)
COS 420 Day 18. Agenda Assignment 4 Posted Chap Due April 6 Group project program requirements Submitted but Needs lots of work Individual Project.
1 Comnet 2010 Communication Networks Recitation 7 Lookups & NAT.
1 Network Address Translation (NAT) Relates to Lab 7. Module about private networks and NAT.
CSE5803 Advanced Internet Protocols and Applications (7) Introduction The IP addressing scheme discussed in Chapter 2 are classful and can be summarised.
Sybex CCNA Chapter 11: Network Address Translation Instructor & Todd Lammle.
CCNA Guide to Cisco Networking Fundamentals Fourth Edition Chapter 9 Network Services.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #12 LSNAT - Load Sharing NAT (RFC 2391)
Network Layer IS250 Spring 2010
1 Network Address Translation (NAT) Relates to Lab 7. Module about private networks and NAT.
Sybex CCENT Chapter 13: Network Address Translation Instructor & Todd Lammle.
4: Addressing Working At A Small-to-Medium Business or ISP.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 4: Addressing in an Enterprise Network Introducing Routing and Switching in the.
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
Network Address Translation
COMS W COMS W Lecture 8. NAT, DHCP & Firewalls.
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.
Introduction to Network Address Translation
1 Network Address Translation (NAT). 2 Private Network شبکه خصوصی شبکه ای است که بطور مستقیم به اینترنت متصل نیست در یک شبکه خصوصی آدرس های IP به دلخواه.
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.
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.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 4: Addressing in an Enterprise Network Introducing Routing and Switching in the.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Planning the Addressing Structure Working at a Small-to-Medium Business.
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,
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
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.
Instructor & Todd Lammle
1 Network Address Translation (NAT) and Dynamic Host Configuration Protocol (DHCP) Relates to Lab 7. Module about private networks and NAT.
1 © 2004, Cisco Systems, Inc. All rights reserved. Scaling IP Addresses Network Address Translation(NAT)
CIT 384: Network AdministrationSlide #1 CIT 384: Network Administration NAT.
NAT/PAT by S K SATAPATHY
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.
Routing. Classless Inter-Domain Routing Classful addressing scheme wasteful – IP address space exhaustion – A class B net allocated enough for 65K hosts.
CCNA4-1 Chapter 7-1 IP Addressing Services Scaling Networks With Network Address Translation (NAT)
© 2001, Cisco Systems, Inc. CSPFA 2.0—5-1 Chapter 5 Cisco PIX Firewall Translations.
CCNA4-1 Chapter 7-1 NAT Chapter 11 Routing and Switching (CCNA2)
CS 3700 Networks and Distributed Systems
Planning the Addressing Structure
NAT : Network Address Translation
Chapter 13 Network Address Translation
Network Address Translation (NAT)
Network Address Translation
Instructor Materials Chapter 9: NAT for IPv4
CS 3700 Networks and Distributed Systems
NAT / PAT.
Network Address Translation (NAT)
Routing and Switching Essentials v6.0
Introducing To Networking
CIS 82 Routing Protocols and Concepts Chapter 11 NAT
NAT / PAT.
Cabrillo College Building Cisco Remote Access Network
CS 3700 Networks and Distributed Systems
Instructor Materials Chapter 9: NAT for IPv4
Planning the Addressing Structure
Planning the Addressing Structure
Chapter 11: Network Address Translation for IPv4
Prepared by :Adeel Ahmad
Network Address Translation (NAT)
DHCP: Dynamic Host Configuration Protocol
Presentation transcript:

CS 540 Computer Networks II Sandy Wang

11. NETWORK ADDRESS TRANSLATION – NAT

Topics 1.Overview 2.LAN Switching 3.IPv4 4.IPv6 5.Routing Protocols -- RIP, RIPng, OSPF 6.Routing Protocols -- ISIS, BGP 7.MPLS 8.Midterm Exam 9.Transport Layer -- TCP/UDP 10.Congestion Control & Quality of Service (QoS) 11.Access Control List (ACL) 12.Application Layer Protocols 13.Application Layer Protocols continue 14.Others – Multicast, SDN 15.Final Exam

Reference Books Cisco CCNA Routing and Switching ICND Official Cert Guide, Academic Edition by Wendel Odom -- July 10, ISBN-13: The TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols Reference by Charles M. Kozierok – October 1, ISBN-13: Data and Computer Communications (10th Edition) (William Stallings Books on Computer and Data Communications) by Williams Stallings – September 23, ISBN-13:

Agenda Basic Concept of Network Address Translation (NAT) Port Address Translation (PAT) Definition, Benefits, Availability and Application Support NAT Concepts and Terminology Port Address Translation (PAT) NAT Technical Information

6 Private Network Private IP network is an IP network that is not directly connected to the Internet IP addresses in a private network can be assigned arbitrarily. Not registered and not guaranteed to be globally unique Generally, private networks use addresses from the following experimental address ranges (non-routable addresses): – – –

7 Private Addresses

Network Address Translation (NAT) RFC 1631 A short term solution to the problem of the depletion of IP addresses Long term solution is IPv6 CIDR (Classless InterDomain Routing ) is a possible short term solution NAT is another NAT is a way to conserve IP addresses Can be used to hide a number of hosts behind a single IP address Uses private addresses: , or

9 Network Address Translation (NAT) NAT is a router function where IP addresses (and possibly port numbers) of IP datagrams are replaced at the boundary of a private network NAT is a method that enables hosts on private networks to communicate with hosts on the Internet NAT is run on routers that connect private networks to the public Internet, to replace the IP address-port pair of an IP packet with another IP address-port pair.

10 Basic Operation of NAT NAT device has address translation table One to one address translation

11 Pooling of IP Addresses Scenario: Corporate network has many hosts but only a small number of public IP addresses NAT solution: Corporate network is managed with a private address space NAT device, located at the boundary between the corporate network and the public Internet, manages a pool of public IP addresses When a host from the corporate network sends an IP datagram to a host in the public Internet, the NAT device picks a public IP address from the address pool, and binds this address to the private address of the host

12 Pooling of IP Addresses

13 Supporting Migration between Network Service Providers Scenario: In CIDR, the IP addresses in a corporate network are obtained from the service provider. Changing the service provider requires changing all IP addresses in the network. NAT solution: Assign private addresses to the hosts of the corporate network NAT device has static address translation entries which bind the private address of a host to the public address. Migration to a new network service provider merely requires an update of the NAT device. The migration is not noticeable to the hosts on the network. Note: The difference to the use of NAT with IP address pooling is that the mapping of public and private IP addresses is static.

Benefits Problem: Merging corporations with conflicting private IP address space need connectivity to each other and/or the Internet Solution: NAT provides transparent, scalable, and bi-directional connectivity between corporate headquarters and acquisitions CorporateAcquisition NAT Before NAT Outbound Packet Before NAT Outbound Packet Src Addr Src Addr Dest Addr Acquisition Dest Addr Acquisition After NAT Outbound Packet After NAT Outbound Packet Src Addr Src Addr Dest Addr Acquisition Dest Addr Acquisition After NAT Outbound Packet After NAT Outbound Packet Src Addr Src Addr Dest Addr Corporate Dest Addr Corporate Before NAT Outbound Packet Before NAT Outbound Packet Src Addr Src Addr Dest Addr Corporate Dest Addr Corporate X

15 Supporting Migration between network service Providers

16 IP Masquerading Also called: Network address and port translation (NAPT), port address translation (PAT). Scenario: Single public IP address is mapped to multiple hosts in a private network. NAT solution: Assign private addresses to the hosts of the corporate network NAT device modifies the port numbers for outgoing traffic

17 IP Masquerading

18 Load Balancing of Servers Scenario: Balance the load on a set of identical servers, which are accessible from a single IP address NAT solution: Here, the servers are assigned private addresses NAT device acts as a proxy for requests to the server from the public network The NAT device changes the destination IP address of arriving packets to one of the private addresses for a server A sensible strategy for balancing the load of the servers is to assign the addresses of the servers in a round-robin fashion.

19 Load Balancing of Servers

20 Concerns about NAT Performance: Modifying the IP header by changing the IP address requires that NAT boxes recalculate the IP header checksum Modifying port number requires that NAT boxes recalculate TCP checksum Fragmentation Care must be taken that a datagram that is fragmented before it reaches the NAT device, is not assigned a different IP address or different port numbers for each of the fragments.

21 Concerns about NAT End-to-end connectivity: NAT destroys universal end-to-end reachability of hosts on the Internet. A host in the public Internet often cannot initiate communication to a host in a private network. The problem is worse, when two hosts that are in a private network need to communicate with each other.

22 Concerns about NAT IP address in application data: Applications that carry IP addresses in the payload of the application data generally do not work across a private-public network boundary. Some NAT devices inspect the payload of widely used application layer protocols and, if an IP address is detected in the application-layer header or the application payload, translate the address according to the address translation table.

Agenda Basic Concept of NAT and PAT Definition, Benefits, Availability and Application Support NAT Concepts and Terminology PAT NAT Technical Information

NAT Concepts An interface on the router can be defined as inside or outside Translations occur only from inside to outside interfaces or vice versa—never between the same type of interface NAT Inside Interface Inside Network Outside Network ip nat inside ip nat outside Inside HostOutside Host Outside Interface

NAT Concepts NAT translations are static or dynamic Static translation are entered directly into the configuration and are always in the translation table ip nat inside source static Dynamic translations use access lists to identify IP addresses that NAT should create translations for ip nat inside source list 1 pool nat-pool access-list 1 permit

Static vs. Dynamic Translations Static translations When you need to be able to initiate a connection from both the inside and outside interfaces (e.g. SMTP, Web) Or you want a specific host to be translated to a specific IP address Dynamic translations When you want to initiate a connection from only the inside or only the outside

NAT Concepts An IP address is either local or global Local IP addresses are seen in the inside network Global IP addresses are seen in the Outside network My Network Internet Inside HostOutside Host NAT Before NAT Outbound Packet Before NAT Outbound Packet Src Addr Inside Local Src Addr Inside Local Dest Addr Outside Host Dest Addr Outside Host After NAT Outbound Packet After NAT Outbound Packet Src Addr Inside Global Src Addr Inside Global Dest Addr Outside Host Dest Addr Outside Host After NAT Inbound Packet After NAT Inbound Packet Src Addr Outside Local Src Addr Outside Local Dest Addr Inside Host Dest Addr Inside Host Before NAT Inbound Packet Before NAT Inbound Packet Src Addr Outside Global Src Addr Outside Global Dest Addr Inside Host Dest Addr Inside Host

Inside Local/Inside Global Example NAT Address Pool For Outbound Packets an Address Is Dynamically Allocated from the NAT Address Pool Outside Host NAT Before NAT Outbound Packet Src Addr Dest Addr Outside Host After NAT Outbound Packet Src Addr Dest Addr Outside Host Pro Inside Local Outside Local Outside Global Inside Global NAT Address Pool My Network Internet

Inside Local/Inside Global Example The NAT Address Translation Entry in the Translation Table Is Used to Translate Return Packets Outside Host NAT After NAT Return Packet After NAT Return Packet Src Addr Src Addr Dest Addr Outside Host Dest Addr Outside Host Before NAT Return Packet Before NAT Return Packet Src Addr Src Addr Dest Addr Outside Host Dest Addr Outside Host Pro Inside Local Outside Local Outside Global Inside Global Pro Inside Local Outside Local Outside Global Inside Global --- My Network Internet NAT Address Pool NAT Address Pool

NAT Terminology Inside local Configured IP address assigned to a host on the inside network; address may be globally unique, allocated out of the private address space defined in RFC 1918, or may be officially allocated to some other organization Inside global The IP address of an inside host as it appears to the outside host and network, “Translated IP Address”; addresses can be allocated from a globally unique address space, typically provided by the ISP (if the enterprise is connected to the global Internet)

NAT Concepts Local IP addresses are seen on the inside network while global IP addresses are seen on the outside network My Network Inside HostOutside Host NAT After NAT Outbound Packet After NAT Outbound Packet Dest Addr Outside Global Dest Addr Outside Global Src Addr Inside Global Src Addr Inside Global Internet Before NAT Outbound Packet Before NAT Outbound Packet Src Addr Outside Local Src Addr Outside Local Src Addr Inside Local Src Addr Inside Local

--- Pro Inside Local Outside Local Outside Global Inside Global --- Pro Inside Local Outside Local Outside Global Inside Global NAT Concepts Router# show ip nat translations A NAT translation is 1 to 1 or many to 1 1 to 1 translations (NAT) assign a different IP address for each translation Many to 1 (PAT) translations can assign the same IP address for each translation --- Pro Inside Local Outside Local Outside Global Inside Global : : : : : :80 tcp

PAT PAT (Port Address Translation) includes ports in addition to IP addresses Many-to-one translation Maps multiple IP addresses to 1 or a few IP addresses Unique source port number identifies each session Conserves registered IP addresses Also called NAPT in IETF documents Router# show ip nat translations Pro Inside Local Outside Local Outside Global Inside Global : : :80 tcp :80

NAT vs. PAT NAT When there is sufficient number of IP addresses for 1 to 1 translations PAT When there are an insufficient number of IP addresses available to translate all of the inside addresses

NAT Order of Operation NAT always checks translation table for entry before access lists For a full NAT order of operation see After NAT Outbound Packet After NAT Outbound Packet Dest Addr Outside Global Dest Addr Outside Global Src Addr Inside Global Src Addr Inside Global Before NAT Outbound Packet Before NAT Outbound Packet Dst Addr Outside Local Dst Addr Outside Local Src Addr Inside Local Src Addr Inside Local After NAT Inbound Packet After NAT Inbound Packet Src Addr Outside Local Src Addr Outside Local Dest Addr Inside Local Dest Addr Inside Local Before NAT Inbound Packet Before NAT Inbound Packet Src Addr Outside Global Src Addr Outside Global Dest Addr Inside Global Dest Addr Inside Global Inside Interface Outside Interface Routing NAT

Summary NAT provides transparent and bi-directional connectivity between networks having arbitrary addressing schemes NAT eliminates costs associated with host renumbering NAT eases IP address management NAT enhances network privacy