Readings

Networks

Why do we want/need them?

- shared access to resources (e.g. printers, files)
- communication: email, news, WWW
- distributed computation: rlogin, remote IPC

History

The Long-Haul Networks 
- data rates of 1Kbps - 1Mbps
- designed for cross-country or international communication
- X.25 (Europe): network built for commercial applications 
- ARPAnet (US DoD): military use but soon spread to academic institutions
- SNA (IBM's System Network Architecture): propietary 

Local Area Networks (LAN):
- Ethernet (Xerox): becomes IEEE 802.3
- initial version was 3Mbps, commercial then moved to 10 Mbps
- new 100 Mbps and 1Gbps versions make use of band signalling techniques
	(don't represent data bit by bit but byte by byte)

  0   1   2   3   4   Hosts
  |   |   |   |   |
--------------------  Ethernet bus

- Token Ring: becomes IEEE 802.5
- initial version was 4Mbps, then moved to 16Mbps

   0--3
  (    ) Token ring
   1--2

- recent emergence of fiber optic technologies: FDDI, ATM
- IEEE 802 draft became ISO 8802 standard for LAN communication

What goes on behind the scenes?

- rate control of data transfer
- bridging multiple networks 
- ensuring reliability (think BER)
- translation of machine-dependent data representations (Big vs. Little-endian)
- ensuring fairness - multiple writers problem?

What's the big deal?

- barrier faced in the early days of communication was connectivity
- point-to-point was easy: string a serial line between two computers
- problem was multi-point -- n computers fully interconnected
- cost is n^2  -- actually  n(n-1)/2 connections -> impractical
- solution came about in early 80's with Ethernet and Token Ring
- idea: n computers could be fully interconnected with only 1 connection
- use a shared communications medium
- problem: decentralized control -- can't have everyone relying on one machine
- more on that later... first, how does data get transferred on a network?

International Standards Organization (ISO) Open Systems Interconnect (OSI)

- a nice palindrome if I ever saw one...
- open systems: what's that?
- created to meet the need for standardization 
- concerned with INFO EXCHANGE between PAIRS of OPEN SYSTEMS
- don't care what happens inside these systems
- objective: provide minimal set of standards (protocols) that allow any
  open systems to cooperate 
- applications needing services at level K are built on top of the
  PROTOCOL STACK comprising levels 0 through K of the model


OSI 7-layer model of data transfer

Host 1			Data Format				Host 2
------			-----------				------

Application			      AH | DATA_UNIT		Application
Presentation			 PH | DATA_UNIT ----		Presentation
Session			    SH | DATA_UNIT ---------		Session
Transport	       TH | DATA_UNIT --------------		Transport
Network		  NH | DATA_UNIT -------------------		Network
Data Link     LH | DATA_UNIT ------------------------		Data Link
Physical      bits             					Physical
  ^							 	   ^
  |_______________________ communication media ____________________|

- peer-to-peer layer communication: sender and receiver operate at same level
- all communication actually takes place at the physical layer
- physical layer of sending process xmits data to physical layer of receiver
- other layers may LOGICALLY transmit data to corresponding layer on receiver
- done by translating the data to lower layers until it reaches physical layer
- receiver then abstracts the data to higher layers until it reaches target

Note: for a bit of orientation:
	- Ethernet defines Physical and Data Link layers
	- IP defines Network Layer
	- TCP or UDP define Transport Layer

Aside: CSMA/CD
--------------
Carrier Sense Multiple Access with Collision Detection

- when a sender wants to transmit, it first listens to bus
- waits for a "clear carrier" (think "dial tone")
- then begins to transmit packet and reads bus while it does so
- race condition: multiple senders
- senders will see bits getting garbled -- indicates a collision
- how long until collision detected?  "slot time"
- time for signal to propogage from one end of bus to another and back
- solution: backoff (binary exponential backoff)
- on the ith collision, each sender randomly waits [0, 2^i -1] slots
  before trying again
- brilliant: achieves fairness without requiring centralized arbitration