Paul Serafimescu

@paserafi

UCLA Computer Science Engineering + Economics '24

Joined on Feb 2, 2024

  • Topics Covered: Autonomous Systems, OSPF, BGP What is an Autonomous System (AS)? The Global Internet is comprised of many Autonomous Systems, which we will refer to as ASes from now on. Each AS gets its own ASN (AS Number). Stub AS refers to an end user AS, like a campus network, and Transit AS refers to an AS part of the backbone, like one belonging to an ISP. Routing occurs at two levels, within the AS (Intra-AS), and between ASes (Inter-AS). We will focus on OSPF for intra and BGP for inter. Both OSPF and BGP work to fill in individual routers' forwarding tables. Note: an AS can be comprised of multiple subnets. These aren't the same thing. A single organization can also have multiple ASes. OSPF OSPF (Open Shortest Path First) uses the link-state algorithm. Each node is aware of its neighbors and costs to access them, by periodically sending Hello messages directly on IP packet to them. This makes sure our neighbors are still up and we get to measure the costs. Routers also broadcast link-state packets to the entire network. What happens if we don't get a Hello in the last 10 seconds? Then that node is down. So we need to broadcast our new link-state packet immediately. Otherwise, broadcast every 30 minutes. How do we identify that we have obtained a new link-state packet with the most up-to-date information? LSP needs to contain a sequence number, and we need to ACK those we receive while forwarding. image
     Like  Bookmark
  • Topics Covered: Wireless, Mobility, Indirect Routing, Brief Cumulative Review Wireless Wireless is not the same thing as mobility, but are related. Wireless just refers to being able to connect hosts over a wireless link. Mobility is connecting hosts where the network that one "belongs to" changes over time. Imagine you have a smart phone, you're on a Whatsapp call over data, then connect to WiFi halfway through. How do we handle that? Terminology AP (Access Point): Also called a base station, provides wireless connectivity to a local area. In fact, wireless routers in homes are common, providing both wireless connectivity and routing in one unit. The administrator chooses a frequency for that AP, and broadcasts a beacon frame periodically with its MAC address. Devices which want to connect to a certain AP listen for this beacon frame, and then run DHCP to get IP address in the AP's subnet (note: AP is not a subnet). BSS (Basic Service Set): An AP and its wireless hosts. image
     Like  Bookmark
  • Course Description: Lecture, four hours; discussion, two hours; outside study, six hours. Enforced requisite: course 111. Designed for juniors/seniors. Introduction to design and performance evaluation of computer networks, including such topics as what protocols are, layered network architecture, Internet protocol architecture, network applications, transport protocols, routing algorithms and protocols, internetworking, congestion control, and link layer protocols including Ethernet and wireless channels. Letter grading. About: This page is created to host materials and resources created by the Spring 2024 CS 118 Learning Assistants -- Paul Serafimescu and Omar Elamri. Contact me at pserafim@cs.ucla.edu if there's any issues or typos to fix. Table of Contents Slides Discussion Week 1 Discussion Week 2 Discussion Week 3
     Like  Bookmark
  • Topics Covered: Link Layer, ALOHA, CSMA/CD, Ethernet Switching Link Layer The link layer is responsible for transferring packets between two physically connected nodes (routers, hosts). Like IP or TCP, there is a link layer packet which the upper layers are encapsulated within. Rather than IP, we use something called MAC (Medium Access Control) addressing, which are 48 bits long, and grouped into 6 groups of 8 bits each with some separator. The link layer frames data (marks start and end), detects errors, but mostly we will discuss its ability to manage channel access through a suite of protocols. Note: I've been mostly referring to everything as a packet regardless of layer. Technically they have different names. Packet is specific for IP, segment for TCP, datagram for UDP (easy way to remember is that TCP is stream protocol), data frame for link. Frames' end are denoted by 01111110. If 01111110 appears in the data, then it is replaced by 0111111001111110 (similar logic to escaping a \ in C). ARP ARP (Address Resolution Protocol) runs on every IP node, and is tasked with constructing a table of IP Address: MAC Address : TTL tuples. The TTL is actually important here. This table resembles a soft-state cache: the TTL is reset when there is a lookup, and the entry deletes itself after TTL expires.
     Like  Bookmark
  • Topics Covered: ICMP, DHCP, Routing Algorithms Where We Left Off We have subnets which are accessible by router(s). These routers could be equipped with NAT, which allows them to direct inward and outward traffic to/from a private network. Every host or router interface is identified by an IP address. IPv4 addresses are running out, so we are trying to migrate to IPv6. IP addresses are hierarchical, and CIDR specifies a network ID by the first n bits, in the /n format. The remaining bits are available addresses, with two of them reserved (broadcast and network addresses). IP tunneling allows IPv6 hosts to communicate with each other over IPv4 network (backbone routers/subnets for example may use IPv4). It also allows for VPN connection between two private networks. ICMP ICMP (Internet Control Messaging Protocol) resides inside of an IP packet payload. image So our IP header here would be either IPv6 or IPv4 with all its relevant fields, and the payload would contain the above fields. Despite the fact that it resides in a payload of a network layer packet, it is still a network layer protocol, and as such it is best-effort. This protocol is used mainly for checking network availability status (no process on some port, forwarding table entry nonexistent or expired, looping). For example, take the ping command. It is comprised of two parts, a request and a reply. These are done over the network layer using ICMP.
     Like  Bookmark
  • Topics Covered: IP, Addressing, NAT Overview of Responsibilities Network layer protocol runs in every single device connected to the Internet. This includes hosts and routers. Therefore, all TCP/UDP/QUIC packets are encapsulated within IP packets. The network layer is also tasked with decapsulating received IP packets, and delivering the contents to the transport layer. Aside: Remember from discussion, a good way to conceptualize encapsulation is that the layer above is placed in the payload of the layer below. From project one, you implemented the HTTP (application layer) protocol within the payload of the TCP packet sent over the SOCK_STREAM (connection-based) protocol. In project two, you will implement the security layer (TLS-ish) within the payload of a UDP packet, and within that security layer, its payload will contain the encrypted file contents. The IP Packet The format of the IP packet is not super important, aside for a few features.
     Like  Bookmark
  • Topics Covered: Intro Cryptography, Digital Signature, TLS Brief Overview The basic idea of internet security is to ensure that only the sender and receiver can read and write messages to each other. No third-party is able to hijack their secure connection by intercepting or spoofing messages. Cryptography image The basic goal of the asynmmetric cryptography field is to come up with "keys" belonging to the sender and the receiver such that $$
     Like  Bookmark
  • Topics Covered: Reliable Data Transfer, TCP Congestion Control, QUIC Reliable Data Transfer TCP must guarantee reliable data transfer, meaning that we want to ensure our data is received from a sender and able to be assembled in the correct order. Connection Setup image We can see the functions from the BSD socket API. The TCP server has a blocking listen() which receives a connection from the TCP client connect(). What really happens? The client will send the server a packet with SYN flag set to 1, along with a random sequence number. Think of the sequence number as some number keeping track of how much data has been sent so far, and acknowledgement number as how much has been received. No data is sent.
     Like  Bookmark
  • Topics Covered: DNS, CDNs, TCP/UDP Why DNS? The primary motivation for DNS (Domain Name System) is, of course, readable domain names to identify websites (servers on the Internet). More importantly, it adds a layer of abstraction between the end client and the server, which is identified by an IP address. IP is not static nor permanent. It changes relatively frequently. Without DNS, you and I would need to memorize and constantly keep track of the current IP address of our favorite websites. DNS as a Distributed System DNS needs to be a distributed system, with each node containing duplicate information. Why? Because we need fault tolerance, scalability, and load distribution. Last week in discussion we covered an example where we bottleneck in the CDN due to a single server handling all incoming requests for cached content. What was the solution? Cloudflare's duplication of cache handling servers. DNS needs a similar mechanism.
     Like  Bookmark
  • Topics Covered: HTTP, Client-Server Model, Web APIs What is HTTP? HTTP (Hypertext Transfer Protocol) is an application layer protocol designed for transferring information over the web between networked devices, and is primarily built on TCP (some recent versions use UDP, which will be discussed further later in the course). Like any protocol, it's a standard agreed upon by networked devices on the Internet. It has a specific message format, which any receiver and sender adheres to. image image
     Like  Bookmark
  • Topics Covered: C++, Unix Socket API Introduction to Computer Networking This course will cover layers #2-5 on the below diagram, working top to bottom. Will also touch base a bit on #1. image The abstractions are quite clever. Each layer i + 1 does not care how layer i is implemented. For example, HTTP can add its own headers on top of TCP or UDP, whichever is chosen (but until recently used TCP, why?). Why should I care?
     Like  Bookmark
  • CS 35L W24 Week 9 Review Topics Covered: Python, Regex, Git Python Why Python? Python recently has become extremely popular and for good reason. A few of these being: Large community, maintains and creates new librariesParticularly useful in Machine Learning and Data Sciencenumpy, pandas, PyTorch, statsmodels, etc. Built-in package manager pip
     Like  Bookmark