47
Introduction to Communication Networks Spring 2007 EECS 122 SPRING 2007 Unit 14 Internetworking

Is Implied Correlation Worth Calculating? Evidence from

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Introduction to Communication Networks Spring 2007

EECS 122 SPRING 2007

Unit 14Internetworking

2 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Acknowledgements – slides coming from:

• The book by Peterson/Davie

• The book by Wiliam Stallings

• Several slides from the earlier issues of the EECS 122 taught by Prof Jean Walrand, some from lectures by Peter Steenkiste (CMU), also Anja Feldmann(TUBerlin), Nick McKeown (Stanford) , and D.Peterson (Princeton)

• Individual slides form the book Andrew Tannenbaum, Computer Networks, 4th edition, the books by Fred Halsall, Farouzan…

3 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Reminder:• We have discussed bridges for connecting individual networks

• The basic limitations: – Scalability (flat addressing!)

– Heterogeneity of networks not supported.

• Both of these limitations are VERY severe…

• The idea of internetworking – coupling of networks in layer 3

• What is necessary?– A service model for the interconnected networks (what properties

should they have?)

– A service model for the “New” internetwork…. (what features will it offer)

– Internals – how to : address, route, and a couple of others…

4 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Flat Addressing in a bridged solution

3311

22

5544

66

a

b

a

b

c a

b

c a

b

baba

2: b3: a4: a5: a6: a

2: b3: a4: a5: a6: a

1: a3: b4: b5: b6: b

1: a3: b4: b5: b6: b

1: a2: b4: c5: c6: c

1: a2: b4: c5: c6: c

1: a2: a3: a5: c6: b

1: a2: a3: a5: c6: b 1: a

2: a3: a4: a5: b

1: a2: a3: a4: a5: b

1: a2: a3: a4: a6: b

1: a2: a3: a4: a6: b

Addresses are arbitrary; not based on topology (e.g., Ethernet)N nodes N -1 entries in every routing table; not scalable

Routing Table: One per nodeDestination Exit Port

Address Ports

TOC – IP – Addressing – Examples – Flat

5 of 47Prof. Adam WoliszEECS 122 SPRING 2007

The Internet – an instance of internetworking…

6 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Repetition: some aspects of the INTERNET PHILOSOPHY?

• Interconnection of networks rather than nodes – multiple different technologies could be included... (a.k.a. : INTERNET over EVERYTHING).What could be assumed about ANY Network: that just SOME data could be transmitted from TIME TO TIME

The „Best Effort“ paradigm...

• HIGH Survivability – mesh with no state in the intermediate nodes:

no state in the network – all the state in the terminalsThe End-to-End paradigm!!

• What will be offered by the network layer? – BEST EFFORT..• Nice separation of APPLICATIONS from COMMUNICATION: the

SOCKET INTERFACE as principal transport service interface... Just transmit a STREAM OF BYTES...

7 of 47Prof. Adam WoliszEECS 122 SPRING 2007

The central component - IP

BGP HTTP RTP TFTP

TCP UDP

IP

Ethernet FDDI Token Etc.

TOC – Architecture - Internet Layering

Datagram Packet switching

8 of 47Prof. Adam WoliszEECS 122 SPRING 2007

What makes the INTERNET approach so succesfull?

• Applications can be deployed by anybody who has a computer connected to the internet. This is a fundamental difference to the Telephone Network in which EVERY FUNCTIONALITY had to be introduced by the operator on the central switching facility.

• The Applications DID COME...– TELNET, FTP; file systems (NFS..), Distributed Files Systems– E-mail – WWW– ----------------– IP telefony..... – Data streaming (movies?) – Recent „peer-to-peer „ service exchange ... GNUTELLA; etc....

• And the Multi-service network became reality: EVERYTHING OVER INTERNET

9 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Important concepts:

• Name: identifies an object

• Address: Identifies where the object is located

• Interface: Identifies a single point of attachment to the network, ≥ 1 interfaces per host – multihomed nodes

• Route: How to get to the objects location

• At the IP Layer there is NO distinction between Names Names and addresses (so called semantic overloading)

• IP addresses pertain to interfaces

• Names like inst.eecs.berkeley.edu• Are application layer names• Pertain to application processes

