What is networking
Three things you can do with more than 1 computer.
Share Devices – common to share a hard drive, or a printer.
- Device sharing protocols include SMB on Windows and NFS on Linux
Remote Operation – be here, and operate a computer that is located over there.
- Remote protocols include – telnet, Windows Remote Access
Messaging Send a stream of data from one computer to another.
- Email – uses SMTP protocol
- Chat – uses IRC protocol
In order to do any of the above, you have to move chunks of data from one computer to another. Chunks of data are called packets, and moving them around is called packet switching. A packet switching protocol exists, and its used pretty much all over the internet. Its called TCP/IP.
Here is a lecture which covers everything you need to know about TCP/IP.
TCP/IP is the network protocol for local networks and for the internet. Local networks may use another network protocol, although TCP/IP is most common. The internet exclusively uses TCP/IP.
TCP/IP is used for both local networks and the global internet because it scales well. Works for large (global) networks and serves to isolates small (local) networks. Routers used with TCP/IP have the ability to route traffic around broken network nodes, enhancing TCP/IP reliabity.
TCP/IP includes the concept of a “port”. A computer analog of a physical device. Protocols are typically assigned to ports – the ports are standard, e.g. pop3 runs on port 110, smtp on port 25, and http on port 80. Understand that this is a convention, like driving on the right side of the road. You can run a web server on a port other than port 80, but you have to tell everybody your doing it or they won’t be able to get to your website.
Sessions and Streaming
Two protocols in one! Transmission control protocol (TCP) / Internet Protocol (IP)
In packet switching, data to be sent is broken into packets (1500 bytes) and sent through a wire along with other packets.
A session refers to a defined series of packets. TCP/IP keeps track of the packets (1 of 10, 2 of 10, 3 of 10 etc.) and asks for a retransmission if the receiver doesn’t get all the packets.
Opposite of session – the packets are just sent without regard of whether they were received.
The session protocol is used when its important that every packet make it to its destination. Say, if you were sending a file, you would want a session protocol. A streaming protocol is more like a firehose. You are spraying data at the destination and hoping it gets there. Video is typically sent using a streaming protocol. You need all the packets at the destination quickly and if you miss one, well, the show has already moved on – no time to retransmit.
Structure of ip address
- 0-255, 0-255, 0-255, 0-255
- Unique on the network
- Key to the internet is making IP addresses unique on a local network but usable from the internet.
Routers, using a technology called network translation, keep track of the packets as they go through the local network, and are sent out on the internet with the router’s ip address.
TCP/IP Protocol Suite
TCP/IP is usually referred to as a “protocol suite”. When you rent a hotel room and its called a suite, it means that you have more than one room. A protocol suite contains more than one protocol. TCP/IP implementations usually include these other protocols and programs such as Telnet and Ping which help you keep TCP/IP running reliably.
Telnet name is a combination of TELetype and NETwork. This is remote access protocol – it lets you act like you are in front of a computer when you are far away from the computer.
Ping – diagnostic protocol used by on TCP/IP networks.
Tracert – tcp/ip diagnostic – built on top of ping
Ping – protocol used by tcp/ip.
Tracert – tcp/ip diagnostic – built on top of ping
Major internet Protocols
DNS – Domain Naming System – TCP/IP sends packets to “hosts” (usually computers) which are identified by a number of the form:
nnn.nnn.nnn.nnn, e.g. 112.160.001.002
This number is called an IP Address.
DNS protocol – which runs from a DNS server to a DNS client, converts a domain name to an IP address. E.g. domain name cnn.com is ip address: 188.8.131.52.
HTTP – hypertext transfer protocol – the protocol defining the web.
- The computer which runs cnn.com is an HTTP server.
- Your computer, running Safari or Internet Explorer, or Firefox, is an HTTP client.
RFC’s Request for Comment
To get a flavor of what these protocols look like – type DNS rfc, or TCP/IP RFC, or HTTP rfc into google.
An RFC is a “request for comment” document, and is circulated before standards and protocols are adopted on the internet. RFC documents, after a period of time where comments are solicited and the documents changed, become the applicable standards. Oddly, they are still called RFC’s.
Summary of common internet protocols and the programs which use them
|HTTP||Send and ReceiveWeb Pages||Internet Explorer, SafariApache, IIS|
|Telnet||Pretend to be A terminal||Telnet|
Walking Through HTTP, the protocol of the World Wide Web
This is an illustration using the following protocols.
- We are connected to the internet using a wireless protocol, namely 802.11G. This is commonly called “wireless G”.
- We move packets of information from our computer to the router, then through the router and on to the internet using the networking protocol TCP/IP.
- The information in the packets is transmitted using the protocol TELNET. Normally this protocol would not be used, but we want to type up the information in the packets ourselves.
- The information we are going to type up manually is going to use the HTTP protocol.
Four protocols: 802.11G, TCP/IP, Telnet, and HTTP. Each protocol on top of the next 802.11G defines the radio signals on the wireless router, TCP/IP defines the format of the packets of information, Telnet allows us to enter our own information like a typewriter but on a remote computer, and HTTP is used to ask for, then display web pages.
Protocols used like this, one on top of another, are called a protocol stack.
Before we start, a little about HTTP. HTTP stands for HyperText Transfer Protocol. We are looking at it because its the protocol used to navigate the web. HTTP is about clients (usually web browsers) requesting resources (usually pictures and text) from servers (web servers).
Let’s start. We open a command line interface on our windows computer:
We are going to use the telnet protocol (we’ve installed the Telnet program on this computer) to access a web site. For clarity we will show everything we type and what it does in a table.
|HTTP Command||What it does|
|telnet||Starts the telnet program|
|o example.com 80||this will open a telnet session on the computer at example.com. The 80 corresponds to TCPIP port 80. This is the port that the web server runs on. Everything we type now is going to the web server. The web server thinks we are a web browser.|
|(nothing)||The HTTP protocol is waiting for an HTTP command. Let's give it a GET command.|
|GET /index.html HTTP/1.1||We are asking for the heading of the index.html file on the server. We are also telling the server that we understand release 1.1 of the HTTP protococol. The server will respond with the following:|
|HTTP/1.1 200 OK||This is directly from the protocol standard. A 200 message means our request made sense to the server.|
|Date: Fri 16 Jun 2015 23:10:10 GMT||More protocol.|
|Content-Type: text/html||This is telling the browser the type of content the server will send.|
|Content-Length 250||And its length which the browser may need to know to format it correctly.|
|<html>||This tells the browser that the content will be in HTML. HTML is the language of web pages. The browser understands HTML and so will interpret the rest of the page properly.|
|<body>||The beginning of the web page content.|
|<h1>Welcome to Example.com</h1>||'Here is some content (finally!). This is a line of text which is marked h1||meaning its a major heading.'|
|(more web text)|
|</body>||The end of the the content.|
|</html>||The end of the HTML|
And after all this, the web server will close the connection.
Cache: a type of storage used in computers which is typically faster and more expensive then the storage it enhances.
Virtual: software and control systems which use cache in such a manner that the user of the slower storage that the cache enhances can use the two types of storage interchangeably.
Volatile and non-volatile: a characteristic of computer memory. Volatile memory disappear with loss of electric power. Non Volatile memory retains information after a machine is turned off.
Thrashing: something a computer will do when it doesn’t have enough memory, and, as a consequence, is constantly reading and writing to the disk.
Proxy server – a computer on the internet which passes through all your communication to the internet. This computer masks your internet address from the rest of the internet.
Ping an internet protocol which defines a back and forth communication between two computers.
IP Address the address used to uniquely identify a computer on the internet.
DNS the internet protocol responsible for translating names into ip addresses. Nslookup is a DNS diagnostic program available on most windows computers.
Protocol: defined interface allowing computes and other devices to communicate with each other in order to perform useful work.
Port: a number attached to an IP address which is used by the addressed machine in order to route network traffic to the correct server program on the target machine. Some services on target machines are, by convention, run on certain ports, e.g. http (web pages) runs on port 80.