Informal Logic

Download Report

Transcript Informal Logic

Communication
(including Networks)
Pervasive Intelligent Environments
Spring 2004
Copyright © 2004 Charles J. Hannon
All rights Reserved.
Why do we need communication
in a smart environment?





Allows sensor input to be collected, fused
and used by a controller or processor
Allow controllers and processors to effect
the environment via actuators
Allows controllers and processors to work
together
Allows the environment to talk to other
environments
Allows the remote access to the
environment by its owner
Is there a one size fits all solution
to communication?


Short answer, NO
Each level has different needs

sensors  controller  actuators


controllers  controllers  processors


medium to low data rate with little overhead
processors  processors


low data rate with little or no overhead
high data rate with higher overhead
processors  WAN

medium data rate with higher overhead
Some Basic Concepts








Data transmission
Clock/control signals
Data framing
Synchronous vs. asynchronous transmission
Serial vs. parallel
P-to-P, hierarchies and broadcast
Addressing (fixed and virtual)
A network
Some Other Concepts

A reference model



Collisions and collision avoidance
Data rate control




with a quick overview of the layers
admission control
flow control
congestion control
Quality of Service (QoS)
Some Standards







I2C
RS-232/449
IEEE-488 (GPIO)
TCP/IP (802.3, 802.u, 802.z)
Wireless Ethernet (802.11)
Broadband (ATM, 802.16, etc.)
Others (VoIP, etc.)
Data Transmission

A
data
B
Given two devices capable of
generating and receiving a
digital signal (high=1, low=0)
on a data line with respect to a
common ground

If A is the sender and B is the
receiver, A can send one bit of
information to B by setting the
data line to either a high or a low
Now, Some Control

Add a second line (for control) that
can be set

control
A
data

B

high, if A is sending to B
low, if B is sending to A
Now, A/B can send one bit of
information to B/A by


setting the correct direction voltage on
the control line
then, setting the data line to either a
high (1) or a low (0)
Now, Some More Control
(a hardware handshake)

connect
A
Add three more control lines that can be set
high when
RTR

RTS

direction
B


data
A and B see each other
A/B is ready to send
B/A is ready to receive
Now, A/B can send one bit of information to
B/A by





see if the connect line is high
set the RTS line high
see if the RTR line is set
set the correct direction voltage
set the data line to either a high (1) or a low (0)
Now, some distance

connect
RTR
RTS
A
direction
B
If we want to add some distance
between the two devices, we need to
do two things

data
GND

Add one or more ground lines to ensure
that the devices have the same idea
about the voltage level of ground
Increase the voltage level (above or
below ground) of the control and data
lines so they are less affected by the
resistance of the transmission lines
Why so much work just to
send a bit?

connect
RTR

RTS
A
direction
data
B

GND

First, A/B can be sure that B/A is
really there
Second, A/B knows that B/A is ready
to use the information being sent
Third, A/B can send a bit, and then,
do another handshake to send a
another bit
Of course, there is a better way
Bi-directional Communications

connect
RTR(2)
RTS (2)
A

B

data 


we will need it back a littler later, but …
Of course, now we need two sets of
RTS/RTR lines

data 
GND
The direction control line is currently kind of
a waste, so let us replace it with a second
data line
but you never get something for nothing
For this approach the handshake is the
same as before except there is no direction
to set
And, of course

you can send and receive at the same time
Enough control already, can
we send some useful data?

connect
RTR(2)

RTS (2)
A
clock
For the simple approach, we need
another control line called the clock
B
data 
data 

GND

Sends out alternating ones and zeros at
twice the rate we want to send data
over the data lines
This allows us to send serial data over
the data line
Example:
1 1
0 1
The Problem with
a Clock Signal (1)




