Presentation is loading. Please wait.

Presentation is loading. Please wait.

Univ. of TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr.

Similar presentations


Presentation on theme: "Univ. of TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr."— Presentation transcript:

1 Univ. of TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 5: Internetworking

2 Univ. of TehranComputer Network2 Internetworking How to connect existing networks TCP/IP protocol Assigned Reading [CK74]: A Protocol for Packet Network Intercommunication. [Hin96]: IP Next Generation Overview

3 Univ. of TehranComputer Network3 The Problem Before Internet different packet-switching networks (e.g., ARPANET, ARPA packet radio) only nodes on the same physical/link layer network could communicate want to share room-size computers, storage to reduce expense

4 Univ. of TehranComputer Network4 The Challenge Interconnect existing networks … but, packet switching networks differ widely different services e.g., degree of reliability different interfaces e.g., length of the packet that can be transmitted, address format different protocols e.g., routing protocols

5 Univ. of TehranComputer Network5 Key problem: Heterogeneity Not described as such in paper Heterogeneous addressing conventions => common addressing scheme Heterogeneous MTU => fragmentation Heterogeneous queuing/transit delays =>adaptive “timing procedures” Heterogeneous reliability => end-to-end recovery mechanisms Heterogeneous control/status info => common error/coordination mechanism

6 Univ. of TehranComputer Network6 Possible solutions Reengineer and develop one global packet switching network standard not economically feasible not deployable Have every host implement the protocols of any network it wants to communicate with Complexity/node = O(n) O(n 2 ) global complexity

7 Univ. of TehranComputer Network7 Solution Add an extra layer: internetworking layer hosts: understand one network protocol understand one physical/link protocol gateways: understand one network protocol understand the physical/link protocols of the networks they gateway Complexity to add a node/network: O(1) with respect to number of existing nodes

8 Univ. of TehranComputer Network8 Solution Gateways

9 Univ. of TehranComputer Network9 Challenge 1: Different Address Formats Options: Map one address format to another. Why not? Provide one common format map lower level addresses to common format Format: Initially: 8b network 16b host 24b total Before Classless InterDomain Routing (CIDR): 7b/24b, 14b/16b, or 21b/8b 32b total After CIDR: Arbitrary division 32b total NAT: 32b + 16b simultaneously active IPv6: 128b total

10 Univ. of TehranComputer Network10 Address Formats 256 networks? What were they thinking? Why CIDR? What happens if they run out before IPv6? Why IPv6? Why 128b for IPv6? 2 48 =281 trillion. Why not variable length addresses?

11 Univ. of TehranComputer Network11 Challenge 2: Different Packet Sizes Need to define maximum packet size Options: Take the minimum of the maximum packets sizes over all networks Implement fragmentation/reassembly Flexibility to adjust packet sizes as new technologies arrive IP: fragment at routers, reassemble at host Why not reassemble at routers? Still stuck with 1500B as de facto maximum

12 Univ. of TehranComputer Network12 Other Challenges Errors  require end-to-end reliability Thought to be rarely invoked, but necessary Different (routing) protocols  coordinate these protocols Accounting Did not envision script kiddies Quality of Service Not addressed

13 Univ. of TehranComputer Network13 Transmission Control Program Original TCP/IP (Cerf & Kahn) no separation between transport (TCP) and network (IP) layers one common header flow control, but not congestion control (why not?) fragmentation handled by TCP Today’s TCP/IP separate transport (TCP) and network (IP) layer (why?) split the common header in: TCP and UDP headers fragmentation reassembly done by IP congestion control

14 Univ. of TehranComputer Network14 Devil’s Advocate Who cares about resource sharing? 1974: cycles, storage, bandwidth expensive, people cheap 2002: resources cheap, people expensive 1974: Share computer resources 2002: Communicate with people, access documents, buy, sell Does it still make sense to make processes the endpoint? Where do people and organizations fit into the ISO layering model?

15 Univ. of TehranComputer Network15 Back to the big picture

16 Univ. of TehranComputer Network16 Goals (Clark’88) 0 Connect existing networks initially ARPANET and ARPA packet radio network 1. Survivability - ensure communication service even in the presence of network and router failures 2. Support multiple types of services 3. Must accommodate a variety of networks 4. Allow distributed management 5. Allow host attachment with a low level of effort 6. Be cost effective 7. Allow resource accountability

