ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 6.2: IP Dr. Nghi Tran (ECE-University.

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

Fundamentals of Computer Networks ECE 478/578 Lecture #14: InternetWorking Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
8-1 Last time □ Network layer ♦ Introduction forwarding vs. routing ♦ Virtual circuit vs. datagram details connection setup, teardown VC# switching forwarding.
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.
Chapter 5 The Network Layer.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
Spring 2003CS 4611 Internetworking COS 461 Spring 2003.
MAC Addresses and ARP 32-bit IP address: –network-layer address –used to get datagram to destination IP subnet MAC (or LAN or physical or Ethernet) address:
Spring 2002CS 4611 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
IP Address 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
Lecture 8 Modeling & Simulation of Communication Networks.
26-Aug-154/598N: Computer Networks Recap SBC UUNET Comcast Sprint End Users Internet First mile problem Last mile problem.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 26 Omar Meqdadi Department of Computer Science and Software Engineering.
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,
Adapted from: Computer Networking, Kurose/Ross 1DT066 Distributed Information Systems Chapter 4 Network Layer.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
12 – IP, NAT, ICMP, IPv6 Network Layer.
A day in the life: scenario
Link Layer 5-1 Link layer, LAN s: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,
1 John Magee 11 July 2013 CS 101 Lecture 11: How do you “visit” a web page, revisted Slides adapted from Kurose and Ross, Computer Networking 5/e Source.
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.
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
5: Link Layer Part Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
Link Layer5-1 Synthesis: a day in the life of a web request  journey down protocol stack complete!  application, transport, network, link  putting-it-all-together:
CSCI 3335: C OMPUTER N ETWORKS A DAY IN THE LIFE OF A WEB REQUEST Vamsi Paruchuri University of Central Arkansas
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP 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.
Link Layer5-1 Synthesis: a “day” in the life of a web request  journey down protocol stack!  application, transport, network, link  putting-it-all-together:
CS470 Computer Networking Protocols Huiping Guo Department of Computer Science California State University, Los Angeles 4. Internetworking.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao
Net5: ARP 協定 授課教師:雲林科技大學 張慶龍 老師. IP Address/Physical Address Static Mapping  IP broadcast address maps to Ethernet broadcast address  IP Multicast Address.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
5: DataLink Layer5-1 Virtualization of networks Virtualization of resources: powerful abstraction in systems engineering: r computing examples: virtual.
1 Internetworking: IP Packet Switching Reading: (except Implementation; pp )
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.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
@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.
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
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.
CPSC 441: Link Layer1 Link Layer Addressing Slides originally from Carey Williamson Notes derived from “ Computer Networking: A Top Down Approach”, by.
Introduction to Networks
12 – IP, NAT, ICMP, IPv6 Network Layer.
Computer Communication Networks
Chapter 4: Network Layer
Scaling the Network: The Internet Protocol
MAC Addresses and ARP 32-bit IP address:
CS 457 – Lecture 10 Internetworking and IP
ECE 4450:427/527 - Computer Networks Spring 2017
Internetworking Outline Best Effort Service Model
Wide Area Networks and Internet CT1403
Overview The Internet (IP) Protocol Datagram format IP fragmentation
DHCP and NAT.
Scaling the Network: The Internet Protocol
DHCP: Dynamic Host Configuration Protocol
Presentation transcript:

ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 6.2: IP Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 1

Internetworking: Discussions Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 2 For Internetworking, we shall look at few sub- problems: Interconnect links of the same type: Switches We consider an important of class switch: Bridges to interconnect Ethernet segments. We also look a way to interconnect disparate networks and links: Gateways, or now mostly known as routers. We shall focus on the IP Once we are able to interconnect a whole lot of links and networks with switches and routers, we will look at a way to find a suitable path, or route through a new working: Paths that are efficient, loop free, etc.: Routing

Internetworking Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 3 What is internetwork – An arbitrary collection of networks interconnected to provide some sort of host-host to packet delivery service A simple internetwork where H represents hosts and R represents routers

IP: Internet Protocol Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 4 What is IP – IP stands for Internet Protocol – Key tool used today to build scalable, heterogeneous internetworks – It runs on all the nodes in a collection of networks and defines the infrastructure that allows these nodes and networks to function as a single logical internetwork A simple internetwork showing the protocol layers

IP: “Best Effort” Service Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 5 IP is a datagram connectionless protocol Does not provide any type of guarantee about packet delivery – Out of order packet deliveries, duplicate packets, no error correction If packets are lost, IP does not try to recover or retransmit (though lower or higher layer functionalities may do so) Global addressing scheme

IPv4: Packet Format Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 6 4-bit Version 4-bit Header Length 8-bit Type of Service (TOS) 16-bit Total Length (Bytes) 16-bit Identification 3-bit Flags 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload

IP Packet Format Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 7 Version number (4 bits) Indicates the version of the IP protocol Necessary to know what other fields to expect Typically “4” (for IPv4), and sometimes “6” (for IPv6) Header length (4 bits) Number of 32-bit words in the header Typically “5” (for a 20-byte IPv4 header) Can be more when “IP options” are used Type-of-Service (8 bits) Allow packets to be treated differently based on needs E.g., low delay for audio, high bandwidth for bulk transfer

IP Packet Format Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 8 Total length (16 bits) Number of bytes in the packet Maximum size is 63,535 bytes ( ) … though underlying links may impose harder limits Fragmentation information (32 bits) Packet identifier, flags, and fragment offset Supports dividing a large IP packet into fragments … in case a link cannot handle a large IP packet Time-To-Live (8 bits) Used to identify packets stuck in forwarding loops … and eventually discard them from the network

Time-to-Live (TTL) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 9 Potential robustness problem Forwarding loops can cause packets to cycle forever Confusing if the packet arrives much later Time-to-live field in packet header TTL field decremented by each router on the path Packet is discarded when TTL field reaches 0… …and “time exceeded” message is sent to the source

Protocol Field Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 10 Protocol (8 bits) Identifies the higher-level protocol E.g., “6” for the Transmission Control Protocol (TCP) E.g., “17” for the User Datagram Protocol (UDP) Important for demultiplexing at receiving host Indicates what kind of header to expect next IP header TCP headerUDP header protocol=6 protocol=17

IP Addresses Field Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 11 Two IP addresses Source IP address (32 bits) Destination IP address (32 bits) Destination address Unique identifier for the receiving host Allows each node/router to make forwarding decisions Source address Unique identifier for the sending host Recipient can decide whether to accept packet Enables recipient to send a reply back to source

IP Fragmentation and Reassembly Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 12 Each network has some MTU (Maximum Transmission Unit): largest IP datagram it can carry in a frame – Ethernet (1500 bytes), FDDI (4500 bytes) Strategy – Fragmentation occurs in a router when it receives a datagram that it wants to forward over a network which has (MTU < received datagram) – Reassembly is done at the receiving host – All the fragments carry the same identifier in the Ident field – Fragments are self-contained datagrams – IP does not recover from missing fragments

IP Fragmentation and Reassembly Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 13 IP datagrams traversing the sequence of physical networks

IP Fragmentation and Reassembly Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 14 Header fields used in IP fragmentation. (a) Unfragmented packet; (b) fragmented packets.

IP Datagram Forwarding Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 15 Strategy – every datagram contains destination's address – if directly connected to destination network, then forward to host – if not directly connected to destination network, then forward to some router – forwarding table maps network number into next hop – each host has a default router – each router maintains a forwarding table

Forwarding Table Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 16

IPv4 Addressing Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 17 A unique 32-bit number Identifies an interface (on a host, on a router, …) Represented in dotted-quad notation

IPv4 Addressing Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 18 A host usually has a single link into network: When IP in host wants to send datagram, it does so over the link -> Boundary between host and link: interface. IP address: technically associated with an interface, rather with the host How about a router? Receive datagram on a link and forward to on some other link. How many interfaces? How many IP addresses?

IPv4: Early Addressing Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 19 Properties – globally unique – hierarchical: network + host – 4 Billion IP address, half are A type, ¼ is B type, and 1/8 is C type Format Dot notation – – –

IP Addressing: CIDR Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 20 CIDR: Classless InterDomain Routing – subnet portion of address of arbitrary length – address format: a.b.c.d/x, where x is # bits in subnet portion of address subnet part host part /23

Subnets Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 21 IP address: – subnet part (high order bits) – host part (low order bits) What’s a subnet ? – device interfaces with same subnet part of IP address – can physically reach each other without intervening router network consisting of 3 subnets subnet

Subnet and Subnet Mask Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks / / /24 Recipe to determine the subnets, detach each interface from its host or router, creating islands of isolated networks each isolated network is called a subnet. Subnet mask: /24 Or

Subnets Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 23 How many?

ARP: Address Resolution Protocol Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 24 Each IP node (host, router) on LAN has ARP table in ARP module ARP 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 MAC address of B knowing B’s IP address? 1A-2F-BB AD D7-FA-20-B0 0C-C4-11-6F-E F7-2B LAN

ARP: Same LAN Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 25 A wants to send datagram to B, and B’s MAC address not in A’s ARP table. A broadcasts ARP query packet, containing B's IP address – dest MAC address = FF-FF- FF-FF-FF-FF – all machines on LAN receive ARP query B receives ARP packet, replies to A with its (B's) MAC address – frame sent to A’s MAC address (unicast) A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) ARP is “plug-and-play”: – nodes create their ARP tables without intervention from net administrator