A clock signal is basically a square
wave
In EM transmission, the only things
that really exist are sine and cosine
waves
So if you try to transmit a square
wave, you end up transmitting a
bunch of sine waves at difference
frequencies and amplitudes
But, transmission lines have an
impedance (AC resistance) which is
proportional to the frequency being
transmitted
The Problem with
a Clock Signal (2)

So,




the longer the transmission line
the more the high frequency components
of the clock signal get attenuated
and, the less the clock signal looks like a
square wave
Since the leading (or sometimes the
trailing) edge of the clock pulse


is used to figure out when the data bit is
changing
a clock pulse that not longer has an
identifiable edge is not exactly the most
useful thing to be trying to use
OK, now what do we do?


For long distances, a clock line is clearly not the solution
Is there another way to clock?


The problem with clocking off the data line is that
nothing forces the data to transition from


Yes, it is called a frame
0  1 or 1  0 at any given time in the signal
If we were to insert a forced transition at a given rate

we could use this framing signal to clock the data
F=1/0
1 1
0 1 1 1 1 1 F=1/0 1 1 1
Framing

The good news


As longs as all the data is being transmitted on
a signal line, it allows us to get rid of a clock
signal
The bad news


It adds ‘overhead’ (a non-data part of the
signal) to the transmission
The more transitions, the better

so it works best when we use something like a
framing nibble
A Definition (sort of)

A transmission approach that uses a clock line
is called


A transmission approach that uses some type
of framing is called


synchronous data transmission
asynchronous data transmission
Like everything else in networking


the term synchronous and asynchronous are
overloaded
Later, we will see a different meaning when we
cover STM and ATM
Serial vs. Parallel
(increasing speed)

We can increase the data transmission speed
by


adding more (parallel) data line
increasing the speed at which we send serial data


A parallel data transmission method is


we will cover this method later
just a group of serial data lines that have been
synchronized to send their data in lock step
So,

the same method for increasing the speed at
which we send data should help both, right?
Serial vs. Parallel
(the limits of parallel)

One might think that the reason things like the
Ethernet are serial is simply due to the cost of
wiring


True, but that is not the real problem



after all, a parallel line must contain more wires, so be
more expensive to run
first, framing only clocks a single line, so a parallel line
normally must contain a clock line
second, thanks to the way EM works, data lines that run
at high voltage right next to each other tend to share
their information (called cross-talk)
This means that parallel lines are inherently bad
for running data any further than about 50 feet
Topologies (Point-to-Point)

A
B

Every device is connected to every
other device
Good points

C
D




simplest approach
no addressing needed
everyone is your neighbor
you can always talk to your neighbor
Bad points

number of ports/lines grow relatively
quickly with the number of devices
Topologies (Hierarchy)

A
B
Devices are connected via hubs to other
devices


Good points

C


fewer connections
devices can have neighborhoods
Bad points

D
If everyone is connected to a single hub, it
is called a Star topology


you need an address (defined later)
you may have to wait to talk to a neighbor
asymmetric communication with some
devices
Topologies (Broadcast)

A

B
All of the devices are connected to a
single wire
Good points


C

Bad points

D
single wire
everyone is your neighbor



you need an address
you may have to wait to talk to anyone
collisions can occur
communication times become statistical
Physical Addresses

A
0001

If more than two devices are on the same wire (bus),
you will need an address to send and receive data
Approaches

B
1111


Issues

C
D
1000

1100
separate vs. combined data/address lines
hardwired vs. selectable address

as the number of devices increase, the address space
(size of the address) must increase
hardwired addresses may tell you nothing about the
network topology
addresses will be used up by devices that might not be
on-line

so your address space may be too big, causing too much
overhead
Virtual Addresses

A
B
C
00
A solution to some physical address problems
is a virtual address

01
10


Approaches


D
11

the address space (size of the address) can be
reduced by only giving addresses to on-line devices
addresses can be set up to support network
topology
fixed vs. run-time addresses
universal vs. p-to-p addresses
Issues


how to assign them
their relationship to the physical address
A Network (A Basic Definition)


