1. Why do we have layers in the OSI model and protocols in general? (6 points)
So the main idea here
is ABSTRACTION. This helps in putting various functions in separate modules and
at the same time hiding the details of what they do and how they do it from
other layers. This way we could improve the performance of one function or even
change it all together, without having to change the whole protocol stack.
2. Mention the seven layers of the OSI stack, and describe the basic function of each layer in one sentence. (6 points)
Physical: Raw
transmission of bits across the links.
Data Link:
Transmitting packets or frames across one hop in the network.
Network: End to End
best effort delivery of packets.
Transport: “value
added services” on top of the network layer.
Session: Communication
between applications across the network is done here.
Presentation:
Differences with data representation are dealt with here.
Application: Specific
tools and services that support network applications.
(Note: if you didn’t
talk about the functions of the Session and Presentation layers, that is fine,
but you should have at least mentioned them.)
3. What are the differences between the circuit switched and packet switched networks? Give examples of each. (6 points)
Circuit switched: The
resources needed along a path are reserved for the duration of the session. It
is one fixed physical path from source to destination. (Ex: Telephone
networks).
Packet switched: The
resources are not reserved, such that a message (or packet) may have to wait
(queue) to use resources on a communication link, and each packet may take a
different route. Today’s Internet
4. What is the difference between hubs, switches, bridges, routers, repeaters and amplifiers? (10 points)
Hubs: Physical layer
(layer-1) devices that simply broadcasts the bit on all other interfaces, so it
operates on bits rather than frames.
Bridges: Are layer-2
devices that operate on frames, and are used to connect different LANs together
while filtering data link layer packets from one network to the other.
Switches: Are very
similar to bridges, except that they usually have many more interfaces, operate
in full duplex mode, and could be used to connect one LAN or many together.
They are also considered layer 2 devices.
Routers: These are
layer-3 devices that operate on the network layer, and
route packets or forward them based on the IP address.
Repeaters: They are devices that take in a signal, interprets it and
reconstructs a fresh new signal exactly like the first but without all the
noise and distortion that the original signal may have suffered. (layer-1 device, used to make signals propagate over long
distances)
Amplifiers: Similar to
repeaters, except that they simply boost the incoming signal the same way it
is. In other words, it will also boost any noise or problems that might be
present in the signal.
5. What is the minimum and maximum length for an Ethernet frame? Why do we have those minimum and maximum lengths? (8 points)
Min length is: 64
bytes. Reason: So that collisions can be detected.
Max length is: 1518
bytes. Reason: Mainly fairness (so that one node would not monopolize the
channel), and also for easier error detection (checksumming).
6. What would the string 0111101111101111110 be after bit-stuffing (flag is 01111110)? (4 points)
The string would be:
011110111110011111010
7. Could there be collisions on a switch? Justify your answer. (6 points)
Generally
no. The reason is because the
switch is a layer two devices that will really forward frames only to the
destined machine that is connected to its port or interface, it also has
buffering and operates in full duplex mode; all that helps in collision
avoidance.
However, switches make
nodes connected to it think that a collision has occurred when its buffers
becomes full, and you could have collisions in cases where switches are half
duplex,
(Note to TA: Either answer would be fine if supported with proper logic as shown in the answers here, so the real answer would be that: “It depends”, and then judge their argument)
8. Rank the following LANs from most secure to least secure: Switched LAN, Wireless LAN and Shared LAN. Explain your reasoning. (6 points)
The sequence would be:
Switched LAN (most secure) then Shared LAN then Wireless LAN (least secure).
Reason: In the switched LAN, the frames take a path from the source to the destination directly without having to broadcast it on all the ports, so no other machine could tap or listen to the medium since nothing is being sent to those machines in the first place. Shared LAN is less secure because of its broadcasting property, so all the machines on the LAN could sniff the packets and see what is being sent even if it weren’t addressed to them. Finally, the wireless is the least secure, because you are not only broadcasting the frames to all the machines, you are actually doing that all over the medium, so even other machines that do not or should not belong to the LAN may sniff the frames.
9. What are the advantages and disadvantages of Manchester encoding when compared with Binary encoding? Are there any other encoding schemes that exist? If yes, give at least one example and briefly explain how it works. (10 points)
Advantage: Helps in
synchronizing between the clocks, so there would be no jitter problem present
as in the Binary encoding.
Disadvantage: We are
using two signals to represent one bit, i.e. double the baud rate for a given
data rate, while in Binary encoding, the baud rate is equal to the data rate,
and so we could transmit more data using Binary encoding.
Yes there are many
other schemes: Any example would do, like: Differential Manchester, NRZ or
NRZI, with a brief explanation.
10. What would happen if two machines on the same LAN have the same MAC address? (6 points)
It really depends on
the underlying network. Many things could happen: a) Packets sent to this MAC
address will be received by both machines instead of one unique machine if they
are connected via a hub. b) Conflict would happen on the switches table since
it would see the same MAC on different ports.
(Note to TA: there is no exact right answer
here, it needs a judgment of how the student thinks, the
real answer would be “it depends” followed by a convincing scenario based on
what they know).
11. We know that all our computers (and most routers) nowadays are electronic based, i.e. they operate with voltages between them, how do we have optical networks work with such computers or routers since all the optical signals are based on light (photons) and not voltages? Why is this a challenge for building faster networks? What is one way this problem could be solved? (10 points)
We have special
devices (usually a the routers) that detect the optical signal, convert it to
an equivalent electrical one that could be processed by the router, then the
resulting packet would be converted again to an optical signal and resent over
the fiber.
It is a challenge to
build faster networks this way because such routers and signal conversions
create huge bottlenecks and slows the whole path down because of all this
double conversion that needs to be made at each router.
There are various ways
to solve such a problem, many are currently in research, some may be: routing
according to the Lamda (wavelength being received)
rather than the IP header, another idea would be to do with packets something
like the idea of train, where we could process only the header of a first
packet, then we assume that the next X packets would just take the same path
(so we would only convert and process the one packet every X packets). (Any
other logical idea is acceptable).
12. What would happen if two computers in the world had the same IP address? Justify your answer. (6 points)
Only one machine would
get the packet, assuming that the other one is misconfigured.
Again this depends on
how the IP’s are setup and on which network. .
If you have those two
IP’s on a local network for instance, you would have a conflict when trying to
set machine 2 for instance to the same IP as machine 1 and it would not be
accepted.
Another scenario is
that you set your machine to an IP of another machine that is totally outside
your network (like setting a machine in UCSB to an IP of a machine in Harvard),
at this time, no conflict will appear, but you simply will not be able to
receive or send any data.
Yet another scenario
is if you have a NAT (Network address translator) which would be the only
interface to the outside world with one true valid IP, while internally you
could assign any IP’s you wish (even if those IP’s existed in the outside
world) since the outside world does not see what is behind this NAT.
(Note to TA: Again,
any logical scenario here is acceptable, so is the first answer based on the
amount of knowledge the student knows from class).
13. If you saw the following entries in a routing table: 54.210/16 and 54.211/16. Is there a way to combine them? If yes, what would the alternative entry or entries look like? (6 points)
Yes. They can be
combined to: 54.210/15
14. Assume each packet has typical TCP and IP headers each 20bytes long. If we have three computers, A, B and C. The link between A and B has an MTU of 3000 bytes, while the link between B and C has an MTU of 1000 bytes. Consider the case where a packet needs to be sent from A to C that has a size of 3000 bytes (including headers). How many fragments will we have from B to C, and how much data will be in each fragment (i.e. excluding headers)? (all connections are assumed to be Ethernet) (10 points)
The packet/frame of
size 3000 bytes will have:
3000 – 20 (IP header)
– 20 (TCP header) = 2960 bytes of data.
Since the MTU is 1000
bytes (including headers), so the max amount of data from IP’s point of view (
including the TCP header if needed) that could be sent is: 1000 – 20 (IP header) = 980 bytes.
But since fragments have
to be divided into offsets that are divisible by 8 (because the offset field are
multiples of 8bytes), then the max data that can be transferred from IP’s point
of view is = 976bytes.
So we will have Four
fragments from A to C
So the first packet
will include 976 – 20(TCP header) = 956 bytes of data.
The second packet will
have 976 bytes.
The third packet will
have 976 bytes.
And the fourth packet
will have: 2960 – (956 + 976*2) = 52 bytes.