Final Flashcards
Put the steps in the most correct order for closing TCP Connection.
- Client Sends segment with FIN bit set; 2. Server sends ACK of received segment; 3. Server sends segment with FIN bit set; 4. Client sends ACK of received segment.
How might authentication work with public key encryption?
Sender encrypts a signature with a registered private key and distributes public key. If public key decrypts signature, we know the sender is who they say they are
Use the RSA algorithm discussed in lecture to develop a public key and a private key for public-key encryption. Let p = 5, q = 11, e = 7, m is the original message, c is the encrypted message.
f. Kprivate(Kpublic(m)) = ?
m
Use the RSA algorithm discussed in lecture to develop a public key and a private key for public-key encryption. Let p = 5, q = 11, e = 7, m is the original message, c is the encrypted message.
e. Kprivate(c) = ?
(c^d) % n
Use the RSA algorithm discussed in lecture to develop a public key and a private key for public-key encryption. Let p = 5, q = 11, e = 7, m is the original message, c is the encrypted message.
d. c = Kpublic(m) = ?
(m^e) % n
Use the RSA algorithm discussed in lecture to develop a public key and a private key for public-key encryption. Let p = 5, q = 11, e = 7, m is the original message, c is the encrypted message.
c) d = ?
23
There are several possibilities. Choose d so that ed-1 is exactly divisible by z. If we choose d = 23, ed-1 = 7 x 23 - 1 = 160, which is divisible by 40.
Use the RSA algorithm discussed in lecture to develop a public key and a private key for public-key encryption. Let p = 5, q = 11, e = 7, m is the original message, c is the encrypted message.
b) z = ?
(p-1)(q-1) = 4 x 10 = 40
Use the RSA algorithm discussed in lecture to develop a public key and a private key for public-key encryption. Let p = 5, q = 11, e = 7, m is the original message, c is the encrypted message.
a) n = ?
pq = 5 x 11 = 55
What are some of the major components of networking security?
Confidentiality: Intruders should not be able to understand the contents of a message.
Integrity: Intruders should not be able to change the contents of a message, without the end users being aware of it.
Authentication: End users should be able to verify they are actually speaking to whom they think they are speaking to. Availability: Services should be accessible, and not interrupted by attacks (resilience to DDoS, etc…)
What are some considerations which might be made before instituting a security policy at a company?
Cost vs. Benefit - How much are we willing to spend to achieve a certain level of security?
Will we secure stored information and transmitted information, or just one or the other?
How will we educate our users so that our policy is not breached from the inside? Each computer is attached to a shared medium, with a terminator on each end to absorb signal and prevent reflections. A ring topology does not have a terminator. Rather, its “ends” are connected to each other to form a ring
What are some of the performance issues involved with mobility?
Data loss due to transmission medium and hand-offs - interpreted as congestion.
Additional overhead
Overall lower throughput
In ____________ routing, the correspondent contacts the home agent to get the mobile device’s care-of address, and sends packets to the visited network
Direct
DevRTT formula
(1 - β) ⋅ DevRTT + β ⋅ | SampleRtt - EstimatedRtt |
What is network congestion? What causes it?
In the simplest terms, network congestion is the increase in end-to-end delay due to high bandwidth utilization at some point in the network. It is caused by end systems sending data faster than the network is capable of handling (those darned routers!).
What are some consequences of a congested network?
Packets are dropped, delayed, or routed through a non-optimal path. Because of this, sending hosts will attempt to retransmit (if using TCP), which causes an increase in network congestion. If this were to continue, there would be a congestion collapse (essentially a network super-slow-down).
Given a nodal delay of 3 ms when there is no traffic on the network (i.e., when usage = 0%).
What is the effective delay when network usage is 25%? 75%? 99%?
(Nodal Delay / (1-usage) = 3ms/(1-.25) = 4ms
(Nodal Delay / (1-usage) = 3ms/(1-.75) = 12ms
(Nodal Delay / (1-usage) = 3ms/(1-.99) = 300ms
What is the goal of congestion control? What, in general, is used to do this?
To optimizing network utilization, such that a high throughput is ensured, with the restriction that utilization is not pushed so high that delay and packet loss become major factors. This is accomplished by attempting to detect and avoid congestion, and if congestion is un-avoidable, the sender should reduce their data output.
How is TCP’s timeout interval set?
TimeoutInterval = EstimatedRTT + (4 * DevRTT)
EstimatedRTT is an exponential weighted moving average based on recent and past sampled round trip time values.
EstimatedRTT(n) = (1 - α)EstimatedRTT(n-1) + (α)SampleRTT(new)
DevRTT is a factor which increases when the most recent sampled round trip time is different from the most recent estimated round trip time. It is another exponential weighted moving average, strongly weighted toward the most recent deviation value.
What are the two major approaches to network congestion control?
Network core assistance: The network core senses when congestion is an issue - directly - and sends messages (either to the destination host, which bounces it back to the source host, or directly back to the source host) indicating congestion in the core, and possibly advising on a course of action.
Host inference: A source host attempts to infer congestion in the network core based on observables (e.g. round trip time, dropped packets)
In basic terms, how is congestion control implemented in TCP? What is this method called?
When no congestion is perceived, the sliding window size gradually increases (additive increase).
When there is perceived congestion, the sliding window size is drastically reduced (multiplicative decrease).
Together this makes up an additive-increase multiplicative-decrease (AIMD) scheme.
What is an MSS?
Maximum Segment Size. This is the maximum amount of transport-layer data which can be sent, such that it will fit within one link-layer data frame. This ranges from the 500’s for a dial-up modem to around 1460 for cable internet.
Describe TCP’s “Slow Start” mode. What is its purpose?
The purpose of TCP Slow Start is that it allows for a very slow start, but a rapid increase, in the size of the congestion window. By doubling the CongWin every time the transmitted packets ACK within the timeout interval, there is an exponential increase in the rate of transmission (until a threshold is reached).
Describe TCP’s “Fast Retransmit” technique. What is its purpose? What affect does this have on congestion control?
TCP’s fast retransmit (from RDT) is intended to more quickly infer the loss of a packet, and retransmit it, to increase data throughput. If a host receives three duplicate (so four total) ACKs “requesting” the same segment number, it assumes the segment starting with that sequence number was dropped, and retransmits the segment, even if the timer for that segment has not expired.
In terms of congestion control, this assumed loss is perceived as congestion, but given less weight than a full timeout. The CongWin is cut in half, rather than set to 1 MSS (as in a timeout).
Describe the steps of the TCP connection setup.
1) SYN: Client host sends a segment to the Server host with the SYN bit set, the ACK bit cleared, and some pre-generated sequence number.
2) SYN ACK: Server host sends a segment to the Client host with the SYN and ACK bits set, a locally generated sequence number, and an ACK number equal to the first segment’s sequence number plus one.
3) ACK: Client host sends a segment to the Server host with the ACK bit set, the SYN bit cleared, and the ACK number is the previous segment’s sequence number plus one. Note that this segment may contain actual application data in the payload.
Describe the steps of the TCP connection takedown
1) FIN: Client host sends a segment to the Server host with the FIN bit set, the ACK bit cleared, and its next sequence number.
2) FIN ACK: Server host sends a segment to the Client host with the ACK bit set and Fin bit cleared. The ACK number is the next expected sequence number. (This is a normal TCP ACK segment).
3) FIN: Server host sends a segment to the Client host with the FIN bit set, the ACK bit cleared, and its next sequence number.
4) FIN ACK: Client host sends a segment to the Server host with the ACK bit set and the FIN bit cleared, and the ACK number is the previous segment’s sequence number plus one. (This is a normal TCP ACK segment)
What is fairness in TCP?
The goal is to share bandwidth evenly amongst all connections through a router. TCP works toward fairness due entirely to its congestion window size algorithm. This is on a per-connection basis, so for example a web browser which spins off a connection for every image it has to download (in parallel) would not be “fair” to a single-connection FTP transfer.
Is the UDP protocol fair?
No, UDP does not utilize any fairness-allowing schemes.
What does TCP do better than UDP?
While there are quite a number of answers to this question, the basics are that TCP’s reliable data transfer is the most endearing aspect it has to an end user, and congestion control for the network core.
What does UDP do better than TCP?
Throughput
Where do Network-layer protocols run?
Everywhere in the internet! At the edge (host systems) and in the core (routers).
What is the purpose of the network layer?
At a very high level, the purpose is to ensure logical communication from host to host. In a more nuts-and-bolts view, the purpose is to determine a path from source to destination that a datagram can take, and to move it on that path (within the network layer)
What is the difference between routing and forwarding?
Routing is the process of determining the path a datagram will take from source to destination in the internet, whereas forwarding is the process within a router of moving a datagram from an input port to the appropriate output port, so that it may take the next step in its journey from source to destination.
What is a “first hop” router?
The “first hop” router is the first router a datagram is passed to from the source host on the path to the destination host
What is a virtual-circuit network? What are some benefits of this type of network?
A connection-oriented network layer implies a virtual-circuit network. This type of network has a call setup at the beginning of a host-to-host connection, and from that point the state of the connection is preserved in all routers from source to destination, until the call is taken down. Some primary benefits of VC networks are guaranteed bandwidth and timing (jitter), which makes them ideal for streaming audio/video.
What is a datagram network? What are some benefits of this type of network?
A connectionless network layer implies a datagram network. The internet is a datagram network. The advantages are similar to those of UDP - there is FAR less overhead. Each network need not preserve the state for every host-to-host communication passing through it. With the billions of devices on the internet, this would be terribly implausible regardless of the rapid development of storage space and access times.
How does a router know which output port each one of the billions of IP addresses are located at?
The forwarding table in a datagram network’s router matches ranges of addresses to output ports, rather than matching each address to its own output port. By doing this, it saves tremendously on time and required storage/access capability.
What does a routing algorithm do? Where is the output of a routing algorithm stored?
Finds a path from a router to destination, and selecting it appropriately. The result of the algorithm is used to construct the router forwarding table (or routing table), which is stored in the router.
What is switching fabric in terms of networking? How is it controlled?
The hardware switching circuitry used, within routers, to switch datagrams from an input port to an output port (or queue) without any collisions occurring. This is controlled by the routing processor, which utilizes the stored routing table. The IP address of incoming datagrams are used to determine the output port.
Is it possible to have a queueing delay at the output port of a router? How? What about packet loss?
Yes, due to transmission rate limitations on the output port link: if several datagrams were switched to the same output port, they will have to wait for access to the transmission medium. Packet loss can also occur, if the buffer overflows.
Is it possible to have a queueing delay at the input port of a router? How? What about packet loss?
Yes, due to head-of-line blocking or output port contention: if the datagram at the front of the line in the input port queue cannot be transferred to the output port because there is already a transfer occurring to, or a full queue at, the desired port. This would cause a delay in transferring the HOL datagram to its output port. Packet loss can occur here as well, if the input buffer overflows
A key aspect of a virtual network is ___________________________.
a single, uniform address format
What reliability services does the IP network-layer protocol implement?
Header Checksum!
But no real reliability services.
What are the minimum and maximum sizes of the IP header, in bytes?
Minimum: No options, Length = 5. 5x4 = 20 bytes.
Maximum: Max options, Length = 15. 15x4 = 60 bytes.
Theoretically, what is the maximum number of bytes of “payload” (actual application data) that can be transmitted in an IP datagram carrying a TCP segment?
65495 bytes.
The “length” field of the IP datagram header is 16 bits, so the maximum datagram size is 65,535 bytes.
The TCP header and the IP datagram header are each at least 20 bytes. 65535 - 40 = 65495
Why can’t we use hardware addresses for our network address?
IP addresses are hierarchically organized, allowing for streamlined routing throughout the internet. If we used hardware addresses, we would not be able to use longest-prefix matching. Indeed, some routers would have to keep lookup tables for every single hardware address connected to the internet. To make it worse, some hardware types use different addressing schemes than others.
Convert the following 32-bit binary number to a dotted-decimal IP address format.
10000000 11000001 00000100 01110000
128.193.4.112
First 20 bits of an IPv4 address represent what?
Network Address
Last 12 bits of an IPv4 address represent what?
Host number
Network address + host number = ?
Host Address
Bits 21-24 of an IPv4 address are for:
ISP subnets
How many hosts can be supported in /28 subnet?
2^4 - 2 = 14
(32 - 28) = 4 bits available
2^4 = total numbers available
Minus 2 because all 0’s and all 1’s (broadcast) is restricted
What is a subnet?
Most generally, a subnet is a part of a network which shares a common address prefix component. More specifically, it is often a discrete portion of a network, separated by a router from all other portions of the network.
What are the two addresses in a subnet which are reserved, and what are they reserved for?
The network address cannot be assigned to a host. To find the network address, set the host part of the IP address to all zeros. (mask it with the netmask) The broadcast address is also reserved. To find the broadcast address, set the host part of the IP address to all ones.
What is a next-hop router?
Once a prefix match is made within a routing table, a packet is forwarded to its appropriate output link. The router at the other end of that link is the next-hop router.
What is DHCP?
Dynamic Host Configuration Protocol:
- application layer protocol, DHCP client-server
- dynamically “lease” IP address from a server when joining the network
- IP address can be reused by other hosts if released
- IP lease can be renewed while still connected
What is the purpose of DHCP?
DHCP is intended to streamline the connection of new devices to a network. Rather than having a sysadmin hard-code a relationship between hardware (MAC) addresses and IP addresses, a new device can enter a network and automatically obtain an IP address valid in the network.
Give the steps undergone when a new device enters a DHCP-enabled network. (very long)
- It broadcasts a “DHCP discover” via UDP to port 67, sending the message to IP address 255.255.255.255 with a ‘source IP address’ of 0.0.0.0. It passes this datagram to the Link Layer which will broadcast to all nodes on the subnet.
- A DHCP-enabled server will pick up this message and send back a “DHCP offer” message on the broadcast IP address (255.255.255.255). This message will contain the proposed IP address, lease time, network mask, etc. NOTE: The link-layer frame is addressed to the MAC address of the new device.
- The new device sends a “DHCP request” message, echoing the configuration parameters, again to the IP broadcast address from source 0.0.0.0, and again to the MAC broadcast address, requesting an IP address.
- The DHCP-enabled server, in response, sends a “DHCP acknowledgement” message, confirming the parameters, to the Broadcast IP address (and the device’s hardware address). It also records the relationship between this IP address, and the device’s hardware address, in a table.
Why does an arriving DHCP client have to broadcast its hardware address?
An arriving DHCP client has no IP address. By broadcasting its hardware address to the entire network, it is received by the DHCP server. The DHCP server can then offer an IP address lease to the client, by sending to its (unique) hardware address
Is IP address space exhaustion a problem?
This depends on your outlook. There are some mechanisms that are proving a stopgap, but really we’ve already run out.
A ____________ is used to find a datagram’s path through a network
routing algorithm
In a network graph…
- “Nodes” represent ________________.
Routers
In a network graph…
- Edges represent ________________________.
direct connections between routers