Lecture 5, 20-755: The Internet, Summer 1999 1 20-755: The Internet Lecture 5: Internetworking II David O’Hallaron School of Computer Science and Department.

Slides:



Advertisements
Similar presentations
Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
Advertisements

20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IP datagrams Service paradigm, IP datagrams, routing, encapsulation, fragmentation and reassembly.
CSE 461: IP/ICMP and the Network Layer. Next Topic  Focus:  How do we build large networks?  Introduction to the Network layer  Internetworks  Service.
CCNA – Network Fundamentals
Transmission Control Protocol (TCP)
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
1 K. Salah Module 5.2: Internet Protocol CO vs. CL protocols IP Features –Fragmentation –Routing IP Datagram Format IPv6.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Internetworking I November 19, 1998 Topics Bridged networks Internets IP datagram delivery IP addresses class26.ppt.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
Spring 2003CS 4611 Internetworking COS 461 Spring 2003.
CSE331: Introduction to Networks and Security Lecture 7 Fall 2002.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
Spring 2002CS 4611 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Process-to-Process Delivery:
CS 6401 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools.
1 Chapter Overview TCP/IP DoD model. 2 Network Layer Protocols Responsible for end-to-end communications on an internetwork Contrast with data-link layer.
1 Chapter 1 OSI Architecture The OSI 7-layer Model OSI – Open Systems Interconnection.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
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.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.
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.
Internetworking I: Basics April 13, 2000 Topics Internetworking with repeaters, bridges and gateways Internetworking with routers –the Internet Protocol.
TCP/IP Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 21.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
Transmission Control Protocol (TCP) BSAD 146 Dave Novak Sources: Network+ Guide to Networks, Dean 2013.
Transport Protocols.
1 Chapter 4: Internetworking (Internet Protocol) Dr. Rocky K. C. Chang 16 March 2004.
1 Internetworking: IP Packet Switching Reading: (except Implementation; pp )
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Introduction to TCP/IP networking
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Scaling the Network: The Internet Protocol
Process-to-Process Delivery, TCP and UDP protocols
Internetworking II November 24, 1998
Introduction of Transport Protocols
Internetworking Outline Best Effort Service Model
Process-to-Process Delivery:
Net 323 D: Networks Protocols
Internetworking I: Basics November 11, 1999
Scaling the Network: The Internet Protocol
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Layer 9/22/2019.
Presentation transcript:

Lecture 5, : The Internet, Summer : The Internet Lecture 5: Internetworking II David O’Hallaron School of Computer Science and Department of Electrical and Computer Engineering Carnegie Mellon University Institute for eCommerce, Summer 1999

Lecture 5, : The Internet, Summer Today’s lecture IP: Internetworking with routers (50 min) Break (10 min) UDP, TCP (35 min)

Lecture 5, : The Internet, Summer Typical computer system Local/IO Bus Memory Network adapter Network adapter IDE disk controller IDE disk controller Video adapter Video adapter Display Network Processor Interrupt controller Interrupt controller SCSI controller SCSI controller SCSI bus Serial port controller Serial port controller Parallel port controller Parallel port controller Keyboard controller Keyboard controller Keyboard Mouse Printer Modem disk cdrom

Lecture 5, : The Internet, Summer IP: Internetworking with routers The “Hourglass Model”, Dave Clark, MIT IP Many different kinds of applications and higher-level protocols Many different kinds of networks IP is the most successful protocol ever developed Keys to success: –simple enough to implement on top of any physical network »two tin cans and a string. –rich enough to serve as the base for implementations of more complicated protocols and applications. »The IP designers never dreamed of something like the Web. –“rough consensus and working code” »solid implementable specs.

Lecture 5, : The Internet, Summer Internet protocol stack Reliable byte stream delivery (process- process) Unreliable best effort datagram delivery (host-host) Unreliable best effort datagram delivery (process- process) User application program (FTP, Telnet, WWW, ) User datagram protocol (UDP) User datagram protocol (UDP) Transmission control protocol (TCP) Transmission control protocol (TCP) Internet Protocol (IP) Network interface (ethernet) hardware Physical connection Berkeley sockets interface

Lecture 5, : The Internet, Summer IP service model IP service model: –Delivery model: IP provides best-effort delivery of datagram (connectionless) packets between two hosts. »IP tries but doesn’t guarantee that packets will arrive (best effort) »packets can be lost or duplicated (unreliable) »ordering of datagrams not guaranteed (connectionless) –Naming scheme: IP provides a unique address (name) for each host in the Internet. Why would such a limited delivery model be useful? –simple, so it runs on any kind of network –provides a basis for building more sophisticated and user- friendly protocols like TCP and UDP

