Chapter 9 Caching, NAT Professor Rick Han University of Colorado at Boulder

Slides:



Advertisements
Similar presentations
CST Computer Networks NAT CST 415 4/10/2017 CST Computer Networks.
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-
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 25 Introduction to Computer Networks.
1 Caching in HTTP Representation and Management of Data on the Internet.
1 Internet Networking Spring 2004 Tutorial 13 LSNAT - Load Sharing NAT (RFC 2391)
Chapter 29 Structure of Computer Names Domain Names Within an Organization The DNS Client-Server Model The DNS Server Hierarchy Resolving a Name Optimization.
Chapter 4 IP Multicast Professor Rick Han University of Colorado at Boulder
Cornell CS502 Web Basics and Protocols CS 502 – Carl Lagoze Acks to McCracken Syracuse Univ.
Subnetting.
Chapter 9 More on HTTP and DNS Professor Rick Han University of Colorado at Boulder
Chapter 23: ARP, ICMP, DHCP IS333 Spring 2015.
1 Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2007 (MW 1:30-2:50 in Friend 004) Ioannis Avramopoulos Instructor:
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #12 LSNAT - Load Sharing NAT (RFC 2391)
Chapter Overview TCP/IP Protocols IP Addressing.
NAT, Samba. Network Address Translation (NAT) Enables reuse of IP addresses, gets around IP’s limited 32-bit address space TCP-level semantic knowledge.
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
Day15 IP Space/Setup. IP Suite of protocols –TCP –UDP –ICMP –GRE… Gives us many benefits –Routing of packets over internet –Fragmentation/Reassembly of.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Network Address Translation (NAT) CS-480b Dick Steflik.
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
23-Support Protocols and Technologies Dr. John P. Abraham Professor UTPA.
9/11/2015Home Networking1 Bob.test Have Road Runner Unhappy about reports of constant probes of machines Policy decision –I want to prevent unauthorized.
FTP (File Transfer Protocol) & Telnet
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
Chapter 6: Packet Filtering
Computer Networks. IP Addresses Before we communicate with a computer on the network we have to be able to identify it. Every computer on a network must.
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
© MMII JW RyderCS 428 Computer Networking1 Private Network Interconnection  VPN - Virtual Private Networks  NAT - Network Address Translation  Describe.
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
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
© 2007 Cisco Systems, Inc. All rights reserved. 1 Network Addressing Networking for Home and Small Businesses – Chapter 5 Darren Shaver – Modified Fall.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
CHAPTER 3 PLANNING INTERNET CONNECTIVITY. D ETERMINING INTERNET CONNECTIVITY REQUIREMENTS Factors to be considered in internet access strategy: Sufficient.
Connecting The Network Layer to Data Link Layer. ARP in the IP Layer The Address Resolution Protocol (ARP) The Address Resolution Protocol (ARP) Part.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
1 Chapter 8 – TCP/IP Fundamentals TCP/IP Protocols IP Addressing.
The Intranet.
Security, NATs and Firewalls Ingate Systems. Basics of SIP Security.
Lectu re 1 Recap: “Operational” view of Internet r Internet: “network of networks” m Requires sending, receiving of messages r protocols control sending,
Multimedia and Networks. Protocols (rules) Rules governing the exchange of data over networks Conceptually organized into stacked layers – Application-oriented.
TCP/IP (Transmission Control Protocol / Internet Protocol)
HTTP evolution - TCP/IP issues Lecture 4 CM David De Roure
IP addresses IPv4 and IPv6. IP addresses (IP=Internet Protocol) Each computer connected to the Internet must have a unique IP address.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
CIT 384: Network AdministrationSlide #1 CIT 384: Network Administration NAT.
1 Internet Protocols To support the Internet and all its services, many protocols are necessary Some of the protocols that we will look at: –Internet Protocol.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
Mapping IP Addresses to Hardware Addresses Chapter 5.
Firewalls A brief introduction to firewalls. What does a Firewall do? Firewalls are essential tools in managing and controlling network traffic Firewalls.
NAT/PAT by S K SATAPATHY
1 Chapter 10: Application Layer Reference: Chapter 7 - “Computer Networks”, Andrew S. Tanenbaum, 4th Edition, Prentice Hall, 2003.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
© 2001, Cisco Systems, Inc. CSPFA 2.0—5-1 Chapter 5 Cisco PIX Firewall Translations.
NAT (Network Address Translation)
The Transport Layer Implementation Services Functions Protocols
Network Address Translation (NAT)
Network Address Translation
Web Caching? Web Caching:.
Introducing To Networking
NET323 D: Network Protocols
Chapter 5 Network and Transport Layers
CIS 82 Routing Protocols and Concepts Chapter 11 NAT
NET323 D: Network Protocols
Lecture 6: TCP/IP Networking 1nd semester By: Adal ALashban.
Ch 17 - Binding Protocol Addresses
Network Address Translation (NAT)
Presentation transcript:

Chapter 9 Caching, NAT Professor Rick Han University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Announcements HW #4 due April 16 Programming Assignment #3 tonight Next, Caching, NAT

Prof. Rick Han, University of Colorado at Boulder Recap of Previous Lecture HTTP Proxies Reasons to use: Caching advantages, Security, Protocol translation Prefetching GET, POST, PUT Load Balancing HTTP Redirect for load balancing DNS Returns a list of IP addresses matching a name DNS round robin on order of IP addresses, Akamai Routing-based techniques SMTP, MIME

Prof. Rick Han, University of Colorado at Boulder Caching Policy at Proxy Relevant HTTP fields Request If-Modified-Since Response Last-Modified Expires Caching proxy doesn’t cache pages with: “Pragma : no-cache” header field “WWW-Authenticate : “ or “Authorization:” headers Server and proxy clocks must be reliable

Prof. Rick Han, University of Colorado at Boulder Caching Policy at Proxy (2) Browser has its own browser cache. Browser sends a “conditional” GET with If- Modified-Since header field when a user hits “Reload”, or a page expired in browser cache, or browser set to always ask for a page, A conditional GET will only succeed in returning a page if that page has been modified since the If-Modified-Since date. Otherwise, get back a status code 304 “Not Modified” Caching proxy receives a conditional GET – what is its policy?

Prof. Rick Han, University of Colorado at Boulder Caching Policy at Proxy (3) If page not in proxy’s cache, or cached page has expired, or if cached page was Last-Modified earlier than request’s If-Modified-Since date, then Forward Conditional GET to server. If server finds its page was Last-Modified earlier than If-Modified-Since date, then server’s response to proxy is status 304 “Not Modified” Proxy returns status 304 “Not Modified” to client Else, server returned fresher page, so proxy caches it and returns it to client Else return cached page to client (it’s not expired and it’s freshly modified)

Prof. Rick Han, University of Colorado at Boulder Caching Policy at Proxy (4) Summary: cached page returned only if not expired and new enough (recently modified), otherwise return fresher page from server or status 304 message “Expires : “ header may be missing, so proxy has to guess a probable expiration date If Last-Modified is recent, then guess the page is changing frequently, so choose a quick expiration date Chaining of caches is allowed, e.g. Browser cache chained with Proxy caches SQUID caching proxies are common freeware based on Harvest caches developed in part at the University of Colorado, see cache.org

Prof. Rick Han, University of Colorado at Boulder More on MIME Displaying non-ASCII character sets augment MIME type and subtype with a qualifying parameter: Content-type: text/plain; charset="utf-8" … Some other character set codes are: korean for Korean KSC 5601, big5 for Chinese big5, x- euc-jp for Japanese EUC, iso-2022-jp for Japanese JIS, utf-8 for UniCode MIME also supports non-ASCII headers, RFC 2047

