Wide Area Networks and Internet CT1403 Lecture-5: Internet Network Layer (Part 3) 1.

Slides:



Advertisements
Similar presentations
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-
Advertisements

CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
Communication Networks ( ) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University Allon Wagner.
8-1 Last time □ Network layer ♦ Introduction forwarding vs. routing ♦ Virtual circuit vs. datagram details connection setup, teardown VC# switching forwarding.
Lecture 18 Network Layer (Internet Protocol)
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.
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
What we will cover… Home Networking: Network Address Translation (NAT) Mobile Routing.
Chapter 5 The Network Layer.
N/W Layer Addressing1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes.
NAT: Network Address Translation local network (e.g., home network) /24 rest of Internet Datagrams.
Network Layer Overview and IP
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
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).
IP Address 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to
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.
Computer Networks The Network Layer
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Network LayerII-1 RSC Part II: Network Layer 4. IP in operation Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are,
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.
1 ECE453 – Introduction to Computer Networks Lecture 12 – Network Layer (IV)
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.
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.
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.
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.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
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.
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.
1 Network Layer Lecture 11 Imran Ahmed University of Management & Technology.
4: Network Layer4b-1 IPv6 r Initial motivation: 32-bit address space completely allocated by r Additional motivation: m header format helps speed.
Wide Area Networks and Internet CT1403 Lecture-7: Internet Network Layer (Part-2) 1.
IPv4 Fragmentation, PMTU Discovery and NAT
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.
CSEN 404 Data Link Layer Amr El Mougy Lamia AlBadrawy.
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.
4: DataLink Layer1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
Network Layer session 1 TELE3118: Network Technologies Week 5: Network Layer Forwarding, Features Some slides have been taken from: r Computer.
4: 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.
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.
12 – IP, NAT, ICMP, IPv6 Network Layer.
Network Address Translation
Chapter 4: Network Layer
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
Chapter 4: Network Layer
MAC Addresses and ARP 32-bit IP address:
CS 1652 Jack Lange University of Pittsburgh
Some slides have been taken from:
Overview The Internet (IP) Protocol Datagram format IP fragmentation
DHCP and NAT.
DHCP: Dynamic Host Configuration Protocol
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

Wide Area Networks and Internet CT1403 Lecture-5: Internet Network Layer (Part 3) 1

Outline NAT: Network address Translation NAT and other Protocols: DHCP and DNS ICMP: Internet Control Message Protocol IPv6 ARP 2

NAT: Network Address Translation 3

NAT: network address translation 5

6

7

The basic idea behind NAT is to assign each company a single IP address or small number of IP addresses for Internet traffic. Within the company, every computer gets a unique IP address, which is used for the internal traffic. However when a packet exits the company and goes to the ISP, an address translation takes place. 8

NAT: network address translation 9

NAT: Reserved IP addresses for Private Networks To make this scheme possible, three ranges of IP addresses have been declared as private. Companies may use them internally as they which. The three reserved ranges are: – /8 (16,777,216 hosts) – /16 (1,048,576 hosts) – /24 (65,536 hosts). 10

NAT: network address translation What happens when a host with a private address wants to connect to a remote web sever with a public IP address ? 11

Internet Communication & NAT This Communication can not be performed in the traditional Source- to-Destination method, because the destination can not respond to the source’s request using its private IP address! How to perform this communication ? Remember: Port 80 is reserved for HTTP request 12

Internet Communication & NAT Step 1Step 2 Step 3 Step 4 13

NAT router must:  outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #)... remote clients/servers will respond using (NAT IP address, new port #) as destination addr  remember (in NAT translation (or forwarding) table) every (source IP address, port #) to (NAT IP address, new port #) translation pair  incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table NAT: Implementation 14

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 NAT implementation: Example 2 15

NAT: network address translation local network (e.g., home network) /24 rest of 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 16

NAT: Advantages 17

- local network uses just one IP address as far as outside world is concerned:  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  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)  Security: the NAT box is often combined with the firewall. NAT: Advantages 18

 16-bit port-number field:  60,000 simultaneous connections with a single LAN-side address!  NAT is controversial:  routers should only process up to layer 3  violates end-to-end argument NAT possibility must be taken into account by app designers, e.g., P2P applications  address shortage should instead be solved by IPv6 NAT Challenges ! 19

