CPSC 463 Networks and Distributed Processing

advertisement
CPSC 463
Networks and Distributed
Processing
Willis F. Marti
1
Course Overview
Syllabus/policy {handout}
Schedule {handout}
Comments on Term Project
Course Objectives
...
Opinions and Facts
2
Class Admin
• Test taking
• Attendance & Job Searches
• Sympathy
3
Project
Purpose
Task
Network Design
Approach {customer/boss/professor}
Teams {preferred size is 4 or 5}
4
Course Objectives
• Science
• Understand what a network is, especially
in the context of distributed systems
• Learn a good model for investigating
networks
• Learn some network programming
• Engineering • Identify (some) real world components
• How networks are built
• Attitude
• Understand there’s more than one correct
solution
• Understand “the map is not the territory”.
5
Why Study Networks
• When computers were rare, we studied all the new facets
of computers: operating systems, languages, ... As
computers became common, we added the fields that
have become computer engineering. Now that computers
are ubitquitous, we add the study of how best for them to
communicate: networking.
• A network is part of a distributed system. Part of computer
science (and computer engineering) is learning how to
build all the components.
• What is a network? Surprisingly, few people will give you a
definition that always fits.
• How will we study networks? There are several methods...
6
Is this a Distributed System?
Just insert a
network?
Mass
Storage
Computing
(CPU)
User
Interface
7
Distributed System (!)
This represents our definition of a distributed system,
focusing on delivery of services to end users. We will
explore this more after we understand more about
networks.
Services
Servers (Storage, Compute)
Network
Users
Users
User Interfaces
8
Network Definition
"A network is a collection of media, devices and
protocols used to facilitate the exchange of information
between computing devices in a manner relatively
transparent to the end user."
Contrast:
The Telephone Company (TELCO) & networks.:
{network as a collection of media without regard to applications}
9
Still Defining a Network
• An ordered collection
• of media, devices and protocols
• used to facilitate the exchange of information
• between computing devices
• in a manner relatively transparent
• to the end user."
10
Another Definition
• LAN vs WAN vs MAN vs CAN ...
Geography
11
Another Definition, cont.
• LAN - Local Area Network
• WAN - Wide Area Network
• MAN - Metropolitan Area Network
• CAN - A metal container
12
LAN vs MAN vs WAN
• Historical Def’n {physical proximity}
• Advance of Technology changes definitions
• Modern Definitions
Total Travel Time
LAN:
Data Transmission Time
Total Travel Time
Data Transmission Time
13
<= .01 to .05
LAN -- Key Points
• Historically, LANs meant fast speed.
– Fast speeds meant short(er) distances.
– Therefore LANs became defined by local {short}
distances
• the REAL key points
– Travel time about 1 to 5% of total time
– LANs ‘tend’ to use broadcast protocols; WANs ‘tend’ to
be point-to-point
14
Studying Networking
•
•
•
•
by protocols & programs ...
by technology ...
by components ...
Layered Models of a System!
“The key to understanding networks is the idea
of layered architectures.”
15
Layered Architectures
-Principles-
 Clearly
Defined Interfaces
 Separation of Functions
 Peer to Peer Protocols
 Provide Services Up,
 Request Services Down
