Internet Tech Final

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is MTU?

*MTU* is the maximum amount of bytes supported in the payload that a link layer frame can carry. Limits the size of an IP datagram(and thus TCP/UDP)

DHT assigning key-val pairs to peers

assign to peer w/closest ID (immediate succesor)

Distributed Hash Tables (DHTs) are used such that: (key, value) pairs are distributed over millions of peers. Any peer can query the database with a key Each peer knows about all other peers Each peer only knows about a small number of other peers

(key, value) pairs are distributed over millions of peers. Any peer can query the database with a key Each peer only knows about a small number of other peers

Suppose that TCP's current estimated value for the round trip time is 200 ms and deviation in the RTT is 20ms. Suppose that the next packet has an RTT of 300 ms, and the the next packet was lost, and the next packet after that was a retransmitted packet and the RTT was 80 ms. Suppose alpha = 0.125 and Beta = 0.25 After the 3 packets' RTT values are calculated, the new val of est RTT is ________ ms and TCP timeout value is _________ ms.

Retransmitted packets are ignored. EstRTT = (1-a)* EstRTT_prev + a*SampleRTT DevRTT = (1-B)*DevRTT_prev + B*(sampleRTT-EstRTT) timeout = EstimatedRTT + 4*DevRTT EstRTT = (1-0.125)*200 + 0.125(300) = 212.5 ms DevRTT = (1-0.25)*20 + 0.25(12.5) = 18.125 ms timeout = 212.5 + 3.125*4 = 212.5 + 12.5 = 225 ms timeout

What are well known ports? What are ephemeral ports?

0-1023: everyone agrees which services run on these ports Ephemeral ports (1024-65535) are given to the clients to do what the want with

You have received the following UDP packet: Offset Bytes in the header and payload (in hexadecimal): 0x0000: 4 5 0 0 0 0 2 5 c e 1 6 4 0 0 0 4 0 1 1 f 9 4 1 c 0 a 8 8 7 5 7 0x0010: 4 2 8 1 7 5 2 9 2 9 8 5 8 2 0 2 0 0 1 1 ... ... The source IP address is: The dest port is

0x0000: 4 5 0 0 0 0 2 5 c e 1 6 4 0 0 0 4 0 1 1 f 9 4 1 c-0-a-8 8-7-5-7 0x0010: 4_2_8_1_7_5 2_9 2*9*8*5 8^2^0 ^2 0 0 1 1 ... ... Dashes are where the source IP address is Underline is Dest IP address Source port is * Dest port is ^ ---> Source IP = 192.168.135.87 ---> Dest IP = 50.129.117.41 ---> Source Port = 10629 ---> Dest port = 33282

How do you generate private/public RSA keys? public key cryptography

1) Choose 2 large prime numbers, p & q. Suggested to be around 1024 bits 2) compute n = pq & z = (p-1)(q-1) 3) Choose a number e, less than n, which has no common factors with z. 4) find a number d such that ed-1 is exactly divisible by z PUBLIC KEY is (n,e) PRIVATE KEY is (n,d)

Describe the different types of delay and how to calculate them if applicable. Also, how do you calculate the total delay?

1) Processing delay: Time to examine the packets header, check for errors, and determine where to route it This is a fixed amount, no calcs 2) Queuing Delay: Only one packet may be transmitted on a link at a time. if a link is busy when a packet arrives to be transmitted it will have to wait in the queue. We do not have to calculate this 3) Transmission Delay: Time to get the entire packet onto the link Calculated as L/R where L is the size of the packet in bits and R is the bandwidth of the link in bps 4) Propagation Delay: The time it takes for the packet to travel along the physical link from the sender to the receiver Calculated as D/S where D is the distance the packet is traveling while S is the speed at which data can propagate through the link Total delay is just all of the other 4 added together(or all that apply)

If a TCP connection has a maximum congestion window size of 50 MSS and RTT of 500 ms and it uses the AIMD alg(increase cwnd by 1 MSS every RTT until loss is detected). Suppose if the window size > max size, a loss event occurs and the window size is cut in half. The average window size (in segments) of this TCP connection is ____________ It would take ____________ seconds for this TCP connection to reach its maximum window size again after recovering from a packet loss

1) average window size is 3/4 of the max. 50 * 3/4 = 37.5 2) 500 ms * 25 = 12.5 seconds The window size would go to 25 (cwnd/2) after the loss event, since cwnd increases by 1 each RTT after 25 RTT we are back at 50. 25 RTT = 12.5 seconds