Lecture 5, : The Internet, Summer IP datagram delivery: Example internet R1 R2 H1 H2 H3 Network 3 (FDDI) H4 H5 H6 H7 H8 R3 Network 2 (Ethernet) Network 4 (Point-to-point) Network 1 (Ethernet)

Lecture 5, : The Internet, Summer IP layering IP TCP ETH IP ETHFDDI IP FDDIP2P IP P2PETH IP TCP ETH Protocol layers used to connect host H1 to host H8 in example internet. H1R1R2R3H8

Lecture 5, : The Internet, Summer Encapsulating IP datagrams in Ethernet Ethernet frame header Ethernet frame header IP datagram header IP datagram header IP datagram data IP datagram header IP datagram header IP datagram data IP datagram Ethernet frame The same idea is used for other types of physical networks

Lecture 5, : The Internet, Summer VerHlen IP packet format VERIP version HLHeader length (in 32-bit words) TOSType of service (unused) LengthDatagram length (max 64K B) IDUnique datagram identifier Flags xxM (more fragmented packets) Offset Fragment offset TTLTime to Live ProtocolHigher level protocol (e.g., TCP) TOSLength Datagram IDFlags TTLProtocolChecksum Source IP address Destination IP address Options (variable) Offset Data

Lecture 5, : The Internet, Summer Fragmentation and reassembly Different networks types have different maximum transfer units (MTU). A problem can occur if packet is routed onto network with a smaller MTU. –e.g. FDDI (4,500B) onto Ethernet (1,500B) Solution: break packet into smaller fragments. –each fragment has identifier and sequence number Destination reassembles packet before handing it up in the stack. –alternative would be to reassemble when entering network with larger MTU Sender can disable fragmentation using flag.

Lecture 5, : The Internet, Summer Fragmentation example IP TCP ETH IP ETHFDDI IP FDDIP2P IP P2PETH IP TCP ETH H1R1R2R3H8 ETHIP1400FDDIIP1400P2PIP512 P2PIP512 P2PIP376 ETHIP512 ETHIP512 ETHIP376 MTU=1500 MTU=4500MTU=532MTU=1500

Lecture 5, : The Internet, Summer Fragmentation example (cont) start of header ident=xm=1offset=0 rest of header 512 data bytes start of header ident=xm=1offset=512 rest of header 512 data bytes start of header ident=xm=0offset=1024 rest of header 376 data bytes First packet Second packet Third packet

Lecture 5, : The Internet, Summer Internet addresses Each host h has a physical address P(h) and a unique IP address I(h). IP addresses contain a network part and a host part: network(7)host (24)0 31 network (14)host (16)10 network (21)host (8)110 Class A (128 nets, 16 M hosts/net) Class B (16 K nets, 65 K hosts/net) Class C (2 M nets, 256 hosts/net) 3 classes of addresses:

Lecture 5, : The Internet, Summer Example Internet addresses networkhost0 31 networkhost10 networkhost110 Class A Class B Class C HostIP NumberClassNetwork cs.cmu.edu B0x0002 cmu.edu B0x0000 cs.stanford.edu B0x2640 att.com C0x008085

Lecture 5, : The Internet, Summer IP Datagram Forwarding Forwarding: the process of copying an input packet from an input port to an output port. Routing: the process of building the tables on each router that allow the correct output port to be determined (beyond our scope) Key points –Every IP datagram contains the IP address of the destination. –Network part of IP address uniquely identifies a single physical network. –All hosts and routers with same network field in address are on the same physical network. –Every physical network on the Internet has a router connected to at least one other physical network.