10 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Simple view of the internet (historical)• Interconencted networks (think in terms of bridged Ethernets

as instances of the networks

R2

R1

H4

H5

H3H2H1

Network 2 (Ethernet)

Network 1 (Ethernet)

H6

Network 4(point-to-point)

H7 R3 H8

Network 3 (FDDI)

11 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Global view of the internet - reality…

AS-1

AS-2

AS-3

AS: Autonomous System

AS (Autonomous System) set of interconnected networks under common administration.

12 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Internet Protocol basics

The Internet Protocol is specifically limited in scope:

The main issues covered by the protocol are Addressing, Forwarding, Fragmentation

There are no mechanisms to augment:end-to-end data reliability,overload (packets are dropped in this case!)sequencing, orother services common to host-to-host protocols.

The internet protocol supports the lowest common denominator of service. If - by chance- the underlying quality is good :) if not :(

13 of 47Prof. Adam WoliszEECS 122 SPRING 2007

IPv4 header (RFC 791)

• Version: version 4 , version 6, further possible…

• IHL: length of the IP header in 32bit words, i.e. specifies the beginning of the payload. Typical length: 20 bytes ☺

• Total Length: 16 bits, limits datagram to 65 535 bytes

14 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Type of Service

• type of service: precedence, delay, throughput, and reliability

• is might be used to specify the treatment of the datagram during its transmission through the internet system …

Not much used in reality...

15 of 47Prof. Adam WoliszEECS 122 SPRING 2007

IP header – further fields…• Identification: used by the sender to mark individual packets

• TTL: Lifetime - is decremented by each node…• Usually decremented by one at each node, when the TTL value equals

zero, the packet is discarded and a notification is sent to the sender using the ICMP management protocol

• Protocol: specifies the next upper layer included in the payload, e.g. 17 TCP, 6 UDP, 46 RSVP, ...

• Header checksum: 16bits

• Options: Source Routing, Timestamp information

16 of 47Prof. Adam WoliszEECS 122 SPRING 2007

IP options

17 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Layers 2 and 3: limitations of Layer 2 hold…

Phy PhyPhy PhyPhy

Transport

Application

Phy

Transport

Application

Phy Phy

Destination Address B Local to port pLocal address B Layer 2 address w

EthernetSwitch

EthernetSwitch

Router

Phy Phy

Linky

NetworkC D

LinkvLinkLink

x

NetworkA

Linkw

NetworkB

Link

p

Destination Address B Next Hop CLocal address C Layer 2 address y

TOC – IP – Addressing – Examples – Layers 2/3

18 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Transferring an IP Packet on a network..• IP packets are transported as a PAYLOAD on intermediate

networks - e.g. Ethernets.

• The underlying network has limits on packet payload length –this is called MTU- maximum transfer unit ....

• Every internet module must be able to forward a datagram of 68 octets;

• Every internet destination must be able to receive a datagram of 576 octets;

• But: IP sender does not, in general, have to know which networks will transmit the packet... and use longer ones..

• Fragmentation – division of a long packet in „Pieces“..

• Alternatively: – Use packet lengths known as „transportable“ (short enough)– Use path features discovery

19 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Fragmentation Approaches

Reassembly at the exit (fixed route required!)

Reassambly at the destination!

(a)

(b)

20 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Fragmentation and reassembly - options• In the Internet, re-assembling is done by the destination host,

not by a router

• In case of a non-fragment option, packets with excessive length are dropped by the proper router.

fragmentation: in: one large datagramout: 3 smaller datagrams

Alternative: Variant (a) (in the previous slide)- assures always maximum possible length of the “pieces”, no small packets on following networks (if they can support big ones)-requires however that fragments leave a network using a SINGLE router!!! (fixed route of all packets within the network!)

21 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Fragmentation in IP – how to ?

22 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Fragmentation- an example

23 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Reassembly

24 of 47Prof. Adam WoliszEECS 122 SPRING 2007

The Internet style of fragmentation

25 of 47Prof. Adam WoliszEECS 122 SPRING 2007

IP fragmentation and reassembly – processing• Some options are copied, but others remain with the first

fragment only;

• Fields which may be affected by fragmentation include:• options field

• more fragments flag

• fragment offset

• internet header length field

• total length field

• header checksum

• Not so much used….

26 of 47Prof. Adam WoliszEECS 122 SPRING 2007

IP addressing scheme

• IP uses 32 bit address– Dotted decimal notation: 4 decimal integers, each specifying one byte

of IP address: 130.149.49.60

• Identifies an interface, not a host! (two or more addresses per host possible – per router a must!)

• Special addresses• loopback: 127.0.0.1 (packets never appear on network)• local broadcast: 255.255.255.255

• Two-level hierarchy (network host)

⇒ see later: extended to three-level (supernet, subnet extensions)

• Separation of concerns – for scalability support!!!– The network address – used for large scale routing/forwarding only– The host address- used for local routing/forwarding within the network

27 of 47Prof. Adam WoliszEECS 122 SPRING 2007

IP address classes (historic)

Class First octet Hosts / network NetsClass A < 128 16 mio. 128

Class B 128..191 65534 16384

Class C 192..223 254 2 mio.

Class D 224..239 268 mio.

Class E 240..255 134 mio.

28 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Addresses: Where do they come from, problems• An ISP gets its address block from its own provider OR from

one of the 3 routing registries:– ARIN: American Registry for Internet Numbers

– RIPE: Reseaux IP Europeens

– APNIC: Asia Pacific Network Information Center

• Example: an organization initially needs 100 addresses– Allocate it a class C address

– Organization grows to need 300 addresses

– Class B address is allocated. (~64K hosts)

– That’s overkill -a huge waste

– Only about 8200 class B addresses!

– Artificial Address crises

29 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Lookup Performance Required [McKeown]

Line Line Rate Pkt­size=40B Pkt­size=240BT1 1.5Mbps 4.68 Kpps 0.78 Kpps

OC3 155Mbps 480 Kpps 80 Kpps

OC12 622Mbps 1.94 Mpps 323 Kpps

OC48 2.5Gbps 7.81 Mpps 1.3 Mpps

OC192 10 Gbps 31.25 Mpps 5.21 Mpps

Routers have to be quick.... Do we really want to have all Class C Networks in each router....

30 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Subnetting [McKeown]

CLASS “B”e.g. Company 10 Net ID Host-ID

2 14 16

10 Net ID Host-ID2 14 16

0000Subnet ID (20) Subnet

Host ID (12)

10 Net ID Host-ID2 14 16

1111Subnet ID (20) Subnet

Host ID (12)

10 Net ID Host-ID2 14 16

000000

Subnet ID (22) SubnetHost ID (10)

10 Net ID Host-ID2 14 16

1111011011

Subnet ID (26) SubnetHost ID (6)

e.g. Site

e.g. Dept

large organizations: multiple LANs with single IP network addresssubdivide “host” part of network address ⇒ subnetting

31 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Subnetting - essentially the same idea within “host”

• Each subnet needs: a subnet Number and a subnet MASK(defining which bits of the address are relevant to subnet definition)

• Bitwise AND of the Destination host IP address and the subnet mask allows to decide if destination is on my subnet!!

32 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Subnet mask defines „host“ as 7 bits...or 8 bits...Subnet mask: 255.255.255.128Subnet number: 128.96.34.0

128.96.34.15128.96.34.1

H1 R1

128.96.34.130 Subnet mask: 255.255.255.128Subnet number: 128.96.34.128

128.96.34.129128.96.34.139

R2H2

128.96.33.1128.96.33.14

Subnet mask: 255.255.255.0Subnet number: 128.96.33.0

H3

33 of 47Prof. Adam WoliszEECS 122 SPRING 2007

CIDR: Classless InterDomain Routing

• CIDR allows networks to be assigned on arbitrary bit boundaries.

– Address ranges can be assigned in chunks of 2k k=1…32

• Idea - use aggregation - provide routing for a (large?) number of networks by advertising one common prefix.

• Reduces the size of routing tables, but maintains connectivity.

• Address format: a.b.c.d/x, where x is # bits in subnet portion of address

11001000 00010111 00010000 00000000

subnetpart

hostpart

200.23.16.0/23

34 of 47Prof. Adam WoliszEECS 122 SPRING 2007

CIDR – an Example

35 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Network Address Translation…

10.0.0.1

10.0.0.2

10.0.0.3

10.0.0.4

138.76.29.7

local network(e.g., home network)

10.0.0/24

rest ofInternet

Datagrams with source or destination in this networkhave 10.0.0/24 address for

source, destination (as usual)

All datagrams leaving localnetwork have same single source

NAT IP address: 138.76.29.7,different source port numbers

NAT idea: Show ONE IP address, run multiple IP addresses

36 of 47Prof. Adam WoliszEECS 122 SPRING 2007

NAT - Objectives

• Enlarge IPv4 address space– Provider view: IP address are a scarce resource

– Address shortness is one motivation for a new IP version (IPv6)

• Prevent home users from running servers at home– Session must be initiated from “inside”

• Connect multiple hosts to the Internet using single IP address– User view: Each IP address (contract with ISP) costs money

• Hide internal topology to outside world– Security aspect (administrator view)

37 of 47Prof. Adam WoliszEECS 122 SPRING 2007

NAT – an Example

• Home Network

– One IP address (IPa) is visible outside

IPa (typically DHCP)

IPb(DHCP with NAT)

IPc(DHCP with NAT)

NAT

Note: Can be extended to a set of addresses instead of only one (IPa)In that case, some “static” addresses can be reserved for servers …

TOC – IP – Addressing – NAT – Example

38 of 47Prof. Adam WoliszEECS 122 SPRING 2007

NAT How it works

• Trick: Use TCP port to distinguish computersThere are 64k port numbers, the first 1k are reserved

IPa

IPc

NAT

IPb

IPx[IPb | IPx | TCPm | TCPn | …]

[IPa | IPx | TCPb | TCPn | …]

[TCPb IPb, TCPm]

[IPx | IPa | TCPn | TCPb | …]

[IPx | IPb | TCPn | TCPm | …]

TOC – IP – Addressing – NAT – How

39 of 47Prof. Adam WoliszEECS 122 SPRING 2007

How do I get an Internet address• I buy a new laptop... It does have:

– Ethernet interface (with a MAC address)

– WLAN interface with a MAC address

– Possibly some more,,,

• I arrive at the Campus – How do I get an IP Address?

• You might start looking for your sysadmin, request an IP address...

• YOU go home... You call the sytem provider...

• You go to the coffee shop ???

• See.., IP Address is dependent on who is the service provider..... (will discuss mobility aspect later!!!)

40 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Dynamic assignment of IP addresses• Desirable for several reasons:

– IP addresses are assigned on-demand

– Avoid manual IP configuration

– Support mobility, e.g., of laptops

• Three Protocols:– RARP (until 1985, no longer used)

– BOOTP (1985-1993)

– DHCP (since 1993)

• Only DHCP is widely used today.

41 of 47Prof. Adam WoliszEECS 122 SPRING 2007

BOOTstrap Protocol (BOOTP)

– Host can configure its IP parameters at boot time.

– 3 services.

• IP address assignment. •Detection of the IP address for a serving machine. •The name of a file to be loaded and executed by the client machine (boot file name)

• Advantages– Not only assigns IP address, but also default router, network mask, etc.

– Sent as UDP messages (Port 67 (server) and 68 (host))

– Uses limited broadcast address (255.255.255.255)

42 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Dynamic Host Configuration Protocol (DHCP)

• Designed in 1993

• Extension of BOOTP (Many similarities to BOOTP)

• Same port numbers as BOOTP

• Extensions:– Supports temporary allocation (“leases”) of IP addresses

– DHCP client can acquire all IP configuration parameters

• DHCP is the preferred mechanism for dynamic assignment of IP addresses

• DHCP can interoperate with BOOTP clients.

43 of 47Prof. Adam WoliszEECS 122 SPRING 2007

DHCP Operation• DCHP DISCOVER

• DCHP OFFER

44 of 47Prof. Adam WoliszEECS 122 SPRING 2007

DHCP Operation

At this time, the DHCP client can start to use the IP address

Renewing a Lease (sent when 50% of lease has expired)

If DHCP server sends DHCPNACK, then address is released.

NOTE: Soft state concept!!

45 of 47Prof. Adam WoliszEECS 122 SPRING 2007

DHCP Operation

• DCHP RELEASE

At this time, the DHCP client has released the IP address

DHCPrelay

DHCPserver

Unicast to server

Broadcast

Host

Other networks

Note: DHCP server does notHave to be avialable on eachNetwork!!

46 of 47Prof. Adam WoliszEECS 122 SPRING 2007

DHCP – client operation

47 of 47Prof. Adam WoliszEECS 122 SPRING 2007

Requirements for DHCP

• Guarantee that any specific network address will not be in use by more than one host at a time

• Retain host configuration across reboot. A host should, whenever possible, be assigned the same configuration parameters (e.g. network address) in response to each request

• Retain host configuration across server reboots, and, whenever possible, a host should be assigned the same configuration parameters despite restarts of the DHCP mechanism

• Allow automatic assignment of configuration to new hosts to avoid hand configuration for new hosts

• Support fixed or permanent allocation of configuration parameters to specific hosts