Internetworking I: Basics April 13, 2000 15-213: Topics

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 37

15-213

Internetworking I: Basics

April 13, 2000

Topics
• Internetworking with repeaters, bridges
and gateways
• Internetworking with routers
– the Internet Protocol (IP)
– IP datagram delivery
– IP addresses

class24.ppt
The internetworking idea
(Kahn, 1972)
Build a single network (an interconnected set of
networks, or internetwork, or internet) out of a large
collection of separate networks.
• Each network must stand on its own, with no internal changes
allowed to connect to the internet.
• Communications should be on a best-effort basis.
• “black boxes” (later called routers) should be used to connect the
networks.
• No global control at the operations level.

class24.ppt –2– CS 213 S’00


Internetworking challenges
Challenges:
• heterogeneity
– lots of different kinds of networks (Ethernet, FDDI, ATM, wireless,
point-to-point)
– how to unify this hodgepodge?
• scale
– how to provide uniques names for potentially billions of nodes?
(naming)
– how to find all these nodes? (forwarding and routing)
Note: internet refers to a general idea, Internet refers to
a particular implementation of that idea (The global IP
Internet).

class24.ppt –3– CS 213 S’00


Internetworking with repeaters

r Repeaters (also called hubs)


(r in the figure) directly
transfer bits from their inputs
to their outputs
r

class24.ppt –4– CS 213 S’00


Internetworking with repeaters
Telnet, FTP,
HTTP, email application application

transport transport

network network

data link data link

10Base-T physical physical

Host on Repeater Host on


network A (forwards bits) network B

class24.ppt –5– CS 213 S’00


Internetworking with repeaters:
Pros and cons
Pros
• Transparency
– LANS can be connected without any awareness from the hosts.
• Useful for serving multiple machines in an office from one ethernet
outlet.
Cons
• Not scalable
– ethernet standard allows only 4 repeaters.
– more than 4 would introduce delays that would break contention
detection.
• No heterogeneity
– Networks connected with repeaters must have identical electrical
properties.

class24.ppt –6– CS 213 S’00


Internetworking with bridges

b Bridges (b In the figure)


maintain a cache of hosts on
their input segments.

b Selectively transfer
ethernet frames from their
inputs to their outputs.

class24.ppt –7– CS 213 S’00


Internetworking with bridges
Telnet, FTP,
HTTP, email application application

transport transport

network network

CSMA/CD data link data link

10Base-T physical physical

Host on Bridge Host on


network A (forwards ethernet network B
frames)

class24.ppt –8– CS 213 S’00


Bridges
adapter (interface)
A B C

Ethernet A port 1 (really just another adapter)

bridge
port 2 Ethernet X
Unlike repeaters (which operate
at the physical level), bridges X Y Z
operate at the data link level
(or link level).

By link level, we mean that they


can parse and understand e.g. ethernet frames (as opposed to IP packets).

Basic forwarding algorithm (flooding): copy each received frame to all


other ports.

class24.ppt –9– CS 213 S’00


Learning bridges

Problem: Flooding is wasteful

A B C

Ethernet A port 1

bridge
port 2 Ethernet X

X Y Z

Optimization: Forward packets only when necessary by learning and


remembering which hosts are connected to which bridge ports.

class24.ppt – 10 – CS 213 S’00


Learning bridges (cont)

Learning algorithm:

1. start with empty hash table T that maps hosts to ports


2. receive frame from host src on port p
3. add (src,p) to T
4. delete old entries

Forwarding algorithm:

1. receive frame f from host src to host dst on port p


2. if T(dst) = n/a then flood f.
else if T(dst) = p then discard f
else forward f on port T(dst).

class24.ppt – 11 – CS 213 S’00


Learning bridges (example)
A B C P Q R

Ethernet A 1 3 Ethernet P

bridge
2 Ethernet X

X Y Z

A -> C B -> A X -> A


host port host port host port
A 1 A 1 A 1
B 1 B 1
flood 2 & 3 X 2
discard
forward on 1
class24.ppt – 12 – CS 213 S’00
Cycles in bridged networks
1. host writes frame F 2. B1 and B2 flood 3. B2 reads F1,
to unknown destination B1 reads F2
F

B1 B2 B1 B2 B1 B2

F1 F2 F2 F1

4. B1 and B2 flood 5. B1 reads F1 6. B1 and B2 flood


B2 reads F2
F2 F1 F1 F2
B1 B2 B1 B2 B1 B2

F1 F2

class24.ppt – 13 – CS 213 S’00


