Welcome to Introductory Networking!
This room provides a beginner introduction to the basic principles of networking.
We are going to learn the following topics:
The OSI Model, The TCP/IP Model, How these models look in practice, and an introduction to basic networking tools.
The OSI (Open System Interconnection) is a standardized model that describes seven layers that computer systems use to communicate over a network.
Layer 7: Application
Human-computer interaction layer, where applications can access the network services.
↓
Layer 6: Presentation
Translate the data into a standardized format and handles any data encryptions and compressions.
↓
Layer 5: Session
Set up and maintain a connection with other computer across the network as well as synchronize communications. It is responsible for controlling ports and sessions.
↓
Layer 4: Transport
Transmit data using transmissions protocols including TCP and UDP. TCP is a connection-based protocol, whereas UDP is a connectionless protocol. TCP for accuracy and UDP for speed.
↓
Layer 3: Network
Responsible for location the destination of user's request. Logical addresses like IPv4 are used to provide order to networks, categorizing them and allowing us to properly sort them.
↓
Layer 2: Data Link
Focus on physical addressing of transmission and defines format of data on the internet.
↓
Layer 1: Physical
Is where the electrical pulses that make up data transfer over a network are sent and received. Physical layer converts the binary data of the transmission into signals and transmit them across the network, as well as receiving incoming signals and converting them back into binary data.
Encapsulation is a process by which data is sent from one computer to another.
The encapsulated data is given a different name depending on at which layer the data is. For example, in layer 7,5 and 6, the data is referred to as data. In layer 4, it's referred to as either a segment or datagram depending on whether TCP or UDP is selected as a transmission protocol. In layer 3, it's referred to as a packet, and in layer 2 it becomes a frame. When it gets passed down to layer 1, it's broken down into bits.
When the message is received by the second computer, it reverses the process from physical layer to application layer. This is referred to as de-encapsulation.
The processes of encapsulation and de-encapsulation are important because they give a standardized method for sending and receiving data from one computer to another.
The TCP/IP Model is a conceptual model and set of communications used in the internet. It is somewhat similar to the OSI model in many ways. However, the TCP/IP Model was developed prior to the OSI Model. It consists of four/five layers: Application -> Transport -> Internet -> Network Interface or (Data Link -> Physical).
The process of encapsulation and de-encapsulation works the same in the TCP/IP model, but at each layer a header is added during encapsulation and removed during de-encapsulation.
As mentioned previously, TCP is a connection-based protocol. Therefore, It must first form a stable connection between the two computers. The process in which such connection is formed is called a three-way handshake.
When you attempt to make a connection, your computer first sends a special request to the remote server indicating that it wants to initialize a connection. This request contains something called a SYN (short for synchronize) bit, which essentially makes first contact in starting the connection process. The server will then respond with a packet containing the SYN bit, as well as another "acknowledgement" bit, called ACK. Finally, your computer will send a packet that contains the ACK bit by itself, confirming that the connection has been setup successfully. With the three-way handshake successfully completed, data can be reliably transmitted between the two computers. Any data that is lost or corrupted on transmission is re-sent, thus leading to a connection which appears to be lossless.
The ping command is used when we want to test whether a connection to a remote resource is possible. It works using the ICMP protocol, which is one of the slightly less well-known TCP/IP protocols. The ICMP works on the Internet layer of the TCP/IP model. The basic syntax for ping is ping <target>.
When you type ping <target>, it returns the IP address for the server that it connected to.
Traceroute can be used to map the path your request takes as it heads to the target machine. The internet is made up of many, many different servers and end-points, all networked up to each other. This means that, in order to get to the content you actually want, you first need to go through a bunch of other servers. Traceroute allows you to see each of these connections -- it allows you to see every intermediate step between your computer and the resource that you requested. The basic syntax for traceroute on Linux and Windows is traceroute <destination> and tracert <destination> respectively.
whois allows you to query who a domain name is registered to. The syntax for whois is whois <domain>. domain translates URL into an IP address so we don't have to remember all the IP addresses of sites we want to visit to. Domains are leased out by companies called Domain Registrars. If you want a domain, you go and register with a registrar, then lease the domain for a certain length of time.
Dig allows us to manually query recursive DNS servers of our choice for information about domains: The syntax for dig is dig <domain> @<dns-server-ip>.