What does a digital signature allow people to confirm.

1) the sender signed the message 2) No one else signed the message non-repudiation: it is provable that a specific sender sent m

In a circular DHT, how many messages would it take in the worst case to find the node that has a given key if there are n = 2^10 = 1024 nodes, and they use up all possible keys if there are no shortcut links and we use only successor links: If like in the chord system, each node has log(n) neighbors in a finger table in addition to the predecessor and we only use the finger table:

1023, has to go through all the others 10, i think its just log(n) ?

Consider a point to point link 3005 km in length. The propagation delay(2*10^8 m/s) equals the transmission delay for a 100 byte packet when the bandwidth is ______ kbps

3005km * 1000 = 3,005,000 m / 200,000,000 m/s = 0.015025 seconds 100 bytes * 8 bits/byte = 800 bits 800/x = 0.015025 x = 53,244.6 bps x = 53.24 kbps

If a circular DHT using the Chord system has 8 nodes with identifiers 1,13,22,26,31,44,47,60 and the range of identifiers is 0-63(6 bits) and each node knows its predecessor and its finger table, and a node of value 8 wants to join, its new finger table would be ___,13,13,22,26,____. Recall that every finger table has m entries if every identifier has m bits and the i-th entry of node n is successor (n+2^(i-1)mod 2^m) where the successor of a key k is the first node whose ID equals k or follows k

8+2^(1-1) mod 2^6 = 8 + 0mod64 = 8 8+2^(2-1) mod 2^6 = 8 + 2mod64 = 10 8+2^(3-1) mod 2^6 = 8 + 4mod64 = 12 8+2^(4-1) mod 2^6 = 8 + 8mod64 = 16 8+2^(5-1) mod 2^6 = 8 + 16mod64 = 24 8+2^(6-1) mod 2^6 = 8 + 32mod64 = 40 From the equation to find the finger table, just look for next highest node if it isn't equal to any: 8 --> 13 10 --> 13 12 --> 13 16 --> 22 24 --> 26 40 --> 44

This question is about round trip time (RTT). A. RTT is a variable value that is the measured time from transmitting a segment until receiving an ACK. B. RTT is a fixed value for all networks on the Internet. C. When measuring RTT, the time required for re-transmission is also considered. D. The TCP timeout value is set to value equal to RTT.

A

What is symmetric key cryptography?

A & B share the same, symmetric key, Ks An example would be a substitution cipher where both know the same way of substituting letters This would also be considered a simple encryption scheme. If you can crack message like quick brown fox... you can get any.

DHT's(distributed hash table)

A hash table converts a name into a more convenient key i.e John --> 100010 key = hash(original key) DHT's distribute (key,value) pairs over millions of peers Any peer can query database with a key: database returns value for the key Each peer only knows a small number of other peers

TCP ensures the following services: A. Point-to-point delivery of the data. B. Congestion avoidance. C. Reliable, in-order Byte stream delivery. D. Flow control.

A,B,C,D

This question is about congestion and how TCP controls it. A. Congestion control prevents the sender from overwhelming the network resources B. In network-assisted congestion control, routers provide no feedback to end systems C. Congestions happen due to buffer overflow at the network routers D. Congestion control is an alternative name to flow control

A,C

This question is about TCP. A. IP protocol provides unreliable service to the TCP protocol. B. IP protocol provides a reliable service to the TCP protocol. C. TCP does not provide any level of reliability for data transfer on top of IP. D. TCP provides a reliable data transfer on top of IP.

A,D

For a fragmented IP datagram: A. fragmentation may happen again along the path to the final destination B. fragments are reassembled only at the final destination C. reassembly happens at the next "intermediate" node along the path to the destination D. reassembly does not happen, once a datagram is fragmented

AB

A NAT router: A. maintains a NAT table that stores the IP address and port number of every connection, for both sides (WAN and LAN) B. uses the same source IP address and port number of every incoming datagram C. replaces the source IP address and port number of every outgoing datagram to the NAT IP address and a new port number D. replaces the source IP address and port number of every incoming datagram

ABC

With NAT (Network Address Translation): A. A range of IP addresses is not needed from ISP, just one IP address for all devices B. The addresses of devices in a local network can be changed, without notifying the outside world C. The ISP can be changed without changing the addresses of the devices in the local network D. A local network uses just one IP address as far as the outside world is concerned

ABCD

In IPv6: A. fragmentation is not done at all B. the checksum is removed entirely to reduce processing time at each hop C. fragmentation is done when needed (similar to IPv4) D. priority can be given to certain datagram in the flow