Lecture 5, : The Internet, Summer IP Forwarding Algorithm if (NetworkNum(S) == NetworkNum(D)) { deliver packet directly to D /* IP->physical mapping via ARP */ else deliver packet to default router NextHop = lookup(NetworkNum(D)); if (NextHop is an interface) deliver packet directly to D using interface NextHop else if (NextHop != ) deliver packet to NextHop (a router) else deliver packet to default router Forwarding table consists of (NetworkNum, NextHop) pairs Algorithm for host S sending to host D: Algorithm for router receiving packet for host D

Lecture 5, : The Internet, Summer IP Forwarding example R1 R2 H1 H2 H3 Network 3 (FDDI) H4 H5 H6 H7 H8 R3 Network 2 (Ethernet) Network 4 (Point-to-point) Network 1 (Ethernet) NetworkNumNextHop 1R3 2R1 3Interface 1 4Interface 0 Router R2 forwarding table

Lecture 5, : The Internet, Summer ARP: Address resolution protocol Initially: –Hosts S and D on the same network with IP addresses I(S) and I(D) and physical addresses P(S) and P(D). Problem: –Given I(D), host S wants to discover P(D). Solution: –Host S broadcasts triple (I(S), P(S), I(D),???) on network. –Host D (and only host D) responds with tuple (I(S), P(S), I(D), P(D)) –Both sender and receiver maintain a software cache of IP to physical mappings. –Time out old entries S S D D (I(S), P(S), I(D), ???) S S D D (I(S), P(S), I(D), P(D))

Lecture 5, : The Internet, Summer Subnetting Problem: IP addressing scheme makes inefficient use of addresses Partial solution: subnetting –physical network part of address identifies a “virtual” physical network to the external world. –use some of the high order “host” bits to identify local physical networks within the “virtual” physical network. Class B address Subnet mask ( ) Subnet number & = network numberhost number xxxxxxxx xxxxxxxx xxxxxxxx All hosts on same physical network have same subnet number. - There is exactly one subnet mask per subnet. - All hosts on subnet configured with this mask (ifconfig)

Lecture 5, : The Internet, Summer IP forwarding with subnetting D1 = SubnetMask & destination IP address if (D1 == MySubnetNum) deliver datagram directly to destination else deliver datagram to default router Algorithm on a host: for each forwarding table entry D1 = SubnetMask & destination IP address if (D1 == SubnetNum) if (NextHop is an interface) deliver datagram directly to destination else deliver datagram to NextHop (a router) Algorithm on a router:

Lecture 5, : The Internet, Summer Subnetting example H R R H H subnet mask: subnet number: subnet mask: subnet number: subnet mask: subnet number: SubnetNumSubnetMaskNextHop interface interface R2 forwarding table for R1

Lecture 5, : The Internet, Summer IPv6 Also called Next Generation IP and IPng Extends address space from 32 bits to 128 bits Hierarchical address space: 010registryIDproviderIDSubscriberIDSubnetIDInterfaceID 3 neat feature –embedded InterfaceID allows host to assign itself an IP address! 48

Lecture 5, : The Internet, Summer IPv6 packet format VerIP version (6) Pri/FlowlabelQuality of Service) PayloadLenpacket len (max 64KB) NextHdroptional/encapsulated header type HopLimitsame as TTL in IPv4 Source Address128-bit source addr Dest Address128-bit dest addr VerPriFlowLabel PayloadLenNextHdr Source Address HopLimit Next header/data Destination Address Optional header examples: fragmentation (44) authentication (51) TCP (6)

Lecture 5, : The Internet, Summer Converting from IPv4 to IPv6 Not possible to have a “flag day” Must upgrade incrementally –dual stack operation »IPv6 nodes run both IPv4 and IPv6 protocol stacks –IP tunneling »IP packet sent as payload of another IP packet »networking community’s version of indirection! IPv4 network IPv6 router IPv6 router IPV6 IPV4 IPV6 IPV4 IPV6

Lecture 5, : The Internet, Summer Break time!

Lecture 5, : The Internet, Summer Today’s lecture IP: Internetworking with routers (50 min) Break (10 min) UDP, TCP (35 min)

Lecture 5, : The Internet, Summer UDP: User datagram protocol Reliable byte stream delivery (process- process) Unreliable best effort datagram delivery (host-host) Unreliable best effort datagram delivery (process- process) User application program (FTP, Telnet, WWW, ) User datagram protocol (UDP) User datagram protocol (UDP) Transmission control protocol (TCP) Transmission control protocol (TCP) Internet Protocol (IP) Network interface (ethernet) hardware Physical connection Berkeley sockets interface

Lecture 5, : The Internet, Summer UDP: User datagram protocol Extends IP to provide process-to-process (end-to-end) datagram delivery Mechanism for demultiplexing IP packets Based on port abstraction Process identified by pair. SrcPortDstPort CheckSumLength Data

Lecture 5, : The Internet, Summer TCP: Transmission Control Protocol Reliable byte stream delivery (process- process) Unreliable best effort datagram delivery (host-host) Unreliable best effort datagram delivery (process- process) User application program (FTP, Telnet, WWW, ) User datagram protocol (UDP) User datagram protocol (UDP) Transmission control protocol (TCP) Transmission control protocol (TCP) Internet Protocol (IP) Network interface (ethernet) hardware Physical connection Berkeley sockets interface

Lecture 5, : The Internet, Summer TCP: Transmission control protocol Uses IP to provide reliable process-to-process byte stream delivery. –stream orientation »sender transfers ordered stream of bytes; receiver gets identical stream –virtual circuit connection »stream transfer analogous to placing phone call »sender initiates connection which must be accepted by receiver. –buffered data transfer »protocol software free to use arbitrary size transfer units –unstructured streams »stream is a sequence of bytes, just like Unix files –full duplex »concurrent transfers in both directions along a connection

