The Internet is a network of networks. There are three tiers of networks.
a protocol defines the format and order of messages exchanged between communicating entities as well as the actions taken in response to various messages.
Internet standards are developed by the Internet Engineering Task Force (IETF), the standards documents are called requests for comments (RFCs)
RFC 1 was published in 1969. On Dec 31, there were 3969 RFCs
Clients and servers (both end entities or hosts). A client initiates a connection; a server listens for connections. Once a connection has been established, the connection is full duplex, both ends can send and receive. The term server can be used to describe either a host computer or the server process. There are two methods of communication, Connectionless and Connection oriented. In the former, a conneciton is established prior to any data being sent. In the latter, the sender just sends the message and hoptes that it arrives at its destination. The obvious analogy is the phone system (connection oriented) vs. the post office (connectionless)
There are two approaches to building a network, circuit switching and packet switching. In the former, the resources needed along a path are reserved for the duration of the communication session (reserving a table at a restaurant). Circuit switching can easily guarantee quality of service (transmission rate etc), while Packet Switching cannot.
But packet switching is usually more efficient (uses a higher fraction of the bandwidth) because Circuit switching has a lot of down time because of silent periods.
Packet switching uses store and forward transmission. Each link has a set of buffers. It reads a packet from a link, stores it in one of the buffers, figures out where to send it, and passes it on. This can lead to queueing delays and lost packets
There are two mechanisms of packet switching networks, datagram and virtual circuit, depending on how they rout packets. X.25, frame relay and ATM are examples of virtual circuit networks. In Virtual Circuit networks, the ciruit is established prior to any data being transferred, each packet has a Virtual Circuit identifier. In packet switching, each packet has a destination address. at which packets arrive at the queue.
The Internet uses packet switching. This means that packets can be lost if a router is too congested, different packets can take different routs from the same sender to the same receiver, and this means that packets may not arrive in the order that they were sent.
Protocol stacks
The entities comprising the corresponding layers on different machines are called peers. The peers communicate using the same protocol. It looks to each peer like data is transmitted directly from one peer to another, but this is not the case.
A set of layers and protocols is called a network architecture. The list of protocols is called the protocol stack.
The ISO OSI Model (International Standards Org, Open Systems Interconnect). a seven layer model.
Altho actual data transmission is vertical, each layer is programmed as if it were horizontal. Note that this is not a network architecture, because it does not specify which protocol(s) to use. It is a meta-architecture.
The 7 Layers of the OSI Model
Here are the layers, listed from bottom to top
This layer conveys the bit stream - electrical impulse, light or radio signal -- through the network at the electrical and mechanical level. It provides the hardware means of sending and receiving data on a carrier, including defining cables, cards and physical aspects. Fast Ethernet, RS232, and ATM are protocols with physical layer components.
Error detection (and error correction) Attaching extra bits to confirm that the data are correct. Use example of 9 track tape with parity bits for each row and each column.
Error checking can also be done with a check sum or with a cyclic redundancy check (CRC) Polynomial codes are based on treating bit strings as representations of polynomials with coeffeicients of 0 and 1 only. A k bit frame is regarded as the coefficient list for a polynomial with k terms.
The data link layer is divided into two sublayers: The Media Access Control (MAC) layer and the Logical Link Control (LLC) layer. The MAC sublayer controls how a computer on the network gains access to the data and permission to transmit it. The LLC layer controls frame synchronization, flow control and error checking.
Every node on the Internet runs the same network layer protocol, IP (Internet Protocol)
Two broad categories - connection oriented and connectionless.
It may also be concerned with multiplexing, determining which process gets the message. Also flow control.
The transport layer and all layers above it run only on end systems, while the network layer and all layers below it run on every intermediate entity as well.
Example: big endian vs little endian computers
bigendian - high order byte at A, low order byte at A+1
littlendian - low order byte at A, high order byte at A+1
Example, big endian represents 1024 like this
00000100 00000000
Little endian like this
00000000 00000100
Bigendians include IBM 370, Motorola 68000, SPARC , Networks (TCP/IP). little endian include Intel, VAX
ASN.1 is the ISO standard (Abstract syntax notation)
Other types of data conversion include representation of floating point numbers and conversion from EBCDIC to ASCII
The implementation of a protocol stack is typically done by each sending layer attaching its own header to the front of the frame, packet or segment. The receiver then strips off the header and processes it.
The OSI ISO model was never widely adopted, because by the time the standard was promogated, a de facto but different standard had already been created.
the TCP/IP reference model
A four layer stack. The application layer generally handles everything that the presentation layer does (e.g., data conversion).
The transport layer is more or less the same, but handles some of what the session layer does. (two protocols TCP and UDP)
The Internet layer is more or less like the network layer. Only one protocol (IP).