ABD

Routing algorithms can: A. find an alternative path, in case of a link or a router failure B. be a link-state, a distance-vector, or a hierarchical C. find the best path between any two nodes on the network that may not be the least cost one D. find the least-cost path between any two nodes on the network

ABD

For hosts in the same subnet: A. the host part is different for each host B. they all have the exact, same IP address C. they all share the same subnet part D. they can have different subnet part

AC

For a DHCP request: A. the request is encapsulated in a UDP segment, encapsulated in an IP datagram, encapsulated in an 802.1 Ethernet frame B. the request is ignored and no IP address is allocated (the host generates an IP address). C. the request is acknowledged by the DHCP server, where the ACK contains the assigned client's IP address. D. the request is broadcasted in an Ethernet frame with a destination address = FFFFFFFFFFFF on the LAN

ACD

ICMP (internet control message protocol) A. messages are carried in IP datagrams B. is only used by routers to communicate network-level information C. messages include the type of information, code, and a description of the network-level information D. is used by hosts and routers to communicate network-level information

ACD

Select all that apply from the following: A. A routing algorithm determines the end-end-path through the network B. All routers have the same forwarding table C. A forwarding table determines the local forwarding at a certain router D. All routers in a network use the same routing algorithms, but each of them maintains its own forwarding table

ACD

How does layering benefit the internet? Also name the layers in order cause why not(highest to lowest level)

Allows you to replace/fix one layer without changing the surrounding layers Higher-level software doesn't have to understand lower level stuff, lower level stuff can just treat higher level stuff as data Application, transport, network, data link, physical

You visit a webpage that contains 19 referenced images to retrieve. You can save at least _____ and at most _____ RTTs by having a persistent HTTP connection over a non-persistent one, assume the non-persistent on is sequential (non-consistent requires 2 RTTS per object. w/ persistent you already have a connection. You save the least if the persistent connection still requires you to request the next object after the previous one has been received, so each needs 1 RTT. Best case only need 1 RTT for the whole sequence of objects).

Amount of RTTs for non-persistent connection: 19 objects * 2 RTTs Min amount for persistent: 1 RTT Max amount for persistent: 19 objects * 1 RTT Most saved: 38 - 1 = 37 RTT Least Saved: 38 - 19 = 19 RTT

Once the TCP timeout timer expires: A. TCP only retransmits the segment that caused the timeout. B. TCP retransmits the segment that caused the timeout and restarts the timeout timer. C. TCP does nothing. D. TCP does not retransmit the segment that caused the timeout and only restarts the timeout timer.

B

On the internet, the host uses which of the following to direct a segment to the appropriate socket? Access point name, IP address, MAC address, Port number

Answer: IP address, Port number

Which of the following is true in P2P architectures: The server is always-on, Peers do not change IP addresses, Peers are intermittently connected and change IP addresses, The server has a permanent IP address

Answer: Peers are intermittently connected and change IP address

The question about link utilization of Automatic Repeat-Request (ARQ) mechanisms. A. None of the Automatic Repeat-Request mechanisms utilizes the link efficiently. B. Pipelined protocols utilize the link more efficiently than Stop-and-Wait protocol C. All Stop-and-Wait protocol and Sliding Window protocols (pipelined protocols) utilize the link efficiently. D. Stop-and-Wait protocol utilizes the link more efficiently than the pipelined protocols.

B

TCP flow control mechanism guarantees that: A. the receiver is always busy B. the sender limits the amount of unacknowledged ("in-flight") data to the receiver's free buffer value C. the receive buffer is full D. the receive buffer will not overflow

B,D

the internet provides ___________ delivery

Best effort, Packets may be lost, corrupted, or delivered out of order

What happens when a router needs to forward a packet that is larger than the link's MTU?

Breaks up the datagram into 2 or more fragments. Each fragment becomes separate IP datagram IP layer at THE END SYSTEM ONLY needs to reassemble the fragments before passing it up to the transport layer. (it may be fragmented multiple times, but only reassembled once)

IP addresses are used to identify: A. only the routers connected to the Internet B. only the hosts connected to the Internet C. routers and hosts connected to the Internet D. the links on the Internet

C

Suppose we have 4 links in a networks path. Suppose each link has a loss probability for a packet 10% The probability that a packet will not arrive at the destination is _______.

Chance it won't make it past first link: 100 * 0.1 = 10% Chance it won't make it past second: 90 * 0.1 = 9% Chance it won't make it past third: 81 * 0.1 = 8.1% Chance it won't make it past the last: 72.9 * 0.1 = 7.29% Total % = 34.39% chance it won't make it (1 - 0.9^4 is the easier way)

