Network Address Translation (NAT)

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.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP Forwarding Relates to Lab 3.
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.
Network Layer and Transport Layer.
ITINERANT: TCP Socket Migration Titus Winters Dan Berger CS 202: Spring ‘03.
What we will cover… Home Networking: Network Address Translation (NAT) Mobile Routing.
1 Network Address Translation (NAT) Relates to Lab 7. Module about private networks and NAT.
Page: 1 Director 1.0 TECHNION Department of Computer Science The Computer Communication Lab (236340) Summer 2002 Submitted by: David Schwartz Idan Zak.
Chapter 6 Network Address Translation (NAT). Network Address Translation  Modification of source or destination IP address  Needed by networks using.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Module 10. Internet Protocol (IP) is the routed protocol of the Internet. IP addressing enables packets to be routed from source to destination using.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Virtual Circuit Network. Network Layer 2 Network layer r transport segment from sending to receiving host r network layer protocols in every host, router.
IP Forwarding.
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.
TCP/IP Protocols Contains Five Layers
Private Network Addresses IP addresses in a private network can be assigned arbitrarily. – Not registered and not guaranteed to be globally unique Generally,
An initial study on Multi Path Routing Over Multiple Devices in Linux 2.4.x kernel Towards CS522 term project By Syama Sundar Kosuri.
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.
Network Layer by peterl. forwarding table routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling.
1 Requirements for Internet Routers (Gateways) and Hosts Relates to Lab 3. (Supplement) Covers the compliance requirements of Internet routers and hosts.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
ECE 526 – Network Processing Systems Design Network Address Translator.
Fall 2004FSU CIS 5930 Internet Protocols1 IP Routing Reading: Chapter 16.
Network Layer by peterl. forwarding table routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling.
LINUX® Netfilter The Linux Firewall Engine. Overview LINUX® Netfilter is a firewall engine built into the Linux kernel Sometimes called “iptables” for.
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cisco I Introduction to Networks Semester 1 Chapter 6 JEOPADY.
Kittiphan Techakittiroj (25/06/59 19:10 น. 25/06/59 19:10 น. 25/06/59 19:10 น.) Network Address Translation Kittiphan Techakittiroj
CS 3700 Networks and Distributed Systems
Chapter 3: Packet Switching (overview)
ROUTING.
NAT : Network Address Translation
Network Address Translation
A quick intro to networking
Network Address Translation (NAT)
Chapter 4 Introduction to Network Layer
CS 3700 Networks and Distributed Systems
IP Forwarding Covers the principles of end-to-end datagram delivery in IP networks.
Network Address Translation (NAT)
How data travels through a network The Internet
ADDRESSING Before you can send a message, you must know the destination address. It is extremely important to understand that each computer has several.
Byungchul Park ICMP & ICMPv DPNM Lab. Byungchul Park
IP Forwarding Relates to Lab 3.
EEC-484/584 Computer Networks
Chapter 4 Introduction to Network Layer
ICMP: Internet Control Message Protocol
FSU CIS 5930 Internet Protocols
CS 3700 Networks and Distributed Systems
Internet Protocol Version 6
IP Forwarding Relates to Lab 3.
Setting Up Firewall using Netfilter and Iptables
EEC-484/584 Computer Networks
Packet Switch Architectures
Lecture 8: The Network Layer.
NAT (Network Address Translation)‏
CSE 313 Data Communication
IP Forwarding Relates to Lab 3.
Ch 17 - Binding Protocol Addresses
Network and the internet
Networking and Network Protocols (Part2)
IP Forwarding Relates to Lab 3.
Network Address Translation (NAT)
Lecture 9 – Chapter 4 Network Data Plane CIS 5617, Spring2019
Review of Internet Protocols Network Layer
Packet Switch Architectures
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

Network Address Translation (NAT) Reading: Chapter 21 Fall 2004 FSU CIS 5930 Internet Protocols

FSU CIS 5930 Internet Protocols Concepts NAT Translation between IP addresses (and port numbers) Basic NAT Only involving IP address translation Network address and port translation Involving both IP address and port number Fall 2004 FSU CIS 5930 Internet Protocols

FSU CIS 5930 Internet Protocols LAN 192.168.1.* NAT-Router Endsystem A 192.168.1.1 Endsystem B 192.168.1.2 WWW-Server 100.1.1.1 192.168.1.254 199.10.42.1 Fall 2004 FSU CIS 5930 Internet Protocols

Some application specific problems FTP PORT command contains IP/port May need to change content Fragmentation Only the first fragment has TCP/UDP header May need to do assembly first Fall 2004 FSU CIS 5930 Internet Protocols

NAT implementation in Linux Incoming packets Connection Tracking Higher layers Local processes NF_IP_LOCAL_IN NF_IP_LOCAL_OUT NAT Forwarded packets Routing NF_IP_FORWARD Routing NAT NAT NF_IP_PRE_ROUTING Connection Tracking NF_IP_POST_ROUTING CRC check Consistency checks Device driver (input) Device driver (output) Ausgehende Pakete Fall 2004 FSU CIS 5930 Internet Protocols

Initialization and uninitialization Done by init() and fini() They call init_or_cleanup() init_or_cleanup() Initialization Initializing some netfilter tables Initializing some protocol specific stuffs Link (register) netfilter hooks ip_nat_fn(), ip_nat_local_fn(), ip_nat_out() Uninitializing Reversing the process Fall 2004 FSU CIS 5930 Internet Protocols

FSU CIS 5930 Internet Protocols How packet flows in NAT Incoming packets NF_IP_PRE_ROUTING ip_nat_fn() Locally generated packets NF_IP_LOCAL_OUT ip_nat_local_fn() for unfragmented packets Passing on other packets Outgoing packets NF_IP_POST_ROUTING ip_nat_out() Reassembly packets, passing on to ip_nat_fn() Fall 2004 FSU CIS 5930 Internet Protocols

FSU CIS 5930 Internet Protocols ip_nat_fn() Determining what NAT needs to be used (src or dst) Determining associated flow of the packet Handling the packet depending on state Expected connection (IP_CT_RELATED) New connection (IP_CT_NEW) Others Doing real binding (translation) Do_bindings() Fall 2004 FSU CIS 5930 Internet Protocols

Initializing address-binding process Netfilter registered branch destinations ipt_snat_target(), ipt_dnat_target() Finding associated flow/connection entry Calling ip_nat_setup_info() to do new binding Fall 2004 FSU CIS 5930 Internet Protocols

Actual address translation do_bindings() Searching associated bindings Calling manip_pkt() to do address translation manip_pkt() Translating ip address Updating checksum Calling prot->manip_pkt() to handle protocol specific translation Fall 2004 FSU CIS 5930 Internet Protocols