A group of computer devices connected together using
a common protocol
Most networks physically use





One or more serial data lines
Little or no hardware-based control (i.e., no control lines)
A combined address/data transmission scheme
A fixed hardware-based address scheme
Built on this, the network protocol




Allows an easy way to connect devices to the network
Tries to reduce transmission errors
Handles transmission problems as they occur
Makes it easy for software applications to talk over the network
The Reference Model
(Overview)




Network protocols are now
built in layers
These layers and their
boundaries are defined using
something called a reference
model
The most general of these
reference models is the OSI
model which defines seven
layers
Most of what we have talked
about up to this point is in the
physical layer
The Reference Model
(A Software View)

Network software is
written to handle each
layer containing
software (2 and above)



It uses the API (or SAP)
from the layer below
Provides an API (or
SAP) for the layer above
A SAP provides a
virtual connection at
that layer
Reference Model
(Message View [1])

At each layer


the data from the layer above
is viewed as the message
this message is provided with
a header (and/or trailer)


which allows the virtual
connection of that layer to share
connection information
Above the bottom S/W layer

the result is called a packet
Reference Model
(Message View [2])

However, the bottom layer
is special



because it has to really send
the message
it may break the message
into pieces to better transmit
it
it almost always adds a
header, trailer and flags


the result being called a frame
or a cell if just a header is used
The Physical Layer

Make up of hardware (standards)

Nodes






controllers
NIC: PCs, servers, etc.
hubs, Ethernet switches
routers
circuit/packet/cell switches
Connection




wire: twisted pair, co-ax
fiber optics: NB and BB
wave guides
wireless RF
Physical Layer - Connections

The first two
components of
a medium’s
ability to carry
information are


base frequency
range
bandwidth
range
Connection Examples

Typical Fiber Optics



Cat 5e cable (twisted pair)



very high base frequency: 5 x 1014 Hz
low relative bandwidth:  10%
lower base frequency: 2.5 x 108 Hz
very high relative bandwidth:  100%
Typical Satellite


Slightly higher base frequency: 5 x 109 Hz
very low relative bandwidth:  5%
Network Components

Local Area Network



Within a building (or maybe a complex)
May have one or more pieces (subnets)
Wide Area Network


Example: one type of WAN is the Internet
Components



The ‘Last Mile’ or ‘Digital Last Mile’ connects LANs to the WAN
Internet Service Providers (ISPs) handle the protocol level
connection over the Last Mile
The Telco network handles the ‘backbone’ which connects ISPs
The LAN

Processing nodes are connected using



Broadcast networks (called a LAN in the figure)
Hubs/switches (do much the same thing)
Bridges (and routers)

but technically a LAN cannot contain a router
Example: Cable as the
(Analog) Last Mile
Example: ADSL as the
Digital Last Mile
Telco Switching
A Sign Post

We have spent a great deal of time covering the physical
layer


Now we are going to cover the high points of the other
layers



Because this will directly help you understand how a smart
environment is physically connected when we get around to that
first, because this will also help
but more importantly, it will give you some idea of just how much
you are asking a network enabled smart device to do when you
assume it is going to provide something like a web interface
The moral (before the story) is

don’t demand user friendliness, unless you are wiling to pay for it
The Data Link Layer




Messages are ‘framed’ using character stuffing,
bit stuffing or header matching
Message pieces are reordered and reassembled
Collisions (of they are possible) are resolved
Many other things (like error correction, location
detection, message encoding, etc.) are handled
The Framing Problem

If you allow variable size frames

You cannot just use length to frame
A Partial Solution

Add a flag at the beginning and end of
every frame


Pretty much any byte length sequence with
some ones and zeros will do


You need both to be able to deal with dead air
But a common flag is 01111110
OK, now the problem

What if that byte sequence just happens to be
the message you are sending?
A Pretty Dumb Solution
(to the Problem our Solution Caused)