17 Univ. of TehranComputer Network17 1. Survivability continue to operate even in the presence of network failures (e.g., link and router failures) failures (excepting network partition) should be transparent to endpoints maintain state only at end-points (fate-sharing) no need to replicate and restore router state disadvantages? Internet: stateless network architecture no per-flow state, still have state in address allocation, DNS

18 Univ. of TehranComputer Network18 2. Types of Services Add UDP to TCP to better support other types of applications e.g., “real-time” applications Probably main reason for separating TCP and IP Provide datagram abstraction: lower common denominator on which other services can be built service differentiation considered (ToS header bits) was not widely deployed (why?)

19 Univ. of TehranComputer Network19 Application Assumptions Who made them: Telephone network: voice (web, video?) Cable: broadcast (2-way?) X.25: remote terminal access (file transfer?) BBS: centralized meeting place (web, p2p?) NAT: client/server model (p2p, IM, IP Telephony?) Who didn't: Internet Caveat: best-effort, unicast, fixed location (real-time, multicast, mobility?) Allows development of unforseen applications: Web, distributed gaming Sometimes too general: Interdomain, multi-source multicast scales poorly Single source multicast scales better [Holbrook99]

20 Univ. of TehranComputer Network20 3. Variety of Networks Very successful because the minimalist service; it requires from underlying network only to deliver a packet with a “reasonable” probability of success …does not require: reliability, in-order delivery, single delivery, QoS guarantees IP over everything Then: ARPANET, X.25, DARPA satellite network.. Now: ATM, SONET, WDM, PPP, USB, 802.11b, GSM, GPRS, DSL, cable modems, power lines

21 Univ. of TehranComputer Network21 Internet Architecture Packet-switched datagram network IP is the glue Hourglass architecture all hosts and routers run IP Common Intermediate Representation IP TCPUDP ATM Satellite Ethernet

22 Univ. of TehranComputer Network22 Other Goals Allow distributed management each network can be managed by a different organization different organizations need to interact only at the boundaries doesn’t work so well for routing, accounting Cost effective sources of inefficiency header overhead retransmissions routing …but routers relatively simple to implement (especially software side)

23 Univ. of TehranComputer Network23 Other Goals (Cont) Low cost of attaching a new host not a strong point  higher than other architecture because the intelligence is in hosts (e.g., telephone vs. computer) Moore’s law made this moot point, both <$100 bad implementations or malicious users can produce considerably harm (remember fate- sharing?) DDoS possibly biggest threat to Internet Accountability very little so far

24 Univ. of TehranComputer Network24 What About the Future? Datagram not the best abstraction for: resource management,accountability, QoS A new abstraction: flow? Routers require to maintain per-flow state (what is the main problem with this raised by Clark?) state management Solution soft-state: end-hosts responsible to maintain the state

25 Univ. of TehranComputer Network25 Summary: Minimalist Approach Dumb network IP provide minimal functionalities to support connectivity addressing, forwarding, routing Smart end system transport layer or app does more sophisticated functionalities flow control, error control, congestion control Advantages accommodate heterogeneous technologies support diverse applications (telnet, ftp, Web, X windows) decentralized network administration Disadvantages poor realtime performance poor accountability

26 Univ. of TehranComputer Network26 How is IP Design Standardized? IETF Voluntary organization Meeting every 4 months Working groups and email discussions “We reject kings, presidents, and voting; we believe in rough consensus and running code” (Dave Clark 1992) Need 2 independent, interoperable implementations for standard

27 Univ. of TehranComputer Network27 IP Internet Concatenation of Networks or “networks of Networks”. “R” is routers and “H” is hosts. R2 R1 H4 H5 H3 H2 H1 Network 2 (Ethernet) Network 1 (Ethernet) H6 Network 3 (FDDI) Network 4 ( point-to-point) H7R3H8

28 Univ. of TehranComputer Network28 Service Model Connectionless (datagram-based) Best-effort delivery (unreliable service) packets are lost. No recover from lost. packets are delivered out of order duplicate copies of a packet are delivered packets can be delayed for a long time Datagram format VersionHLen TOSLength IdentFlagsOffset TTLProtocolChecksum SourceAddr DestinationAddr Options (variable) Pad (variable) 0 4 816 1931 Data Contains all information for routing!

29 Univ. of TehranComputer Network29 Packet Headers  The current Version is 4 or IPv4.  HLen- the Header Length: from 5-15 in 32-bit words.  Length- the total length of the packet including headers. Max length is 64K.  TTL: Time To Live is expressed in second. It is to prevent packet from permanently circulating in a loop.  Protocol: specify the packet application ex. 1 for ICMP. It is for demultiplexing to higher layer protocols.  Checksum: is a 1-complement error checksum for the header only.

