CS代考 FIT3165/FIT4165 Tutorial #5 Introduction to computer networks

FIT3165/FIT4165 Tutorial #5 Introduction to computer networks
and TCP/IP Layered Architecture Week 6 – Semester 1 – 2022
27 March 2022
Revision Status

Copyright By PowCoder代写 加微信 powcoder

Updated by Dr. , and Rosanna F 2022.
©2022, Faculty of IT, Monash University

Instructions
1. Students work individually to solve this week’s exercise.
2. Each student must answer the following review Q’s and complete the practical
tasks given in part 2.
Review Questions
1. Explain the difference between the process of routing a packet from the source to the destination and the process of forwarding a packet at each router.
Forwarding is delivery to the next node. A router uses its forwarding table to send a packet out of one of its interfaces and to make it reach to the next node. In other words, forwarding is the decision a router makes to send a packet out of one of its interfaces.
Routing, on the other hand, is an end-to-end delivery resulting in a path from the source to the destination for each packet. This means a routing process is a series of forwarding processes. To enable each router to perform its forwarding duty, routing protocols need to be running all of the time to provide updated information for forwarding tables. Although forwarding is something we can see in the foreground, in the background, routing provides help to the routers to do forwarding.
2. In the following figure, assume that the link between R1 and R2 is upgraded to 170 Kbps and the link between the source host and R1 is now downgraded to 140 Kbps. What is the throughput between the source and destination after these changes? Which link is the bottleneck now?
©2022, Faculty of IT, Monash University

The throughput is the smallest transmission rate, or 140 Kbps. The bottleneck is now the link between the source host and R1.
3. Explain Close loop and Open Loop congestion control mechanisms? And briefly describe different methods used?
Close loop congestion control is a mechanism where policies are implemented to mitigate or reduce the network congestion in the network after congestion has already occurred in the network. The various methods used for closed loop congestion control are:
Backpressure: Backpressure is a node-to-node congestion control that starts with a node and propagates back, in the opposite direction of data flow. (to each node)
Choke Packet: In this method of congestion control, congested router or node sends a special type of packet called choke packet to the source to inform it about the congestion. (from choke router straight to source and not to the intermediate nodes)
Implicit Signalling: In implicit signalling, there is no communication between the congested node or nodes and the source. The source guesses that there is congestion somewhere in the network when it does not receive any acknowledgment. This type of congestion control policy is used by TCP.
Explicit Signalling: In this method, the congested nodes explicitly send a signal to the source or destination to inform about the congestion. Explicit signalling can occur in either the forward direction or the backward direction.
Open loop congestion control is a mechanism where policies are implemented in
the network to prevent congestion before it happens. Congestion control is handled either by the source or by the destination. The various methods used for open loop congestion control are:
©2022, Faculty of IT, Monash University

Retransmission Policy: The sender retransmits a packet, if it feels that the packet it has sent is lost or corrupted. The retransmission policy and the retransmission timers need to be designed to optimize efficiency.
Window Policy: To implement window policy, selective reject window method is used for congestion control. Selective Reject method is preferred over Go-back-n window as in Go-back-n method, when timer for a packet times out, several packets are resent, although some may have arrived safely at the receiver. Thus, this duplication may make congestion worse. Selective reject method sends only the specific lost or damaged packets.
Acknowledgement Policy: positive and negative acknowledge approaches can be used.
Discarding Policy: A router may discard less sensitive packets when congestion is likely to happen.
Admission Policy: An admission policy, which is a QoS (quality-of-service) mechanism, can also prevent congestion in virtual circuit networks.
In classless addressing, we know the first and the last address in the block. Can we find the prefix length? If the answer is yes, show the process.
If the first and the last addresses are known, the block is fully defined.
We can first find the number of addresses in the block (N) and then find the prefix
length (n).
N = (last address) – (first address) + 1 n = 32 – log2N
Block: (first address)/n
Assume we have an internet with an 8-bit address space. The addresses are equally divided between four networks (N0 to N3). The internetwork communication is done through a router with four interfaces (m0 to m3). Show the internet outline and the forwarding table (with two columns: prefix in binary and the interface number) for the only router that connects the networks. Assign a network address to each network.
©2022, Faculty of IT, Monash University

The total number of addresses is 28 = 256. This means we have 64 addresses for each network. We can divide the whole address space into four blocks (blocks 0 to 3), each of 64 addresses. The addresses in each block are allocated as (0 to 63), (64 to 127), (128 to 191), and (192 to 255). It can be checked that each block is allocated according to the two restrictions needed for the proper operation of CIDR. First, the number of addresses in each block is a power of 2. Second, the first address in each block is divisible by the number of addresses in the block, as shown below:
Block 0: 0/64 = 0 Block 1: 64/64 = 1 Block 2: 128/64 = 2 Block 3: 192/64 = 3
The prefix length for each group is ni = 8 – log264 = 2. We can then write the ranges in binary to find the prefix for each block.
The following shows the outline and the forwarding table. Note that each interface can use one of the addresses in the corresponding block.
6. Subnetting: As a Network Admin, you are required to provide an efficient IP plan for the following scenario.
©2022, Faculty of IT, Monash University

● IP block allocated: 192.168.31.0/24
● Network A – Has 25 devices
● Network B – Has 120 devices.
● Network C – Has 55 devices
For each subnet, you are required to provide the following
a) Subnet address and the subnet mask
b) Broadcast Address
c) Usable IP range.
Total number of addresses are 232– 24 = 256 addresses in the whole complete block. The first address is 192.168.31.0/24.
The last address is 192.168.31.255/24.
We assign addresses to sub-blocks, starting with the largest and ending with the smallest one.
The number of addresses in the largest sub-block (Network B), which requires 120 addresses, is not a power of 2. So, we allocate 128 (27) addresses.
The subnet mask for this subnet can be found as netmask 1 = 32 – log2 128 = 32 – 7 = 25
The first address in this block is 192.168.31.0/25.
The last address is 192.168.31.127/25.
Subnet address and the subnet mask 192.168.31.0/25. Broadcast Address 192.168.31.127/25.
Usable IP range 192.168.31.1/25 – 192.168.31.126/25.
The number of addresses in the second largest sub-block (Network C), which requires 55 addresses, is not a power of 2 either. So, we allocate 64 (26) addresses. The subnet mask forthissubnetcanbefoundasnetmask2=32−log264=32–6= 26.
The first address in this block is 192.168.31.128/26
The last address is 192.168.31.191/26.
Subnet address and the subnet mask 192.168.31.128/26. Broadcast Address 192.168.31.191/26.
Usable IP range 192.168.31.129/26 – 192.168.31.190/26.
The number of addresses in the smallest sub-block (Network A), which requires 25 addresses, is not a power of 2. So, we allocate 32 (25) addresses. The subnet mask for this subnet can be found as netmask 3= 32 − log2 32= 32 – 5 = 27.
The first address in this block is 192.168.31.192/27.
The last address is 192.168.31.223/27.
Subnet address and the subnet mask 192.168.31.192/27. Broadcast Address 192.168.31.223/27.
Usable IP range 192.168.31.193/27 – 192.168.31.222/2
©2022, Faculty of IT, Monash University

Practical Tasks
Activity 1: Introduction to CORE (Common Open Research Emulator) as a tool for network and protocol demonstrations and evaluation of network scenarios.
The Common Open Research Emulator (CORE), is a tool for emulating networks on a PC. CORE can emulate PCs (Servers and Laptops), routers, switches and the network links between them. CORE graphical user interface allows the user to start with an empty drawing space where devices (or nodes) can be placed and linked together. An example is shown in the figure below. Nodes can be configured with addresses, routing protocols, and various network services. The entire emulated network setup can be saved in a text-based configuration file (*.imn).
The start button (green circle with white play sign) allows the user to start the emulation (i.e. execution process). In this mode, the user can interact with any node by double-clicking on the node icon to get an OS shell to type commands. There are more tools available that can also be used to inspect various parameters in the running emulation.
©2022, Faculty of IT, Monash University

In this activity, we will design a simple network with just two nodes, run the emulation and interact with the nodes. Follow the steps given below to complete this task.
(a) Run your Virtual Machine and start the CORE Network Emulator.
(b) From the available network building tools in the left column of the CORE window, click on ‘network-layer virtual nodes’ and select a PC. Then, click in one location on the canvas to place a PC as a virtual node. Follow the same steps to place another host on the canvas.
(c) Again from the left column of the CORE window, select the ‘link-tool’. Click and drag a link from the host to the PC. You should now see a network similar to the one below. The IPv4 addresses (10.0.0.20 or similar) are auto-generated together with the IPv6 addresses (Figure 2 – Top Left). Using the selection tool (arrow pointer), you may double click on the nodes to open a configuration window and delete the IPv6 addresses (Figure 2 – Right), as we will not be using them in our emulations.
©2022, Faculty of IT, Monash University

(d) To begin the simulation process, Click on the ‘START’ button (the green circle with white play sign) above the ‘link tool’ button in the left column of the CORE window.
(e) Now you can interact with the nodes by double clicking on any node to open a terminal and typing commands.
(f) You can run the following command in node n2 (the PC) Ping 10.0.0.10
And select the node n1 (the Host) to use the right-click mouse button to invoke Wireshark packet capture at port eth0.
©2022, Faculty of IT, Monash University

This will enable you to see the packet movement initiated by the ping command. Ping uses ICMP protocol to send and receive information from participating nodes.
©2022, Faculty of IT, Monash University

Activity 2: Build a LAN with auto-assigned IP addresses
In this activity, we are designing a LAN with multiple users, a few switches and a router. You can use static routers, switches, hosts, PCs and connectors provided in CORE to build your network. Follow the steps below to complete this task.
(a) Build the following network using CORE. Start the simulation. If everything goes from red-to-green, then your network is ready and running.
(b) You can run the following command in node n7 (the PC with IP – 10.0.0.22/24) Ping 10.0.0.10
And select any other node (e.g. n4) to use the right-click mouse button to invoke Wireshark packet capture at port eth0. This will enable you to see the packet movements initiated by the ping command. Ping uses ICMP protocol to send and receive information from participating nodes.
©2022, Faculty of IT, Monash University

(c) If you double click on any node to check the address configuration details, you may notice that MAC addresses are left to “auto-assign”. CORE will assign MAC addresses during simulation initiation. During the simulation process you may check the MAC addresses of each node using the “ifconfig” command.
(d) Frame movement within a LAN is solely dictated by MAC addresses. Can you find out how a PC or a host finds the MAC address of its communicating partner during execution of ping command? You may investigate the wireshark capture to find your answer.
Activity 3: Build a LAN with Network Administrator Designated IP addresses
Rebuild the network in activity 2 using your own IP addresses for each of the devices that require IP configuration. You may use the network address: 10.100.3.0/24. Simulate your network and check the connectivity using the ping command. Explore each of the device’s capabilities (by double clicking on the devices), like IP routing, DHCP Client, DHCP (server), RIP etc.
©2022, Faculty of IT, Monash University

Extra theory questions try on your own time:
7. Why does the network-layer protocol need to provide packetizing service to the transport layer? Why can’t the transport layer send out the segments without encapsulating them in datagrams?
The transport layer communication is between two ports; the network layer communication is between two hosts. This means that each layer has a different source/destination address pair; each layer needs a different header to accommodate these pairs of addresses. In addition, there are other pieces of information that need to be separately added to the corresponding header.
8. If a label in a connection-oriented service is 8 bits, how many virtual circuits can be established at the same time?
The number of virtual circuits is 28 = 256.
9. Assume a destination computer receives several packets from a source. How can it be sure that the fragments belonging to a datagram are not mixed with the fragments belonging to another datagram?
Each datagram should have a unique identification number that distinguishes it from other datagrams sent by the same source. The identification number is copied into all fragments. In other words, the identification number glues all fragments belonging to the same datagram together.
10. At any moment, a RIP message may arrive at a router that runs RIP as the routing protocol. Does it mean that the RIP process should be running all the time?
Although RIP is running as a process using the service of the UDP, the process is called a daemon because it is running all the time in the background. Each router acts both as a client and a server; It acts as a client when there is a message to send; It acts as a server when a message arrives.
©2022, Faculty of IT, Monash University

11. We say that OSPF is a hierarchical intra-domain protocol, but RIP is not. What is the reason behind this statement?
OSPF divides an AS into areas, in which routing in each area is independent from the others; the areas only exchange a summary of routing information between them.
RIP, on the other hand, considers the whole AS as one single entity.
12. Why do you think we need only one update RIP message, but several OSPF update
In RIP, each router just needs to share its distance vector with its neighbor. Since each router has one type of distance vector, we need only one update message. In OSPF, each router needs to share the state of its links with every other router. Since a router can have several types of links (a router link, a network link etc), we need several update messages.
13. In classless addressing, can two different blocks have the same prefix length? Explain.
Many blocks can have the same prefix length. The prefix length only determines the number of addresses in the block, not the block itself.
Two blocks can have the same prefix length but start in two different points in the address space. For example, the following two blocks have the same prefix length, but they are definitely two different blocks. The length of the blocks is the same, but the blocks are different.
14. OSPF messages and ICMP messages are directly encapsulated in an IP datagram. If we intercept an IP datagram, how can we tell whether the payload belongs to OSPF or ICMP?
The type of payload can be determined from the value of the protocol field. The protocol field value for ICMP is 01; for OSPF, it is 89.
©2022, Faculty of IT, Monash University

15. Compare and contrast the protocol field at the network layer with the port numbers at the transport layer.
(a)What is their common purpose?
(b)Why do we need two port-number fields but only one protocol field? (c)Why is the size of the protocol field only half the size of each port number?
The protocol field and the port numbers both have the same functionality: multiplexing and demultiplexing. Port numbers are used to do these tasks at the transport layer; The protocol field is used to do the same at the network layer.
We need only one protocol field at the network layer because payload taken from a protocol at the source should be delivered to the same protocol at the destination. The client and server processes, on the other hand, normally have different port numbers (ephemeral and well-known), which means we need two port numbers to define the processes.
The size of the protocol field defines the total number of different protocols that use the service of the network layer, which is a small number (eight bits is enough for this purpose). On the other hand, many new applications may be added every day that need a larger size of the port number field (sixteen bits is assigned).
16. Assume that we have an isolated Autonomous System (AS) running RIP. We can say that we have at least two different kinds of datagram traffic in this AS. The first kind carries the messages exchanged between hosts; the second carries messages belonging to RIP.
a) What is the difference between the two kinds of traffic when we think about source and destination IP addresses?
b) Does this show that routers also need IP addresses?
The source and destination IP addresses in datagrams carrying payloads between the hosts are the IP addresses of the hosts;
The IP addresses carrying routing update packets between routers are IP addresses of the routing inter- faces from which the packets are sent or received.
This shows that a router needs as many IP addresses as it has interfaces.
©2022, Faculty of IT, Monash University

17. Which fields of the IPv4 main header may change from router to router?
The following fields can be changed from one router to another:
a) HLEN: If there is option change
b) Total length: If fragmented or options change
c) Flags: If fragmented
d) Fragmentation Offset: If fragmented
e) Time-to-Live; Decremented at each router
f) Header Checksum: Need to change because of other changes
18. Find the class of the following Classful IP addresses: a. 130.34.54.12 b. 200.34.2.1 c. 245.34.2.8
The class can be defined by looking at the first byte (see figure below):
a. Since the first byte is between 128 and 191, the class is B. b. Since the first byte is between 192 and 223, the class is C. c. Since the first byte is between 240 and 255, the class is E.
19. In classless addressing, what is the value of prefix length (n) if the size of the block (N) is one of the following?
a. N= 1 b. N= 1024 c. N= 232
©2022, Faculty of IT, Monash University

The prefix can be found as n =32 – log2N:
a. n = 32 -log2 1 =32
b. n = 32 – log2 1024 = 22
c. n = 32 – log2232 = 0
20. Give some reasons for using fragmenta

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com