It is called character
stuffing
It works just like


the way you print special
characters in UNIX by
putting yet another special
character in front of them
Only problem


It a terrible solution
Half of your message ends
up being stuffed bytes
A Better Solution (Bit Stuffing)


Just add a zero anytime you see the flag pattern
in the message
Believe it or not

This is actually relatively easy to do and to recover
from doing
Reordering Frames

This is not an easy
problem

Hard to detect



Sequence numbers have to
repeat sometime
Acknowledging every message
waste bandwidth
Hard to recover from
without wasting either


time (resending), or
Space (save out of sequence
messages)
Collisions (and non-collision)

There are some protocols that do not allow
collisions




And some that go out of their way to avoid
them


Bit Map
Binary Countdown
Token Ring and Token Bus
Adaptive Tree Walk, etc.
But, most of the important ones being used
today do
What causes a collision?

Just because a device looks to
see if someone else is
transmitting before sending



does not mean its message will
get through
the reason: it takes time for a
signal to travel down a wire
The longer the wire, the worse
the problem gets

which is why a broadcast LAN can
be only so long
Two Statistical Solutions to a
Statistical Problem

If you are using




a wireless medium
with a great deal of distance between stations
there is basically nothing you can do to avoid
collision
But if you are using a wire, you can


Carrier Sense (CSMA) by making sure the
channel is free (idle) before sending
Collision Detect (CSMA/CD) by listening to
what you send
Carrier Sense
(without the two or three days of math)


p-persistent means you wait for the channel to become idle and
when it does you have a probability of p of choosing to seize it
nonpersistent means if the channel is idle you send, but if it is
not idle you go away for some random time before trying again
Collision Detection

Good News

The concept is absurdly simply


If what I am hearing is not what I am sending, there must
have been a collision
Bad News


This is an analog comparison which requires special (but
fairly simple) hardware
Even if I am an using a full-duplex line (like with a hub), I
cannot send and receive at the same time
Some Ethernet Details

The Data Link layer is where the Ethernet MAC
address (EA) lives

the 48 bit number that come with your NIC


There is one special EA called a broadcast address


Example: EA = 00:50:04:A4:5F:84
EA = FF:FF:FF:FF:FF:FF
The Ethernet header looks like
DIX
802.3
The Network Layer

Routers live here


The things that drive the WAN
ARP and DHCP lives here

APR is the thing that allows you to


DHCP is the thing that allows you to


figure out the EA of the computer assign an IP address
like 138.237.123.12 so you can send it a message
provide network information from a server
And, most of data rate control lives here

Stuff that try to keep the network from getting
overloaded
Routing
(without the graph theory)

Routers are basically IP switches


they map output paths to a range of IP addresses
But unlike LAN devices, routers live in a world where


not only do theyhave to figure out how to get a packet from
point A to B
you have to worry about the effects of picking one path over
another
Routing Algorithms

You need a routing algorithm, unless you want to



Network routing R&D is not going anywhere



Set up the network by hand (hardcode all the paths)
Never deal with dynamic equipment changes
There is always a need for better and better specialized
routing algorithms (many papers a year)
Complexity is a routing algorithm’s middle name
But, almost all algorithms are some combination of


Bellman-Ford’s distance vector (1957)
Link state (1979)
Routing Issues



When and how do you update the network topology?
How large a view of the whole network does each router
need?
Should a route be




How do you router the same packet to multiple places?
What if the devices being routed to are free to move?


Connection-oriented (all of the packets following the same route)
Connectionless (each packet is free to get there the best way it can)
called mobile hosts
What do you do if the routers are free to move around?

called an Ad Hoc networks
Address Resolution Protocol

ARP is what allows you to


give a computer an IP address without
having to worry about telling every other
computers on the LAN its EA-IP mapping
The beauty of ARP is that



it is fully distributed
very simple
almost foolproof
ARP (how it works [1])