30 Univ. of TehranComputer Network30 Packet Headers (Cont) TOS: type of Service Precedence Specify the priority Type of Services Specify routing, for instance cheapest, fastest and more reliable D for Delay T for Throughput R for Reliability C for low cost. Note: Precedence is only for inside channel queuing. Replaced by DiffServ. 0 2 | 3 7 Precedence Type of service DTRC

31 Univ. of TehranComputer Network31 Packet Headers (Cont) Options If C set, the option will copied to all fragments. Otherwise, only to the first one. Class 0 for control Class 2 for debugging and measurement. Options are rarely used in today except for ‘loose’ and ‘strict’ source routing parameters. ‘loose’ and ‘strict’ source option sometimes, is used for IP encapsulation in another IP or “Tunneling” CClassNumber

32 Univ. of TehranComputer Network32 Fragmentation and Reassembly 0 7|0 7|0 4 7|0 7 IdentificationFlagsFragment Offset 012 0DFMF  Flags  DF: Don’t Fragment  MF: More Fragment coming In fragmentation, IP copy the original header and only modify The length, which is the new length, and offset. Offset is used for reassembly.  Note: Fragmentation may degrade the network performance. That is why the IP packet should be the same of TCP packets Modern TCP implement “Path MTU discovery”. It start with large packet and with DF set flag, if it passed TCP keeps the same packet size, otherwise, it reduces it.

33 Univ. of TehranComputer Network33 Fragmentation and Reassembly (cont) Each network has a Maximum Transfer Unit size, MTU Strategy fragment when necessary (MTU < Datagram) fragments are self-contained datagrams do not recover from lost fragments Where to do reassembly? End nodes – avoids unnecessary work Dangerous to do at intermediate nodes Buffer space Multiple paths through network

34 Univ. of TehranComputer Network34 Fragmentation is Harmful Uses resources poorly Forwarding costs per packet Best if we can send large chunks of data Worst case: packet just bigger than MTU Poor end-to-end performance Loss of a fragment Reassembly is hard Buffering constraints

35 Univ. of TehranComputer Network35 Path MTU Discovery Hosts dynamically discover minimum MTU of path Algorithm: Initialize MTU to MTU for first hop Send datagrams with Don’t Fragment bit set If ICMP “pkt too big” msg, decrease MTU What happens if path changes? Periodically (>5mins, or >1min after previous increase), increase MTU Some routers will return proper MTU MTU values cached in routing table

36 Univ. of TehranComputer Network36 Addressing in IP IP addresses are names of interfaces Domain Name System (DNS) names are names of hosts DNS binds host names to interfaces Routing binds interface names to paths

37 Univ. of TehranComputer Network37 Addressing Considerations Fixed length or variable length? Issues: Flexibility Processing costs Header size Engineering choice: IP uses fixed length addresses

38 Univ. of TehranComputer Network38 Addressing Considerations Structured vs flat Issues What information would routers need to route to Ethernet addresses? Need structure for designing scalable binding from interface name to route! How many levels? Fixed? Variable?

39 Univ. of TehranComputer Network39 IP Addresses Fixed length: 32 bits Initial classful structure (1981) Total IP address size: 4 billion Class A: 128 networks, 16M hosts Class B: 16K networks, 64K hosts Class C: 2M networks, 256 hosts High Order Bits 0 10 110 Format 7 bits of net, 24 bits of host 14 bits of net, 16 bits of host 21 bits of net, 8 bits of host Class A B C

40 Univ. of TehranComputer Network40 IP Address Classes (Some are Obsolete) Network IDHost ID Network IDHost ID 816 Class A 32 0 Class B 10 Class C 110 Multicast Addresses Class D 1110 Reserved for experiments Class E 1111 24