ARP: Packet Format Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 26 – HardwareType: type of physical network (e.g., Ethernet) – ProtocolType: type of higher layer protocol (e.g., IP) – HLEN & PLEN: length of physical and protocol addresses – Operation: request or response – Source/Target Physical/Protocol addresses

Addressing: Routing to another LAN Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 27 walkthrough: send datagram from A to B via R. – focus on addressing - at both IP (datagram) and MAC layer (frame) – assume A knows B’s IP address – How can A know whether B is in the same subnet/network? – assume A knows B’s MAC address (how?) – assume A knows IP address of first hop router, R (how?) – assume A knows MAC address of first hop router interface (how?) – How many MAC addresses? 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 28 R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A 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 BD-D2-C7-56-2A B2-2F-54-1A-0F B

Addressing: Routing to another LAN Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 29 R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A IP Eth Phy  frame sent from A to R IP src: IP dest: MAC src: C-E8-FF-55 MAC dest: E6-E BB-4B IP Eth Phy  frame received at R, datagram removed, passed up to IP BD-D2-C7-56-2A B2-2F-54-1A-0F B

Addressing: Routing to another LAN Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 30 R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF BD-D2-C7-56-2A B2-2F-54-1A-0F B A 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

Addressing: Routing to another LAN Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 31 R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF BD-D2-C7-56-2A B2-2F-54-1A-0F B A  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