Every computer on a LAN keeps an ARP table with all
known EA to IP mappings
If it wants to talk to another computer, it looks to see if
it already knows the EA


If not, it broadcasts an ARP request using the EA
broadcast address


If so, it puts the EA in the level 2 and the IP in the level 3
header and sends the message
Who owns 192.168.2.2 ?
All computers on the LAN get the request, but only the
computer with that IP responds and all it has to say is

I own 192.168.2.2
ARP (how it works [2])



Since the reply message is not broadcasted (sent
p-to-p), the level 2 header already contains the
EA address of the requestor and responder
Then the requestor can update its ARP table
with the responder’s EA to IP mapping
Over a period of time a table entry times out so
if you replace a NIC, all the devices on the LAN
quickly learn about the change
ARP and the WAN

An EA broadcast never leaves a LAN


But WAN magic happens because


a router connected to a LAN responds to ARP requests just
like any other computer
Each computer is setup either statically or by
something like a DHCP server


routers do not forward EA broadcast
to know the IP address of the gateways (ways out of the
LAN for a given set of IP addresses)
The computer uses ARP to find the gateway’s EA and
then sends the message to it
Reversing the ARP Process

Why?



Allows a computer’s IP address (and other
things like gateways’ IPs, host names, etc.)
to be configured from a central location
Better utilization of IP addresses
A historic overview

RARP  BOOTP  DHCP
A More Detailed History

Reverse Address Resolution Protocol (RARP)


Used EA broadcast (just like ARP)
Simple process




Problem: could not cross router boundaries
BOOTP



A computer broadcast: what IP belongs to EA = x?
A RARP server responds to x with: IP= y
Uses UDP messages (IP broadcast)
Requires a manual setup of the EA-IP mapping
DHCP


Extends BOOTP to allow the server to provide more information
Adds the concept of leases which allows an automatic assignment
of IPs while providing some EA-IP mapping stability
Tunnels and Private LANs
(the problem)

Computers on the same LAN can share
information using


EA-based services like ARP
IP-based services blocked at the router (firewall)



done for security, speed, etc.
Routers do not preserve anything below the
network layer
So, two computers on separate LANs cannot
normally be as ‘connected’ as two computers
on the same LAN
Tunnels and Private LANs
(the tunnel concept)

Any packet can be wrapped by another
packet/frame/cell


If you wrap a packet/frame/cell




this is how the layered concept of networking works
in a packet/frame/cell at the same network layer
using either the same or a different protocol
you create something called a tunnel
Since the internal packet is wrapped before
transmission

tunnels can preserve LAN-based information
Tunnels and Virtual LANs
(virtual private networks)

Tunnels can be used to do a lot of things


Say you want to allow a remote computer



to use a service (like PostgreSQL)
without running the risk of everyone seeing the database
Using either the server’s built-in access control or the
firewall’s port control



but we will address only VPNs
you can open a port in your firewall for the service while controlling which
remoter computers can access the database
however, you are still passing your data through a public network
Solution:


set up a VPN between your firewall and the remote computer
now you can tunnel your data via an encrypted link
Transport Layer

Forms the link between
network applications running
on different machines



Setup the connection
Get the data packet to/from
the NIC and application who
wants it
Figure out when a connection
is no longer operating
Ports (TSAPs)

Ports are ID numbers used to keep track of
application connections




A complete connection consists of two ports
(one on each machine)


‘well known’ ports (0 - 1023)
‘registered’ ports (1024 - 49151)
dynamic or private ports (49152-65535)
these are sent in the transport level packets
Ports point to the ‘socket name’ data structure

contains information about how the application is
using the port
Sockets

Uses the analogy of wall plug


A socket is the mapping between



A socket is what you plug your application into to get
connected to the network
the name socket name structure using be the
transport layer, and
the stream/datagram structures used by OS’s system
call to support IPC
In UNIX, socket numbers are just file descriptors
with a Non-NULL socket name pointer in their
file descriptor structure
Transmission Control Protocol (TCP)