Real-time online games often use UDP instead of TCP for lower latency and prioritizing the latest updates over in-order reliable transmission. Some aspects of game data may need to be received reliably, and it's tempting to use TCP along with UDP, but internet devices may prioritize TCP packets, and this can cause UDP packets that come along to be more likely to be lost. If you are playing a game and only need to send 2 packets of small critical info to a game server within 100ms to win the game, and suppose the RTT is 50ms, and suppose a UDP packet has a 10% probability o get lost and a TCP packet has a 5% probability to be lost, and assuming if a TCP packet is lost the sender can only know it's lost and resend it after 2RTT's so you can resend it in time, but if a UDP packet is lost the game detects it so you have ine cahnce to resend a single packet(not both) and it will still arrive in time if it's not lost, what is the difference in probability of you successfully sending the 2 packets in time to the server and win the game if you use UDP packets over TCP.

Chance of both UDP packets being lost: 0.1 * 0.1 = 0.01 = 1% Chance of 1 UDP packet being lost: 18% Chance of that packet being lost: 1.8% Chance of no UDP packets being lost: 81% Only lose if BOTH are lost w/UDP so 2.8% of the time you will lose. Chance of both TCP packets being lost: 0.05*0.05 = 0.0025 = .25% Chance of 1 TCP packet being lost: 9.5% Chance of no TCP packets being lost: 0.95*0.95 = 0.9025 = 90.25% You will lose if 1 or both are lost: 9.75% 0.0975 - 0.028 = 0.0695 6.95% difference

Explain ways of breaking an encryption scheme.

Cipher-text only attack: intruder has ciphertext only, and have to analyze it to break it 1) Brute force- just try every key 2) can analyze w/stats Known-plaintext attacks: intruder has plaintext corresponding to ciphertext Chosen-plaintext attack: Intuder can get ciphertext for chosen plaintext

Circular DHT vs Circ w/ shortcuts

Circular: each peer only aware of immediate successor and predecessor. On average takes O(N) messages to resolve a query for N peers Shortcuts: each peer now also has IP's of shortcuts, possible to design to take O(logN)

What are the 4 parts of network security? Define each term as well

Confidentiality: Only the server and the intended receiver understand message contents Authentication: Sender and receiver must confirm identity of each other Message Integrity: Sender/Receiver need to make sure message hasn't been edited Access and Availability: Services must be accessible and available for users

Describe the following: VC connection setup VC communication VC teardown

Connection setup: Set up is based on dest address, each router commits resources. Each router enters the connection in its forwarding table, meaning that it maintains connection state info Communication: each packet contains a VC#, forwarding tables in routers determine the next link and next VC# dest address NOT needed, just VC# Teardown: clear connection from forwarding table in each router

The network layer's service model is (2 main things, 4 parts to second thing)

Connectionless Best effort deliver(unreliable) - packets lost - packets out of order - duplicates of packets can be delivered -packets can be delayed for a long time

When a receiver receives an out-of-order segment with higher than the expected sequence number, it: A. immediately sends a single ACK acknowledging that segment B. immediately sends a single cumulative ACK, acknowledging all previous in-order segments C. does not send any kind of ACK D. immediately sends a duplicate ACK, indicating the sequence number of next expected byte

D

What are examples of transport services that an app would need?

Data integrity Timing(low delay) Throughput(need minimum rate of data transferred) security

Problem with RSA in practice

DES is at least 100 times faster. Use public key crypto to establilsh secure connection, the establish second key, symmetric session key for encrypting data

Describe the purpose of the link layer

Detects and corrects errors Organizes data into frames before passing it down, sequences packets if necessary. Ex: Ethernet, MAC, PPP Data called frames

Consider distributing a file of size F = 40 Gbits to 90 peers. The server has an upload rate of u_s = 5Mbps, and each peer has a download rate of d_i = 4Mbps and an upload rate of u = 400 Kbps The minimum distribution time for a client-server model is _________ seconds. For P2P it is: ________ seconds. 1G = 10^3M = 10^6 K = 10^9