Spanning tree bridges
A B A B
G G
B3 B4 B5 B3 B4 B5

C D C D

B2 F B2 F

E E

B1 B1

• Networks are graph nodes, ports are graph edges


• Tree is constructed dynamically by a distributed “diffusing computation”
that prunes ports.
• “spanning” refers only to networks, not bridges

class24.ppt – 14 – CS 213 S’00


Portion of the bridged CMU internet
gw.cs
100 Mb/s ethernet

interlink.sw.net backbone-1.net.cs

baker porter es-weh-cle-4.net.cs 7th floorWean


rtrbone.net (PDL/CMCL Labs)
10 Mb/s ethernet
cyert host
cmu-fddi.psc.net
es-weh-cl6-2.net.cs 8th floor Wean

ATM OC-3 (150 Mb/s)


poconos.cmcl Alpha
PSC

pitt.edu

AT&T Sprint

class24.ppt – 15 – CS 213 S’00


Internetworking with bridges:
Pros Pros and cons
• Transparency
– LANS can be connected without any awareness from the hosts
– popular solution for campus-size networks
Cons
• Transparency can be misleading
– looks like a single Ethernet segment, but really isn’t
– packets can be dropped, latencies vary
• Homogeneity
– can only support networks with identical frame headers (e.g., Ethernet/FDDI)
– however, can connect different speed Ethernets
• Scalability
– tens of networks only
» bridges forward all broadcast frames
» increased latency

class24.ppt – 16 – CS 213 S’00


Internetworking with application
gateways
application gateways (g in
the figure) connect
Network A different networks for
particular applications.
g x Example:
• User on host x posts
news item to gateway
machine on network A.
phone
system • Gateway on A passes
item (along with others)
to gateway B.
Network B
• User on host y reads
message from gateway
g y on B.

class24.ppt – 17 – CS 213 S’00


Internetworking with application
gateways
Gateway program
usenet news application application

transport

network

modem data link data link

phone physical physical

Application gateway Application gateway host on network B


on network A on network B

class24.ppt – 18 – CS 213 S’00


Internetworking with application
gateways: Pros and cons
Pros
• Heterogeneous
– can connect different types of networks
• Simple
– modems + gateway software
Cons
• Not general-purpose
– each solution is application-specific

class24.ppt – 19 – CS 213 S’00


Internetworking with routers
Def: An internetwork (internet for short) is an arbitrary
collection of physical networks interconnected by
routers to provide some sort of host-to-host packet
delivery service.

host
host host
host

internet
internet

host
host host
host

class24.ppt – 20 – CS 213 S’00


Building an internet

We start with two separate, unconnected computer networks (subnets),


which are at different locations, and possibly built by different vendors.

AA BB CC XX YY ZZ

adapter
adapter adapter
adapter adapter
adapter adapter
adapter adapter
adapter adapter
adapter
Ethernet ATM
network 1 (SCS) network 2 (ECE)

Question: How to present the illusion of one network?

class24.ppt – 21 – CS 213 S’00


Building an internet (cont)

Next we physically connect one of the computers, called a router


(in this case computer C), to each of the networks.

AA BB CC(router)
(router) XX YY ZZ

adapter
adapter adapter
adapter adapter
adapter adapter
adapter adapter
adapter adapter
adapter adapter
adapter

network 1 (SCS) network 2 (ECE)

class24.ppt – 22 – CS 213 S’00


Building an internet (cont)

Finally, we run a software implementation of the Internet Protocol (IP)


on each host and router. IP provides a global name space for the
hosts, routing messages between network1 and network 2 if
necessary.

128.2.250.0
IP addresses: 128.2.250.1 128.2.250.2 128.2.80.0 128.2.80.1 128.2.80.2 128.2.80.3

AA BB CC(router)
(router) XX YY ZZ

adapter
adapter adapter
adapter adapter
adapter adapter
adapter adapter
adapter adapter
adapter adapter
adapter

network 1 (SCS) network 2 (ECE)

class24.ppt – 23 – CS 213 S’00


Building an internet (cont)
At this point we have an internet consisting of 6 computers built from
2 original networks. Each computer on our internet can communicate
with any other computer. IP provides the illusion that there is just
one network.

128.2.250.1 128.2.80.1
128.2.80.1
128.2.250.1

internet
internet
128.2.250.2 128.2.80.2
128.2.250.2 128.2.80.2

128.2.80.3
128.2.80.3

128.2.250.0
128.2.250.0
128.2.80.3
128.2.80.3

class24.ppt – 24 – CS 213 S’00


Internetworking with routers