TCP is the protocol for setting up a bidirectional pipe between two sides of a
networked application
Good points

More secure connection




both sides know who each other are (or at least claim to
be)
Guaranteed delivery
Flow control is built in
Bad points

Slow
User Datagram Protocol (UDP)


UDP is the protocol for setting up a datagram
transport between two sides of a networked
application
Good points



Fast
Better handles dynamic connections
Bad points



Less secure connection
No guaranteed delivery
No flow control
Client/Server


TCP-based applications are built on the clientserver model
The Server


sets up a listening port (and socket)
accepts (or rejects) client connections


The client


Adds a new socket for each connected client
attempts to connect to a server
Once connected the path is


normally bi-directional
can be shut down from either side
The Gory Details
Session thru Application Layer


The session and presentation level of
the OSI model are rarely used
The Application layer supports network
enabled applications



These applications use their own protocol
Examples: HTTP, SMTP, etc.
Little or no network related activity
happen above the transport level
An Example: DNS


The Domain Name Service (DNS) maps
between IP addresses and domain
names
It is supported by DNS servers which
use their own protocol
Other Common Applications

E-mail


WWW


SMTP, POP3, IMAP, etc.
HTTP, HTML, XML, etc.
Other Important Classes



RPC-based (NFS, etc.)
UDP-based (RPC, etc.)
Tunnels (ssh, cipe, etc.)
Hierarchy of Control

Admission Control



Flow Control


supports something called QoS
tries to prevent the conditions for a
problem
tries to stop the problem at the source
Congestion Control

tries to fix problems when they happen
Admission Control
(just the basics)

Tries to statistically determine

what you want


what you can stand




maximum latency, jitter rate, etc.
what you can have


average latency, average and peak bandwidth, etc.
Total bandwidth available
Priory of traffic (how much you are willing to spend)
your willingness to play by the rules
Three steps



negotiate (renegotiate) for QoS
monitor your adherence to the rules
take action when things do not work out
Flow Control

Tries to throttle a dataflow at

the source or the problem



destination of the problem



called forward flow control
reduces traffic directly
called backwards flow control
reduces traffic by reducing request
Forward works better, but backward is
easier to do

reason is on the next slide
Congestion Control

Two step

Start dumping packets to fix the immediate
problem




Inform someone so flow control can take over



Dumb: First in, first dumped
Smart: Priority dump
Smarter: Priority & percent of problem dump
Dumb: forward inform in related packets
Smart: backward inform in related packets
Backward works better, but forward is
much much easier to do
Smart Home, Office & Car
Communication/Network Issues

Installation

Homes and offices last 100s of years


Cars are normally replaced every few years


intelligent systems must be integrated to other components
from the start
Cost

A solution needs to



need a way to be upgraded to smart environments without
sacrificing power
cost under the ‘threshold of pain’
last long enough to return on the investment
Safety and reliability

The more you control, the harm you can do
Smart Homes and Offices
The Current Model
LAN
OS S/W
NIC
Net S/W
NIC
OS S/W
Net S/W
AI S/W
AI S/W
S Ctrl S/W
S Ctrl S/W
I/O
A Ctrl S/W
X10, IR/RF
I/O
NIC
NIC
OS S/W
Net S/W
Firewall
S/W
A Ctrl S/W
RS232/USB
Digital Modem
Appliance
Appliance
Appliance
Sensor
Appliance
Appliance
WAN
Smart Homes and Offices
The Future Model
Sensor
NIC
Mobility S/W
Agent S/W
LAN
Sensor
NIC
NIC
Agent S/W
Agent S/W
wireless, wire or fiber
Appliance
Mobility S/W
Mobility S/W
Appliance
NIC
Mobility S/W
Agent S/W
Interface
WAN
Smart Car (One view)


