Network Programming 1

CS 493/693 Lecture, Dr. Lawlor, 2006/01/23

Background

A network is just a way of getting information from one machine to another.  This is a simple idea, which means that everybody in the world has tried to implement it from scratch.  Read this and the first 20 pages of "Network Intrusion Detection" for the basics.

You always start with a way to get bytes from one machine to the other.  For example, you can use the serial port, parallel port, or a network card to send and receive bytes.  Bytes actually physically sent between machines are said to be "on the wire", even if they're sent over a fiber optic cable or microwave radio link!

Just sending bytes back and forth, however, is almost never enough.  You immediately find you need:
There are quite a few different ways to handle these issues.  The standard way to do this is to wrap all data in little "packets". A packet consists of a header, some data, and possibly a trailer.  The "header" indicates who the message is for, which piece of the message it is, and other housekeeping.  The trailer usually includes a checksum for error detection. 

The International Standards Organization (ISO) defined a very complicated layered model for networking called the Open Systems Interconnect (OSI) model.  Almost nobody implements the thing, but the conceptual model is pretty popular.  The layers of the ISO OSI model are:
People have built lots and lots of different networking interfaces.  Totally unique networking interfaces I've used include:
Today, "the network" means TCP/IP, the standard protocol spoken on the internet.  TCP/IP is really at least three different protocols:
We'll look at the various TCP/IP protocols in detail, but for the next week we'll focus on TCP.