Tuesday, September 7, 2021

CST 311 - Week 1

A New Semester


Here we go! Summer break has ended and a new class has begun. This one will (hopefully) be a bit less demanding than my last class. Indeed, I have been looking forward to learning about networking. I do have a little bit of prior knowledge from watching the likes of NetworkChuck and PowerCert Animated Videos on YouTube, but I am very much an amateur in the realm of networking. I hope that by the end of this class I will know enough about it to test for a certificate.

Five Layers of Networking


The Internet protocol stack (TCP/IP) consists of five layers*: application layer, transport layer, network layer, link layer, and physical layer. The highest level, the application layer, is what most people are familiar with. The application layer of networking includes common user software such as web browsers (HTTP), e-mail applications (SMTP), file transfer (FTP) and chat clients (IRC). In order for these applications to be useful, they must be able to send messages across the internet to other computers running the same software. 

To analyze each layer of networking, we will follow an e-mail sent from our own computer (localhost) to another host: a computer, phone, laptop, or any other end-system belonging to a user on the network edge. The edge of the network consists of regular users (or the servers they connect to). These users often share a local area network (LAN) that is connected to the internet using a router (in conjunction with a modem, which converts digital signals to analog for transport over the wire, or vice versa for incoming analog signals). A router also works in tandem with a switch, which provides similar functionality ("routing" data, or packets of information, to the correct destination) but operates in a lower layer of the network.

When we press "send" in our e-mail client (say, Outlook), the first thing the application does is decide which transport protocol to use: Transmission Control Protocol (TCP) or User Datagram Protocol (UDP). These protocols provide the same functionality: taking our message (which now includes our e-mail text and other SMTP-specific header information) and packaging it up into a transportation-layer segment for transfer to the network (the next layer). There is one primary difference, however. TCP guarantees that our message arrives at the destination. Sometimes packet loss is experienced as data is sent across the internet. This occurs when a router along the path to our destination cannot accept anymore packets due to its queue being full. With TCP, the lost packets will be resent, guaranteeing that they will eventually arrive. With UDP, there is no such guarantee.

The next layer is the network layer. Let's assume our e-mail client chose TCP to guarantee delivery of our mail, and the protocol passed a nicely wrapped segment down to the network, with headers noting our own network address (the source IP address**) and a destination IP address. Here, the network will act like a post office by analyzing the destination address and selecting the best path for forwarding the message along. Any relevant header information is added onto the segment, and the resulting datagram is passed down to the link layer. Alternatively, if the destination address of an arriving datagram belongs to the node, the network layer passes the enclosed segment back up to the transport layer, which passes the enclosed message back up to the application layer so that our friend's e-mail client can read it!***

Of course, our network-layer datagrams need to be transported from router-to-router somehow. That is where the last two layers come in. The link layer provides transport services for the network layer by converting datagrams into specially-crafted frames for transport on the physical layer. The physical layer is the medium through which bits are passed from one node to the next, and frames often pass through more than one type of physical medium on their journey across the internet (and, by extension, are handled by different link-layer and physical-layer protocols). Incoming bits from the physical link are stored in a frame and the enclosed datagram is passed back up to the network layer. Note that link-layer switches function similarly to network-layer routers, but they use MAC addresses rather than IP addresses for packet switching, which are unique to each node's network interface card.

* The OSI Model defines seven layers of networking, the missing two being the presentation and session layers. The TCP/IP Model assumes that if an application requires the services provided by these missing layers (such as data compression or encryption), the functionality will be added manually by the developer.

** The Internet Protocol (IP) is the backbone of the internet and dictates how the network layer (of any node on the internet) must operate. Many nodes on the internet are just routers, and since routers operate in the network layer, they do not typically include higher level layers (transport or application).

*** All these enclosures result in multi-layer encapsulation of our message.

No comments:

Post a Comment

CST499 - Week 8

The End? I made it. This is my final week in the CS Online program here at CSUMB. I still have one final hurdle in the form of a mock techni...