41 Univ. of TehranComputer Network41 Some Special IP Addresses 127.0.0.1: local host (a.k.a. the loopback address Host bits all set to 0: network address Host bits all set to 1: broadcast address

42 Univ. of TehranComputer Network42 Subnet Addressing – RFC917 (1984) For class B & C networks Very few LANs have close to 64K hosts For electrical/LAN limitations, performance or administrative reasons Need simple way to get multiple “networks” Use bridging, multiple IP networks or split up single network address ranges (subnet) Must reduce the total number of network addresses that are assigned

43 Univ. of TehranComputer Network43 Subnetting Variable length subnet masks Could subnet a class B into several chunks Network Host Network HostSubnet 1111.. 00000000..1111Mask

44 Univ. of TehranComputer Network44 Subnetting Example Assume an organization was assigned address 150.100 Assume < 100 hosts per subnet How many host bits do we need? Seven What is the network mask? 11111111 11111111 11111111 10000000 255.255.255.128

45 Univ. of TehranComputer Network45 Subnet Addressing Example H1H2 H3H4R1 150.100.12.128 150.100.12.154150.100.12.176 150.100.12.129 150.100.12.0 150.100.12.4 To Internet 150.100.12.55150.100.12.24 150.100.0.1 Assume a packet arrives with address 150.100.12.176 Step 1: AND address with subnet mask

46 Univ. of TehranComputer Network46 IP Address Problem (1991) Address space depletion In danger of running out of classes A and B Why? Class C too small for most domains Very few class A – IANA (Internet Assigned Numbers Authority) very careful about giving Class B – greatest problem

47 Univ. of TehranComputer Network47 IP Address Utilization (‘98) http://www.caida.org/outreach/resources/learn/ipv4space/

48 Univ. of TehranComputer Network48 Some Problems Class B sparsely populated But people refuse to give it back Solution Assign multiple class C addresses Assign consecutive blocks RFC1338 – Classless Inter-Domain Routing (CIDR)

49 Univ. of TehranComputer Network49 Classless Inter-Domain Routing Do not use classes to determine network ID Assign any range of addresses to network Use common part of address as network number e.g., addresses 192.4.16 - 196.4.31 have the first 20 bits in common. Thus, we use this as the network number netmask is /20, /xx is valid for almost any xx Enables more efficient usage of address space (and router tables)

50 Univ. of TehranComputer Network50 Network Address Translation (NAT) Sits between your network and the Internet Translates local network layer addresses to global IP addresses Has a pool of global IP addresses (less than number of hosts on your network)

51 Univ. of TehranComputer Network51 NAT Illustration Global Internet Private Network Pool of global IP addresses Operation: Source (S) wants to talk to Destination (D): Create S g -S p mapping Replace S p with S g for outgoing packets Replace S g with S p for incoming packets PG DgDg SpSp Data NAT DestinationSource DgDg SgSg Data

52 Univ. of TehranComputer Network52 Problems with NAT What if we only have few (or just one) IP address? Use NAPT (Network Address Port Translator) NAPT translates: Translates Paddr + flow info to Gaddr + new flow info Uses TCP/UDP port numbers Potentially thousands of simultaneous connections with one global IP address

53 Univ. of TehranComputer Network53 Problems with NAT Hides the internal network structure Some consider this an advantage Multiple NAT hops must ensure consistent mappings Some protocols carry addresses e.g., FTP carries addresses in text What is the problem? Encryption No inbound connections

54 Univ. of TehranComputer Network54 IPv6 Changes Scale – addresses are 128bit Header size? Simplification Removes infrequently used parts of header 40byte fixed size vs. 20+ byte variable IPv6 removes checksum Relies on upper layer protocols to provide integrity IPv6 eliminates fragmentation Requires path MTU discovery Requires 1280 byte MTU

55 Univ. of TehranComputer Network55 IPv6 Header Source Address Destination Address 04162432 VersionClassFlow Label Payload LengthNext HeaderHop Limit 1219

56 Univ. of TehranComputer Network56 IPv6 Changes TOS replaced with traffic class octet Flow Help soft state systems Maps well onto TCP connection or stream of UDP packets on host-port pair Easy configuration Provides auto-configuration using hardware MAC address to provide unique base Additional requirements Support for security Support for mobility

57 Univ. of TehranComputer Network57 IPv6 Changes Protocol field replaced by next header field Support for protocol demultiplexing as well as option processing Option processing Options are added using next header field Options header does not need to be processed by every router Large performance improvement Makes options practical/useful

58 Univ. of TehranComputer Network58 Next-lecture: Intra-Domain Routing Routing algorithms- two main approaches Distance vector protocols Link state protocols How to make routing adapt to load How to make routing scale Assigned reading [KZ89] The revised ARPANET routing metric [Tsu88] The Landmark Hierarchy: A New Hierarchy for Routing in Very Large Networks


Download ppt "Univ. of TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr."

Similar presentations


Ads by Google