Answers To Tutorial Sheets 1 and 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

1. What is an IP address?

- An IP address is a numerical label assigned to each device connected to a computer network


that uses the Internet Protocol for communication.

2. What is the use of an IP address?


- IP addresses uniquely identify and locate devices on a network, facilitating communication
between them.

3. Which version of IP is covered in this course?


- The version of IP covered in this course is likely specified in your curriculum; it could be
IPv4 or IPv6.

4. How a host determines its IP address?


- A host can obtain its IP address through manual configuration, DHCP (Dynamic Host
Configuration Protocol), or other network configuration methods.

5. Is there any relation between the MAC address and IP address of a host?
- Yes, there is a correlation. MAC addresses are used at the data link layer, and IP addresses
are used at the network layer, with the MAC address often associated with a specific IP address.

6. Can a single network interface have more than one IP address associated with it?
- Yes, a single network interface can be configured with multiple IP addresses, each serving
different purposes.

7. What is the difference between a host name and an IP address?


- A host name is a human-readable label for a device, while an IP address is a numerical
identifier used for communication on a network.

1
8. How a host name is resolved to the corresponding IP address?
- Host name resolution is typically done through DNS (Domain Name System) or local host
files.

9. What is the size of an IP address?


- The size of an IPv4 address is 32 bits, and for IPv6, it is 128 bits.

10. How an IP address is represented?


- In IPv4, it is represented as four octets separated by dots, and in IPv6, it is represented as
eight groups of hexadecimal digits separated by colons.

11. Do routers have IP addresses? If so, how many?


- Yes, routers have one or more IP addresses. The number depends on the number of interfaces
the router has, as each interface typically has its own IP address.

12. What is the 32-bit binary equivalent of the IP address 223.1.3.27? What is the class of this
address?
- Binary equivalent: 11011111.00000001.00000011.00011011
- Class: This is a Class D address (leading bits 1110), typically reserved for multicast.

13. Suppose an application generates chunks of 40 bytes of data every 20 msec, and each chunk
gets encapsulated in a TCP segment and then an IP datagram. What percentage of each datagram
will be overhead, and what percentage will be application data? Assume that TCP segment and
datagram header are 20 B each.
- Overhead: 40 bytes of data + 20 bytes TCP + 20 bytes IP = 80 bytes overhead
- Application data: 40 bytes
- Overhead Percentage: (80 / 120) * 100 = 66.67%
- Application Data Percentage: (40 / 120) * 100 = 33.33%

14. Consider a network configured with the address 128.119.0.0 and network mask
255.255.0.0.1. What is the class of this address? 2. What is the first address that can be assigned

2
to a computer in this? 3. What is the last address that can be assigned to a computer? What is the
broadcast address of this network?
- Class: This is a Class B address.
- First Address: 128.119.0.1
- Last Address: 128.119.255.254
- Broadcast Address: 128.119.255.255

15. What are the components of an IP address?


- An IP address consists of two components: the network ID and the host ID.

16. What is a network ID?


- The network ID is the portion of the IP address that identifies the specific network to which a
device belongs.

17. What is a host ID?


- The host ID is the portion of the IP address that identifies a specific device within a network.

18. What is a unicast IP address?! 19. What is a multicast IP address?


- Unicast IP address: Refers to an address that identifies a single sender and a single receiver.
- Multicast IP address: Identifies a group of hosts, and data sent to this address is delivered to
all members of the group.

20. What is a broadcast IP address?


- Broadcast addresses are used to send data to all devices on a network. In IPv4, this is
typically represented by the address with all host bits set to 1.

21. How are IP addresses classified?


- IP addresses are classified into five classes: A, B, C, D, and E. The classification is based on
the range of the first octet, determining the network size and the number of hosts.

3
22. What is the use of classifying IP addresses?
- Classifying IP addresses helps in efficient address assignment and routing. It provides a
systematic way to allocate addresses based on the size of networks, ensuring optimal resource
utilization.

23. What are the different classes of IP addresses?


- There are five classes: A, B, C, D, and E. Classes A, B, and C are commonly used for
addressing networks, while D is reserved for multicast and E for experimental purposes.

24. How to determine the class of an IP address?


- The first octet of an IP address determines its class. The range of values for each class is:
- Class A: 1-126
- Class B: 128-191
- Class C: 192-223

25. How many bytes does each Class of IP address use to represent network and host IDs?
- Class A: Network ID (1 byte), Host ID (3 bytes)
- Class B: Network ID (2 bytes), Host ID (2 bytes)
- Class C: Network ID (3 bytes), Host ID (1 byte)

26. What is the format of the various IP address classes?


- Class A: N.H.H.H
- Class B: N.N.H.H
- Class C: N.N.N.H

27. How many networks and hosts can be represented using the IP address classes?
- Class A: 128 networks, 16 million hosts

4
- Class B: 16,384 networks, 65,534 hosts
- Class C: 2 million networks, 254 hosts

28. What is the possible range of IP addresses for the different classes?
- Class A: 1.0.0.1 to 126.255.255.254
- Class B: 128.1.0.1 to 191.254.255.254
- Class C: 192.0.1.1 to 223.255.254.254

29. What kind of networks use a Class A or Class B or Class C IP address typically?
- Class A: Large organizations, like multinational corporations
- Class B: Medium-sized networks, like universities
- Class C: Small networks, like local businesses

30. How to decide which class of IP address to use for a particular network?
- The decision is based on the size of the network and the number of hosts it needs to support.
Larger networks typically use Class A or B, while smaller networks use Class C.

31. Does the maximum number of hosts in a network restrict the class of IP address that can be
used for the network?
- Yes, the size of the network and the number of hosts influence the choice of IP address class.
For larger networks, Class A or B is chosen to accommodate more hosts.

32. What are the various special IP addresses?


- Special IP addresses include:
- Loopback Address: 127.0.0.1 (used for testing)
- Broadcast Address: Used to send data to all hosts in a network
- Network and Host Address: Reserved for special purposes

5
Tutorial Sheet 2
1. What is the difference between a host and an end system? List several different types of end
systems. Is a Web server an end system?
- A host refers to any device connected to a network. An end system is a specific type of host,
typically used by a user. Examples of end systems include desktop computers, laptops,
smartphones, and servers. A web server is considered an end system as it provides services to
users.

2. The word protocol is often used to describe diplomatic relations. How does Wikipedia
describe diplomatic protocol? Is it compliant with network protocol?
- Diplomatic protocol refers to the rules and ceremonies governing official diplomatic
relations. While diplomatic and network protocols share the concept of rules, they are distinct.
Diplomatic protocol is not compliant with network protocol, which specifically relates to rules
for communication between network entities.

3. Why are standards important for protocols?


- Standards ensure interoperability and consistency. They define common rules and formats,
allowing devices and systems from different manufacturers to communicate effectively. This
promotes a cohesive and reliable network environment.

4. List the available residential access technologies in your city. For each type of access, provide
the advertised downstream rate, upstream rate, and monthly price.

5. The Internet is roughly doubling in size every 18 months. Although no one really knows for
sure, one estimate put the number of hosts on it at 600 million in 2009. Use these data to
compute the expected number of Internet hosts in the year 2018. Do you believe this? Explain
why or why not.
- To compute the expected number of Internet hosts in 2018, you would use the growth rate.

6. Make a list of activities that you do every day in which computer networks are used. How
would your life be altered if these networks were suddenly switched off?

6
- Common daily activities involving computer networks include email, social media, web
browsing, online banking, and streaming. If networks were suddenly switched off, these
activities would be severely impacted, affecting communication, information access, and various
online services.

7. What is the transmission rate of Ethernet LANs?


- Ethernet LANs commonly have transmission rates of 10/100/1000 Mbps (megabits per
second) or even higher for modern implementations.

8. What are some of the physical media that Ethernet can run over?
- Ethernet can run over various physical media, including twisted-pair copper cables, fiber-
optic cables, and wireless technologies like Wi-Fi.

9. Describe the most popular wireless Internet access technologies today. Compare and contrast
them.
- Popular wireless Internet access technologies include Wi-Fi and cellular networks (4G and
5G). Wi-Fi is commonly used for local area wireless networking, while cellular networks
provide wider coverage. Wi-Fi typically offers higher data rates in short ranges, while cellular
networks offer broader coverage but may have varying data rates.

10. What advantage does a circuit-switched network have over a packet-switched network?
- In a circuit-switched network, a dedicated communication path is established for the entire
duration of the conversation, ensuring a constant connection and predictable delay. This can be
advantageous for applications requiring constant bandwidth, such as voice calls. However,
packet-switched networks are more efficient for data transmission as they allow shared use of
network resources.

11. Consider sending a packet from a source host to a destination host over a fixed route. List the
delay components in the end-to-end delay. Which of these delays are constant and which are
variable?
- The end-to-end delay components include:
- Transmission delay: Variable, depends on the packet size and link transmission rate.
- Propagation delay: Constant, depends on the distance between the source and destination.

7
- Queuing delay: Variable, depends on network congestion.
- Processing delay: Variable, depends on the processing capability of intermediate devices.

12. An image is 1600 x 1200 pixels with 3 bytes/pixel. Assume the image is uncompressed. How
long does it take to transmit it over a 56-kbps modem channel? Over a 1-Mbps cable modem?
Over a 10-Mbps Ethernet? Over 100-Mbps Ethernet? Over gigabit Ethernet?
- Transmission time (T) can be calculated using the formula: ( T = Data Size / Transmission
Rate)
- For each channel:
- 56 kbps modem: ( T = {(1600 * 1200 *3 bytes)/(56 *10^3 bps )
- 1 Mbps cable modem, 10 Mbps Ethernet, 100 Mbps Ethernet, and gigabit Ethernet: Adjust
the transmission rate in the formula accordingly.

13. Suppose end system A wants to send a large file to end system B. At a very high level,
describe how end system A creates packets from the file. When one of these packets arrives to a
packet switch, what information in the packet does the switch use to determine the link onto
which the packet is forwarded? Why is packet switching in the Internet analogous to driving
from one city to another and asking directions along the way?
- End system A divides the file into smaller packets, adding headers to each packet for
addressing and error checking. When a packet arrives at a packet switch, the switch uses the
destination address in the packet header to determine the outgoing link. Packet switching is like
asking directions because data packets choose different routes based on network conditions,
analogous to choosing roads while driving.

14. When a file is transferred between two computers, two acknowledgment strategies are
possible. Discuss these two approaches.
- In the first approach, individual packets are acknowledged by the receiver, but the file
transfer as a whole is not acknowledged. In the second approach, the entire file is acknowledged
when it arrives, but individual packets are not acknowledged. The first approach allows for more
granular error recovery but may introduce more overhead due to acknowledgments. The second
approach reduces acknowledgment overhead but may require retransmission of the entire file in
case of errors.

8
15. Suppose there is exactly one packet switch between a sending host and a receiving host.
Assuming that the switch uses store-and-forward packet switching, what is the total end-to-end
delay to send a packet of length L? (Ignore queuing, propagation delay, and processing delay.)
- The total end-to-end delay is the sum of transmission delay and propagation delay.
Total Delay = Transmission Delay + Propagation Delay
- Transmission Delay = L/R1. where R1 is the transmission rate from the sending host to the
switch.
- Propagation Delay = d. where d is the distance and s is the propagation speed.
- Note: This assumes store-and-forward packet switching.

16. What are the five layers in the Internet protocol stack? What are the principal responsibilities
of each of these layers?
- The five layers in the Internet protocol stack are:
1. Application Layer: Responsible for providing network services to end-user applications.
2. Transport Layer: Manages end-to-end communication, ensuring reliable data transfer.
3. Network Layer: Handles routing and forwarding of data packets between hosts.
4. Link Layer: Manages communication on the local network segment, including addressing
and error detection.
5. Physical Layer: Deals with the physical connection and transmission of raw bitstreams over
the physical medium.

17. What is an application-layer message? A transport-layer segment? A network-layer


datagram? A link-layer frame?
- An application-layer message is the data generated by an application.
- A transport-layer segment is the data with transport layer headers and trailers.
- A network-layer datagram is the data with network layer headers and trailers.
- A link-layer frame is the data with link layer headers and trailers.

18. Which layers in the Internet protocol stack does a router process? Which layers does a link-
layer switch process? Which layers does a host process?
- A router processes the network layer and link layer.

9
- A link-layer switch processes the link layer.
- A host processes all layers from the application layer to the link layer.

19. A system has an n-layer protocol hierarchy. Applications generate messages of length M
bytes. At each of the layers, an h-byte header is added. What fraction of the network bandwidth
is filled with headers?
- The fraction of network bandwidth filled with headers is (n * h/(M + n * h)).

20. What is the difference between a virus and a worm?


- A virus is a piece of code that attaches itself to a host program and spreads when the host
program runs. A worm is a standalone program that replicates itself to spread to other computers
over a network.

21. Describe how a botnet can be created, and how it can be used for a DDoS attack.
- A botnet is created by infecting a large number of computers with malware, turning them into
"bots" under the control of a single entity. These bots can be coordinated to launch a Distributed
Denial of Service (DDoS) attack by flooding a target with traffic, overwhelming its resources
and making it inaccessible.

22. Suppose Alice and Bob are sending packets to each other over a computer network. List
some of the malicious things Trudy can do from this position.
- Trudy can perform various malicious activities, including:
- Intercepting and reading the contents of the packets.
- Modifying the packets in transit.
- Injecting false packets into the communication.
- Dropping or delaying packets to disrupt communication.

10
23. Consider an application that transmits data at a steady rate. Would a packet-switched network
or a circuit-switched network be more appropriate for this application? Why?
- A circuit-switched network would be more appropriate because it provides a dedicated
communication path with constant bandwidth, suitable for applications with steady and
continuous data transmission.

- For part b) Yes, some form of congestion control is needed to ensure that the sum of the
application data rates does not exceed the capacities of the network links. Congestion control
helps prevent network congestion and ensures fair and efficient data transmission.

24. Propagation delay and transmission delay:


a) d_prop = m/s
b) d_trans = L/R
c) d_end-to-end = d_prop + d_trans
d) At t = d_prop, the last bit of the packet has just left Host A.
e) At t = d_trans, if d_prop > d_trans, the first bit has not yet reached Host B.
f) At t = d_trans, if d_prop < d_trans, the first bit has already reached Host B.

Good luck

11

You might also like