diff options
| author | mo khan <mo@mokhan.ca> | 2025-09-30 15:52:49 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-09-30 15:52:49 -0600 |
| commit | a0368f6fe02f4ae60504e8a21365cc05c8cdaf8a (patch) | |
| tree | e21a091d22910039f725153b34027529e2cc5c45 | |
| parent | dd3991bf49f6b3ab943f576aaa5428baea58463a (diff) | |
improve wording of answers in a2
| -rw-r--r-- | assignments/2/README.md | 183 |
1 files changed, 74 insertions, 109 deletions
diff --git a/assignments/2/README.md b/assignments/2/README.md index 89acd8e..1ccb815 100644 --- a/assignments/2/README.md +++ b/assignments/2/README.md @@ -18,13 +18,12 @@ unreliable best‑effort service. Study related sections of the textbook and articles from other sources. In your own words, explain how TCP provides a reliable data transfer service. -TCP uses a 3-way handshake to establish a connection from client to -server. It has built in error detection for corrupted data, sequencing -to ensure data is reassembled in order, the ability to retransmit data -due to network errors, just-in-time traffic/congestion management. - -TCP uses ACK packets to acknowledge that it has received segments and uses the -sequence numbers for keeping track of packets. +TCP establishes a connection between a client and a server using a 3-way +handshake. It provides reliable data transfer through several mechanisms like +built-in error detection to identify corrupted data, sequencing to ensure +that data is reassembled in the correct order, retransmission of lost +or corrupted packets, and traffic/congestion control to manage network +load efficiently. ## 1.2 Go-Back-N Protocol (5%) @@ -33,10 +32,10 @@ protocols, the GBN protocol allows the sender to send multiple packets without waiting for acknowledgement from the receiving parties. How does GBN achieve that? -GBN is able to achieve that through several mechanisms such as pipelining with a -sending window, sending cumulative acknowledgement packets, timeout for the -oldest packet that has not been acknowledged, and a sliding window that moves as -new acknowledgement packets arrive. +Go-Back-N (GBN) achieves reliable data transfer using several mechanisms +like pipelining with a sending window, cumulative acknowledgments, +timeouts for the oldest unacknowledged packet, and a sliding window that +advances as new acknowledgments are received. ## 1.3 IPv6 Transition (5%) @@ -45,20 +44,19 @@ networking. What problems was IPv6 intended to solve? With the large number of networking devices and applications using IPv4 still in use, how is the transition from IPv4 to IPv6 being resolved? -IPv4 uses 32 bits for addresses which means that it can address 2^32 (4 billion) -devices. This upperbound is being exhausted and IPv6 was designed to alleviate -this issue by using 128 bits for addressing. This is enough to assign an IP -address to every grain of sand on the planet. This removes the need for things -like NAT to translate packets destined to the public interface of a router to -the private subnet of the router. - -The transition is being resolved by using hosts, switches, routers that support -both IPv4 and IPv6 to give devices time to upgrade. IPv6 can also be carried -over IPv4 to offer a form of tunneling to support legacy devices. There are also -layers that allow IPv6 clients reach IPv4 services such as NAT64. Many average -day consumers do not understand the trade-offs so much of this transition is -being carried out piecemeal by bigger players like IPS, CDN's and larger -corporations. +IPv4 uses 32-bit addresses, allowing for roughly 4 billion unique +addresses. As this limit is being reached, IPv6 was introduced, using +128-bit addresses which is enough to assign an IP to every grain of sand +on Earth. This eliminates the need for techniques like NAT to map public +addresses to private subnets. + +The transition to IPv6 is gradual. Many hosts, switches, and +routers support dual-stack operation, allowing both IPv4 and IPv6 +simultaneously. IPv6 can also be tunneled over IPv4 for legacy +support, and mechanisms like NAT64 enable IPv6 clients to reach IPv4 +services. Because most everyday users are unaware of the trade-offs, +much of the transition is being managed incrementally by ISPs, CDNs, +and large organizations. ## 1.4 SNMP Protocol (5%) @@ -66,20 +64,15 @@ corporations. types. What are the purposes of the SNMP GetRequest and SetRequest messages? Why were UDP datagrams chosen to transport SNMP messages? -SNMP is the Simple Network Management Protocol which is meant to be used to -manage devices within a network. Sometimes the network can be busy so using a -protocol with low overhead to manage busy devices is important. TCP has more -overhead that UDP because TCP requires a 3-way handshake to establish a -connection. When a device on the network is busy and needs instructions from a -network manager it may not have the resources to establish/maintain a TCP connection. -UDP is a better choice for this because it is a fire and forget protocol. - -The `GetRequest` type is sent by network manager to read the current state of -configuration from a device. The configuration is stored in something called MIB -objects which serves as a sort of key/value store. The `SetRequest` type is used -to change configuration from a manager to an agent/device. This allows the -manager to change the state of configuration on different devices on the -network. +SNMP (Simple Network Management Protocol) is designed to manage devices +within a network efficiently. In busy networks, a low-overhead protocol is +crucial, as devices may not have the resources to establish or maintain +a TCP connection. Unlike TCP, which requires a 3-way handshake, UDP +is lightweight and works well as a "fire and forget" protocol for +sending management instructions. + +- `GetRequest`: Sent by the network manager to read the current state of a device's configuration. Configurations are stored in MIB (Management Information Base) objects, which act as key/value pairs. +- `SetRequest`: Sent by the manager to modify a device's configuration, allowing centralized control of network devices. ## 1.5 SDN-Enabled Devices (5%) @@ -87,21 +80,22 @@ network. SDN-enabled networking devices. What are the preferrable features that an SDN-enabled networking device usually has? -A software defined network (SDN) allows software to control the flow of packets -within a network. This type of software is typically easier to update than the -firmware embedded in most traditional routers/switches. This allows for -protocols like OpenFlow and NETCONF to be used as well as creates extensions -points for new protocol to form. SDN offers things like higher throughput, lower -latency with quaility of service (QoS) and other forms of traffic engineering. -On top of this the centralization helps to offer improved telemetry data to see -everything that is happening withing a network. It also allows for improved -security by making it easier to integrate intrusion detection and prevention -mechanisms. Centralization through a SDN also makes it easier for human -operators to access and control who can manage and operate the network. -Extending a network through an SDN gives the network capability to grow over -time which can lead to enhancements such as the ability to connect cameras, hvac -controls, and network attached storage without needing to manually managing each -of these devices through cumbersome protocols. +Software-Defined Networking (SDN) enables programmatic control of +network packet flow through software rather than embedded firmware, +making updates significantly faster to deploy. SDN supports modern +protocols like OpenFlow and NETCONF while providing extensibility for +future protocol development. The centralized architecture delivers +enhanced throughput and reduced latency through quality of service +(QoS) policies and sophisticated traffic engineering that dynamically +optimizes network paths. Operators gain comprehensive telemetry and +real-time visibility into traffic patterns and network behavior, +while centralization streamlines access control and simplifies +administration. Security integration becomes straightforward, enabling +rapid deployment of intrusion detection and prevention systems across +the entire infrastructure. Networks can expand seamlessly to accommodate +IoT devices like cameras, HVAC systems, NAS without manual per-device +configuration, as the SDN controller automates provisioning and management +at scale. ## 1.6 BGP Loop Detection (5%) @@ -109,18 +103,21 @@ of these devices through cumbersome protocols. that BGP faces is detecting loops in paths. What are the loops? Why should loops be avoided? How does BGP detect the loops in paths? -A network loop occurs when a path revisits the same node (AS) more than once -while attempting to reach a destination. This loops creates a problem because -packets may never reach their destination and could exhaust network resources. - -Loops waste bandwidth, increase latency and may effectively send certain traffic -the equivalent of `/dev/null` (a black hole). This can destabilize a network by -exhausting available resources and can be used by state actors to destablize -economies, communication and more. - -BGP is path-vector (i.e. an array of visited nodes) where each route carries the list of AS that it has visited in something called an `AS_PATH`. -If a router sees its own AS in the received `AS_PATH`, it rejects the route and -prevents looping. +Network loops occur when a routing path revisits the same node (Autonomous +System) multiple times while attempting to reach a destination. These +loops prevent packets from reaching their destination, waste bandwidth, +increase latency, and can create black holes where traffic is effectively +dropped. By exhausting network resources, loops can destabilize critical +infrastructure and have been exploited by state actors to disrupt +economies and communications. + +BGP prevents loops through its path-vector design. Each BGP route +carries an `AS_PATH` attribute which is an ordered list of every AS the +route advertisement has traversed. When a router receives a route, +it examines the `AS_PATH` for its own AS number. If found, the router +immediately rejects the route, preventing the loop from forming. This +mechanism ensures that routing information propagates acyclically across +the Internet. # Part 2: Long Answer Questions (70%) @@ -251,47 +248,13 @@ which is better known as Dijkstra's shortest path algorithm. - Each row shows the state after each iteration of the algorithm. - N' is the set of nodes with the shortest path distance from the source. -- Each subsequent column shows the best known distance from `u` to the node - descried in the column as well as the node before it. - - `D(<node>)`: the best known distance from `u` to `<node>`. - - `P(<node-1>)`: the node that was last visited before `<node>`. +- Subsequent columns shows the best known distance from `u` to each node. + - `D(<node>)`: current shorted distance from `u` to `<node>`. + - `P(<node>)`: predecessor node in the shortest path to `<node>` > b) Consider the network shown in the following diagram. With the indicated link costs, use Dijkstra's shortest path algorithm to compute the shortest path from x to all other network nodes. Show how the algorithm works by computing a table like the one above. -```dot -strict graph { - s -- t [label=1] - s -- v [label=5] - t -- s [label=1] - t -- u [label=9] - t -- v [label=6] - t -- y [label=5] - t -- z [label=3] - u -- t [label=9] - u -- v [label=1] - u -- w [label=1] - u -- x [label=2] - u -- y [label=1] - v -- s [label=5] - v -- t [label=6] - v -- u [label=1] - v -- w [label=3] - w -- u [label=1] - w -- v [label=3] - w -- x [label=3] - x -- u [label=2] - x -- w [label=3] - x -- y [label=5] - y -- t [label=5] - y -- u [label=1] - y -- x [label=5] - y -- z [label=11] - z -- t [label=3] - z -- y [label=11] -} -``` - - + ```ruby { @@ -332,16 +295,18 @@ strict graph { > c) 192.53.40.6 > d) 192.53.56.7 -CIDR routers use the longest prefix match. Among all entries that match -the destination it will choose the one with the longest mask. If none -match, then is uses the default route. +CIDR routers forward packets using longest prefix matching among all +matching routing table entries, the route with the longest network mask +is selected. If no entries match, the default route is used. + +Routing Table: | CIDR | start | end | Route | | ---- | ----- | --- | --------- | | 135.46.56.0/22 | 135.46.56.0 | 135.46.59.255 | Interface 0 | | 135.46.60.0/22 | 135.46.60.0 | 135.46.63.255 | Interface 1 | | 192.53.40.0/23 | 192.53.40.0 | 192.53.41.255 | Router 2 | -| Default | | | Router 3 | +| Default | - | - | Router 3 | a. 135.46.61.10 -> matches 135.46.60.0/22 -> forward to Interface 1. b. 135.46.53.16 -> no /22 match -> forward using Default -> Router 3. @@ -359,7 +324,7 @@ that each TCP segment size is 1,500 bytes; the two-way propagation delay of this connection is 15 msec; and this TCP connection is always in the congestion avoidance phase (ignore slow start). -Given: +Given: * Single TCP flow over a 1 Gbps link, no buffering at the link * segment size = 1500 B (12,000 bits) |
