CS6250 COMPUTER NETWORKS
EXAM 1
What is a distributed algorithm? - ANSWERS-A distributed algorithm is
an algorithm designed to run on computer hardware constructed from
interconnected processors. Distributed algorithms are used in many
varied application areas of distributed computing, such as
telecommunications, scientific computing, distributed information
processing, and real-time process control.
https://en.wikipedia.org/wiki/Distributed_algorithm
Explain the Spanning Tree Algorithm. - ANSWERS-The algorithm runs
in "rounds" and at every round each node sends to each neighbor node a
configuration message with three fields: a) the sending node's ID, b) the
ID of the roots as perceived by the sending node, and c) the number of
hops between that (perceived) root and the sending node.
At every round, each node keeps track of the best configuration message
that it has received so far, and it compares that against the configuration
messages it receives from neighboring nodes at that round.
At the very first round of the algorithm, every node thinks that it is the
root.
,What is the purpose of the Spanning Tree Algorithm? - ANSWERS-The
purpose of the Spanning Tree Algorithm is to prevent broadcast storm
through the network and cause stalls or heavy congestion.
The spanning tree also prevents loops (cycles) from occurring in a
network.
What does the transport layer provide? - ANSWERS-The transport layer
is the logical connection. Transport layer consists of TCP and UDP
protocols. The transport layer provides an end-to-end connection
between two applications that are running on different hosts. Of course
the transport layer provides this logical connection regardless if the hosts
are in the same network. User datagram protocol (UDP) and the
Transmission Control Protocol (TCP).
-Some applications that use UDP include video streaming, DNS, and
Online Multiplayer Games.
- Some applications that use TCP include Web, SMTP and FTP
What is a packet for the transport layer called? - ANSWERS-WA
segment. (If it is a TCP packet)
Datagram (If it is UDP packet)
What are the two main protocols within the transport layer? -
ANSWERS-User datagram protocol (UDP) and the Transmission
Control Protocol (TCP).
,What is multiplexing, and why is it necessary? - ANSWERS-
Multiplexing is the ability for a host to run multiple applications using
the network simultaneously. It's necessary to ensure multi-tasking with
the host.
Multiplexing essentially combines multiple signals into one with 1 IP
and multiple ports, where each application binds itself to a port. Allow
multiple apps to communite to different servers with 1 IP address
Describe the two types of multiplexing/demultiplexing. - ANSWERS-1.
Connectionless Multiplexing/Demultiplexing: Uses the UDP socket that
consists of a two-tuple made up of a destination IP address and port.
Transport layer identifies port from receiverd datagram that includes the
port.
2. Connection Oriented Multiplexing/Demultiplexing: Uses the TCP
socket and is a four-tuple that consists of IP address, source port,
destination IP address, destination port.
What are the differences between UDP and TCP? - ANSWERS-UDP is
A.) an unreliable protocol as it lacks the mechanism that TCP has in
place. B.) a connectionless protocol that does not require the
establishment of a connection (example: three way handshake) before
sending packets. Some benefits to UDP are: A.) no congestion control or
similar mechanisms. B.) No connection management overhead. The
UDP packet structure is a 64 bits header consisting: 1.) Source and
destination ports. 2.) Length of the UDP segment (header and data). 3.)
Checksum (an error checking mechanism). Since there is no guarantee
for link-by-link reliability, we need a basis mechanism in place for error
, checking. The UDP sender adds the src port, the dest port and the packet
length. Then it takes the sum and performs an 1s complement (all 0s are
turned to 1 and all 1s are turned to 0s). If during the sum there is an
overflow, it's wrapped around. The receiver adds all the four 16-bit
words (including the checksum). The result should be all 1s unless an
error has occurred.
To detect errors, the receiver adds the four words (the three original
words and the checksum). If the sum contains a zero, the receiver knows
there has been an error. While all one-bit errors will be detected, but
two-bit errors can be undetected (e.g., if the last digit of the first word is
converted to a 0 and the last digit of the second word is converted to a
1).
TCP is a protocol consisting of a three-way handshake and a connection
teardown:
3-way Handshake:
Step 1: The TCP client sends a special segment, (containing no data) and
with SYN bit set to 1. The Client also generates an initial sequence
number (client_isn) and includes it in this special TCP SYN segment.
Step 2: The Server upon receiving this packet, allocates the required
resources for the connection and sends back the special 'connection-
granted' segment which we call
When would an application layer protocol choose UDP over TCP? -
ANSWERS-When developers need just a simple mechanism for
transmission control. Typically, use UDP in applications where speed is
EXAM 1
What is a distributed algorithm? - ANSWERS-A distributed algorithm is
an algorithm designed to run on computer hardware constructed from
interconnected processors. Distributed algorithms are used in many
varied application areas of distributed computing, such as
telecommunications, scientific computing, distributed information
processing, and real-time process control.
https://en.wikipedia.org/wiki/Distributed_algorithm
Explain the Spanning Tree Algorithm. - ANSWERS-The algorithm runs
in "rounds" and at every round each node sends to each neighbor node a
configuration message with three fields: a) the sending node's ID, b) the
ID of the roots as perceived by the sending node, and c) the number of
hops between that (perceived) root and the sending node.
At every round, each node keeps track of the best configuration message
that it has received so far, and it compares that against the configuration
messages it receives from neighboring nodes at that round.
At the very first round of the algorithm, every node thinks that it is the
root.
,What is the purpose of the Spanning Tree Algorithm? - ANSWERS-The
purpose of the Spanning Tree Algorithm is to prevent broadcast storm
through the network and cause stalls or heavy congestion.
The spanning tree also prevents loops (cycles) from occurring in a
network.
What does the transport layer provide? - ANSWERS-The transport layer
is the logical connection. Transport layer consists of TCP and UDP
protocols. The transport layer provides an end-to-end connection
between two applications that are running on different hosts. Of course
the transport layer provides this logical connection regardless if the hosts
are in the same network. User datagram protocol (UDP) and the
Transmission Control Protocol (TCP).
-Some applications that use UDP include video streaming, DNS, and
Online Multiplayer Games.
- Some applications that use TCP include Web, SMTP and FTP
What is a packet for the transport layer called? - ANSWERS-WA
segment. (If it is a TCP packet)
Datagram (If it is UDP packet)
What are the two main protocols within the transport layer? -
ANSWERS-User datagram protocol (UDP) and the Transmission
Control Protocol (TCP).
,What is multiplexing, and why is it necessary? - ANSWERS-
Multiplexing is the ability for a host to run multiple applications using
the network simultaneously. It's necessary to ensure multi-tasking with
the host.
Multiplexing essentially combines multiple signals into one with 1 IP
and multiple ports, where each application binds itself to a port. Allow
multiple apps to communite to different servers with 1 IP address
Describe the two types of multiplexing/demultiplexing. - ANSWERS-1.
Connectionless Multiplexing/Demultiplexing: Uses the UDP socket that
consists of a two-tuple made up of a destination IP address and port.
Transport layer identifies port from receiverd datagram that includes the
port.
2. Connection Oriented Multiplexing/Demultiplexing: Uses the TCP
socket and is a four-tuple that consists of IP address, source port,
destination IP address, destination port.
What are the differences between UDP and TCP? - ANSWERS-UDP is
A.) an unreliable protocol as it lacks the mechanism that TCP has in
place. B.) a connectionless protocol that does not require the
establishment of a connection (example: three way handshake) before
sending packets. Some benefits to UDP are: A.) no congestion control or
similar mechanisms. B.) No connection management overhead. The
UDP packet structure is a 64 bits header consisting: 1.) Source and
destination ports. 2.) Length of the UDP segment (header and data). 3.)
Checksum (an error checking mechanism). Since there is no guarantee
for link-by-link reliability, we need a basis mechanism in place for error
, checking. The UDP sender adds the src port, the dest port and the packet
length. Then it takes the sum and performs an 1s complement (all 0s are
turned to 1 and all 1s are turned to 0s). If during the sum there is an
overflow, it's wrapped around. The receiver adds all the four 16-bit
words (including the checksum). The result should be all 1s unless an
error has occurred.
To detect errors, the receiver adds the four words (the three original
words and the checksum). If the sum contains a zero, the receiver knows
there has been an error. While all one-bit errors will be detected, but
two-bit errors can be undetected (e.g., if the last digit of the first word is
converted to a 0 and the last digit of the second word is converted to a
1).
TCP is a protocol consisting of a three-way handshake and a connection
teardown:
3-way Handshake:
Step 1: The TCP client sends a special segment, (containing no data) and
with SYN bit set to 1. The Client also generates an initial sequence
number (client_isn) and includes it in this special TCP SYN segment.
Step 2: The Server upon receiving this packet, allocates the required
resources for the connection and sends back the special 'connection-
granted' segment which we call
When would an application layer protocol choose UDP over TCP? -
ANSWERS-When developers need just a simple mechanism for
transmission control. Typically, use UDP in applications where speed is