Chapter 3 Theory - Distributed System, Assignments of Distributed Programming and Computing

Chapter 3 Theory - Distributed System

Typology: Assignments

2020/2021

Uploaded on 05/15/2021

thuy-dung-nguyen
thuy-dung-nguyen 🇻🇳

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Student's name: Nguyen Thuy Dung
Student’s ID: 20184244
Class: ICT01-K63
Class Exercises
Module: Distributed Systems
Chapter 3: Naming
Question 1: What is the problem of using Identifier to identify
entities in a system? (hint: you can base on the three characteristics
of an Identifier). What are the solutions for this problem? Do these
solutions conflict with three characteristics of an Identifier?
Because an identifier refers to at most one entity and it is never reused, we can
come to a problem: exhaustion of identifier.
Solutions for this problem:
- extending the namespace
- re-assign identifier to new entities => conflict with characteristics of an
identifier (an identifier refers to at most one entity and it is never
reused)
Question 2: How the Broadcasting method works? Explain with the
example of ARP protocol.
Broadcasting method:
- A message containing the identifier of the entity is broadcasted to all
other machines.
- Each machine is requested to check whether it has that entity
- Only machines that can offer an access point for the entity send a reply
message containing the address of that access point.
ARP protocol:
- Purpose: find the link layer address (MAC address) given an internet
layer address (IP address).
- It broadcasts a packet to all devices of the source network
pf3
pf4
pf5

Partial preview of the text

Download Chapter 3 Theory - Distributed System and more Assignments Distributed Programming and Computing in PDF only on Docsity!

Student's name: Nguyen Thuy Dung Student’s ID: 20184244 Class: ICT01-K Class Exercises Module: Distributed Systems Chapter 3: Naming Question 1: What is the problem of using Identifier to identify entities in a system? (hint: you can base on the three characteristics of an Identifier). What are the solutions for this problem? Do these solutions conflict with three characteristics of an Identifier? Because an identifier refers to at most one entity and it is never reused, we can come to a problem: exhaustion of identifier. Solutions for this problem:

  • extending the namespace
  • re-assign identifier to new entities => conflict with characteristics of an identifier (an identifier refers to at most one entity and it is never reused) Question 2: How the Broadcasting method works? Explain with the example of ARP protocol.  Broadcasting method:
  • A message containing the identifier of the entity is broadcasted to all other machines.
  • Each machine is requested to check whether it has that entity
  • Only machines that can offer an access point for the entity send a reply message containing the address of that access point.  ARP protocol:
  • Purpose: find the link layer address (MAC address) given an internet layer address (IP address).
  • It broadcasts a packet to all devices of the source network

=> the devices of network peel the header, transfer the packet to network layer => if the IP’s network ID = IP of the packet, it responds to the source with the MAC address of destination.

  • The above process continues till the second last network device in the path to reach the destination where it gets validated and ARP, in turn, responds with the destination MAC address. Question 3: What is the problem of ARP protocol? List some ARP spoofing attacks.  Scalability problem :
  • Wast network bandwidth by request messages
  • too many hosts may be interrupted by requests they cannot answer.  ARP has a lack in authentication and can thus be easily spoofed.  Some ARP spoofing attacks:
  • Denial-of-service attacks: leverage ARP spoofing to link multiple IP addresses with a single target’s MAC address => overloading the target with traffic.
  • Session hijacking: steal session IDs, granting attackers access to private systems and data.
  • Man-in-the-middle attacks: intercept and modify traffic between victims. Question 4: What is the problem of Forwarding Pointer approach? Explain the solution for redirecting the Forwarding Pointer.  Drawbacks
  • A chain of FP can become so long => locating that entity is expensive.
  • All intermediate nodes have to maintain their part of the chain.
  • Broken links => cannot reach the entity  Solution: Redirecting a FP

Question 8: Consider an entity moving from location A to location B, while passing several intermediate locations where it will reside for only a relatively short time. When arriving at B, it settles down for a while. Changing an address in a hierarchical location service may still take a relatively long time to complete, and should therefore be avoided when visiting an intermediate location. So, propose an appropriate name resolution system for this scenario. (hint: you should combine the Forwarding Pointer and Hierarchical approaches)

  • We can combine the hierarchical location service with forwarding pointers. When the entity starts to move, it leaves behind a forwarding pointer at A to its next (intermediate) location.
    • Each time it moves again, a forwarding pointer is left behind. Upon arrival in B , the entity inserts its new address into the hierarchical location service. The chain of pointers is subsequently cleaned up, and the address in A is deleted. Question 9: Explain the difference between a hard link and a soft link in Linux systems. Are there things can be done with a hard link that cannot be done with a soft link or vice versa?
  • Hard link: mirror copy of the original file.  has the same inode number and permissions of original file  has the actual contents of original file, so that you still can view the contents, even if the original file moved or removed  permissions will be updated  can't link directories  can't cross the file system boundaries
  • Soft link: actual link to the original file.  can cross the file system  allows you to link between directories  has different inode number and file permissions than original file  permissions will not be updated  has only the path of the original file, not the contents. A h ard link is a named entry in a directory file pointing to the same file descriptor as another named entry (in possibly a different directory). A sym- bolic link is a file containing the (character string) name of another file. With a

soft link you can link to a different disk partition or even t o a d ifferent machine A h ard link is a named entry in a directory file pointing to the same file descriptor as another named entry (in possibly a different directory). A sym- bolic link is a file containing the (character string) name of another file. With a soft link you can link to a different disk partition or even t o a d ifferent machine A h ard link is a named entry in a directory file pointing to the same file descriptor as another named entry (in possibly a different directory). A sym- bolic link is a file containing the (character string) name of another file. With a soft link you can link to a different disk partition or even t o a d ifferent machine Question 10: Compare the iterative name resolution and recursive name resolution. Iterative Iterative DNS:

  • ones in which a DNS server is queried and returns an answer without querying other DNS servers, even if it cannot provide a definitive answer.
  • non-recursive queries. Recursive DNS:
  • DNS client requests information from a DNS server that is set to query subsequent DNS servers until a definitive answer is returned to the client.
  • The queries made to subsequent DNS servers from the first DNS server are iterative queries.