16
Layering
Message
Message
TRANSPORT
Packets
Pkts
Packets
Pkts
NETWORK
10010111001
{Bits}
LINK
PHYSICAL
{Signal}
17
10010111001
{Bits}
Packet Formats
Stream
Packets
Application “Header”
Data
Presentation “Header”
Data
Session Header (?)
Data
Transport Header
Network Header
Link Header
Data
Data
Data
Framing
Data
18
Protocols and Services
<some function>
This:
or
this...
or
this...?
19
Protocols and Services
-a better model
n+1
n+1
n
n
n-1
n-1
20
Which Architecture to Study?
•
•
•
•
•
TCP/IP {Internet suite}
SNA
Novell
IEEE
OSI Reference Model
21
Network Models
Standards & Committees
ANSI
IEEE {most important for LANs}
EIA
ISO {does more than just data standards}
ITU-T {international PTT oriented. Formerly CCITT}
etc
Standards & Users {cost, flexibility}
Purpose of the Open Systems Interconnection Model
{remember, it's just a model}
22
Using Models for Understanding
Models are created by extracting key features, functions
and information from a specific domain of interest so
that the model contains essential attributes for
understanding. Road maps are models. We extract
positions of towns and cities and the roads that
connect them. We ignore most terrain or reduce it to
color. Road maps are good for planning trips by car but
relatively useless for determining where to drill for oil. A
key part of building a good model is ensuring that all
features of interest are included, but only those. When
using a model (network or otherwise), remember the
limitation: "The map is not the territory."
23
IEEE 802 Protocols
• .1 - Management
– .1d - Bridge Spanning Tree
•
•
•
•
•
•
.2 - Link Layer
.3 - CSMA/CD [Ethernet]
.4 - Token Bus
.5 - Token Ring
.6 - DQDB
.7 - MAN
24
(Partial) TCP/IP Stack
FTP
TELNET
DNS
TCP
UDP
IP
ICMP
ARP
DIX Ethernet or ...
25
Why the OSI Reference Model?
• OSI RM is not the ISO protocol(s)
• Not tied to any specific protocol suite
• ‘Clean’ start
• Completeness
26
Example: OSI & the Internet
Application
NFS
Presentation
XDR
Session
RPC
Transport
UDP
Network
IP
Data/Link
DIX Ethernet
Physical
IEEE 802.3
27
The OSI
Model
{remember,
enveloping at each layer}
Application
7
Presentation
6
Session
5
Transport
4
Network
3
Data/Link
2
Physical
1
28
OSI Reference Model
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Data/Link
Data/Link
Physical
Physical
{Each layer communicates with its peer by using the services of the
layer just below, and provides services to the layer above. Only the
physical layer has an actual connection}
29
OSI Model, cont
{there can be multiple, separate entities at each layer}
Application
Application
Presentation
Presentation
Session
Session
Gateway
Transport
Transport
Router
Network
Network
Bridge
Data/Link
Physical
Data/Link
Repeater
30
Physical
Physical Layer
• Converts Bits -> Signals & sends signals across the media
• Recovers Bits from incoming Signal
Key Aspects of Physical layer specifications:
• Signaling Method
• Connectors
• Media
• Voltages/Power Levels
Media Considered -- Optical Fiber, Broadband Coax, baseband coax, UTP
Media not Considered -- Radio/Microwave/Satellite
31
Data/Link Layer
• Gets bits from A to B along a (logically) single physical link
• Provides addressing and error detection.
• OSI model talks about error recovery -- not usually implemented in LANs,
and only in some point-to-point networks (X.25 best example)
• Why no error recovery? In the case of an error in the packet, where did it
come from and where was it really addressed to...
32
Data/Link Layer
• Gets bits from A to B along a (logically) single physical link
• Provides addressing and error detection.
• OSI model talks about error recovery -- not usually implemented in LANs,
and only in some point-to-point networks (X.25 best example)
• Why no error recovery? In the case of an error in the packet, where did it
come from and where was it really addressed to...
33
Network Layer
• End-to-end packets (each system on the network has a network address
BUT
each packet (is)(may be) treated separately
• This layer is supposed to hide all the messiness of differing link and
physical layer requirements from the upper layers
34
Transport Layer
• End-to-end messages
Usually provides reliable, sequenced byte stream to upper layers.
Does error recovery.
• There are options for non-guaranteed transport
35
Session Layer
• Control layer
• Manages 'sessions'
36
Presentation Layer
• Provides information transform services
-> translation
->encryption
->compression
37
Application Layer
TCP/IP
ISO
email
SMTP
X.400
file transfer
FTP
FTAM
remote terminal/access
TELNET
VTS
38
Basic Network Concepts
Circuit switching - {basic TELCO service.
Guaranteed response
because resources are guaranteed. Inefficient for some applications}
Virtual-circuit packet-switching - {divide the info into packets to
multiplex}
Datagram packet-switching - {like the US Mail....}
Connectionless vs Connection-oriented
{At the Link layer, do we do acknowledgements? At the network layer,do
all the packets have to follow the same route?}
Multiplexing - {single media, multiple independent 'circuits'}
{putting multiple 'sessions' on a single media}
39
Terminology
•
•
•
•
•
SAP -- Service Access Point {see Fig 1-9}
Connection Oriented
Connectionless
Datagram
Primitives
40
Modulation
"Modification of a transmitted signal to encode information (bits)"
ASK - Amplitude Shift Keying {varying signal strength}
FSK - Frequency Shift Keying {varying signal frequency}
PSK - Phase Shift Keying {don't ask!}
{NB the above three methods are usually applied to signal carriers}
PCM/PWM - Pulse Code Modulation/ Pulse Width Modulation
{good for fiber}
Others
41
Switching
• Circuit Switching
– Guaranteed resource
– No size limit on information sent
• Packet Switching - Divides the information into packets;
restricts sizes; also sharing of resources
– Virtual Circuit // Connect-oriented
– Datagram // Connection-less
42
Multiplexing
TDM - {time division multiplexing}
{low overhead, inefficient}
FDM - {frequency division multiplexing}
STDM - { statistical time division multiplexing}
{some overhead, more efficient, may FAIL}
43
Multiplexing Examples
2400
TDM
A
B
C
D
2400
2400
BADCBADCBADCBAD
9600
A
B
C
D
STDM
BACACBDCBDBABBD
4800
44
2400
FDM
45
Multiplexing w/ Packets
Like STDM, except NO "ROUND ROBIN"
46
Physical Layer Issues
• Theoretical Underpinning
– or, Bandwidth 101
• Media Characteristics
–
–
–
–
Optical Fiber
Coax
Copper Wire (Twisted Pair)
Wireless
• Other Useful Ideas
47
Signals
• Propagation - {how fast does the signal travel in that media,
esp. compared to light?}
• Frequency - {number of oscillations per second of the
electromagnetic field of the signal}
• Bandwidth - {the width/size, in Hz, of the signal -- usually
defined by where most of the energy is}
• Data Rate - {the number of bits per second.
Distinct from, but
related to, frequency and bandwidth}
• Baud - {Changes per second in the signal. Limited by
bandwidth.}
48
Freq/BW/DR
BW
Power
FREQ
Frequency
{see Fig 2-1}
49
Maximum Data Rates
• Nyquist:
– DataRate <= 2*BandWidth * log2 V
where ‘V’ is the number of values which are encoded into
the signal. In the On/Off, 0/1 world, V = 2. Your highspeed
modem has V = 16.
• Shannon:
– The real world is noisy, so Nyquist was an optimist.
• Marti:
– Complexity costs money and adds fragility.
So be choosy.
DR ~ 2 * BW {Max by Theory}
DR ~ 1/2 * BW {Practical}
50
<- In an On/Off world
(V = 2)
Physical Effects
Bandwidth Limits - {Signals consist of many (infinite) different
sine waves, not all of which can be carried by the media}
Dispersion - {Particularly for multimode fiber, different parts of the
signal may move at different speeds, thus changing the shape of
the signal at the receiver}
Jitter - {Imperfect clock synchronization along the transmission path}
Noise - {Unwanted, external energy that may corrupt the signal}
51
Framing & Synchronization
{Here synchronization refers to the sender's and receiver's clocks}
{Frames are packets added signal needed to transmit them on Physical Layer}
Synchronous - Sender and receiver somehow share a common clock.
good for longer runs of data; more efficient but requires the clock signal
somehow be sent along with the data
Asynchronous - Sender and receiver use different clocks so data runs
have to be shorter. Doesn't require the extra clock signal
Synchronous vs Asynchronous - Framing & clocks
Isochronous vs Aperiodic - Characteristics of traffic {beware of
confusion as each writer may mix terms}
52
Specific Framing
Bit Stuffing - Used to ensure special framing and/or control
characters are not sent in the data. A problem because the 'clock' is
usually continuous but data may not be there, so we have to know when
the line is idle and when a frame starts {frame delimiter}
Manchester Encoding - Example of combining clock with data to
form a single signal -- no separate line is required. It does require twice
the bandwidth of the original signal
53
Manchester
Encoding
Ensures for each bit there is a clock transition. Data values (0 or 1)
are encoded by positive or negative clock transitions in the middle of
the bit time. Transitions are made at bit edges if needed so that the
correct transition can be made in the middle of the bit.
54
Media
• Optical Fiber {pg 87}
Multimode
Single Mode
• Coax {pg 84,85}
Broadband
Baseband
• Twisted Pair {pg 83}
Shielded
Unshielded
55
Cost and Performance
Media Types:
UTP
Coax
Baseband
Broadband
Increasing
Bandwidth
Increasing
Cost
Fiber
Multimode
Single Mode
But remember, cost includes
--material
Biggest part of installation cost
--LABOR
--electronics
56
Distances
Media Types:
UTP
Typically 100m +/-
Coax
Baseband
Broadband
200m-500m
up to 40km
Fiber
Multimode
Single Mode
depends on power budget;
can be 100s of km*
* Most LANs use 2km between devices
57
Fiber Facts
Core
Cladding
Protective Coating
Core Cladding
50
125
Multimode (microns)
62.5
125
"
"
8 to 10 n/a
Singlemode
58
Fiber Facts,
cont.
Modes == Different paths thru core
"photons"
Since the photons travel at the same speed, but for different distances,
the energy is spread out, or dispersed, at the receiver
Fiber is specified as XX Mhz-km. So a specification of 800Mhz-km
means you could have a bandwidth of 400Mhz over a 2km distance
or 1.6Ghz over a 0.5km distance.
Dispersion has two components: modal and material
59
Traditional Baseband
Transceiver
Coax
Terminator
Transceiver Cable
Host
60
CATV Systems
Headend
Translator
"Forward" Signal
"Return" Signal
Splitter
Amplifier
Network
Interface
Unit
61
Twisted Pair
• Just copper wire where each two wires
(“pairs”) have been twisted around each other
in the cable. {Phone wire}
• Rejects common mode noise
• Minimizes antenna characteristics
• Shielded or Unshielded refers to a ground
sheath around the whole cable.
• Cat 3 vs Cat 4 vs Cat 5
62
Physical Design Ideas
Distribution
Backbone
Daisy Chain
Home Run
Riser Systems
63
Bus
Wireless Overview
• Radio
– Mobile
– Cellular
• Microwave
• Satellite
• Infrared/Laser
64
TELCO Architecture
Trunks
CO
CO
Users
CO
Users
CO
Users
Users
65
TELCO Trunking
Older, Analog World: Frequency Multiplexing
Current World: Digitizing & Time Multiplexing
66
ISDN
Integrated Services Digital Network
"Think of defining ISDN by looking at the two pairs of words"
BRI • 2B+D
Basic Rate Interface
B = 64kbps each
D = 16kbp for TELCO signaling
PRI • 23B+D
BISDN: So fast it seems like broadband!
67
ISDN Nets
Definition points
AT&T
GTE
"User"
68
Data/Link Layer Issues
• Protocol & Services
• Topology
• Error Detection & Recovery
69
Topology vs Geography
Logical Layout
Physical Layout
"How devices talk to
each other" -or"How devices hear
each other"
How the signal
actually travels
70
Topologies
Bus
Star
Ring
Mesh
71
BUS
• Every
node hears every other node's transmission
directly.
72
Ring
• Series of unidirectional point-to-point links
without "store & forward", usually with a bypass
ability.
73
Star
• Switching functions all in central node
74
Mesh
• Each node independently routes over
(bi-directional) point-to-point links.
75
IEEE & OSI
LLC
2
MAC
1
PHY
LLC = Logical Link Control
MAC = Media Access Control
PHY = Physical
76
Link/Physical Layer Standards
• Ethernet
– 10BASET, Fast Ethernet, Gigabit Ethernet
• Token Ring
– 4/16MB
• FDDI
• ATM
77
Ethernet & IEEE 802.3
What the IEEE standard covers- Physical layer and
interface to the link layer. IEEE 802.2 is the Link layer standard.
History- DEC/Intel/Xerox came up with it, then submitted to
IEEE for standardization. Some changes were made so
Ethernet is not identical to IEEE 802.3
Differences between Ethernet and 802.3
There are some electrical and connector differences; most
equipment uses IEEE 802.3.
There is difference in the header. DIX uses TYPE, 802.3
uses LENGTH. SInce the frame is limited in size, the two coexist.
Most people use the DIX format.
78
Ethernet
• Work started back in 1973 by Bob Metcalfe and David Boggs from
Xerox Palo Alto Research Center (PARC).
– He studied the Aloha network and "fixed" the mathematics.
• Experimental Ethernet implemented in 1975.
• Cooperative effort between Digital, Intel, and Xerox produced
Ethernet Version 1.0 in 1980.
– This also became known as the Blue Book specification or DIX
standard. Ethernet V2.0 adopted in 1982.
• Ethernet was adopted with modifications by the standards
committees IEEE 802.3 and ANSI 8802/3.
• Ethernet allows for only connectionless communication.
79
CSMA/CD
"Carrier Sense/Multiple Access
with Collision Detection"
"Driving in Boston"
BUS!
51.2 microseconds
"Many stations; Listen before talking; listen while talking; if a collision,
backoff and try again"
80
Normal Ethernet Operation
B
C
Address mismatch
packet discarded
Address mismatch
packet discarded
Send data
to node D
A
Address match
packet processed
Transmitted packet seen
by all stations on the LAN
(broadcast medium)
Data
81
D
Ethernet Collisions
B
C
Collision
Data transmission
for C
Data transmission for A
A
D
82
CSMA/CD - A Simple Definition
• A network station wishing to transmit will first check the cable
plant to ensure that no other station is currently transmitting
(CARRIER SENSE).
• The communications medium is one cable, therefore, it does allow
multiple stations access to it with all being able to transmit and
receive on the same cable (MULTIPLE ACCESS).
• Error detection is implemented throughout the use of a station
"listening" while it is transmitting its data.
• Two or more stations transmitting causes a collision
(COLLISION DETECTION)
• A jam signal is transmitted to network by the transmitting
stations that detected the collision, to ensure that all
stations know of the collision. All stations will "backoff"
for a random time.
• Detection and retransmission is accomplished in
microseconds.
83
Frame/Packet Format
Preamble SFD Dst Src Type
Size
7
(octets)
1
6
6
2
Data/Pad FCS
46-1500
4
In IEEE 802.3, the Type field is used as a Length field.
Addresses are generally (3) octets vendor code, (3) octets device number.
84
Ethernet
Addressing
Each station recognizes three classes of addresses.
• Own address
• Broadcast address (all 1's)
• Optionally, one or more multicast addresses
Major reason for broadcast is address discovery.
Multicast addresses are used for specialized link
layer functions.
85
Ethernet Cable Names
Name
Wire Type
IEEE Name
Standard Number
Other names
Thick coaxial
Thin coaxial
Unshielded Twisted Pair
RG-8
22 - 26 AWG
10BASE5
RG-58
10BASE2
10BASET
10BASEF
IEEE 802.3
IEEE 802.3a
IEEE 802.3i
N/A
Thick net
Thin net
UTP
86
Fiber
62.5/125 micron
Thick Coax Makeup
Thick braid for EMI
Foil
Thin braid for EMI
Thin foil bonded to insulation
Center conductor of tin plated
solid copper conductor
Jacket of PVC or Teflon
Teflon is used for
fire code regulations
87
Thick Coaxial Connection
500 meter maximum cable run
Black marks
every 2.5 meters
to show transceiver
placement
Transceiver
cable
Transceiver
Pierce clamp
88
Transceivers
• Transmitter/Receiver: AUI on one side, media on the other
• Used on all Ethernet networks and is the device that allows data to
flow between the controller card and the network.
• Detects errors on the bus cable plant and reports them to the
station's controller card.
• For thick coaxial cable, the transceiver is external to the controller
card and attaches directly to the thick coaxial cable via a special
cable known as the transceiver cable.
• External transceivers have a SQE function that enables the controller
to determine the status of the transceiver.
• Usually has status indicators (LEDs) physically located on it to
indicate the state of the transceiver (transmitting, receiving, collision,
and power.)
89
Thin Coaxial Cable Makeup
Polyethylene foam
Jacket made of PVC or Teflon
Tinned copper wire
EMI braided shielding
90
Thin Coaxial Connection
Concatenation of network attachments
Direct
connection
to card
T connector
BNC connector at each cable end
91
Thin Coaxial Connection (cont.)
On-board
transceiver logic
AUI connector
ASIC
T connector for connection
to cable plant
02608C
BNC
connector
Interface to computer
bus
92
UTP Makeup
• UTP was standardized by the IEEE 802.3 committee
in October of 1990.
• Standardized by the EIA under TIA 568A.
• UTP for LANs is now classified as:
–Category 3 - used for LANs up to 10 Mbps.
–Category 4 - used for LANs up to 16 Mbps.
–Category 5 - used for LANs up to 100 Mbps.
• Cable is made up of 8 strands of 24 AWG wire.
– Only 2 pair are used for single 10BASET connection.
93
Unshielded Twisted Pair
Repeater unit
required
Unshielded twisted
pair cable
100m max cable run
Straight through pins 1, 2, 3 and 6
Unshielded twisted pair
atleast two (2) twists per foot
RJ-45
Connector
8 pin
RJ-45
connector
8 pin
94
Concentrator (Hub) Management
• With the concentration of the wiring into a common point, network managers can manage the hub
with specialized software.
• Network management software resides not only in the concentrator but on an external
workstation’s device (a PC, for example).
– The workstation can query the concentrator for information.
• Concentrators also allow the control of individual ports.
• This software allows managers to extract information from each card that is inserted in the
repeater. You could query the hub for statistics such as:
– number of packets (bytes),
– number of collisions (single and multiple),
– number of framing errors,
– number of time the particular card de-inserted itself from the network,
– ability to turn on/off any repeater card in the hub, and
– all information is time and date stamped.
• With 10BASET, all information is provided on an individual-connection basis, giving a manager
information right from the desktop.
95
Ethernet Repeaters
• Extend the network by interconnecting multiple segments
– Extend the physical domain of the network
• Governed by the IEEE 802.3c working group standard.
– This governs the electrical specifications of a repeater.
– The physical configurations of a repeater varied from vendor to
vendor.
• Some repeaters contain the intelligence to:
– detect collisions per cable plant (will not repeat collision
fragments to other cable plants).
– de-insert themselves from a wiring concentrator (when there are
excessive errors on the cable plant).
– submit network management information to a central controller.
• Repeaters have been transformed into wiring concentrators or hubs
• Repeaters can be used to interconnect different wiring types but not
different access methods (i.e., not Token Ring to Ethernet).
96
IEEE802.3 Efficiency
"WARNING: Opinion"
% Utilization
Status
0 - 10
Great!
10 - 40
OK
40 - 60
60+
Performance Problems -- look at it
RIP
Signal
On
"Utilization"
Time
97
Token Ring - IEEE 802.5
What the IEEE standard covers
"Physical layer standard (gives link layer format)"
History
Essentially an IBM standard 'given' to the industry"
Differences between 802.5 and 802.3
"Guaranteed response
Priorities
Controlled delays"
98
Token Ring History
• Presented by IBM in 1982 to IEEE 802 committee.
• First prototype developed in 1983 in Geneva,
Switzerland.
• Cabling System was announced in 1984.
• Officially announced in 1985.
• Standardized by IEEE in 1985.
• Only one adopted by the IEEE 802.5 committee.
99
Token Ring Technology Summary
• Access method by which network attachments gain access to the cable plant
by acquiring a special frame called the token. {Token is a special 24-bit pattern that
continuously circulates the ring.}
• Token Ring is a broadcast medium. {To receive data, a destination station performs an
address match.}
• The destination station merely copies the frame as it repeats it back to the
ring.
• When the frame arrives back to the source station, it strips the frame from the
ring and then releases the token (4 megabit operation only).
» The token is allowed to be released prior to frame reception on 16-megabit
rings.
• Token Ring originally ran at 4 Mbps. Upgraded in 1989 to 16 Mbps
• Maximum frame size for 4 Mbps is 4472.
– This is based only on the fact a station cannot hold the token longer than
10 milliseconds.
• Maximum frame size for 16 Mbps is 17,800.
100
TRN Features
"data rate of 4 or 16Mbps"
Traffic usually (always in 802.5) unidirectional
"one frame on the net at a time..."
RAR (802.5) vs RAT (FDDI) for Token Passing
Recovery from lost token
Priorities
Frame Structure
101
Controller Attachment to a MAU
The IBM 8228 MAU
Shielded or UTP cable
Lobe cables
102
Cable Connectors
Hermaphroditic or RJ-45
connectors on MAU
DB-9 connector
MAU
Token Ring controller
Media filter
for UTP only
RJ-11 or RJ-45
connector
Media filter
can be on-board
103
Multiple MAU Connection
Ring out
MAU
Ring in
Ring out
MAU
Ring in
Ring out
MAU
Ring in
Type 6 patch cables
104
MAU Operation
Lobe cables
Relays
Closed
Closed
MAU top view
Ring in
MAU bus
All stations are active
105
Closed
Ring out
MAU Operation (Inactive Station)
Lobe cables
Relays
Closed
Closed
Closed
MAU top view
Ring out
Ring in
MAU bus
Inactive station
106
Token Ring Cable Types
• Type 1
– A shielded data grade cable with two solid wire twisted pairs.
– Available in indoor and outdoor versions.
• Type 2
– A Type 1 indoor cable with four solid twisted pairs of 24 AWG wire.
– Contains four voice grade wires along with four data grade wires.
• Type 3
– Unused existing telephone wire or EIA category 3 wire (4 Mbps operation).
– Category 4 is needed for 16 Mbps (speed of the Token Ring) operation.
– Must use a special media filter.
• Type 5
– 100/140 micron fiber cable used for fiber optic repeater links.
• Type 6
– Often used for patch cables.
» Patch cables can be used for MAU-to-MAU connection or from a wall outlet to a
network attachment.
107
Type 3 Media Filter
• Type 3 cable requires a device known as a media filter.
• Its purpose is to filter out any unwanted signals.
• It is a small rectangular device that is usually part of the UTP cable
itself.
• It can be a separate device that attaches to the UTP cable at the end
of the cable that attaches to the controller card.
• It can be used on 16- or 4-mb Token Rings.
• It is only used with Type 3 (UTP) cable.
108
802.5 Framing
• IEEE 802.5 uses special characters, but does
not use bit stuffing!
Manchester
“1” bit
“0” bit
Violations!
109
Token Ring Frames
Physical header
SD
AC
FC
no preset size
DA
Routing
Information
Fields
SA
MAC or LLC Frame
Token frame
SD
AC
ED
1 byte 1 byte 1 byte
Abort frame
SD
1 byte
ED
1 byte
110
IEEE
802.2
Data
Physical trailer
FCS
ED
FS
Token Ring Frame Field Definitions
no preset size
SD
1 byte
AC
FC
1 byte
1 byte
DA
6 bytes
SA
6 bytes
Routing
Information
Fields
IEEE
802.2
FCS
SSAP
Control
Legend
1 byte
SD - Starting Delimiter
AC - Access Control
FC - Frame Control
DA - Destination Address
SA - Source Address
FCS - Frame Control Sequence
ED - Ending Delimiter
FS - Frame Status
111
ED
FS
4 bytes 1 byte 1 byte
<= 18 bytes
DSAP
Data
1 byte
1 or 2 bytes
The SD and the AC
Fields
Field
Bit 0
SD
Bit 7
JK0JK000
PPP - priority bits
AC
PPPTMRRR
T - Token bit
M - Monitor bit
RRR - Reservation bits
112
The FC, ED, and FS Fields
Field
FC
Bit 0
Bit 7
FFrrZZZZ
FF - indicates a MAC or
LLC frame.
ZZZZ - indicates the type of
MAC frame.
I - Intermediate bit
ED
JK1JK1IE
E - Error bit
A - Address recognized bits
FS
ACr rACrr
C - Frame copied bits
113
Bit Order Transmission
for Token Ring
• Bit 0 is the first bit transmitted.
– Bit 0 is the left most bit of the byte.
» Unlike Ethernet, the bits in the bytes are not reversed as they are
transmitted.
• Example:
– 40-00-12 are the first three bytes of a MAC address.
» Translated to binary:
01000000-00000000-00010010
» As transmitted on a Token Ring:
01000000-00000000-00010010
» Compared to Ethernet transmission:
00000010-00000000-01001000
114
Token Passing Policies (Defn)
• Multiple Token
– RAT (FDDI): free token is appended to tail of last packet
• Single Token
– ?: Token is released upon receipt of leading edge of own
packet
• Single Packet
– RAR (802.5):Token is released upon receipt of trailing
edge of own packet
115
Token Passing Policies (Usage)
• Multiple Token
– Allows multiple packets on the segment at one time.
Good when packet length is less than ring latency
• Single Token
– More efficient than RAR; when packet length is about the
same as ring latency
• Single Packet
– Least efficient, but allows controlling station knowledge
of (un)successful transfer before the token is released
(see pg. 224, 1st paragraph)
116
Token Passing Policies (Perf.)
• Multiple Token
– Always the best performer, but more complex
• Single Token
– Closer to RAR than RAT
• Single Packet
– ‘Worst’ performance
KEY POINT: Ratio of ring latency to packet length, a, is real
determiner of performance. For a << 1, RAR is OK.
117
Controller Operation - Phases 0 and 1
• Five-phase initialization
– Phase 0 - Lobe test
» The controller transmits frames between the controller card and the
cable attached between the controller card and the MAU.
» The controller tests to ensure that the lobe cable can successfully
transmit and receive frames.
– Phase 1 - Monitor Check
» Station inserts into the ring (flips the relay in the MAU) and looks for
special frames that are transmitted by the monitors.
» Sets a timer to wait for these frames.
» If the station does not receive any of the frames, the controller
assumes:
• it is the first ring station on the network,
• there is not an Active Monitor present, or
• inserting into the ring disrupted the ring.
• The controller may initiate the token claim process.
118
Controller Initialization Phases 2, 3, and 4
• Phase 2 - Duplicate address check.
– Checks to ensure that it can successfully transmit and receive a
frame and to detect other stations that might have the same MAC
address.
» The controller transmits a frame to itself.
» If the frame returns with the address recognized bit set, it
notifies one of the monitors and removes itself from the ring.
• Phase 3 - Participation in neighbor notification.
– The station transmits a special frame that will identify itself to its
downstream neighbor.
– The station should receive a similar frame for its upstream
neighbor.
• Phase 4 - Lan Network Manager Notification
– Notifies LAN Network Manager about its presence on the ring
119
Claim Token Process
• A ring cannot operate without a token circulating on the ring.
– There is only one token per ring.
• The token-claiming process allows one station to insert the token onto the ring.
– This station will be elected as the AM.
» It will purge the ring (ability to transmit a frame to itself).
» After purging the ring, it will insert a new token on the ring.
• The Token-Claim process can be started when the AM
– detects a loss of signal,
– a timer expires and it has not yet received its AM frame back, or the AM
– cannot receive enough of its own Purge Ring MAC frames.
• It can be started when the SM
– detects loss of signal or
– detects expiration of its timer for receiving SM frames.
120
Details of the Claim Token Process
• If there is no token on the ring, all activity will cease on the ring.
– The Active Monitor should be able to recover by purging the ring and issuing
a new Token.
– If the Active Monitor cannot recover, the token-claim process will begin.
• Any station will insert its master clock, a 24-bit delay, and start to transmit
Token-Claim frames.
– These frames are received by all stations on the ring.
– The station will follow these frames with idle (clock) signals.
– After transmitting the Token Claim frames, the station starts a timer.
» If it does not receive its frames or someone else’s claim frames, it will
beacon the ring.
• Once the process is started other stations may participate.
– Stations bid for the right to become the AM.
– The station with the highest priority (MAC address) wins.
– That station becomes the AM.
» It will purge the ring and insert a new token.
121
Claim Token Process Example
Detected condition
1
Token Claim
frames
Not
participating
2
Repeat frame
4
B transmits its own
Token Claim frames
C
D
B has higher
priority than A
B
A
Higher priority
than C. Does
not repeat C’s
3
A transmits its own
Token Claim frames
6
Stops transmitting
its own Claim frames
and repeats B’s
C
D
7
Repeats
B's Token
Claim frame
122
5
Continues
transmitting
its own
B
A
8
Stops transmitting its own
and repeats B’s claim frames
Token Ring Transmit Mode
• A station that needs to transmit receives the SD of approaching frame. This
station quits transmitting idles (clock signals).
• Checks for priority.
– If the priority in the frame is greater than the station's priority, then
» the station sets reservation bits and awaits new token.
• If the priority in the frame is less than or equal to the station’s priority then
– the station changes the T bit in the AC field from a 0 to a 1,
– appends its information to the rest of the frame and transmits the frame.
– If the end of its transmission is reached and it has not received its current
transmission back, the station
» transmits idle characters and awaits current transmission.
• When the station receives its frame back it will strip the frame and release the
token.
• The station enters normal repeat mode.
123
Token Ring Copy Mode
• The destination Token Ring controller recognizes its address in the
destination field of a received frame and copies the frame into its
buffer.
• If at any time an error is detected, the copy phase ends and the
controller sets the A and E bits and repeats the frame back to the ring.
• If no errors are found, the destination sets the A and C bits and repeats
the frame back to the ring.
• The destination station enters Normal Repeat mode.
• The frame travels on the ring until it reaches the originator and that
station strips the frame off of the ring and submits the token to the
ring.
124
Normal Repeat Mode
• A station in normal repeat mode checks current
frames and token for signalling errors.
– If any errors are found the station sets the E bit and repeats the
frame back to the ring.
• A station in this mode also checks every frame for
its address.
– A duplicate address could be found.
– If a duplicate address is found, the station will transmit a soft error
MAC frame to one of the monitors.
125
The Active Monitor (AM)
• Functional address is C00000000001.
• It must be present in order for the ring to function properly.
• The AM is the kingpin of the ring.
• The AM:
– tracks lost tokens and ensures that only one token exists on a single ring.
– monitors frames and priority tokens that circulate the ring more than once.
– initiates neighbor notification,
– provides a latency buffer to recover the clock signal and so that at least 24
bits (the size of the token) can be transmitted on the ring, and
– supplies the master clocking .
126
Token Recovery
• Monitor Station
– 1 station becomes responsible for monitoring the token
for token loss or token busy
• Time Outs
– Token time out (‘Beaconing’)
– No monitor (Claim frames (highest addr wins)
127
Options for Token Ring
• For 16 megabit rings, early token release allows a ring station to release the
token before receiving its original frame back.
– It is based on the ring length
» A station will not release the token when it is still transmitting its frame
and it has started to receive its frame back.
– Allows greater use of Token Ring bandwidth.
• Token Ring operates at 4 and 16 Mbps.
– 4 and 16 Mbps controllers are not allowed on the same ring.
» Ring will beacon when this condition occurs.
– To have 4 and 16 Mbps ring interoperate, you must use a data forwarding
device such as a bridge or a router.
• IBM is currently experimental with a new Token Ring controller which allow it
to operate between 52 - 100 Mbps.
128
Data Link Layer
Uses 'bit pipe' Physical Layer to send packets
Packet Formats - Generic: Framing (Layer 1), Addresses and
control information (layer 2), and data (info from layer 3 and up)
Point-to-Point vs Broadcast - Key idea is that not all
packet formats are alike. One needs to look at particluar technologies
to see what is needed.
129
Data Link Services
• Unacknowledged Connectionless Service
– Most LANs
– Upper layers handle error recovery
• Acknowledged Connectionless Service
– Odd duck. Example?
• Connection-oriented Service
– Reliable Delivery ...
130
Link Protocols
Used to provide reliability. Basic idea can be
used at any layer
Don't need to know details at this time, but know general operation
and that they provide assured delivery.
ABP
SRP
GoBack N
Windowing & Flow Control
131
Performance
• Overhead vs Frame Length
• Error rate (bit error vs block error)
• Physical Layer
– distance
– propagation delay
132
Error Control
Error Detection - Methods: Parity, Checksum, CRC -generically Frame Check Sequences
Error Correction - The basic idea is to add redundant information
so that the receiver can deocde the message even if some (specified)
number of bits are damaged (e.g., Hamming codes)
Error Recovery includes error correction but also includes actions taken
to get a message retransmitted
133
Connection Oriented Services
• Two modes of operation:
– Operational
– Non-operational
• Operational mode incorporates three functions:
– Link establishment.
» A source station sends a frame to a destination station
requesting a connection.
» The destination station may accept or reject the connection
request.
– Information transfer.
» Allows information to be transferred after a connection is
set up and the required handshaking has taken place.
» Reliable information is transferred between the two stations.
– Link termination.
» Either side of the connection may terminate the connection
at any time.
134
IEEE & OSI {again}
LLC
2
MAC
1
PHY
LLC = Logical Link Control
MAC = Media Access Control
PHY = Physical
135
IEEE 802.2 Fields
Bit 0
I/G D D D D D D D D
C/R S S S S S S S
Length of the Information field
is access method dependent
Destination
address
Source
address
DSAP
address
SSAP
address
1 byte
1 byte
Length
field
Control
1 or 2 bytes
IEEE 802.2 field
136
Information
CRC
SAP Types
•
E0 - Novell NetWare
•
F0 - NetBIOS
•
06 - TCP/IP
•
42 - Spanning Tree BPDU
•
FF - Global SAP
•
F4 - IBM Network Management
•
7F - ISO 802.2
•
00 - NULL LSAP
•
F8, FC - Remote Program Load
•
04, 05, 08, 0C - SNA
•
AA - SNAP
•
80 - XNS
•
FE - OSI
137
SubNetwork Access Protocol (SNAP)
• Most common implementation of LLC1 is from a subsection of the IEEE 802.2
standard known as SNAP.
• At the time of IEEE 802.2’s introduction, most network protocols were
designed to use the Ethernet packet format.
• SNAP allows for the migration of the standard network protocols to the IEEE
802.2 format.
• Supported by TCP/IP, NetWare, OSI, AppleTalk, and many other protocols.
• The second purpose for the SNAP protocol is to allow those protocols that do
not support the IEEE 802 standard to be able to traverse IEEE 802 LANs.
• SNAP uses a reserved SAP: AA (for both the DSAP and SSAP).
– It uses the unnumbered frame format: control field equal to 03.
– Actual SNAP header consumes 5 bytes:
» Three bytes for the Organizationally Unique Identifier (OUI) field, and
» Two bytes for an Ethernet Type field.
138
Protocol Discriminator
Destination
address
Source
address
Length
field
DSAP
SSAP
Control
AA
AA
03
139
SNAP
header
Data
OUI
Type
field
00-00-00
08-00
3 bytes
2 bytes
Pad
CRC-32
Protocol discriminator
Verification
• Finite State Machines
• Estelle & Other Languages
• Petri Nets
• Blind Faith (or, code it in C...)
140
Naming Conventions
{and Confusion}
Segment
Segment
Repeater
Link Layer Subnet
Bridge
Segment
Link Layer Network
Network Layer Subnet
Segment
Router
Network Layer Network
141
Naming Conventions {cont}
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Router
Data/Link
Data/Link
Bridge
Physical
Physical
Repeater
142
Intro to ATM
• Asynchronous Transfer Mode
• Text References
–
–
–
–
Sect 2.6
Sect 3.6.3
Sect 5.6
Sect 6.5
143
ATM Background
• Outgrowth of TELCO transition to integrated
services
• Only “real” >100Mbit standard
• Offers multiservice (voice video data)
potential
• Switched architecture familiar to TELCOs, not
to high speed data networks
144
What is ATM?
Application
Note: Tanenbaum considers
this more a network layer
technology.
Presentation
Session
Transport
Network
AAL
Data/Link
ATM
Physical
PL
145
ATM - A layered standard
AAL - ATM Adaptation Layer
• Assembles and disassembles broadband servicesinto
a stream of cells
• Each cell has a header that contains routing information
ATM - Asynchronous Transfer Mode
• Switches the cells around the network based on the routing
information in the header
Physical Layer
• Provides the physical transportation of cells across the
network
(Note: CCITT reference model, p. 63)
146
ATM - A Switched Architecture
• Cells (small, fixed length packets) are
switched in a connection-oriented manner
but not using circuits like today’s voice.
Switch
Switch
Edge
Device
Edge
Device
147
What is ATM Switching?
• Why small cells?
– (32+64)/2=48 + 5 header bytes
– Mixed Traffic
• Packet (random)vs Circuit (TDM) Switching
• Q.2931
– SVC, PVC
148
Physical Layer Options
• SONET (US)/ SDH (Europe)
• SMDS
• DQDB
• Speeds from DS3 on up! (45Mbs to Gbps)
• OC-3c => 155.52Mbps => 149.76Mbps
^ optical carrier
^ 3rd level in heirarchy
^ full duplex (two strands of fiber)
• Also OC-12c (622Mbps), OC-48c (2048Mbps)
[Look at the interesting way to frame cells]
149
ATM Adaptation Layer
(AAL)
• Classes of Service: 1, 2, 3/4, 5
1: circuit emulation
2: variable bit rate service
3/4: connection oriented data service
5: connectionless data service
• SAR - Segmentation and Reassembly
• Convergence Sublayer
the miscellaneous category
150
ATM Cell
• ATM cells are constant size packets of 53 bytes size.
-- 48 bytes payload, 5 bytes header/overhead.
VPI
VPI
(8 bits wide)
VCI
VCI
VCI
Type Res CLP
HEC
151
VPI - Virtual Path ID
VCI - Virtual Channel ID
Type - Payload type
(internal)
Res - reserved
CLP- Cell loss priority
HEC- Header Error
Control
VCI/VPI Operation
• A Virtual Channel exists between two switching points
VCI = a
VCI = b
• A Virtual Path contains 'bundles' of VCs
152
ATM Switch Architecture
•
•
•
•
Crossbar
Banyan
TDM busses
Buffering
– Input
– Output
– Both?
153
ATM Protocols
• UNI, NNI
• Services
• “LAN” Stuff
154
ATM Services
•
•
•
•
CBR
VBR (RT, NRT)
UBR
ABR
155
ATM Quality of Service
•
•
•
•
•
QoS: A contract
Traffic Descriptors
Cell Rate Options (pg 462)
Traffic Shaping
Traffic Policing
156
ATM Congestion Control
•
•
•
•
Admission Policy
Reservation System
Rate Based Control
Other
157
ATM Flow Control
• The leaky bucket algorithm
• CLP in ATM header
• Frame Relay comparisons
158
Routing
•IISP (Interim Inter-switch Signaling Protocol)
•PNNI (Private Network-Network Interface)
•Phase 1
•Phase 2
159
IISP
• Interim
– Allowed multi-vendor interoperability before
completion of NNI
• Signaling
• Routing via manually configured NSAP
prefixes
160
PNNI
• Topology abstraction
• Peer group(group of nodes)
– One switch elected Peer Group Leader
– All nodes in group have identical view of group
• Hierarchy of logical groups
– Up to 105 levels of hierarchy
161
PNNI Routing
A12
A11
A22
A21
A13
B3
A23
B1
A2
A1
NSAP Domain
B2
B
B25
A12
A117
A2
A11
A13
162
B
View from A117 at A11
Sequence of Events
• A117 -> B25
• Forward to switch (A11)
– Switch knows topology of A1 group
– B reachable by A2 - A2 reachable by either A12 or A13
• DTL (Designated Transit List)
– [A12][A2][B]
– [A22][A23][B]
– [B2]
163
ATM “LAN” Stuff
• LAN == Link Layer Domain
• ELANs & VLANs
• LANE & MPOA
– LECS, LES, BUS
164
LANE v1
• LAN Emulation
• No QoS (Quality of Service) Support
• Uses AAL5 signaling
 optimized for data transport
 entire cell payload available for user data
• LEC - LAN Emulation Client
• LAN Emulation Service
 LECS - LAN Emulation Configuration Server
 LES - LAN Emulation Server
 BUS - Broadcast and Unknown Server
• STP (Spanning Tree Protocol) supported
165
LEC - LAN Emulation Client
• Software process on any ATM-connected LAN switch,
router, PC, or workstation
• Layer 2 process
• Prior knowledge of certain parameters
 LEC’s ATM address
 LAN type to be emulated
 maximum data frame size
 any route descriptors (for SR bridging)
 whether it is willing to proxy (respond to LE-ARP)
 LAN name - SNMPv2 display string
166
LECS - LAN Emulation
Configuration Server
• One per administrative domain
• Gives identity of ELAN (Emulated LAN)
• Returns ATM address of LES, type of LAN emulated,
and maximum PDU size of ELAN
• Controls which physical LANs are combined to form
VLANs (Virtual LAN)
• LECS address known via ILMI or its well-known NSAP
address
167
LES- LAN Emulation Server
• Adds LEC’s to ELAN
• Assigns LECID to joining LEC
• Table of address information of LEC
 MAC address
 proxy for MAC address
 Token Ring route descriptors
• LECs can communicate directly with each other only when
they are connected to the same LES
• Multiple LESs on the same physical ATM LAN
• Answers LE-ARP requests from LECs
168
BUS- Broadcast and Unknown
Server
• During address resolution LEC forwards all frames to the BUS
 floods frames to all LECs
 after address resolved flush protocol used to guarantee order of cells
• All multicast and broadcast traffic sent through BUS
• Traffic limited to 10 frames/second
• Intelligent BUS
 resolve destinations
 CLS- connectionless server
169
LANE Setup
170
Connections
• All SVC (switched virtual circuits)
• SVCs required:
 LECs and LECS
 LES and LECS
 Control Direct - LECs and LES
 pt-mpt Control Distribute - LES to LECs
 Multicast Send - LECs and BUS
 pt-mpt Multicast Forward - BUS to LECs
 Data Direct - LEC and LEC
• PVC (permanent virtual circuit) possible to connect LEC
and LECS
171
Virtual Channel Connections
LANE Server
(LES)
Control
Direct
VCC
Broadcast and
Unknown Server (BUS)
Control
Direct
VCC
LANE Client
(LEC)
Multicast
Send VCC
LANE Client
(LEC)
Multicast
Send VCC
LANE Client
(LEC)
Control
Distribute VCC
LANE Client
(LEC)
Multicast
Forward VCC
LAN Switch
Data Direct VCC
ATM Host
ATM Host
Configuration
Direct VCC
Configuration
Direct VCC
LANE
Configuration
Server (LECS)
172
LAN Switch
NHRP
•
•
•
•
Next Hop Resolution Protocol
Grew out of ATMARP
Only IP
Allows shortcut routes (pt-pt)
 direct VCCs across ATM network
• Address resolution across multiple IP networks
• If network unknown, request forwarded to other NHSs
(Next-hop Server)
 NHS with knowledge will forward response to source router
• Router must have ability to bypass default route
173
RSVP
• Resource Reservation Protocol
• Provides QoS (Quality of Service) guarantees
• Operates in simplex
 each direction has separate reservation
 maps well to ATM (two individual VCCs)
• Built on IP, but no data transport built-in
• Only if resources available and does not conflict with policy
• Flowspec (bandwidth and delay) and filterspec (type of
packets) transmitted downstream
 hop by hop
174
MPOA
• Multiprotocol over ATM
• EDFG (Edge Device Functional Groups)
 existing LAN segments via LAN switches
• AHFG (ATM-attached Host Functional Groups)
 ATM-connected host
• Layer 3
• Only supports IP for now
• Uses LANE for Layer 2 forwarding within a single Layer 3
subnet
• Adaptation of NHRP to provide connectivity between hosts
in different subnets
175
MPOA Operation
176
Competing Technologies
• “Fast Ethernet”
– 100BASE-TX, 100BASE-FX,100BASE-T4, 100BASE-VG
• FDDI, FDDI- II
• HPPI
• Gigabit Ethernet (IEEE 802.3z)
177
ATM Issues
• SONET/SDH duplication of services
• ATM overhead
• ATM granularity and bandwidth management
• ATM & connectionless service
• End point synchronization
• Flow Control !!! (bandwidth allocation, correlated traffic)
• ATM Forum
178
“Internetworking”
• Bridges
– Transparent bridges
– Source Routing - Transparent Bridges
• Routers (Network Layer)
3
• Brouters
2
2
1
1
2
1
179
1
Why Bridges
• Isolation of Physical Layer Effects
• Bandwidth Multiplication
• Security or Traffic Isolation
180
Segmenting Traffic
File server
Workstations
LAN traffic
Bridge
LAN traffic
Terminal server
Terminals
181
Host
Transparent Bridges
• Interconnect multiple cable segments to allow
for extension of a network.
• Can be used to interconnect different access
methods (Ethernet to Token Ring) and different
physical layers.
• Operate at the data link layer.
• They are protocol transparent.
–They are designed to operate regardless of
the upper-layer protocol.
–They operate on the source and destination
address in the MAC header.
182
T-L-F Bridges
• Bridges only forward traffic destined for other
cable segments.
• They operate transparently to any stations
that are active on the network.
• Packet formats and software drivers on the
workstations remain the same.
• Bridges do not have to be programmed with
the addresses of all the devices on the
network.
183
Learning, Filtering, and Forwarding
Node D
Node F
Terminals
Node C
Cable segment 1
Node C, D and F are on this
cable segment through port 2.
Port 2
Bridge
Forwarding table
Nodes A, B, and E are on this
cable segment though port 1.
Port 1
Cable segment 2
Node A
Node B
184
Node E
Filtering - An Example
Node B
Node A
Cable segment 2
Port ID 1
A
B
C
D
1
1
Port ID 2
2
2
Fowarding Table
Filtered
Cable segment 1
Packet transmitted
Node C
Node D
185
Forwarding - An Example
Node B
Node A
Cable segment 2
Forwarded
Port ID 1
A
B
C
D
1
1
2
2
Forwarding table
Port ID 2
Cable segment 1
Node C
Node D
186
Forwarding Beyond One Bridge
Node B
Node A
Cable segment Z
AB
Bridge 1
CD
Cable segment Y
AB
Bridge 2
Bridge table
CD
Cable segment X
AB
Bridge 3
CD
Cable segment V
Node C
Node D
187
Loops
• Complexity of bridging arises when two or more
bridges interconnect the same two cable segments.
• This is called providing redundancy or providing a
loop.
• There are problems with this type of design
including:
–duplicate packets,
–broadcast packets, and
–unknown destination packets.
188
Duplicate Packets
Node B
Node A
Two packets received
Cable segment 2
Bridge 1
Bridge 2
Cable segment 1
Single packet transmitted
Node D
Node C
189
Broadcasts
Packet received and
transmitted back by
second bridge
Node B
Node A
Cable segment 2
Loop
Bridge 1
Bridge 2
Cable segment 1
Broadcast packet transmitted
Node D
Node C
190
Unknown Destination Address
Node A
Node B
Packet received and
transmitted back by
second bridge
Cable segment 2
Loop
Bridge 1
Bridge 2
Cable segment 1
Destination Z packet transmitted
Node D
Node C
191
Spanning Tree Algorithm
• Bridged networks must allow for redundancy. Only
one path should be enabled to any destination on
the network.
• STA is a protocol unto itself. Don’t confuse it with
the transparent bridge protocol. IEEE 802.1d
• In an active STA topology certain bridges are allowed to forward
packets.
– Other bridges will participate in the STA but do not forward packets.
– These are backup bridges that dynamically become available.
• Bridges that do not forward packets are placed in blocking mode.
– These bridges still participate in the spanning tree protocol.
192
Source Routing Bridges
• Developed as a bridge protocol for Token Ring LANs.
• Source routing gained popularity due to IBM’s support of it.
– It is easy to install a source route network.
– It is not easy to grow a source route network into a large network.
• Invented due to technical limitations of the source route chip set..
Early source route chip sets could not be set for promiscuous mode.
• Source routing was also invented to allow two non-routing protocols
to be placed on a LAN: NetBIOS and SNA.
• Source Routing does not build forwarding tables based on MAC
addresses.
• Most of the intelligence for this algorithm is found in the network
stations.
• Each frame carries complete route information with it.
193
Source Routing
Features
• Source routing requires split intelligence to be carried in the node and
the bridge.
• All frames contain routing information, which does produce more
overhead.
• Uses STA to configure which bridges will forward single route
broadcast frames.
• All paths are active which legally allows loops to be designed.
• Provided a routing solution for those protocols that could not be routed
(NetBIOS).
• Easy to follow ring/MAC address for troubleshooting.
194
Source Routing Features (cont.)
• Source Routing originated as an alternative to
transparent bridging
• Originally, Token Ring could not be placed in
promiscuous mode ( requirement for transparent
bridging) and therefore an alternative model was
created
• Allowed for SNA and NetBIOS traffic an attempt to
enjoy the benefits of routing
– As a data link layer implementation.
195
Source Routing Overview
• Each separate ring is assigned a unique ring number, assigned on the
source route bridge port and not on the ring station.
• Each bridge is assigned a bridge number. There is a single number for
the whole bridge, no matter how many ports it has.
• End stations try to find destination ring stations by broadcasting
special discovery frames.
• A frame will contain source route information based on one bit in the
source address.
• A source route frame may not cross more than seven bridges.
– At the eighth bridge, the frame is discarded.
196
MAU
Source Routing Example
2
Find a
station off
ring
Node 1
1
Find a
station on
the local ring
MAU
Bridge 5
Node 2
Bridge 6
Bridge 7
Ring 4
Ring 3
197
Routing Information Field
Routing Information Indicator (RII)
Starting
Delimiter
Access
Control
Frame
Control
Destination
Address
Source
Address
Optional
Routing
Information
Field
BBBLLLLL
Source Service
Access Protocol
(SSAP)
Up to 8 RD fields
2 bytes
Routing
Control
Destination Service
Access Protocol
(DSAP)
Route
Designator
DFFFrrrr
......
Route
Designator
Ring number
12 bits
1 - 4095
rings
198
Bridge
number
4 bits
1-F
bridge IDs
Rest of Token
Ring frame
The Route Designator
Bridge 1
Discovery
frame
Ring B
Ring A
RC
Token
Frame
Header
Routing
Control
RC
Token
Frame
Header
Token
Frame
Trailer
RD1 RD2
Routing 00B1 00A0 Token
Frame
Control
Trailer
Routing
Information
Field
Routing
Information
Field
199
Source Route Frame Types
• Four types of Source Route frames:
–Single Route Explorer (SRE)
»Also known as Spanning Tree Explorers (STE)
•So named by the IEEE 802.5 working group
–All Routes Explorer (ARE)
–Specifically Routed Frame (SRF)
–Single Route Explorer with a specific route return.
200
Token Ring to Ethernet Conversion
Copy and
bit reverse
Token Ring frame
SD
AC
FC
DA
SA
SNAP header
RIF
DSAP SSAP CTRL OUI
Discard
Ethernet frame
Preamble
DA
SA
Type
201
Info
FCS
Copy
Type Info
FCS
ED
FS
Ethernet to Token Ring Conversion
Copy and
bit reverse
Preamble
DA
SA
Ethernet frame
Type
Info FCS
Copy
SD
AC
FC
DA
SA
RIF
DSAP SSAP CTRL OUI
Type Info
Insert
SNAP header
Token Ring frame
202
FCS
ED
FS
Token Ring to IEEE
802.3 Conversion
Copy and
bit reverse
SD
AC
FC
Preamble SFD
DA
DA
SA
SA
Token Ring frame
RIF
DSAP SSAP CTRL Info
Cut
Insert
Copy
Length
DSAP SSAP CTRL Info
IEEE 802.3 frame
203
FCS
ED
PAD FCS
FS
IEEE 802.3 to Token Ring Conversion
Copy and
bit reverse
Preamble
SD
AC
SFD
FC
DA
DA
SA
SA
IEEE 802.3 frame
Length
DSAP SSAP CTRL Info
Cut
Insert
Copy
RIF
DSAP SSAP CTRL Info
Token Ring frame
204
PAD FCS
FCS
ED
FS
Network Layer Functions
• Key Layer in Internet Architecture
• End-to-end Packets
• Adapt to lower layers
3
2
1
205
2
1
Network Layer
• Design Goals
– ‘Independent’ of layer 1 & 2 implementations
– Hide layer 1 & 2 details from upper layers
• Architecture
– Connection oriented
– Connectionless
– (where should reliability be done?)
• Services
– Routing (Path selection)
– Adaptation to different lower layers
206
Routing Algorithms
• Goals
–
–
–
–
–
–
Optimality
Fairness
Stablility
Robustness
Correctness
Simplicity
• Adaptive vs Static
• Congestion Control
207
Adaptive Routing
• Centralized
• Isolated
• Distributed
208
Distributed Routing
• Metric - Vector Algorithms
–
–
–
–
sometimes called shortest path
Bellman-Ford most famous
Knowledge of immediate neighbors
Result is “first step” in path to ultimate destination
• Link State Algorithms
– OSPF {Open Shortest Path First}
– Knowledge of network layer map (connectivity)
209
Congestion Control
RESEARCH ISSUE!
• Resource Reservation
• Packet Discarding
• Flow Control
210
Routers - Directly Attached Networks
Node D
Step 4
Router forwards packet
to network station D
Network 100
Step 2
Send packet
to router Z
C
Router Z
B
Step 1
Find network 100
Node A
211
Network 1
Step 3
Packet is given
to the router
Routers - Non-Directly Attached
Networks
• If the destination network is not directly attached to the router, the router will forward
the packet to another router in the forwarding path of the destination network.
• Router-to-router communication is directly MAC addressed.
• Will all routers in the path perform the same decisions as the previous router?
• The last router in the path to the destination will forward the packet directly to the
destination.
• Important to note that the data link MAC headers will constantly change while the
packet is being forwarded.
– Very little information in the network header will change.
» The network layer header in the packet will contain the originator’s full address
and final destination address of the packet.
» The full address of a network station is the combination of the network ID and
its MAC address.
• This uniquely identifies any station on the internet.
212
Multiprotocol Routers
• LANs currently operate with many different types of protocols.
– Apple Computers can use AppleTalk.
– UNIX workstations use TCP/IP.
– Client/Server applications could use Novell NetWare.
• To require one router for each protocol on the LAN is not efficient.
• Multiprotocol routers were invented to handle this.
– Arrived around 1986.
– Routes not only based on the network IDs but are able to pass the
packet to the correct protocol processor by examining the Type of
packet.
213
Multiprotocol Routers - A Block
Diagram
Bridge
Forward on
MAC address
Router
Route on
network IDs
Combine both
into one
box
Incoming packet
Can packet be routed
based on protocol type?
Bridge packet if not
214
Bridged or routed packet
Routing Diagram
G
Network 4
Router X
H
F
Network 3
E
Router Y
D
Network 2
C
MAC addresses
Router Z
B
Network 1
A
215
Routing Information Protocol
(RIP)
• Known as a routing table update protocol
• Developed by Xerox and gained widespread acceptance by the proliferation
of TCP/IP’s implementation of it in UNIX.
• Other protocols (AppleTalk, NetWare) adopted RIP as their standard routing
update protocol.
• Known as a distance vector protocol.
– Vector is an adjacent router and the distance is how far away (hops) the
network is.
– One hop is considered one router traversed.
• Devised for relatively stable, small-to-medium size networks (less than 16
routers in diameter) .
216
Calculating the Cost
Network 4
Internal routing
table
Router C
Network
3
Hops
1
4
1
2
2
1
3
Network 3
Router B
Transmitted
routing
table
Network
2
Hops
1
3
1
1
2
Network 2
Network
1
Hops
1
2
1
3
2
Transmitted
routing
table
Router A
Network 1
217
IP Routing
• Making Decisions
• Gathering Information
• ICMP
218
Routing Table
Network
3
4
2
1
Mask Router
255
C
255
C
255
B
255
B
219
Hops
1
1
2
3
Age
30
30
15
45
Port ID
1
2
2
2
Example: TCP/IP
•
•
•
•
Not the only way to do things ...
But well tested in the field
Brief History
TCP/IP vs ISO protocols
220
References TCP/IP
• Overall -- Douglas Comer
–
–
–
–
Internetworking with TCP/IP, Vol I, 3d ed.
Internetworking with TCP/IP, Vol II
Internetworking with TCP/IP, Vol III (Sockets)
Internetworking with TCP/IP, Vol III (TLI)
• Unix Programming -- W. Richard Stevens
– Unix Network Programming
– Advanced Unix Network Programming
• Stevens & Wright
– TCP/IP Illustrated Vol I
– TCP/IP Illustrated Vol II
– TCP/IP Illustrated Vol III
221
TCP/IP Stack
OSI
FTP
5 -7
TELNET
4
DNS
TCP
UDP
IP
3
ICMP
ARP
2
DIX Ethernet or ...
1
222
Notes on TCP/IP Suite
• TCP/IP preceded the OSI Reference Model
• Layers 1 & 2 are not part of the standard
• Functions above the Transport Layer are
consolidated
223
Brief Definitions
•
•
•
•
•
•
•
•
ARP -- Address Resolution Protocol
IP -- Internet Protocol
ICMP -- Internet Control Message Protocol
UDP -- User Datagram Protocol
TCP -- Transmission Control Protocol
DNS -- Domain Name System
FTP -- File Transfer Protocol
TELNET -- remote terminal
224
Other TCP/IP Protocols
•
•
•
•
•
•
•
Routing Protocols -- RIP, OSPF, EGP, GGP
BOOTP - Bootstrap Protocol
RARP - Reverse ARP
TFTP - Trivial FTP
HTTP - Hyper Text Transfer Protocol
SMTP - Simple Mail Transfer Protocol
SNMP - Simple Network Management
Protocol
225
Layer Protocols
DNS
Query
DNS
Reply
SYN
Caller
SYN/ACK
Callee
ACK
{TCP Establishment}
ARP
Request
ARP
Reply
226
IP Functionality
•
•
•
•
Presents single, virtual network to user
Connectionless Delivery
Packet Routing
Interface to Lower Layers
227
IP Addresses
• “Dotted Decimal”
32 bit (4 byte) address, written by taking each
byte as an unsigned number
• Address Classes
[first octet]
– A - <net> < > <host> < >
1-126
– B - <net> < > <host> < >
128-191
– C -< > <net> < > <host>
192-223
– D - special subset of C
224-239
multicast
– E - reserved
240-254
• Netmask
– a 32 bit value which, when ANDed with an address, selects only
the network part
228
Netmask Usage
“Do a bitwise AND then compare for equality of
results”
<src addr> & netmask =?= <dst addr> & netmask
Same netmask
if comparison is equal, then both src & dst are
on same (sub)net.
229
Netmask Examples
S=
M=
result
128.194.100.10
255.255.255.0
128.194.100.0
D=
M=
result
128.194.200.10
255.255.255.0
128.194.200.0
Not Equal
S=
M=
result
128.194.12.10
255.255.255.0
128.194.12.0
D=
M=
result
128.194.12.110
255.255.255.0
128.194.12.0
?
S=
M=
result
67.194.18.10
255.255.240.0
67.194.16.0
D=
M=
result
?
230
67.194.10.10
255.255.240.0
67.194. 0.0
Special Address Conventions
• This host
all 0’s
all 0’s
• Host on this net
host
• Limited broadcast
all 1’s
net
127
• Directed broadcast
all 1’s
• Loopback
anything (usually 1)
231
IP Header
0
VERS
4
8
16
HLEN
SERVICE TYPE
24
TOTAL LENGTH
IDENTIFICATION
TIME TO LIVE
19
FLAGS
PROTOCOL
FRAGMENT OFFSET
HEADER CHECKSUM
SOURCE IP ADDRESS
DESTINATION IP ADDRESS
IP OPTIONS (IF ANY)
PADDING
DATA
...
232
31
IP Packet Handling (rcv)
Sockets
Transport Layer (TCP or UDP)
Other
IP
Link {DIX Type or 802.3 DSAP}
Physical
receiving
233
IP Packet Handling (xmit)
Local or Non-Local ?
sending
Search Routing
Table
ARP
Found!
Missing!
Send locally...
ICMP Error
234
Bridges or Routers
Address & Netmask
1: 131.122.24.12 255.255.255.0
2: 131.122.31.253 255.255.255.0
3: 131.121.18.12 255.255.240.0
4: 131.121.24.18 255.255.240.0
5: 131.121.31.254 255.255.240.0
1
3
A
B
C
2
5
D
4
235
ICMP
• ping
– ECHO Request/Reply
• traceroute
traceroute to falcon.ece.utexas.edu (128.83.196.10),
30 hops max, 40 byte packets
1 exit_133 (128.194.133.254) 2 ms 2 ms 2 ms
2 exit_128 (128.194.128.254) 2 ms 3 ms 2 ms
3 FDDI-T3.TAMU.EDU (128.194.1.13) 3 ms 3 ms 3 ms
4 FDDI-WAN.TAMU.EDU (165.91.128.17) 5 ms 4 ms 6 ms
5 sprint-gw-h1-0.the.net (129.117.16.161) 20 ms 5 ms 5 ms
6 ut8-h1-0.the.net (129.117.16.241) 8 ms 9 ms 21 ms
7 129.117.20.12 (129.117.20.12) 7 ms 11 ms 7 ms
8 ens.gw.utexas.edu (128.83.7.132) 16 ms 23 ms 21 ms
9 ece-e0.gw.utexas.edu (128.83.249.251) 12 ms 9 ms 9 ms
10 * * *
236
Project
• Purpose
• Options
– Network Design
– Software (?)
• Approach {customer/boss/professor}
• Teams {prefered size is 3}
237
Project Phases
"almost a joke, but too often true!"
1. Enthusiasm
2. Disillusionment
3. Panic
4. Search for the Guilty
5. Punishment of the Innocent
6. Praise and Honors for the Non-participants
238
Project Schedules
"don't let yourself plan like this"
Start
*
* A miracle occurs
239
End
Network Design
• An iterative, interactive process
"you have to ask questions, & you'll never get it all in one
meeting with the customer"
• More than just selecting the media
"remember you're designing a system -- make sure you look at
something for all 7 layers of the OSI model"
• More than one right answer
"don't be dogmatic. stay open to other soltuions than the one you
feel is technically best."
240
Network Design,cont
"Do them in order. Each step is important"
Time
• What does the customer want to do?
• What does the customer want to use?
{tentative design time}
• What are the customer's desires (biases)?
• Check for
completeness...
• Check for
integration...
• Implementation Plan
241
Functions
"the 2 main reasons for a network are connectivity and resource sharing"
Connectivity
• Remote login
Electronic Mail
File Sharing
• Transfer
• Virtual disk/files
Software Management
Resource Sharing
• Printers/plotters etc
• Modems
• CPU
• Disk
242
Resources
"Remember to be precise!"
Systems
Qty
Mfg
Version
Geography
Distances
Constructions Standards
243
Software
Tentative Design
• Meant to bring out Key features ...
• ... and Decision points ...
with the Customer.
• Provide your “best” solution, and be ready
with alternatives.
– Features vs “Costs”
• CYA, or “say it with memos”
244
User Input
"listen.
understand that you are the expert, responsible for making
sure both sides understand each other.
But there are many different solutions to any networking
problem."
245
Completeness
"Have you covered all the functions needed?"
Integration
"Does it all work together?"
246
Implementation
"Make sure it can be built."
Sequence of actions
(1) Identify key points in schedule
(2) Provide alternative plans for problems
• Plan
• Build
• Test
247
• Turn over
Project “Hints”
• READ the lecture slides
– Ask the user closed end questions
– Don’t try to ask too much at one session
– No preconceived scenarios
• Remember Inventory (equip., s/w, space)
• Tentative Design
– Informal
– High Level
– Drawings are “Good Things”
248
More Hints
• Look in catalogs
• Report Format;
– Problem statement: don;t just repeat what I said
– Solution HIghlights
» Alternatives considered
» Word Description (logical, physical)
• Bill of Materials
– Specific Items (model, brand)
– Costs aren;t very important
249
Transport Layer
• Services
– Reliable Delivery
– or Not!
• Protocols
– Internet: TCP, UDP
– ISO: TP0 thru TP4
250
Transport Services
User
Provider
Application “Header”
Data
Presentation “Header”
Data
Session Header (?)
Data
Transport Header
Network Header
Link Header
Data
Data
Data
Framing
Data
{see page 481}
251
Delivery Services
• First layer that can really provide reliability
• Reliability means sequencing, error recovery,
acknowledgements
• Not every application needs (wants) reliability
252
Quality of Service
• New idea from the voice, video folk
• Not (yet) part of Internet protocols
– RSVP in process
• Unclear which layer guarantees QoS
253
Generic Transport Service
Primitives
• Listen
– notify Transport layer a call is expected
• Connect
– establish Transport layer connection
• Send (or Write)
• Receive (or Read)
– Both could be connectionless
• Disconnect (or Close)
254
Berkeley Sockets
• ‘Sockets’ are one of the 2 major Unix network
programming application programming
interfaces.
• The other is the System V Transport Layer
Interface (TLI).
• Sockets are biased towards Unix and C.
• Good references are Doug Comer’s Vol III
– both of them!
255
Unix File I/O
• Unix treats a file as a ‘stream of bytes’
• API calls: open, creat, read, write, lseek, close
• All operate on file descriptors
• File descriptors are int’s, but represent a
more complex structure
256
Socket I/O
• Transport layer also provides ‘stream of
bytes’ type service to the upper layers
• API calls:
–
–
–
–
–
–
–
–
socket: Initialize data structure
bind: set addresses
listen: specify a queue
accept: wait for connection
connect: initiate a connection
read, write, recv, send: transfer data
close, shutdown: terminate connection
recvfrom, sendto: datagrams
257
Overview -- connection
Server
socket()
server blocks
bind()
socket()
listen()
bind()
read()
accept()
connect()
Client
Optional(!!)
258
write()
Overview -- connectionless
Server
socket()
server blocks
bind()
socket()
recvfrom()
bind()
sendto()
Client
259
sendto()
recvfrom()
Socket Paradigm
• Setup is ‘client/server’ because someone has
to start the conversation
• BUT, communication is bidirectional (either
end can read or write)
• Sockets (in Unix) are multiprotocol:
– TCP/IP, UNIX, XNS {address families}
260
Server Types
• Iterative
– Receive request, process it, go to next on queue
– Best in connection-less environment
• Concurrent
– Receive request, fork process, reset socket
– Best when extended interaction is needed
261
Socket ‘Details’
• If you don’t want to block on a read, look at
the select system call.
• You’ll need the following includes:
– #include <sys/types.h>
– #include <sys/socket.h>
• Program examples are available on net.
262
Managing Connections
•
•
•
•
•
Addressing
Identifying duplicate TPDUs
Three-way handshakes
Flow control
Crash recovery (largely ignored)
263
TCP
•
•
•
•
•
Reliable, sequenced stream of bytes
Virtual circuit
Buffered transfer
Unstructured
Full Duplex
264
TCP - How it Works
• Positive Acknowledgements w/
Retransmission
• Sliding Windows
• Pages 531, 532 give the programmer’s state
machine info
265
TCP Features
•
•
•
•
A protocol, not a package
Ports (Well Known Ports)
Out of Band, or URGENT, data
Timeouts
– RTT Estimation (Karn’s Algorithm) (pg 541)
• Congestion
– Slow-Start Methodolgy
• Limitations
266
TCP Header
0
4
10
16
SOURCE PORT
24
31
DESTINATION PORT
SEQUENCE NUMBER
ACKNOWLEDGEMENT NUMBER
HLEN RESERVED
CODE BITS
WINDOW
CHECKSUM
URGENT POINTER
OPTIONS (IF ANY)
PADDING
DATA
...
267
TCP Connection Management
• Three Way Handshake
– SYN, SYN/ACK, ACK
• May be viewed as two Simplex connections
• Window management
– Advertising Zero Window Size
– Nagle’s algorithm
– Silly Window Syndrome
268
UDP
• Your basic datagram
• No acknowledgements, no reliability
• Why use it?
0
16
31
SOURCE PORT
DESTINATION PORT
MESSAGE LENGTH
CHECKSUM
DATA
...
269
Transport Layer Performance
•
•
•
•
•
Timeout Values
Inadvertent Synchronized Loads
Latency (Bandwidth-delay product)
MTU, MSS values
Router impact
270
Performance Hints
• CPU normally is the bottleneck
– most time is spent in protocol stacks, not on the wire
• Per-packet overhead means big packets are
much more efficient…
• But delays to create big packets impact
interactive applications
• Easy to increase bandwidth, impossible (?) to
reduce propagation delay
271
Performance Challenges
• Gigabit networks
• Satellites
272
Packet Tracing -Putting it all together
• Packet tracing: the actions of observing
packets as they appear on the media and
deriving the activities occuring on hosts; or,
knowing the top-level commands issued and
predicting the packets that will appear on the
media.
273
Motivations for Packet Tracing
• Understanding network protocols
• Debugging your network
• Debugging applications that work over the
network
274
Layer Protocols
DNS
Query
DNS
Reply
SYN
Caller
SYN/ACK
Callee
ACK
{TCP Establishment}
ARP
Request
ARP
Reply
275
Examples - 1
• Assumptions:
Host A, IP Address 128.194.1.2
Host B, IP Address 128.194.1.3
netmask 255.255.255.0
ARP caches and bridge tables are empty
All hosts know DNS Server is 128.194.1.3
Trace command “DNS Query” initiated on Host A
B
A
1
276
Answer - 1
Seg
DAE
SAE
“type”
SAIP
DAIP
1
1
1
1
FF
EA
EB
EA
EA
EB
EA
EB
ARP Req
ARP Reply
DNS Q
DNS R
1.2
1.3
1.2
1.3
1.3
1.2
1.3
1.2
277
Examples - 2
• Assumptions:
Host A, IP Address 128.194.1.2
Host B, IP Address 128.194.1.3
Host C, IP Address 128.194.1.4
netmask 255.255.255.0
ARP caches and bridge tables are empty
All hosts know DNS Server is 128.194.1.3
C
Trace command “DNS Query” initiated on Host A
B
A
1
2
278
Answer - 2
Seg
DAE
SAE
“type”
SAIP
DAIP
1
2
1
1
1
FF
FF
EA
EB
EA
EA
EA
EB
EA
EB
ARP Req
ARP Req
ARP Reply
DNS Q
DNS R
1.2
1.2
1.3
1.2
1.3
1.3
1.3
1.2
1.3
1.2
279
Examples - 3
• Assumptions:
Host A, IP Address 128.194.1.2
Host B, IP Address 128.194.1.3
netmask 255.255.255.0
ARP caches and bridge tables are empty
All hosts know DNS Server is 128.194.1.3
Trace command “telnet 128.194.1.3” initiated on Host A
B
A
1
280
Answer - 3
Seg
DAE
SAE
“type”
SAIP
DAIP
1
1
1
1
1
FF
EA
EB
EA
EB
EA
EB
EA
EB
EA
ARP Req
ARP Reply
TCP SYN
SYN/ACK
TCP ACK
1.2
1.3
1.2
1.3
1.2
1.3
1.2
1.3
1.2
1.3
281
Examples - 4
• Assumptions:
Host A, IP Address 128.194.1.2
Host B, IP Address 128.194.1.3
netmask 255.255.255.0
ARP caches and bridge tables are empty
All hosts know DNS Server is 128.194.1.3
Trace command “telnet B” initiated on Host A
B
A
1
282
Answer - 4
Seg
DAE
SAE
“type”
SAIP
DAIP
1
1
1
1
1
1
1
FF
EA
EB
EA
EB
EA
EB
EA
EB
EA
EB
EA
EB
EA
ARP Req
ARP Reply
DNS Q
DNS R
TCP SYN
SYN/ACK
TCP ACK
1.2
1.3
1.2
1.3
1.2
1.3
1.2
1.3
1.2
1.3
1.2
1.3
1.2
1.3
283
Examples - 5
• Assumptions:
Host A, IP Address 128.194.1.1
Host B, IP Address 128.194.2.2
Host X, IP Address 128.194.1.254 on segment 1
Host X, IP Address 128.194.2.254 on segment 2
netmask 255.255.255.0
ARP caches and bridge tables are empty
All hosts know DNS Server is 128.194.1.3
3
Trace command “telnet 128.194.2.2” initiated on Host A
X
A
B
1
2
284
2
2
1
1
Examples - 5 cont.
Routing table on A:
Net
Mask
0.0.0.0
0.0.0.0
Routing table on B:
Net
Mask
0.0.0.0
0.0.0.0
Router
128.194.1.254
Router
128.194.2.254
Routing table on X:
Net
Mask
Router
285
Answer - 5
Seg
DAE
SAE
“type”
SAIP
DAIP
1
1
1
2
2
2
2
1
1
2
FF
EA
EX1
FF
EX2
EB
EX2
EA
EX1
EB
EA
EX1
EA
EX2
EB
EX2
EB
EX1
EA
EX2
ARP Req
ARP Reply
TCP SYN
ARP Req
ARP Reply
TCP SYN
SYN/ACK
SYN/ACK
TCP ACK
TCP ACK
1.1
1.254
1.1
2.254
2.2
1.1
2.2
2.2
1.1
1.1
1.254
1.1
2.2
2.2
2.254
2.2
1.1
1.1
2.2
2.2
286
Problem A -1
Use the data and diagram to show the packets resulting from the command "telnet B" being
executed on host C. Assumptions: The diagram consists of 8 numbered ethernet segments,
5 bridges (unlabeled rectangles), two routers (X, Y) and hosts A, B, C. ARP caches are
empty. Tables on bridges are empty. Routing entries are as shown below. Host A is the
DNS nameserver and its IP address is known to all machines.
Netmask for 128.194 is 255.255.255.0.
A- 128.194.15.1, ethernet e1
B- 128.194.99.2, ethernet e2
C- 128.194.12.3, ethernet e3
X- seg 7:128.194.15.100, ethernet e5
seg 3:128.194.12.100, ethernet e6
Y- seg 8:128.194.99.101, ethernet e7
seg 4:128.194.12.101, ethernet e8
287
Problem A - 2
288
Problem A - 3
Host
A:
Network
0.0.0.0
Netmask
0.0.0.0
Router
128.194.15.100
B:
128.194.12.0
255.255.255.0
128.194.99.101
128.194.15.0
255.255.255.0
128.194.99.101
128.194.15.0
255.255.255.0
128.194.12.100
0.0.0.0
0.0.0.0
128.194.12.101
128.194.99.0
255.255.255.0
128.194.12.101
0.0.0.0
0.0.0.0
128.194.12.101
128.194.15.0
255.255.255.0
128.194.12.100
0.0.0.0
0.0.0.0
128.194.12.100
C:
X:
Y:
289
Decode Example - 1
33 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977 Syn Seq=1011631 Len=0 Win=0
0: 0000 ef03 efb0 00a0 2435 5343 0800 4500
........$5SC..E.
16: 002c 6f03 0000 3c06 f2c2 80c2 8547 cfc8
.,o...<......G..
32: 4734 07b9 0050 000f 6faf 0000 0000 6002
G4...P..o.....`.
48: 0000 036d 0000 0204 05a0 0000
...m........
290
Decode Example - 2
36 h-207-200-71-52.netscape.com -> cfl02
Seq=1144453529 Len=0 Win=49152
TCP D=1977 S=80 Syn Ack=1011632
0: 00a0 2435 5343 0000 ef03 efb0 0800 4500
..$5SC........E.
16: 002c 914c 4000 3206 9a79 cfc8 4734 80c2
.,.L@.2..y..G4..
32: 8547 0050 07b9 4436 f999 000f 6fb0 6012
.G.P..D6ù...o.`.
48: c000 0577 0000 0204 05b4 15f8
...w.......ø
291
Decode Example - 3
37 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977
Len=0 Win=2880
Ack=1144453530 Seq=1011632
0: 0000 ef03 efb0 00a0 2435 5343 0800 4500
........$5SC..E.
16: 0028 6f04 0000 3c06 f2c5 80c2 8547 cfc8
.(o...<......G..
32: 4734 07b9 0050 000f 6fb0 4436 f99a 5010
G4...P..o.D6ù.P.
48: 0b40 d1f4 0000 0204 05a0 0000
.@..........
292
Decode Example - 4
56 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977
0:
16:
32:
48:
64:
80:
96:
112:
128:
144:
160:
176:
192:
208:
224:
240:
256:
272:
288:
304:
320:
336:
352:
368:
384:
400:
416:
0000
019e
4734
0b40
6573
2f68
6966
4d6f
5765
722d
543b
6665
6d65
6573
7473
0a43
702d
656e
2028
743a
2e63
6167
2d78
6a70
670d
4150
3132
ef03
6f08
07b9
a905
2f73
6f72
2048
6469
646e
3937
206c
7265
2e6e
6361
7263
6f6e
416c
743a
5769
2068
6f6d
652f
6269
6567
0a43
455f
3336
efb0
0000
0050
0000
6561
697a
5454
6669
6573
2030
656e
723a
6574
7065
6872
6e65
6976
204d
6e31
6f6d
0d0a
6769
746d
2c20
6f6f
4944
3139
00a0
3c06
000f
4745
7263
6f6e
502f
6564
6461
303a
6774
2068
7363
732f
6e64
6374
650d
6f7a
363b
652e
4163
662c
6170
696d
6b69
3d31
6130
2435
f14b
6fb0
5420
682f
7461
312e
2d53
792c
3430
683d
7474
6170
7365
2d31
696f
0a55
696c
2049
6e65
6365
2069
2c20
6167
653a
3030
0d0a
5343
80c2
4436
2f65
696d
6c62
300d
696e
2031
3a31
3534
703a
652e
6172
2e68
6e3a
7365
6c61
290d
7473
7074
6d61
696d
652f
204e
3065
0d0a
0800
8547
f99a
7363
6167
6172
0a49
6365
362d
3620
0d0a
2f2f
636f
6368
746d
204b
722d
2f32
0a48
6361
3a20
6765
6167
706a
4554
3031
4500
cfc8
5018
6170
6573
2e67
662d
3a20
4170
474d
5265
686f
6d2f
2f6e
6c0d
6565
4167
2e30
6f73
7065
696d
2f78
652f
7065
5343
302c
Ack=1144453530 Seq=1011632 Len=374 Win=2880
........$5SC..E.
..o...<..K...G..
G4...P..o.D6..P.
.@....GET /escap
es/search/images
/horizontalbar.g
if HTTP/1.0..IfModified-Since:
Wednesday, 16-Ap
r-97 00:40:16 GM
T; length=54..Re
ferer: http://ho
me.netscape.com/
escapes/search/n
tsrchrnd-1.html.
.Connection: Kee
p-Alive..User-Ag
ent: Mozilla/2.0
(Win16; I)..Hos
t: home.netscape
.com..Accept: im
age/gif, image/x
-xbitmap, image/
jpeg, image/pjpe
g..Cookie: NETSC
APE_ID=1000e010,
123619a0....
293
Decode Example - 5
58 h-207-200-71-52.netscape.com -> cfl02
0:
16:
32:
48:
64:
80:
96:
112:
128:
144:
160:
176:
192:
208:
224:
240:
256:
272:
288:
304:
320:
00a0
0140
8547
c000
3030
6574
7365
6e2c
383a
7465
2f67
6965
2031
4d54
7468
616e
6e6e
6c69
1400
002c
cbed
2435
92eb
0050
3e23
204f
7363
2f33
2032
3135
6e74
6966
643a
3939
0d0a
3a20
6765
6563
7665
9100
0000
0fa3
5343
4000
07b9
0000
4b0d
6170
2e30
3420
3a33
2d74
0d0a
2054
3720
436f
3534
733a
7469
0d0a
00ff
0000
9cb4
0000
3206
4436
4854
0a53
652d
0d0a
4175
3820
7970
4c61
7565
3233
6e74
0d0a
2062
6f6e
0d0a
ffff
0b00
da8b
ef03
97c6
f99a
5450
6572
456e
4461
6720
474d
653a
7374
2c20
3a34
656e
4163
7974
3a20
4749
6699
1400
b3de
efb0
cfc8
000f
2f31
7665
7465
7465
3139
540d
2069
2d6d
3135
303a
742d
6365
6573
6b65
4638
9900
0002
9c17
0800
4734
7126
2e31
723a
7270
3a20
3937
0a43
6d61
6f64
2041
3136
6c65
7074
0d0a
6570
3961
0000
0f8c
003b
TCP D=1977 S=80
4500
80c2
5018
2032
204e
7269
5375
2030
6f6e
6765
6966
7072
2047
6e67
2d72
436f
2d61
0b00
0000
8f01
..$5SC........E.
.@..@.2.....G4..
.G.P..D6ù...q&P.
..>#..HTTP/1.1 2
00 OK..Server: N
etscape-Enterpri
se/3.0..Date: Su
n, 24 Aug 1997 0
8:15:38 GMT..Con
tent-type: image
/gif..Last-modif
ied: Tue, 15 Apr
1997 23:40:16 G
MT..Content-leng
th: 54..Accept-r
anges: bytes..Co
nnection: keep-a
live....GIF89a..
........f.......
.,..............
.............;
294
Ack=1012006 Seq=1144453530 Len=280 Win=49152
Decode Example - 6
59 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977
Len=0 Win=2880
Ack=1144453810 Seq=1012006
0: 0000 ef03 efb0 00a0 2435 5343 0800 4500
........$5SC..E.
16: 0028 6f09 0000 3c06 f2c0 80c2 8547 cfc8
.(o...<......G..
32: 4734 07b9 0050 000f 7126 4436 fab2 5010
G4...P..q&D6..P.
48: 0b40 cf66 0000 0204 05a0 0000
.@.f........
295
Decode Example - 7
60 h-207-200-71-52.netscape.com -> cfl02
Seq=1144453810 Len=0 Win=49152
TCP D=1977 S=80 Fin Ack=1012006
0: 00a0 2435 5343 0000 ef03 efb0 0800 4500
..$5SC........E.
16: 0028 92ec 4000 3206 98dd cfc8 4734 80c2
.(..@.2.....G4..
32: 8547 0050 07b9 4436 fab2 000f 7126 5011
.G.P..D6ú...q&P.
48: c000 1aa5 0000 6915 9192 0000
......i.....
296
Decode Example - 8
61 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977
Len=0 Win=2880
Ack=1144453811 Seq=1012006
0: 0000 ef03 efb0 00a0 2435 5343 0800 4500
........$5SC..E.
16: 0028 6f0a 0000 3c06 f2bf 80c2 8547 cfc8
.(o...<......G..
32: 4734 07b9 0050 000f 7126 4436 fab3 5010
G4...P..q&D6ú.P.
48: 0b40 cf65 0000 0204 05a0 0000
.@.e........
297
Top Three Layers
• Session Layer
• Presentation Layer
• Application Layer
298
Session Layer Design
• Marks the division between “upper layers and
lower layers”
– lower layers:= end to end communications
– upper layers:= user-oriented services
•
•
•
•
Invented by ISO
Can support transport layer QoS
Not explicitly used by TCP/IP
“Generally connection-oriented”
299
Mission of the Session Layer
• Provides a way for the session users to
establish connections, called sessions, and
transfer data over the sessions in an orderly
way.
• Examples:
– remote logins
– file transfers
– Remote Procedure Calls
300
Session Layer &
Transport Layer
• Usually a transport connection is required to
establish a session
• Session Layer provides Control. It says what
to do, not necessarily how to do it.
• Can provide redundancy and multiplexing of
transport layer resources
• Administrative control point
301
Data Exchange
• Same three phases as transport layer
– establishment
– use
– release
• In many cases the session layer simply
passes the primitive requests to the transport
layer.
• orderly (graceful) release vs. abrupt release
– abrupt release is analogous to hanging up the phone
– orderly release uses a full handshake, (not provided in
transport layer)
302
Dialog Management
• In principle, all OSI connections are full
duplex
• Some upper layer software is structured to be
half-duplex
• This is to simplify the software and has
nothing to do with hardware limitations
• The session layer supports data token
schemes to support half-duplex
transmissions
303
Synchronization
• Transport layer provides error recovery only
from communication errors
• Synchronization in the transport layer
provides for returning the session entries
back to the last known correct state.
• Example: Session established and large file
transmitted; receiving end has no storage and
directly prints the incoming data. The printer
dies and data is lost.
• Session users could split the text into pages
and insert a synchronization point between
each page.
304
Activity Management
• Users split the message stream into activities
• delimiters are added in the session to
separate activities
First
File
Sent
Second File Sent
Session
Stop
Start
Start
Stop
305
Remote Procedure Calls
•
•
•
•
Based on the connectionless model
Generally outside the OSI model
Can be implemented in the application layer
Multiple Flavors
– {Sun} ONC RPC
– {OSF} DCE RPC
306
“RPC School of Thought”
• Clients sending messages are viewed as
procedure calls with the reply being the
return from the procedure
• Contrast this to the more “conventional”
school which views I/O with primitives such
as X-DATA.request and X-DATA.return as I/O
and interrupts respectively.
307
RPC Invocation
Client
Client Stub
Network
{Portmapper}
Server Stub
Server
1
2
3
4
5
7
308
6
RPC Semantics and Orphans
• Operations
– exactly once
– at most once
– at least once
• Handling crashes:
– 1. Hang forever, waiting for reply that never comes
– 2. Time out and raise an exception
– 3. Time out and retransmit
• Orphans
–
–
–
–
extermination
expiration
reincarnation (kill & restart)
gentle reincarnation (selectively kill and restart)
309
Session Layer Conclusions
• Not used in ARPANET or USENET
• Some debate on including it in the ISO model
Closest Internet example of an OSI (not ISO) stack:
NFS
XDR
RPC
UDP
IP
whatever
310
Presentation Layer
Information
Transformation
Network
Format
Local
Format
“few standards, but a lot of ideas”
311
Presentation Functions
These are examples!
• Syntax (format) conversion
• Compression
• Encryption
– Sub-issue: Does it belong here?
312
Presentation Layer, cont.
• Providing a way to specify complex data
structures
• Managing the set of data structures required
• Converting data between internal and external
form
313
Data Representation
• ASCII vs. EBCDIC
• two’s complement vs. one’s complement
• FFF0 hex is -15 1’s complement; -16 2’s
complement
• byte order right left vs. left right
• Text File formats
314
Abstract Syntax Notation 1
(ASN.1)
•
•
•
•
•
Data Structures
Abstract Syntax
Transfer Syntax
International Standard 8825
Notation used to encode, transfer and decode
data structures across a wide range of
applications
• Both connection-oriented and connectionless
primitives
315
Data Compression
• Encoding a Finite Set of Equally Likely
Symbols
– Finiteness of the set of symbols.
• Frequency Dependent Coding
– The relative frequencies with which the symbols are
used.
• Context Dependent Encoding
– The context in which a symbol appears.
316
Compression
• Elimination of Redundancy
– (increased susceptibility to error)
• Examples
–
–
–
–
Run Length Encoding
Predictive Codes
Huffman
LZW
317
Frequency Dependent Coding
• In English, “E” occurs ~100 times more than
the letter “Q”
• So give common symbols short codes and
longer symbols longer codes.
• Theoretical minimum encoding often requires
fractional bits, but close approximations
available.
318
Huffman Coding
• 1. Write down all symbols and associated probability of
each. Eventually a binary tree is built on these nodes, with
the symbols representing terminal nodes.
• 2. Find the two smallest nodes and mark them. Add a new
node with arcs to each of the nodes just marked. Set the
probability of the new node to the sum of the probabilities of
the two nodes connected to the new node.
• 3. Repeat until all symbols are marked except one. The
probability of the unmarked node will always be 1.0.
• 4. The encoding for each symbol is found by tracing the path
from the unmarked symbol to that symbol, recording the
sequence of left and right branches taken. The code is the
path, left = 0, right = 1.
319
Context Dependent Encoding
• Uses conditional probability instead of
independent probability.
• What is P(u|q)?
• So determine the conditional probability for
each possible predecessor and store in a
table.
• For k symbols this requires k2 entries.
320
Network Security and Privacy
• Protecting data from being read by
unauthorized persons.
• Preventing unauthorized persons from
inserting and deleting messages.
• Verifying the sender of each message.
• Allowing electronic signatures on documents.
321
Cryptography
• Traditional Cryptography
– Substitution Ciphers
– Codes
– Transposition Ciphers
• Data Encryption Standard
• Key Distribution
• Public Key Crytography
– MIT Algorithm
• Authentication & Digital Signatures
– Federal Standards
322
Cryptography Users
• Military
• Diplomatic
• Diarists
• Lovers
• Curmugdeons
323
Cyptography Terms
• Ciphertext or Cryptogram -- encrypted
message
• Cryptanalysis -- breaking ciphers
• Cryptography -- devising ciphers
• Cryptology := Cryptanalysis and
Cryptography
324
Encryption Model
Passive Listener
Plaintext
Ciphertext
Plaintext
Key-1
Active Intruder
325
Key-2
Keys
• If Key-1 is the same as Key-2, then it has to be
a secret key process. They can differ, making
it a Public Key Process.
• Big Problems: key distribution and key
security
326
Fundamental Truths of
Cryptology
• Potential intruders know the general
encryption method.
• Message contents may be guessed.
• Cryptographic systems may be changed, but
rarely are.
• Non-technical compromises always
outnumber successful cryptanalysis.
327
Ciphers
• Substitution (preserve order, disquise)
–
–
–
–
Caesar code = “shift 4”
Alphabet shifted by k letters --”enigma”
Exhaustive search infeasible
Words and phrases may be guessed
• Codes
– Purple code, Japanese translated into Latin
– Navajo talkers
• Transposition Ciphers (reorder, do not
disguise)
– Game is up when key length is guessed
– Once close, easy to guess
328
Data Encryption Standard
•
•
•
•
Developed by IBM in 1977
Implemented in hardware
Widely used
128 bit key proposed, 56 bit key specified
Any guesses why?
329
Public Key Encryption
• Applying the decryption key to an encrypted
message must return the plaintext message.
• The decryption key can’t be guessed from an
encyption key.
• The encryption key cannot be broken by a
plaintext attack.
• Key Point: the decryption key must be
privately held.
330
RSA Algorithm
• 1. Choose two large primes, p and q, each
greater than 10100.
• 2. Compute n = p * q and z = (p - 1) * (q - 1).
• 3. Choose a number relatively prime to z and
call it d.
• 4. Find e such that e * d = 1 mod z.
331
Implementation of the MIT
Algorithm
• To encrypt
– divide plaintext P into k bits where k is the largest
integer for 2k < n.
– compute C = Pe(mod n)
• To decrypt
– P = Cd(mod n)
• Encryption requires e and n (public key)
• Decryption requires d and n (private key)
• If n can be factored, then this yields p an q,
then z.
• Euclid’s Algorithm will derive e and d from z.
332
Digital Signatures
• A’s secret key must remain secret
• B has A’s public key and A has B’s public key
• B received a encypted message from A that
he decypts with A’s public key
• B can later show that lacking A’s private key
that he could not have produced the
encrypted message
333
Politics of Cryptography
•
•
•
•
•
Software as Munition
“Clipper” Chip
Digital Telephony Bill
Digital Signature Standard
Other Countries
• Current Legislation
334
Application Layer
• File Transfer, Access and Management
– virtual file store
– file servers and requesting clients
• Electronic Mail
– process to process traffic expected to dominate Internet
– actually email dominates the Internet
• Virtual Terminals
– representing the abstract state of the real terminal
• Remote Job Execution
– JTM: Job Transfer and Manipulation
335
ISO Applications
•
•
•
•
FTAM ~ FTP File Transfer, Access & Manipulation
VTS ~ TELNET Virtual Terminal Service
JTM ~ ??? Job Transfer & Manipulation {maybe rsh, RPC?}
MHS ~ SMTP Message Handling System (X.400)
336
ISO Terminology
“applications”
SASE
SASE
CASE
[Specific|Common] Application Service Elements
“think of them as programming libraries or APIs”
337
ISO Service Elements
(examples)
• Association Control Service Element
(primitives)
• Commitment, Concurrency and Recovery
– atomic actions
– two phase commit
338
File Servers
• 1. File Structure
• 2. File Attributes
– e.g. identifier, size of storage, access control
• 3. File Operations
– create, delete move
– OSI has defined virtual filestore operations
339
Replicated Files
• Why multiple file servers?
– 1. To split the workload over multiple servers.
– 2. To allow file access to occur even if one file server is
down
– 3. To increase reliability by having independent backups
of each file
• Updates
• Voting
340
Electronic Mail
• Motis and X.400
CCITT has aligned them for compatibility
May replace SMTP
• The user agent
user interface
• Message transfer agent
post office
341
Virtual Terminals
• Scroll mode terminals
no local resources; dumb display and
transmission
• Page mode terminals
25 x 80 character display
screen editing via termcap
• Form mode terminals
local processing enabled
• Bitmapped terminals
like X stations
• Browsers!
342
Case Study: Internet
• File Transfer
• Electronic Mail
• Virtual Terminals
343
Getting Started
•
•
•
•
RARP
BOOTP
TFTP
DHCP
344
Domain Name System
• A heirarchial, distributed database
• A service primarily aimed at mapping names
to IP addresses
• Partitioned for ease of administration
345
DNS Structure (partial)
.
edu
utexas
tamu
ibm
austin
cs
mac1
gov
com
solar
mac1
346
DNS -- How it Works
•
•
•
•
DNS Servers in a logical tree
DNS clients on every host
Iterative Queries
Recursive Queries
347
ARP
• Address Resolution Protocol {translate network
layer address to physical address}
• Part of general resolution procedure:
name {e.g., neuron.cs.tamu.edu}
DNS
IP Address {e.g., 128.194.133.1}
ARP
Ethernet address {e.g., 08:00:20:08:58:78}
348
File Transfer Protocol
• FTP recognizes four file types:
• 1. Image
– bit by bit transfer
• 2. ASCII
• 3. EBCDIC
• 4. Logical Byte files
– binary files which use byte size other than 8 bits
349
Electronic Mail
• Pioneered by ARPANET
• RFC 822 (widely used)
• Simple Mail Transfer Protocol (SMTP)
• Supports only ASCII text
• name@domain addressing
350
Virtual Terminals - TELNET
• Designed for scroll mode terminals
• Hit a key , 8-bit bytes are sent
• 95 ASCII and 7 control characters legal
351
USENET--HOW TO AVOID
GRADUATION
• Internet compatible (now)
• Variety of newsgroups
• Moderated newsgroups
• NNTP, Network News Transfer Protocol,
allows selective downloading of messages
to multiple sites
352
The Web
• “the” killer application for the Internet
• Two components for popularity
– http combines multiple access (gopher, ftp, etc) methods
– hypertext interface supports point-and-click interface
• Who will organize the information?
– No one...
– Database experts
– Librarians (!)
353
Web Terminology
• Web Browsers
– Netscape
– Mosaic
• Web Servers
– http daemon
» httd.conf - main server config file
» srm.con - server resource config file
» access.conf - global access control file
• Home Page
– Eg., www.cs.tamu.edu
• HTML
– HyperText Markup Language
354
HTML Document
<HTML>
<HEAD>
<TITLE>Willis Marti’s Homepage</TITLE>
<LINK REV=“OWNER” HREF=“mailto:willis@cs.tamu.edu”>
</HEAD>
<BODY>
<IMG SRC=“my-logo.gif” ALT=“logo”>
<H1> Sample HTML Document</H1>
<EM> To demonstrate HTML </EM>
<HR>
....
355
Web Future Directions
• HTML Enhancements
• Secure Transactions
• Uniform Naming
• Librarians & Brokers
• Information “push” or “pull”
356
Layer 7 Summary
• Service Element Model
• Not all Apps belong here...
• Common Network Services
357
What is a Distributed System?
Just insert a
network?
Mass
Storage
Computing
(CPU)
User
Interface
358
Distributed System
Services
Servers (Storage, Compute)
Network
Users
User Interfaces
Users
359
D.S. Design Issues
• Transparency
• Flexibility
• Reliability
• Performance
• Scalability
360
More Design Issues
• Global Clocks?
• Causality
• Information Consistency
361
Distributed Control
• Master/Slave (Issue: Response Time)
– Polled
– Command -> <-Response
– Schedule under control of server
• Client/Server (Issue: Server Size)
– Interrupt, or Event, Driven
– Aperiodic Scheduling
• Peer-to-Peer (Issue: Coordination)
– No single critical node
– Hard to describe or predict
362
Distributed System:
Why or Why not?
• Performance
• Economics
• Reliability
• Security
363
D. S. Architectures
• Cooperating Peers
• Client-Server
• Tiered Client-Server
– Data Repository
– Compute Servers
– Client Stations
364
“Intranets”
• Definition
– Using Internet protocols, especially Web tools, for
internal MIS
• Motivation
– Information “push” vs “pull”
• Problems
– User Capabilities
– Corporate Policy or Personal Opinion
365
Key Protocol Areas
•
•
•
•
•
Directory Services
RPCs
Security/Authentication
(Performance) Management
Programming Models
366
References
• ISO RM-ODP
– ITU-T X.901/ISO 10746-1/2/3/4
• Amjad Umar Distributed Computing: A
Practical Synthesis
– PTR Prentice-Hall, Englewood Cliffs, NJ, 1993
• Sape Mullender Distributed Systems, 2d ed.
– Addison Wesley, 1993
367
Network Management
Definition
"...deploying and coordinating resources in
order to plan, operate, administer, analyze, evaluate,
design and expand communication networks to
meet service-level objectives at all times, at a
reasonable cost, and with optimum capacity."
368
Network Management
Functional Areas
• Fault Management
detect -- diagnose -- repair
•Configuration/Name Mgmt
a database problem...
•Performance Mgmt
measure and predict
•Accounting Mgmt
look at individual usage
•Security Mgmt
access control and encryption
369
Management Protocols
• SNMP - Simple Network Management
Protocol
– Internet
• CMIP - Common Management Information
Protocol
– ISO
• TMN - Telecommunications Management
Network
– ITU-T
370
Management Protocols
Philosophy
• SNMP - Simple Network Management
Protocol
– keep it simple! (cf the Internet toaster)
• CMIP - Common Management Information
Protocol
– the bazaar: whatever you want
• TMN - Telecommunications Management
Network
– actually a separate network specification
371
SNMP vs CMIP {round 1}
SNMP
CMIP
Requirements from
various vendors and
user communities
372
ISO Management Overview
Fault
Configuration Performance Security
Accounting
Management Management Management Management Management
System Management Functions
Object Mgmt Alarm Mgmt Event Report Mgmt Workload Monitoring
State Mgmt Log Control Security Alarm
Security Reporting
Measurement Summarization
Bill Verification
Billing
Resource Utilization
Test Mgmt
Relation Mgmt
CMISE Services
Initialize Event Report
Set Get Delete Cancel
Terminate
Action Create Abort
Confirmed Event Report Confirmed Get
373
SNMP Architecture
• Keep the agent as simple as possible
• Support remote management operations to
the fullest extent possible
• Plan for future additions & expansion
• Be independent of specific hosts or devices
• Operate at the Application level
374
Internet Management Model
Agent
Managed
Entities
Network
Management
Proxy
Agent
375
Managed
Entities
SNMP
• Intersection of vendor/user requirements
• Few ‘verbs’:
–
–
–
–
get / get-next
get-bulk {SNMPv2}
set
trap
• Polled, Master-Slave, Request-Response
376
SNMP Format
• <header><verb><value><variable>[<verb><value><variable>]
• ASN.1 subset to describe value format
• MIB-II{Management Information Base} to
identify variables
• UDP as a Transport layer
• Now out! SNMPv2
377
The MIB
• Standard set of data for managing network
devices
• Variable names are part of the ISO/CCITT
object identifier namespace
• Provides globally unique identifiers
• Variables governed by Structure of
Management Information (SMI) specification
378
Accessing MIB Data
• SNMP Communities
• SNMP Views
• SNMP Authentication
379
Abstract Syntax Notation 1
(ASN.1)
•
•
•
•
•
Data Structures
Abstract Syntax
Transfer Syntax
International Standard 8825
Notation used to encode, transfer and decode
data structures across a wide range of
applications
• Both connection-oriented and connectionless
primitives
380
Example SNMP PDU using
ASN.1
SEQUENCE
len=41 INTEGER
len=1 vers=0
30
29
02
01
00
string len=6 p
u
b
l
i
c
04
06
70
75
62
6C
69
63
getreq. len=28 INTEGER len=4 -------request ID---------------A0
1c
02
04
05
AE
56
02
INTEGER len=1 status INTEGER len=1 error index
02
01
00
02
01
00
SEQ.
len=14 SEQ
len=12 objectid
len=8
30
0E
30
0C
06
08
1.3
6
1
2
1
1
1
0
2B 06
01
02
01
01
01
00
null
len=0
05
00
381
SNMP vs SNMPv2
• History in Brief
• More features (more complex)
• BIG increase in security
– authentication and integrity
– access controls
– security and privacy
• Better access controls in Views
• Trap confirmations
• Knowledge of multiple managers
382
Enterprise Architecture
• SNMP is designed for simple, manager-toagent communications
• CMIP is complex and bulky, but complete
• Most Enterprise networks can’t be managed
directly from a single place
383
Enterprise Management
CMIP
Managers
Separate
Organization
SNMP
Managers
Local
Networks
384
Management Tools
•
•
•
•
Packet Analyzer
Media Analyzers (TDR, OTDR, BER Tester)
RMON devices
Hosts (?)
385
Software Tools
• Hosted on PCs
• Hosted on Unix Workstations
• Commercial Packages
386
Decent Books
• Network Management Standards 2d ed
– Uyless Black
• The Simple Book, 2d ed
– Marshall T. Rose
• Communication Networks Management, 2d ed
– Kornel Terplan
• Internetworking with TCP/IP, Vol I, 3d ed
– Douglas E. Comer
387
Defining Network Security
Security is prevention of unwanted information
transfer
• What are the components?
–
–
–
–
...Physical Security
…Operational Security
…Human Factors
…Protocols
388
Areas for Protection
•
•
•
•
Privacy
Data Integrity
Authentication/Access Control
Denial of Service
389
Regulations and Standards
• Computer Crime Laws
• Encryption
• Government as “Big Brother”
390
Security
Threat, Value and Cost Tradeoffs
• Identify the Threats
• Set a Value on Information
• Add up the Costs (to secure)
Cost < Value * Threat
391
Threats
•
•
•
•
•
Hackers/Crackers (“Joyriders”)
Criminals (Thieves)
Rogue Programs (Viruses, Worms)
Internal Personnel
System Failures
392
Network Threats
•
•
•
•
•
IP Address spoofing attacks
TCP SYN Flood attacks
Random port scanning of internal systems
Snooping of network traffic
SMTP Buffer overrun attacks
393
Network Threats (cont.)
• SMTP backdoor command attacks
• Information leakage attacks via finger, echo,
ping, and traceroute commands
• Attacks via download of Java and ActiveX
scripts
• TCP Session Hijacking
• TCP Sequence Number Prediction Attacks
394
Threat, Value and Cost Tradeoffs
•
•
•
•
•
Operations Security
Host Security
Firewalls
Cryptography: Encryption/Authentication
Monitoring/Audit Trails
395
Host Security
•
•
•
•
Security versus Performance & Functionality
Unix, Windows NT, MVS, etc
PCs
“Security Through Obscurity” L
396
Host Security (cont)
• Programs
• Configuration
• Regression Testing
397
Network Security
• Traffic Control
• Not a replacement for Host-based
mechanisms
• Firewalls and Monitoring, Encryption
• Choke Points & Performance
398
Access Control
• Host-based:
–
–
–
–
Passwords, etc.
Directory Rights
Access Control Lists
Superusers L
• Network-based:
–
–
–
–
Address Based
Filters
Encryption
Path Selection
399
Network Security and Privacy
• Protecting data from being read by unauthorized persons.
• Preventing unauthorized persons from inserting and deleting
messages.
• Verifying the sender of each message.
• Allowing electronic signatures on documents.
400
FIREWALLS
•
•
•
•
•
Prevent against attacks
Access Control
Authentication
Logging
Notifications
401
Types of Firewalls
• Packet Filters
Application
– Network Layer
• Stateful Packet Filters
– Network Level
• Circuit-Level Gateways
– Session Level
• Application Gateways
– Application Level
402
Presentation
Session
Transport
Network
Data Link
Physical
Packet Level
• Sometimes part of router
• TAMU “Drawbridge”
Drawbridge
Campus
403
ROTW
Router
Circuit Level
• Dedicated Host
• Socket Interfaces
Local
FW
ROTW
404
Application Level
• Needs a dedicated host
• Special Software most everywhere
Firewall
telnet
ROTW
405
Firewall Installation Issues
FTP
INTERNET
DNS
Web
Router
406
Mail
Firewall Installation Issues
•
•
•
•
•
•
DNS Problems
Web Server
FTP Server
Mail Server
Mobile Users
Performance
407
Address Transparency
• Need to make some addresses visible to
external hosts.
• Firewall lets external hosts connect as if
firewall was not there.
• Firewall still performs authentication
408
Gateway
Internet
10.0.0.0
128.194.103.0
Network Address Translation
Firewall
409
Network Address Translation
Host B: External Host
Gateway Host
Host A: Internal Host
gw control
ftpd
ftp
proxy ftp
TCP
IP
TCP
Data Link
IP
Hardware
Data Link
TCP
IP
Data Link
Hardware
Hardware
A GW
Datagram
A B Datagram
410
IP Packet Handling
•
•
•
•
•
Disables IP Packet Forwarding
Cannot function as a insecure router
eg. ping packets will not be passed
Fail Safe rather than Fail Open
Only access is through proxies
411
DNS Proxy Security
INTERNET
External DNS Server
DNSd
Eagle Gateway
eagle.xyz.com
finance.xyz.com
sales.xyz.com
marketing.xyz.com
412
Virtual Private Tunnels
Encapsulate
Hello
Authenticate
Hello
Encrypt
Hello
INTERNET
!@@%*
!@@%*
!@@%*
Creates a “ Virtual Private Network “
413
Hello
Decapsulate
Hello
Authenticate
Hello
Decrypt
VPN Secure Tunnels
• Two types of Tunnels supported
– SwIPe and IPsec tunnels
• Encryption
– DES, triple DES and RC2
• Secret key used for used for authenticatio
and encryption
• Trusted hosts are allowed to use the tunnel
on both ends
414
Designing DMZ’s
DMZ
INTERNET
Web
FTP
Company
Intranet
Mail
415
Screening
Router
Firewall Design Project
San Jose
File Server
INTERNET
Mail Server
Wide Area Router
Dallas
Internet
Router
Raptor Eagle
Raptor Remote
Hawk Console
416
Monitoring
• Many tools exist for capturing network traffic.
• Other tools can analyze captured traffic for
“bad” things.
• Few tools are real-time.
417
Summary
• Security must be comprehensive to be
effective.
• Remember threat, value, cost when
implementing a system.
• Security is achievable, but never 100%.
• Make your system fault tolerant.
418
Where Do the 7 layers “fit”?
Or, where is
the dividing line
between hdw &
s/w?
Application
7
Presentation
6
?
Session
5
Transport
4
Network
3
Data/Link
2
Physical
1
419
?
Implementing the Model
User Space Software
OS Space
Software
Firmware
Hardware
420
Some More Definitions
• User Space Software - Code that executes as any
program that a normal user could compile and run
• OS Space Software - Code that executes on the host
CPU but in a mode or with special access that normal users can
not use
• ‘Firmware’ - Code that executes on a processor (special or
general purpose) that is different from the host CPU; may be in
PROM or RAM downloaded from another source
• Hardware - Generally special purpose VLSI and analog/linear
interface components
421
Assigning the 7 layers
• Performance
• vs
• Flexibility
422
Download