Equations: For client-server D=max{NF/u_s, F/d_min} N= # peers, F = file size, u_s = upload rate of server, d_min = rate of slowest downloader For P2P: D=max{F/u_s, F/d_min, NF/(u_s+ sum(u_i)) NF/u_s = 3600 Gbits/5Mbps = 3,600,000,000,000 / 5,000,000 = 720,000 seconds F/d_min = 40,000,000,000 / 4,000,000 = 10,000 seconds Therefore client server takes 720 K sec F/d_min is less than F/u_s so it's meaningless 3,600,000,000,000/(5,000,000 + 36,000,000) = 87804.878 seconds This is the greatest of the P2P ones, so it is the answer

In P2P networks: Each and every node is itself client and server A centralized server is used to store the data Each and every node can do both requests and responses for the services Clients and servers are differentiated

Each and every node is itself client and server Each and every node can do both requests and response for the services

Distance Vector Routing

Each node maintains set of triples (dest, cost, nexthop) Exchange updates with directly connected neighbors - periodically and whenever table changes Each update is a list of pairs(dest, cost)

What are the different things that attackers can do? Define each of them as well if applicable.

Eavesdrop: Intercepting messages Actively inserting messages into a connection. Impersonation: Can fake(spoof) source address in packet(or other fields) Hijacking: attacker can take over ongoing connection by removing sender or receiver, inserting themselves instead. Denial of Service: Prevents service from resources by others

Ethernet Switching vs VC switching

Ethernet: No connection setup(connection-less) Packets must carry dest address Switching based on globally unique MAC address hosts don't know if network can deliver packet when it sends it Packets are forwarded individually and may be out of order A switch and link failure may not be serious if alternate route can be found VC: Establishes connection Packets(cells) only carry VC# Switching is based on incoming port + VC#, VC# is changed at output port Negotiates quality of service parameters first: if not enough resource, reects the connection request. QoS is guaranteed for connection Each cell is routed along connection in order If switch/link fail, need to tear down old connection and reestablish

This question is about file distribution time in client-server vs. P2P with two clients or more. File distribution time in client-server and P2P networks increases exponentially as the number of clients increases File distribution time in client-server and P2P networks are equal File distribution time in client-server networks is less than P2P networks File distribution time in client-server networks is greater than P2P networks.

File distribution time in client-server networks is greater than in P2P networks

Suppose a sender and a receiver directly connected by one line of rate 8*10^3 bps nad the round trip time is a constant 1 second. Suppose the client wants to retrieve an object of size 6*10^4 bits, and the MSS is 10^4 buts, They are using TCP wiht an initail congestion window of 1 MSS and it increments by 1 for each ACK received in the slow start phase, Suppose there's no packet loss and ignoring protocol headers length, it take ________ seconds to retrieve the data(including TCP set up)

First, we have to set up the connection, which takes 1 RTT (1 second) Note that our object to send is 6 MSS Now our window size has increased to 2 MSS 2*10^4 bits/8*10^3 bps = 2.5 seconds until last bit of the packet is sent, takes 1 RTT for ACK from second to arrive: 4.5 seconds Window size is now 4 MSS, so 5 seconds to transmit, 1 second until acked

Consider the scenario in figure 1(a). Suppose this scenario where an ACK from the receiver is lost, happens 1% of the time. Assume that each ACK is 40 bytes and each packet is 100 bytes. Compate the two protocol, GBN and SR, in terms of the average number of packet transmissions in both directions when transferring a file of size 2*10^6 bytes. The situation is Sender Receiver Seq = 100,100 bytes --------------------- > received Seq = 200, 200 bytes --------------------> received x------------------- ACK 200 received <----------------------------------- ACK 300