NAT traversal problem: Local server  client wants to connect to a local server with address  server address local to LAN (client can’t use it as destination addr)  only one externally visible NATed address:  solution1: statically configure NAT to forward incoming connection requests at given port to the local server  e.g., ( , port 2500) always forwarded to port NAT router client ? 22

NAT traversal problem  solution 2: Universal Plug and Play (UPnP) Internet Gateway Device (IGD) Protocol.  IGD: a NAT Port Mapping Protocol supported by some NAT routers to automatically configure port forwarding.  Allows NATed host to:  learn public IP address ( )  add/remove port mappings (with lease times) i.e., automate static NAT port map configuration NAT router IGD 23

Do we Need NAT with IPv6? 24

DHCP and NAT: How do they Work Together? 26

Configuring DHCP for NAT 27

Configuring DHCP for NAT 28

Configuring DHCP for NAT Step 1: DHCP discover by host 29

Configuring DHCP for NAT Step 2: DHCP offer by server 30

Configuring DHCP for NAT Step 3: DHCP request by host 31

Configuring DHCP for NAT Step 4 : DHCP Confirmation by server 32

Special Issues-1 33

Special Issues -2 34

Special Issues -3 35

How to Renew the assigned IP Address Lease Time : The duration or length of time the allocation of this IP address is valid. After this time, the host will not be able to use its assigned IP address. Therefore, the host needs to renew the lease. Lease time can be of any length: hours, days, months etc Long lease time : less traffic but wastes IP addresses. Short Lease time : higher overhead but the utilization of IP addresses could be better. 36

How/When to renew the lease of the given IP address? Half-way through the lease ( after 50% of the lease time), the host speaks to the DHCP server saying that “I want to keep this IP address”. If the DHCP server did not response to the host renewal request, the host waits for another 50% of the time, then the host sends another request. The host keeps sending this request every 50% of the remaining time, e. g. if the total lease time was 4 days, then the host starts sending the renewal request after 2 days, then after 1 day, then after 12 hours then after 6 hours, then after 3 hours, then after 90 minutes, and so on. If the IP address expires, the host asks the DHCP server for a new IP.

 The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network.  DNS server maps DN to IP addresses  In my home network, DNS service is provided by my home router  Large enterprises environments use: Microsoft, Linux, Unix DNS servers. DNS: Domain Name System (LAN) 37

 Local vs. Remote DNS server  Primary vs. Secondary DNS server Interaction between different DNS Servers 38

 When my computer A connects to my home router R using DHCP, R provides A with the following information  A’s given IP address,  Subnet mask  IP of first-hop router (Default gateway),  IP of the local DNS server  IP of alternative DNS server(s) Putting all Together: DNS, NAT and DHCP Your IP= Subnet Mask= Default Gateway= DNS Server= DNS (Primary)= DNS (Secondary)=

ICMP: Internet Control Message Protocol 40

ICMP: Internet Control Message Protocol  used by hosts & routers to communicate network-level information  error reporting: unreachable host, network, port, protocol, TTL exceeded, IP checksum failed, invalid header, reassembly failed, etc.  echo request/reply (used by ping)  network-layer “above” IP:  ICMP msgs carried in IP datagrams ICMP principal messages and their description 41

ICMP: internet control message protocol  ICMP message: type, code plus first 8 bytes of IP datagram causing error Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header 42

Traceroute and ICMP  source sends series of UDP segments to dest  first set has TTL =1  second set has TTL=2, etc.  unlikely port number  when nth set of datagrams arrives to nth router:  router discards datagrams  and sends source ICMP messages (type 11, code 0)  ICMP messages includes name of router & IP address  when ICMP messages arrives, source records RTTs stopping criteria:  UDP segment eventually arrives at destination host  destination returns ICMP “port unreachable” message (type 3, code 3)  source stops 3 probes 43

IPv6 44

IPv6: motivation  initial motivation: 32-bit address space soon to be completely allocated.  additional motivation:  header format helps speed processing/forwarding  header changes to facilitate QoS IPv6 datagram format:  fixed-length 40 byte header  no fragmentation allowed 45

IPv6 datagram format priority: identify priority among datagrams in flow flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). next header: identify upper layer protocol for data data destination address (128 bits) source address (128 bits) payload len next hdr hop limit flow label pri ver 32 bits 46