Main Processor will have
the power of a modern
home PC
Talks to the engine &
chassis systems using
existing standards



CAN, LIN
J1850 PWM & VPM,
Keyword 2000
Talks to the other
systems using


MOST, FlexRay
USB, 1394, Ethernet
The Supporting Standards

Serial:


Ethernet:


802.11 & Bluetooth
Controller:


802.3  802.u  802.z
Wireless:


RS232  USB  IEEE 1394
I2C, CAN, LIN, X-10
Others:

FlexRay, MOST, VoIP
RS-232


Very old (and reliable) standard for direct
connection of devices to a computer
Specs

P-to-P connection (master-slave)


11 to 6 wire used


depending on application
Can support speeds up to 56 kbps


no addressing supported
9600 bps is the most common flow rate used
Features


Built-in support for things like analog modems
The most widely used I/O standard in the history of
computing
USB


Designed to replace RS-232 for computer device I/F
Specs

127 devices in a tiered star



Control



main processor acts as controller
controls who can transmit
Speed


using hubs
hot swappable devices
full-speed – 12 Mbps; high-speed – 480 Mbps
Features

inexpensive enough for general control
IEEE 1394 (Firewire/i.Link)


Designed to support the LAN-based video
Specs

64K nodes in a peer-to-peer topology



Control



1 device per node acts as bus manager
all nodes get equal access
Speed


63 nodes per network, 1024 networks, 1394 bridges
hot swappable nodes
1394a – 400 Mbps; 1394b – 800 to 3200 Mbps
Features


high speed
too expensive for many control applications
TCP/IP (802.3, 802.u, 802.z)

802.3 (10 Mbps)



802.u (100 Mbps)



10baseT: twisted pair (4-wires of CAT5)
10base2 (and others): co-ax based
100baseT: twisted pair (4-wires of CAT5 or CAT5e)
100baseF (FDDI): single fiber
802.z (1 Gbps)


1000baseT: twisted pair (8-wires of CAT5e or CAT6)
1000baseF: single fiber
Wireless Ethernet (802.11)


We will only cover 802.11b (the most common)
Data rate varies with the SNR


Uses




fixed Access Points (APs) that work like bridges
the same frequency band as FRS radios (2.4GHz)
spread spectrum encoding (79 channels)
Features



at maximum SNR, transmits at 11 Mbps
allows hand-off between Access Points
vendors supported encryption
Problems

vendors tend to modify things, so single vendor solution is best
Bluetooth

Supports an Ad Hoc network
for PDA-type devices


Uses



64Kbps (each way) per hop
Bridge slaves to extend the
network
The same FRS transmission
standard as 802.11b
Is basically an experimental
network
I2C
(Inter-Integrated Circuit)

One of the oldest controller buses


Philips (1980s)
Low-cost chip-to-chip communication link

uses two wires to form a clocked serial bus



one called Clock (SCL) and the other Data (SDA)
the SDA carries address, selection, control, and
data
Overview



multi-master bus (up to 1024 devices)
can run at speed up to 3.4 Mbps
can be used as a SAN

but normal ranges are on the order of 14 cm
Automotive Inspired Busses
LIN
(Local Interconnect Network)


Designed for European cars (still used)
Very simple



single wire
single mastered bus
Overview




1 master, up to 16 Slaves
uses a message-based protocol
maximum distance of 40 m
Two data rates

9,600 and 19.2 Kbps
CAN
(Controller Area Network )

CAN was designed to support emission control
system in European cars


Capable of



but became a general automation control bus
high-speed (1 Mbits/s) data transmission over short
distances (40 m)
low-speed (5 kbits/s) transmissions at lengths of up to
10,000 m
Overview


a multi-master bus
highly fault tolerant

Built-in support for error detection and handling
MOST
(Media Oriented System Transport)

An inexpensive
automotive and
appliance network