Addressing: Routing to another LAN Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 32 R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF BD-D2-C7-56-2A B2-2F-54-1A-0F B A  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 Addresses: How to get one? Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 33 – MAC address: configured in adapter, globally unique – IP address: Not only be unique on a given internetwork, but needs to reflect the structure of the internetwork Not possible to be configured once into host; Hosts might change to another network: IP needs to be reconfigurable – Usually, automatic configuration methods are required: Dynamic Host Configuration Protocol (DHCP): Textbook, 3.2.7

A day in the life: Connecting to Internet Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 34 Comcast network /13 Google’s network / web server DNS server school network /24 browser web page

A day in the life: Connecting to Internet Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 35 connecting laptop needs to get its own IP address, addr of first-hop router, addr of DNS server: use DHCP router (runs DHCP) DHCP UDP IP Eth Phy DHCP UDP IP Eth Phy DHCP  DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in Ethernet  Ethernet frame broadcast (dest: FFFFFFFFFFFF ) on LAN, received at router running DHCP server  Ethernet demuxed to IP demuxed, UDP demuxed to DHCP

A day in the life: Connecting to Internet Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 36 DHCP server formulates DHCP ACK containing client’s IP address, IP address of first-hop router for client, name & IP address of DNS server router (runs DHCP) DHCP UDP IP Eth Phy DHCP UDP IP Eth Phy DHCP  encapsulation at DHCP server, frame forwarded (switch learning) through LAN, demultiplexing at client Client now has IP address, knows name & addr of DNS server, IP address of its first-hop router  DHCP client receives DHCP ACK reply

A day in the life: ARP (before DNS, HTTP) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 37 before sending HTTP request, need IP address of DNS DNS UDP IP Eth Phy DNS  DNS query created, encapsulated in UDP, encapsulated in IP, encapsulated in Eth. In order to send frame to router, need MAC address of router interface: ARP  ARP query broadcast, received by router, which replies with ARP reply giving MAC address of router interface  client now knows MAC address of first hop router, so can now send frame containing DNS query ARP query Eth Phy ARP ARP reply

NAT Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 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

NAT Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 39 Implementation: 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 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 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: Network Address Translation Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 41 NAT is controversial: – routers should only process up to layer 3 – violates end-to-end argument: Hosts should be talking directly with each other, without interfereing nodes modifying IP addresses and port numbers – Address shortage should instead be solved by IPv6 But like it or not, NAT becomes an important component of the Internet