Prof. Rick Han, University of Colorado at Boulder Well-Known TCP Ports Many application-level protocols rely on client- server paradigm Server or daemon should be up and running on a well- known port Client then contacts server on well-known destination TCP port Client’s source TCP port can be any # above the reserved limit of 1023, for safety choose > 5000 IANA reserved/well-known TCP ports 80 = http 20 = ftp-data, 21 = ftp control 23 = telnet 25 = smtp

Prof. Rick Han, University of Colorado at Boulder Network Address Translation (NAT) Enables reuse of IP addresses, gets around IP’s limited 32-bit address space TCP-level semantic knowledge is required TCP/IP source Wants to send to cnn.com creates packet NAT has a local IP LAN address and an external IP address NAT Network Addr Trans TCP/IP destination cnn.com TCP/IP source LANExternal

Prof. Rick Han, University of Colorado at Boulder NAT (2) NAT receives packet and Replaces IP sender addr with its own external IP address Replaces TCP sender port with its own TCP source port, chosen from a list of available source ports Sends packet to destination Stores a mapping of to NAT Network Addr Trans TCP/IP destination cnn.com TCP/IP source LANExternal

Prof. Rick Han, University of Colorado at Boulder NAT (3) When a reply packet is received from cnn.com on NAT TCP src port NAT substitutes the original sender’s IP sender address and TCP sender port Even if two sources on same LAN choose the same TCP sending port, they’ll differ in their IP addresses – input/output mapping still unique Extends IP address spaces by qualifying addresses with TCP port #’s NAT Network Addr Trans TCP/IP destination cnn.com TCP/IP source LANExternal

Prof. Rick Han, University of Colorado at Boulder NAT (4) NAT needs to modify IP address and TCP port and TCP/IP checksums Adds latency The type of NAT described thus far is called a “Dynamic” NAT Internal hosts can use any non-reserved IP address to connect to external hosts External hosts don’t know about internal IP addresses – NAT’s as “masquerading” firewalls! NAT Network Addr Trans TCP/IP destination TCP/IP source LANExternal

Prof. Rick Han, University of Colorado at Boulder NAT (5) Static NAT’s allow an external client to connect to an internal TCP/IP server, e.g. a Web server, at a specific address External host can’t just send a Web request to NAT’s external IP address, port 80, because NAT won’t know to which internal host to route the http request Static NAT allocates a fixed IP address for the Web server and constructs a static mapping from ISP- assigned external IP to internal IP Static NAT also called “inbound mapping” NAT Network Addr Trans TCP/IP source/ client TCP/IP destination Web server LANExternal

Prof. Rick Han, University of Colorado at Boulder NAT (6) Static NAT’s work with FTP and other application layer protocols as well Static NAT’s introduce security risk – allowing unknown outsiders to connect into a local computer Configure your NAT router to have two Ethernet LAN ports with separate IP addresses Place machines you wish to be public on one IP addresses, and keep private hosts on 2 nd IP address NAT Network Addr Trans TCP/IP source/ client TCP/IP destination Web server LANExternal

Prof. Rick Han, University of Colorado at Boulder NAT (7) NAT’s can be used a load balancers too TCP/IP Packets into a NAT are rewritten with the IP address and TCP port of the most lightly loaded destination Reply packets from destination also rewritten by NAT on way back to source NAT Network Addr Trans TCP/IP destination TCP/IP source LAN TCP/IP destination

Prof. Rick Han, University of Colorado at Boulder NAT (8) Comparing NATs and Proxies: Similar architecture of intermediary between client and server NATs are lower level (IP and TCP) vs. Proxies (HTTP) NATs are arguably faster than higher-layer proxies NATs are “transparent” to source and destination nodes, whereas HTTP clients are explicitly aware that there is an HTTP proxy intermediary in their path to the HTTP server NAT Network Addr Trans TCP/IP destination cnn.com TCP/IP source LANExternal