25 Mbps fiber-optic
bus
for real-time data
transfer
used in surroundsound systems and
CD and DVD players
FlexRay



Designed to replace LIN, CAN and MOST as
a ‘by wire’ solution for future cars
It is a fiber-optic bus (like MOST)
Current speed


But it is designed to go much higher


10 Mbps
could run faster than 100 Mbps
But remember

that is faster than most current microcontroller’s internal bus speed
X10


Has been around for 20 years
Uses


AC power lines to transmit control information
from a transmitter to up to 16 receivers


the address scheme allows for 256 devices but top 4
bits of the address are reserved for a home code (A-P)
Problems

was designed as a manual control system


very little control information can be sent
the data signal can be easily confused

by things like fluorescent lamps, motors, etc.
VoIP (Voice over IP)

This is simply a way to send voice over a
computer network


In a WAN, VoIP allows you to move



details are not that important
from sending data over voice lines
to sending voice over data lines
In a LAN, VoIP allows you to


combine cable, phone and your computer
network into a single line
a very important thing to do

if we move to a totally fiber network
Some Other Issues

Compression


Mobile Agents



MPEG as an example
What they are
How they work
Security

The challenge of moving from where we
are into an ubiquitous future
Compression using MPEG
(Moving Picture Experts Group)

MPEG are a group of standards for compressing audio
and video data

MPEG-1 was designed to



MPEG-2 was designed to



support CD-ROMs
data rates of about 1.5 Mbps
Support DVDs
data rates of about 4-8 Mbps
Currently,


almost every piece of digital video transmitted or
stored uses MPEG compression
including this class
MPEG
A Very Simple Explanation


Between frames of a moving picture,
most of the picture does not change
So a simple way to compress video is to




compare the frames
find the smallest box (or set of boxes) that
outline the things that did change
instead of sending the whole second frame,
send only those boxes
Of course, the real process needs to
worry about things like transmission
errors, and thus, is much more complex

but that is just the details 
Mobile vs. Fixed Code
Some Basic Facts

A program (agent) is made up of




code (native or VM)
data
state
All network enabled programs (agents)
must support some form of network
enabled IPC


fixed programs send data
mobile programs send themselves
Mobile vs. Fixed Code
What is Mobility

For a program (agent) to migrate it must (at least)




It would be nice if it also could pass its state



be cloned (forked) on another machine
send some part of its data to that machine
be shut down on the first machine
so it can take up where it left off
however, this must be supported by either the OS, a VM,
or a middleware program
To be truly mobile, a program (agent) must also
send its code, which requires


that all machines are totally homogeneous, or
some type of VM is used
Mobile vs. Fixed Code
The Trouble with Mobility


No current OS or VM truly supports statebased program restart
VMs are inherently slow



Have to interpret instructions
Have to provide their own interface to threads
and sockets
Unless programs (agents) rarely move,
sending code greatly increases network
message traffic
Ubiquitous Computing Security
Some Basic Facts

Most current methods use



port-blocking firewalls
SSL message interface
These methods are based on

privilege LANs (i.e.)



us  firewall  them
ownership of physical devices
a few visible powerful nodes that


have little or no problem supporting encryption
are easy to monitor
Ubiquitous Computing Security
The Death of the Firewall

The concept of ownership will need to change




You may still ‘own’ some of the computational resources in
your house and transportation
However, these will have to be seamlessly connected to
other resources
The real ownership will be in the number and type of agents
working for you
These agents will need to provide their own bubble
of security


Analogy #1: as people become adults, they learn what is
safe behavior
Analogy #2: communities develop and maintain
organizations (made up of individuals) that enforce laws
Ubiquitous Computing Security
Clever Secure Messaging

Message traffic between many-to-many
small nodes will need to be




Authenticated
Encrypted
Tracked
These node will need to rely on

Fast approaches to methods used today


This can be done using special hardware
New approaches


Quamtum-based
Brain models: dumb messages, smart end-nodes