For Go Back N it would need to resend 0 packets because GBN uses a cumulative ack. Therefore, if the sender receives an ack for 300, it knows that the receiver has gotten all bytes up to 300. For SR, out of 2*10^6 bytes, we have 2*10^4 packets 0.01 * 20,000 = 200 (1 percent of packet's ACKSare lost. with SR, it will need to resend these)packets that will need to be resent 200 * 0.01 = 2 packets out of the 200 resent will need to be resent. total of 202 packets to be resent

What must an implementation of of a NAT do?

For outgoing datagrams: replace Source IP and Port # of every outgoing datagram to NAT IP, new port# Remember in a NAT translation table every source IP, port # to NAT IP, port # translation pair Replace incoming datagrams (NAT IP address, new port #) in dest fields of every incoming datagram with source IP, port # stored in NAT table

Question: Suppose 15 people want to communicate with each of the 14 other people using symmetric key encryption. All communication between any 2 people is visible and no other person should be able to decode it. how many keys are required in this system? Consider the same situation for a public key system?

For symmetric key encryption, every person needs 1 link with each person. e.g first needs 14, 13, 12 etc. = (n*(n-1))/2 --> 105 keys needed For public, private key system each person just needs a public key and a private key, so 2*n 15*2 = 30 keys

When a new peer joins a swarm in a bittorrent network: It has no chunks but will accumulate them over time from other peers It may have chunks that it can immediately exchange with other peers It has no chunks and will not accumulate them over time Registers with a tracker to get a list of peers and connects to a subset of peers

It has no chunks but will accumulate them over time from other peers Registers with a tracker to get a list of peers and connects to a subset of peers

Describe HTTP

Its the web's application layer protocol Its a client-server model Uses TCP Is stateless(no info maintained about past requests) can be persistent(multiple objects sent over single TCP connection) or non-persistent(needs new connection for each object)

NATs. what's the motivation/benefits my g.

Local network can now just use one IP as far as the outside world is concerned IP addresses are limited and also cost money Allows addresses of devices in local network without notifying outside world. Can change ISP without changing addresses in local network devices inside are no explicitly addressable(security plus)

Gathering chunks of data received from different sockets and encapsulating them with transport headers, and then passing the results to the network layer is called _______________

Multiplexing

File distribution equation for client-server and P2P

N = number of people downloading F = files size in bits u_s = upload rate of server d_min = lowest download rate of person u_i = ith person's upload rate Client-server = max{NF/u_s, F/d_min} P2P + max{F/u_s, F/d_min, NF/(u_s + sum(u_i)

On the internet, data is chunked into small pieces that referred by different names in each layer of the protocal stack, Data the needs to be exchanged is referred to as a datagram at the :

Network Layer

Difference between transport and network layer

Network later provides logical communication between two hosts Transport layer provides logical communication between processes(relies on/enhances network layer services) analogy: transport layer appropriately distributes letters once they have arrived at a house while the network layer is the postal service responsible for moving the letters between houses

Do TCP/UDP provide security?

No, need to use SSL on top of them to encrpyt

Difference in persistent and nonpersistent HTTP connections

Non-persistent: Needs 1 RTT to initiate TCP connection and one RTT to request/return an object 2RTT per object + file transmission time Persistent HTTP At worst, needs 1 RTT to set up connection, then needs to request each object(1 RTT per object). best case all objects can be sent together meaning just a total of 2 rtt

When using circular DHTs: All peers are aware of all other peers in the network Only one peer is aware of all other peers in the network O(N^2) messages are exchanged on average to resolve a query when there are N peers O(N) messages are exchanged on average to resolve a query when there are N peers

O(N) messages are exchanged on average to resolve a query when there are N peers

Describe the difference in scalability between P2P and client-server architectures

P2P archs are self-scalable. new peers bring new service capacity as well as new service demands Client servers can only scale by increasing the power/size of their server, need data centers as more data needs to be exchanged

Peer churn and how to handle it

Peers may come and go. Each peer only knows its successors, and periodically pings them to see if they are still there. When one leaves, make immediate successor new peer

What is a process? What makes a process client/server respectively

Processes are programs running on a host. Client processes initiate communication while server processes wait to be contacted

Describe the purpose of the transport layer

Provides an interface for end-to-end communication(app to app). Sends/receives segments of data. Manages flow control. May include end2end reliability Data called segments

Describe the purpose of the network layer

Relay and route information to destination. Manages the journey of datagrams and figure our intermediate hops Ex: IP protocol Data called datagrams

two key difference between routers and switches

Router: layer 3 device (up to network layer); uses IP addresses; route packets between devices over multiple networks (or the global Internet) Switch: layer 2 device (up to datalink layer); uses MAC addresses (physical or Eth address); forward packets within the same network

Host A and Host B alternate between sending messages to each other over a TCP connection. All of host A's message are 100 bytes long. Host B's are 200 bytes long. Each host includes a new message along with the ack for the previously received message Assume A1 has a sequence number of 6 and B1 has a sequence number of 27. What are the values of the sequence # and ack # fields of the TCP segments for the first 6 segments in the exchange? Segment Sequence ACK 1 6 27 2 27 ? 3 ? ? 4 ? ?

Segment Sequence ACK 1 6 27 <---- Sent from A 2 27 106 <------B 3 106 227 <------ A 4 227 206 <------ B add size of packet that was sent

Public Key Cryptography

Sender uses the public key of the recipient to encrypt and the recipient uses its private key to decrypt Anyone with public key can send messages to a person, but no one but them can decode it because they don't have the private key

Which of the following are examples of P2P file sharing netowrks. Piazza Sakai Skype Bittorrent

Skype, Bittorrent

What are sockets?

Sockets are the way that processes send and receive messages. They are analogous to a door. Sending process will shove the message out the door and rely on the transport layer infrastructure to deliver the message to the socket at the receiving process

What services to TCP and UDP provide?

TCP: reliable transport, flow control, congestion control, is connection oriented Doesnt provide: timing, throughput guarantee UDP: unreliable data transfer

One limitation of satellite internet connections is higher latency even for short distances on Earth, especially if communication satellites are in a geostationary orbit. What is the difference in seconds between the min time required for a piece of data of size 71 MB to go though fiber optics around the Earth's equator, and for the same data to travel to a geostationary satellite directly above the sender's location and back. Earth radius = 6378 km Orbit height = 35786 km speed of light = 300,000 km/s light prop speed in fiber optics = 200,000 km/s Bandwidth of fiber optics = 1 Tbps = 1,000,000 Mbps Bandwidth of satellite = 500 Mbps

The answer of this question is just straight up wrong

Problem Solving Q: Internet backbones have a complex and relatively "sparse" structure, mostly by having smaller ISPs connect to larger ones, other that Tier 1 ISPs. Suppose 159 ISPs need to be interconnected. If they connect to each other in a tree structure, how many direct connections are saved compared to if all were connected to all other directly(links are undirected)

The equations: # of possible undirected connections between n nodes is n*(n-1)/2 # of undirected links in a tree with n nodes is n-1 no matter the structure of the tree. The solution: 159*(159-1)/2 = 12561 n-1 = 158 12561-158 = 12403 links saved

Encapsulation is

The higher level protocols headers can jsut be treated like data while headers of lower level protocols cans just be ignored

Explain the path of a message being encrypted. (general case, like basic key)

The message starts as plaintext, gets encrypted by an algorithm (Ka(m)). It then travels as ciphertext to the receiver and gets decrypted by the receiver's decryption key. (Kb(Ka(m))) = m and now the receiver has the plaintext message.

With selective repeat: The sender can have up to N unacked packets in the pipeline The receiver only sends a cumulative ack The sender can only have 1 unacked packet in the pipeline the receiver sends an individual ack for each packet

The sender can have up to N unacked packets in the pipeline The receiver sends an indiviudal ack for each packet

Describe a client-server architecture.

The server is an always on hose with a permanent IP address. has to use data centers in order to scale up Clients are intermittently connected and have dynamic IP addresses. They communicate with the server, not directly with each other

Describe P2P architecture

There is no always on server. Arbitrary end systems directly communicate with each other Peers request service from other peers, provide service in return to other peers peers are intermittently connected and change IP addresses

What are slow start, additive increase, multiplicative increase, congestion avoidance and fast recovery?

They are stages of TCP's congestion control You start of in slow start, where for every ACK received, the number of packets sent increases by 1(effectively doubling it). You have an initial max window size preset which tells you the maximum size handle-able. Once slow start reaches a window size half of the max window size, it enter additive increase where it increases the # of packets by 1 each RTT. Once a timeout event happens(the first one), the # to send is set back to one and the program goes back to slow start, but now the max window size is the window when the timeout happened(meaning re-enter additive at 1/2 new window size). Now when we have a timeout, we go into fast recovery where we just reset to half of the timeout size and are in additive increase.

Describe the purpose of the application layer

This is where all the important applications that make the internet/computers useful reside Examples: HTTP, FTP, SMTP etc. deals with app-specific protocols

What does application layer protocol define?

Types of messages exchanged message syntax(what/where fields are in message) message semantics(meaningof info in fields) Rules for when/how processes send/respond to messages

DES(Data Encryption Standard)

Us encryption standard 56 bit symmetric ket, 64 bit plaintext input DES is not secure, can be cracked by brute force way too quick (but no known good analytic attack) 3DES makes it more secure by encrypting 3 times with 3 different keys

What are the main differences between Virtual Circuit and Datagram Network?

VC networks have connection service at the network layer. All routers in the path are involved in the connection Datagram networks are connectionless at the network layer, but may be connection oriented at transport layer. this means that only the end systems are involved and the routers are oblivious

A web page consists of

a base HTML file which includes several referenced objects

In the additive increase phases; The sender Tcp does not increase cwnd at all and keeps it fixed until the connection is closed The sender TCP increades cwnd by 1 MSS every RTT till loss Sender duplicates cwnd for every RTT until loss Increases cwnd by 2MSS every RTT until loss is detected

increases by 1 MSS every RTT

Bittorrent choking

a host will only send chunks to the four peers who are currently sending her chunks at the highest rate, other peers are not receiving chunks from her. Re-eval top 4 every 10s

Certification Authority (CA)

a trusted third party that binds a public key to a given host, e E(person, router) registers its public key with CA - E provides proof of identity - CA creates certificate binding E to public key - certificate contains signature by CA confirming

Given 2 8 bit integers: 01011001 and 11100100, their 1's complement checksum is: If we flipped the first digit from the left of both original integers, now the new checksum plus the wraparound sum of the two old integers is:

add: 01011001 +11100100 100111101 ^ this digit wraps around 00111101 + 1 00111110 1's complement just means flip the bits: 11000001 Flipping the end bits doesn't change the checksum as they were different (1 and 0 vs 0 and 1) 1001 11 101 +11000001 111111110 ^ wraps around 11111111

Compared to common DHT systems like Chord, there are systems like Koorde that provide more optimal degree/route length tradeoffs. If a Koorde- based system has 1024 nodes and the max number of neighbors = log(n) and max route = ceiling(logn/log(logn)) and a Chord based system w/ n nodes has max neighbors n and max route length log(n). The worst case in Koorde is ________ The worst case in Chord is _________

ceiling(logn/log(logn)) = 10/log(10) = 3.01 ceiling(3.01) = 4 = max for Koorde logn = 10 Chord max

Why is the source IP address found starting with the 13th byte of the datagram? Where can you find the source port?

first 12 are options/checksum/length etc 13-16 = source IP 17-20 are dest IP 21-22 are source port(start of TCP/UDP) 23-24 are dest port

how are processes identified?

host devices have unique 32 IP address. In order to indetify specific process though, need port number as well

Why do we need a transport layer? Also what are the 2 basic features?

hosts have many application processes running on them, need transport layer to determine what goes to which process Demultiplexing(multiplexing too) port numbers tell it where to send info Error detection(checksum)

Packet switching

message are divided into packets - header identifies the dest address Packets travel separately through the network, - Forwarding based on dest address - packets may be buffered temporarily Destination reconstructs the message

Consider RSA w/ p =3 q =11 what are n & z. Also find an e and d

n = 11*3 = 33 z = (11-1)*(3-1) = 20 e is just a random number that doesn't share any factors with z z's factors = 2, 4, 5, 10 let's choose 63 (factors are 3, 7, 9, 21) e=63 Now we need to find a number such that (63d-1)/20 is a whole # example: 63*7 = 441 441-1 = 440/20 = 22

What does the transport layer do?

provides logical communication between app processes running on different hosts. It runs in end systems, breaks up app messages into segments and passes them to the network layer. On receive side it reassembles and passes to app layer

rdt's. name/describe them :)

rdt1.0: reliable transfer over a reliable channel

rdt 3.0 is also reffered to as the stop and wait protocol. Suppose a sedner is sending a packet to a receiver. The packet sie is L=7*10^3 bytes and the bandwidth is R=7*10^9 bytes per second. The RTT is 11 ms. 1) The sender utilization of the stop-and-wait protocol is ___________ 2) The sender utilization is ______________ is 3 data packets are pipe-lined within one round trip of transmission

u = (k * L/R) /(1000 * RTT + (L/R)) k = # of date packets L = Packet size in 10^3 bytes R = bandwidth in 10^9 bytes/second RTT = roundtrip time in ms 1) u = (1 * 7/7) / (1000 * 11ms) + 1) = 1/11001 = 0.0000909

what are Digital Signatures

the sender adds in the plaintext message along with the encrypted message so that the person decrypting it can confirm that it came from the appropriate sender

Describe the purpose of the physical layer

transmits and receives raw data to communication medium. Doesn't care about contents. Is how bits are encoded in the medium Data is bits(or representing them)

When is UDP preferred to TCP?

when an application can tolerate some loss of data during transmission, but wants to send stuff as fast as possible without being throttled like TCP is - no connection establishment to waste time - simple, small header size - no congestion control


Kaugnay na mga set ng pag-aaral

Principles of Microeconomics Test 3

View Set

Spinal Cord Enlargements and Terminations

View Set

Sadlier Vocabulary Workshop Level F Unit 4: Parts of Speech

View Set

Diseases of the Small Intestine (PEARLS) - Appendicitis, Intussusception, Small bowel obstruction (Smarty PANCE)

View Set

Rhetoric and Style: "Professions for Women" Virginia Woolf

View Set