Lecture 5, : The Internet, Summer TCP functions Connections Sequence numbers Sliding window protocol Reliability and congestion control. Source Port Dest. Port Sequence Number Acknowledgment Hlen/Flags Window D. Checksum Urgent Pointer Options..

Lecture 5, : The Internet, Summer Connections Connection is a fundamental TCP communication abstraction. –data sent along a connection arrives in order –implies allocation of resources (buffers) on hosts The endpoint of a connection is a pair of integers: –(IP address, port) A connection is defined by a pair of endpoints: –(( , 1184), ( , 53)) connection ( , 1184)( , 53)

Lecture 5, : The Internet, Summer Sequence space Each stream split into a sequence of segments which are encapsulated in IP datagrams. Each byte in the byte stream is numbered. –32 bit value –wraps around –initial values selected at runtime Each segment has a sequence number. –indicates the sequence number of its first byte –Detects lost, duplicate or out of order segments

Lecture 5, : The Internet, Summer TCP flow control mechanism: sliding window The purpose of flow control is to keep senders from flooding receivers with packets and filling up their memories. Often confused with congestion control, which tries to keep the senders from flooding the network with packets.

Lecture 5, : The Internet, Summer Sliding window protocol (sender) Sender maintains a “window” of unacknowledged bytes that it is allowed to send, and a pointer to the last byte it sent: current window Bytes through 2 have been sent and acknowledged (and thus can be discarded) Bytes have been sent but not acknowledged (and thus must be buffered) Bytes have been not been sent but will be sent without delay. Bytes 10 and higher cannot be sent until the right edge of window moves. byte stream leftrightcurr

Lecture 5, : The Internet, Summer Sliding window protocol (receiver) Receiver acknowledges receipt of a segment with two pieces of information: –ACK: the sequence number of the next byte in the contiguous stream it has already received –WIN: amount of available buffer space. ACK indicates that data was received correctly. –sender can increment left edge of window –sender can delete data to the left of the window. WIN indicates that more buffer space was freed up. –sender can increment the right edge of its window –sender can transmit more data.

Lecture 5, : The Internet, Summer Sliding window protocol (example) SenderReceiver Application does 2K write Application does 3K write Sender is blocked Sender may send up to 2K 2K, SEQ = 0 ACK=2K, WIN = 2K Receiver’s buffer empty 04K 2K 2K, SEQ =2K 4K ACK=4K, WIN = 0 Application reads 2K ACK=4K, WIN = 2K 2K 1K, SEQ =4K 2K1K

Lecture 5, : The Internet, Summer Opening and closing connections Host 1Host 2 Application does a connect to a socket on Host 2 SYN, SEQ = J, WIN = 4K ACK =J +1, SYN, SEQ = K, WIN = 4K ACK = K+1, J is the initial sequence number for messages from Host 1 to Host 2. K is the initial sequence number for messages from Host 2 to Host 1. SYN is the “synchronize” flag The three way handshake Application does a close on a connection FIN, SEQ = M FIN, SEQ = N ACK = M+1 ACK = N+1 Host 2 replies with its own close. FIN is the “finish” flag

Lecture 5, : The Internet, Summer Reliability and congestion control Reliability: –sender »saves segments inside its window »uses timeouts and sequence numbers in ACKS to detect lost segments. »retransmit segments it thinks are lost –receiver » uses sequence numbers to assemble segments in order » also to detect duplicate segments (how might this happen?) Congestion control –sender maintains separate separate congestion window –uses smaller of the two windows –uses “slow start” algorithm to adaptively set congestion window size.

Lecture 5, : The Internet, Summer End-to-end data issues Presentation formatting –must account for different data formats on different machines »different byte orders »different word sizes Compression –data can be compressed/decompressed on the endpoints to save network bandwidth (beyond our scope) Encryption –sensitive data can be encrypted/unencrypted on the endpoints. Authentication –Receivers may want to verify that messages really do come from the sender.

Lecture 5, : The Internet, Summer Key themes in IP internetworking Protocol layering –Way to structure complex system –Handle different concerns at different layers Must cope with heterogeneous networks Must cope with huge scale Must cope with imperfect environment –Packets get corrupted and lost No one has complete routing table –Too many hosts –Hosts continually being added and removed –In the future, they will start moving around (mobile computing)

Lecture 5, : The Internet, Summer Next time: Programming the global IP Internet Reliable byte stream delivery (process- process) Unreliable best effort datagram delivery (host-host) Unreliable best effort datagram delivery (process- process) User application program (FTP, Telnet, WWW, ) User datagram protocol (UDP) User datagram protocol (UDP) Transmission control protocol (TCP) Transmission control protocol (TCP) Internet Protocol (IP) Network interface (ethernet) hardware Physical connection Berkeley sockets interface