Other changes from IPv4  checksum: removed entirely to reduce processing time at each hop  options: allowed, but outside of header, indicated by “Next Header” field  ICMPv6: new version of ICMP  additional message types, e.g. “Packet Too Big”  multicast group management functions 47

Transition from IPv4 to IPv6 48

Transition from IPv4 to IPv6  not all routers can be upgraded simultaneously  no “flag days”  how will network operate with mixed IPv4 and IPv6 routers?  tunneling: IPv6 datagram carried as payload in IPv4 datagram among IPv4 routers IPv4 source, dest addr IPv4 header fields IPv4 datagram IPv6 datagram IPv4 payload UDP/TCP payload IPv6 source dest addr IPv6 header fields 49

Tunneling physical view: IPv4 A B IPv6 E F C D logical view: IPv4 tunnel connecting IPv6 routers E IPv6 F A B Different tunneling techniques have been proposed so far. e.g. 6to4, Teredo, ISATAP, 6in46to4TeredoISATAP 50

flow: X src: A dest: F data A-to-B: IPv6 Flow: X Src: A Dest: F data src:B dest: E B-to-C: IPv6 inside IPv4 E-to-F: IPv6 flow: X src: A dest: F data B-to-C: IPv6 inside IPv4 Flow: X Src: A Dest: F data src:B dest: E physical view: A B IPv6 E F C D logical view: IPv4 tunnel connecting IPv6 routers E IPv6 F A B Tunneling IPv4 51

Address Resolution Protocol (ARP)  Because there are both network -layer addresses (IP address) and link- layer addresses (that is MAC address), there is a need to translate between them  For Internet, this translation is the job of the Address Resolution Protocol (ARB)  MAC address allocation administered by IEEE. Manufacturer buys portion of MAC address space (to ensure uniqueness)  Analogy:  MAC address: like Social Security Number  IP address: like postal address

ARP: address resolution protocol ARP table: each IP node (host, router) on LAN has table  IP/MAC address mappings for some LAN nodes:  TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) Question: how to determine interface’s MAC address, knowing its IP address? 1A-2F-BB AD D7-FA-20- B0 0C-C4-11-6F-E F7-2B LAN

ARP protocol in the Internet: same LAN 1.A wants to send datagram to B  B’s MAC address not in A’s ARP table. 2.A broadcasts ARP query packet, containing B's IP address  dest MAC address = FF-FF-FF- FF-FF-FF  all nodes on LAN receive ARP query 3.B receives ARP packet, replies to A with its (B's) MAC address  frame sent to A’s MAC address (unicast) 4. A caches (saves) IP-to- MAC address pair in its ARP table until information becomes old (times out)  soft state: information that times out (goes away) unless refreshed 5. ARP is “plug-and-play”:  nodes create their ARP tables without intervention from net administrator

walkthrough: send datagram from A to B via R  focus on addressing – at IP (datagram) and MAC layer (frame)  assume A knows B’s IP address  assume A knows IP address of first hop router, R (how?)  assume A knows R’s MAC address (how?) Addressing: routing to another LAN R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A BD-D2-C7-56-2A B2-2F-54-1A-0F B

R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A BD-D2-C7-56-2A B2-2F-54-1A-0F B Addressing: routing to another LAN IP Eth Phy IP src: IP dest:  A creates IP datagram with IP source A, destination B  A creates link-layer frame with R's MAC address as dest, frame contains A- to-B IP datagram MAC src: C-E8-FF-55 MAC dest: E6-E BB-4B

R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A BD-D2-C7-56-2A B2-2F-54-1A-0F B Addressing: routing to another LAN IP src: IP dest:  R forwards datagram with IP source A, destination B  R creates link-layer frame with B's MAC address as dest, frame contains A- to-B IP datagram MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP Eth Phy IP Eth Phy

R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A BD-D2-C7-56-2A B2-2F-54-1A-0F B Addressing: routing to another LAN  R forwards datagram with IP source A, destination B  R creates link-layer frame with B's MAC address as dest, frame contains A- to-B IP datagram IP src: IP dest: MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP Eth Phy IP Eth Phy

R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A BD-D2-C7-56-2A B2-2F-54-1A-0F B Addressing: routing to another LAN  R forwards datagram with IP source A, destination B  R creates link-layer frame with B's MAC address as dest, frame contains A- to-B IP datagram IP src: IP dest: MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP Eth Phy