Telnet, FTP,
HTTP, email application application

transport transport

IP network network

CSMA/CD data link data link

10Base-T physical physical

Host on Router Host on


network A (forwards IP packets) network B

class24.ppt – 25 – CS 213 S’00


IP: Internetworking with routers

IP is the most successful Many different kinds


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

class24.ppt – 26 – CS 213 S’00


Internet protocol stack
Berkeley sockets interface

User
Userapplication
applicationprogram
program(FTP,
(FTP,Telnet,
Telnet,WWW,
WWW,email)
email)
Reliable
Unreliable User
best effort Userdatagram
datagramprotocol
protocol Transmission
Transmissioncontrol
control byte stream
(UDP)
(UDP) protocol
protocol(TCP)
(TCP) delivery
datagram (process-
delivery Internet process)
(process- InternetProtocol
Protocol(IP)
(IP)
process)
Network
Networkinterface
interface(ethernet)
(ethernet)
Unreliable
best effort
hardware Physical
datagram hardware
connection
delivery
(host-host)

class24.ppt – 27 – CS 213 S’00


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

class24.ppt – 28 – CS 213 S’00


IP datagram delivery:
Example internet

Network 1 (Ethernet)
H1 H2 H3
H7 R3 H8
Network 2
(Ethernet) R1 Network 4
R2
(Point-to-point)

Network 3 (FDDI)

H4 H5 H6

class24.ppt – 29 – CS 213 S’00


IP layering
Protocol layers used to connect host H1 to host H8 in example internet.

H1 R1 R2 R3 H8

TCP TCP

IP IP IP IP IP

ETH ETH FDDI FDDI P2P P2P ETH ETH

class24.ppt – 30 – CS 213 S’00


Encapsulating IP datagrams in Ethernet

IP
IPdatagram
datagram IP datagram
IP
IPdatagram
datagramdata
data
header
header

Ethernet
Ethernetframe
frame IP
IPdatagram
datagram Ethernet frame
IP
IPdatagram
datagramdata
data
header
header header
header

The same idea is used for other types of physical networks

class24.ppt – 31 – CS 213 S’00


IP packet
0 4
Ver Hlen
8
TOS
16 19
Length
format31

Datagram ID Flags Offset


VER IP version
TTL Protocol Checksum HL Header length (in 32-bit words)
TOS Type of service (unused)
Source IP address Length Datagram length (max 64K B)
ID Unique datagram identifier
Destination IP address Flags xxM (more fragmented packets)
Offset Fragment offset
Options (variable) TTL Time to Live
Protocol Higher level protocol (e.g., TCP)

Data

class24.ppt – 32 – CS 213 S’00


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

class24.ppt – 33 – CS 213 S’00


Fragmentation
H1 R1 example
R2 R3 H8

TCP TCP

IP IP IP IP IP

ETH ETH FDDI FDDI P2P P2P ETH ETH

ETH IP 1400 FDDI IP 1400 P2P IP 512 ETH IP 512

P2P IP 512 ETH IP 512

P2P IP 376 ETH IP 376

MTU=1500 MTU=4500 MTU=532 MTU=1500


class24.ppt – 34 – CS 213 S’00
Fragmentation example (cont)
start of header
ident=x m=1 offset=0
First packet
rest of header
512 data bytes

start of header
ident=x m=1 offset=512
Second packet
rest of header
512 data bytes

start of header
ident=x m=0 offset=1024
rest of header
Third packet

376 data bytes


class24.ppt – 35 – CS 213 S’00
Internet
IP address I(h).
addresses
Each host h has a physical address P(h) and a unique

IP addresses contain a network part and a host part:

3 main classes of addresses:


012 8 16 24 31
0 network(7) host (24) Class A (128 nets, 16 M hosts/net)

10 network (14) host (16) Class B (16 K nets, 65 K hosts/net)

110 network (21) host (8) Class C (2 M nets, 256 hosts/net)

Note: this simple A, B, C scheme has been largely replaced by


the CIDR (classless interdomain routing) technique allows for
variable bit length network numbers.
class24.ppt – 36 – CS 213 S’00
Example Internet
addresses
Host IP Number Class Network
cs.cmu.edu 128.2.222.173 B 0x0002
cmu.edu 128.2.35.186 B 0x0000
cs.stanford.edu 171.64.64.64 B 0x2640
att.com 192.128.133.151 C 0x008085

01234 8 16 24 31

0 network host Class A

10 network host Class B

110 network host Class C

class24.ppt – 37 – CS 213 S’00

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy