Tuesday, October 1, 2024

CST311 - Week 5

 

CST311 – Intro to Computer Networks 

The network layer is the central topic for this week. We are moving down from the top application layer to the transport layer and now to the network layer with its two components, the data plane and the control plane. The primary role of this layer is to hand over the data packets from the sender to the receiver through the forwarding and routing mechanisms. In the data plane, forwarding is implemented to process packets by the router and send (or block) to the next router in the path. On the other hand, Routing utilizes routing algorithms in the control plane to determine the end-to-end path for a packet to reach the final destination.

This week's module also covered the basic components of a router: input ports, switching fabric, routing processor, and output ports. Each component has its own function that handles arriving packets as they enter the input ports. Packets are routed to the corresponding output ports determined by the forwarding table. The switching fabric connects the input and output ports and executes link layer and physical layer functions using the longest prefix matching rule. In the data plane, switching could be done via memory, bus, and an interconnection network. The latter offers faster switching through 2N buses for every N port, allowing other packets to forward simultaneously. Packets that reach the output ports are queued accordingly for transmission to the outgoing link.

The equation above calculate the buffer needed for N TCP flowing through a link with Capacity C.

We also examined the IPv4 and IPv6 datagram format and the key fields associated with each version. Where the IPv4 is formatted in dotted-decimal notation, 32 bits long, divided into 4 groups of 8 bits each. For example, the IPv4 address 192.168.1.1 is written in dotted-decimal notation, where each part corresponds to an 8-bit binary value. The IPv6, on the other hand, is 128 bits long divided into 8 groups of 16 bits written in hexadecimal. A Dynamic Host Configuration Protocol (DHCP) automatically assigns a unique IP address from a pool to the requesting host.

NAT or network address translation, offers a way to efficiently manage IPs allocations in a network. For example, a NAT-enabled router translates multiple devices (IP addresses) in a home network to face the public Internet as only one IP address.

In this week, we also covered software-defined networking (SDN), where software-based networking interactively calculates the values of forwarding tables for routing.

Tuesday, September 24, 2024

CST311 - week 4

 

CST311 – Intro to Computer Networks 

We are halfway into this course, and the focus is on network security this week. As usual, the subject of network security covers a variety of fundamental concepts related to data security transmission and safe storage. Securing data communication aims to maintain confidentiality, data integrity, availability, and authentication. Several cryptographic techniques are used to achieve confidentiality by encrypting the transmitted message, making it impossible for the interceptor to decode it. The reliable transport and data link protocol is used for message integrity to ensure senders and recipients are communicating with each other with confidence. Message authentication codes (MACs) and digital signatures are two distinct methods that provide message integrity.

At a high level, the idea of cryptography is to mask the sender's original message to a recipient and reserve a method for the intended receiver(s) to recover the data. For example, a sender uses an encryption algorithm on a raw message called plaintext to produce ciphertext. On the other hand, a receiver will use decryption algorithm to recover the plaintext. One of the oldest techniques is the use of a symmetric key to encrypt and decrypt. However, sharing such a key poses logistics and even more security risk among participants. A public key partially solves these challenges by allowing senders to freely encrypt the message. A private key is only known to the recipients and must allow the decryption of the message. The RSA algorithm is a widely used public-key cryptographic algorithm, a mathematical concept built on modulus. Additionally, Cryptographic hash function and digital signatures secure email communication by authenticating users and warranting integrity.

Tuesday, September 17, 2024

CST311 - week 3

 

CST311 – Intro to Computer Networks 

We are reviewing the second layer of the top-down approach this week. The transport layer is responsible for communication between end systems. The layer is implemented entirely on the end systems, not the network routers. Messages of an application are sent in segments called packets before being passed to the network layer for encapsulation in the datagram. Application developers choose between distinct types of transport-layer protocols based on use cases. The UDP protocol provides unreliable, connectionless service, while the TCP protocol offers a reliable connection-oriented service. The transport-layer multiplexing and demultiplexing extend the end-to-end service delivery to running processes on the application TCP or UDP sockets. In UDP multiplexing and demultiplexing, the destination port determines which socket receives the segments, and the source port is used as a return address in an inversion manner. On the other hand, the connection-oriented TCP is identified by four tuples: source IP address, source port number, destination IP address, and destination port number.

We also reviewed the UDP checksum mechanism, which determines if the segment was modified during transmission. A UDP segment structure consists of the source port, destination port, segment length (header included), checksum, and application message. Additionally, we examined the TCP segment structure, which provides a reliable connection between hosts.

The sequence number and acknowledgment number are the fields in the TCP header used between sender and receiver to ensure service reliability. For example, the receiver host will drop segments that have already been transmitted once if the sequence number matches a previous one. Another scenario is dropping one of two retransmitted segments if an acknowledgment for the second segment in the original phase is received. Finally, we have looked into TCP connection management and congestion control.

 

 

 


Tuesday, September 10, 2024

CST311 - Week 2

 

CST311 – Intro to Computer Networks 

In the second week of the introduction to computer networks, we reviewed the application concept as the top layer. As we learned from week 1, routers and switches handle the packet transfers by forwarding and routing across the network. The core network deals with the lower layers; therefore, the creation of network applications does not require programming the network devices. We also reviewed the HTTP or the Hypertext Transfer Protocol by examining the request and response behavior. The two types of HTTP connections are non-persistent, where requests and responses are sent over separate TCP.  On the other hand, the persistent connection is developed to send the requests along with the corresponding responses on the one open TCP connection.

The Wireshark lab was very helpful and important in diving into the details of an HTTP GET and the HTTP response message with status code and phrase. Although HTTP messages are written in ASCII text, the examples provided in the labs require careful attention to examine header, request, and status lines.  

Another important application-layer protocol is the SMTP or the Simple Mail Transfer. TCP over port 25 provides reliable and error-checked delivery of messages between servers, which is necessary for ensuring that emails are delivered accurately. Internet Mail Access Protocol (IMAP) or POP3, and http provides users access to email via mail clients. Sending and receiving emails is implemented in the client-server model – the sender server is the client, and the receiver server is the server.

DNS or Domain Name System provides an essential service to network users and devices that allows the translation from IP addresses to names and vice versa. The protocol mainly uses UDP port 53 for sending and receiving and TCP for exceptional cases. DNS requests are queried using a distributed database hierarchy of different types of servers, such as Root DNS servers, Top-Level Domain servers, and Authoritative DNS servers.

Finally, we reviewed the difference between client-server and P2P architecture and briefly reviewed BitTorrent methods of distributing data among peers.

Tuesday, September 3, 2024

CST311 - Week 1

 

CST311 – Intro to Computer Networks 


In the first week of CST 311 Introduction to Computer Networks, we are introduced to fundamental concepts of network. The first module focuses on introducing the Internet as a network of networks illustrated with examples. We also discussed the Internet protocol stack layers: application layer, transport layer, network layer, link layer, and physical layer.

It was important to start by defining packets as the pre-packaged segment of data transmitted from a source to a destination. A packet is traversed over a route or path using packet switches like routers or link-layer switches. ISPs (Internet Service Providers) deliver the Internet to commercial and residential users using various types of access and physical infrastructure.

The sending and receiving of data packets rely on network protocols that determine the communication standards for network components. The main purpose of the network protocol is to format and arrange the order of data exchanged between devices or any network object for transmission or acknowledgment and receipt. Packet switches use store-and-forward to receive the entire packet first before forwarding any of the received bits to the link. Circuit switching is another method to move data over the link, however, this approach requires reserving the resources like the buffer, bandwidth, and path. Unlike packet switching, the communication network in circuit switching must reserve the transaction rate at a fixed link, making this approach less efficient. An advantage of Circuit switching is the guarantee of delivering data without loss of packets or delays. QoS and tight security make circuit switching more attractive, but it comes at a cost. In the past, many companies, including the ones I worked for, ran circuit-switching voice ISDN to host PBX. Today, fewer and fewer companies depend on circuit switching for their voice needs.




We also explored the delay, loss, and throughput concepts. These are important network constraints found between systems. The common types of network delays we encounter are nodal processing, queuing, transmission, and propagation delays. A processing delay consist of the time needed to inspect the packet header and correct any error if necessary. The queuing delay occurs when the packet waits for the full transmission of other packets in the router. The transmission delay is the time required for a packet to be transmitted expressed in L/R where L is the packet bits, and R is the link transmission rate measured in bits per second. On the other hand, a propagation delay is the time needed for the bit propagation at the start of a link to the destination. The propagation delay is expressed by d/s, where d is the physical distance between the source and destination, and s is the propagation speed. An end-to-end delay is calculated as the sum of delays at each node. Throughput is a very important concept for capacity planning, troubleshooting, and initial network design – not the same as bandwidth (usually the ISP sold rate). It measures the real-time performance of a network by measuring the rate at which the data is transmitted. One item to watch for when designing a network is to choose the right hardware specification that handles the appropriate traffic in an enterprise environment.

Example of hardware datasheet that list hardware specification for branch office, Cisco Meraki MX67

Friday, August 9, 2024

CST334 - Week 8

 

CST334 – Operating Systems - Week 8

We are in the final week of the CST 335 Operating Systems course. The course was very comprehensive and covered many important and fundamental topics. I hope that much of this information I retained over the past eight weeks remains persistent and useful. In computer science, the data we store in storage, write to a database, or send as an attachment via email, among other forms, are all examples of persistence. I/O devices are the gateway to processing input and output operations by interacting with the OS. While I/O processes occur during a running program, data saved to a disk is persistent.

In life, persistence is about determination, ambition, and dedication to achieve a goal regardless of the challenges. We thrive when we have a drive that leads to the next step, fueled by strong will. Personally, my routine is my persistence path to success. By consistently following my daily habits and staying focused on my objectives, I steadily progress toward my goals and overcome obstacles that arise along the way.


Tuesday, August 6, 2024

CST334 - Week 7

 

CST334 – Operating Systems - Week 7

This week, we are learning about the I/O integration with the Operating Systems.

The typical interaction of a device with OS is completed in four steps as follows:

  • Polling the Device: The OS repeatedly reads the status register to check if the device is ready to receive a command.
  • OS Sending Data: The OS writes the data to the data register. For large data transfers, multiple writes may be required, such as transferring a disk block.
  • Issuing a Command: The OS writes a command to the command register, signaling the device that data is ready and instructing it to start processing.
  • Waiting for Completion: The OS polls the status register again in a loop to check if the device has finished processing the command.


Direct Memory Access (DMA) eliminates the CPU involvement in transferring data, allowing other processes to run. Additionally, the hardware communicates with a device via explicit I/O instructions or memory-mapped I/O. The first method uses machine-level instructions to the CPU to directly access hardware devices and perform input and output operations. On the other hand, in memory-mapped I/O, the device registers are used by hardware to read/write as if they are the main memory. 

We also explored the functions and details of hard disks as the main form of persistent data storage. The device's geometry plays a crucial role in the level of performance needed to read and write data. A hard disk's basic geometry consists of one or more circular platters with two magnetic surfaces. The platters are connected around a spindle to a rotating motor that spins them into rotation.

There are different ways to control the performance of I/O operations, disk reliability, and data protection. Redundant Array of Inexpensive Disks (RAID) offers various techniques for storing data on hard disks with different trade-offs. 


We also learned about the system files implementation and the two basic parts, data structures, and access methods.  

 






Week 100

The 100-Week Completion of the CS Program This is it. My CSUMB Online Computer Science journey has come to an end. Looking back at my very f...