2022-CS320FZ-January
Q1
(a) What are the five layers in the Internet protocol stack? What are the principal responsibilities of each of these layers?
- Physical Layer: Handles the physical connection between devices, transmitting raw data over mediums like cables or radio waves.
- Data Link Layer: Manages links between local network devices, responsible for error detection and framing.
- 如果检测到错误,会直接丢弃该数据包,不会尝试恢复或重传。
- Network Layer: Routes packets across network boundaries, with IP addressing and routing being key functions.
- Transport Layer: Provides communication services to application processes, ensuring reliable data transfer and error recovery.
- 不仅能检测到错误,还会尝试恢复错误,包括重传损坏或丢失的数据包等。
- Application Layer: Contains end-user applications, dealing with high-level protocols like HTTP, SMTP.
(b) What is a circuit switched network and a packet switched network? What advantage and disadvantages does a circuit switched network have over a packet-switched network?
Definition
- Circuit Switched Network is a network where a path is established between two nodes for the duration of the communication session.
- Packet Switched Network is a network where data is sent in small packets that are routed independently.
Circuit Switched Network over Packet-Switched Network
Advantages
- Stable Connection: Provides a constant connection, ensuring a high quality of service.
- Less Overhead: Once the circuit is established, there’s no need for routing information.
Disadvantages
- Inefficient Resource Usage: The path is not fully utilized if there’s no continuous data flow.
- Less Flexible: Cannot easily adapt to changes in network topology and harder to accommodate large numbers of users due to the dedicated line requirement.
(c) Explain different types of wired communication links (twisted pair cable, coaxial cable and fiber optic cable)
Lecture 1
(功能 + 材质 )
- Twisted pair cable is the least expensive and most commonly used guided transmission medium. A solid copper wire is used in it.
- Coaxial cable is used as a guided shared medium. It has an inner copper conductor and an outer copper shield, separated by a insulating material, offering superior noise immunity and enhanced signal strength over longer distances.
- Fiber optic cables is a flexible medium that conducts pulses of light, with each pulse representing a bit. It is made of very thin glass.
Q2
(a) What is time division multiplexing (TDM) and frequency division multiplexing (FDM), use diagrams to illustrate your explanation.
Lecture 1
- FDM: The total bandwidth is divided into a series of non-overlapping frequency sub-bands
- TDM: The transmission time on a single channel is divided into non-overlapped time slots.
(b) What is a recursive query and an iterated query in DNS
Lecture 2
- In a recursive query, the DNS server takes full responsibility for resolving the query, contacting other DNS servers as necessary, and returns the final answer to the client.
- In an iterated query, the DNS client allows the DNS server to return the best information it has, which might not be the complete resolution. If the server does not have the answer, it directs the client to another DNS server. The client then makes a series of queries to different DNS servers until it finds the answer.
(c) Discuss the ‘store-and-forward’ property with the aid of an example in packet- switching.
Lecture 1
Most packet switches use store-and-forward transmission at the inputs to the links. It means that the packet switch must receive the entire packet before it can begin to transmit the first bit of the packet onto the out link.
(d) Alice wants to send an email message to Bob. This will involve four entities: Alice’s mail client (for email compo- sition and sending), Alice’s outgoing mail server, Bob’s incoming mail server, and Bob’s mail client (for email retrieval and viewing). Between which of these four entities does the SMTP protocol operate?
- Between Alice’s mail client and Alice’s outgoing mail server
- Between Alice’s outgoing mail server and Bob’s incoming mail server.
(e) What is throughput? Provide a diagram to illustrate the idea.
Lecture 1
Throughput is the rate (bits/time unit) at which bits are transferred between sender and the receiver.
- When , the average end-end throughput is
- When , the average end-end throughput is
Q3
(a) Using a diagram describe a peer to peer (P2P) architecture.
Lecture 2
A peer-to-peer network allows to communicate between peers without the need for a server.
(b) What are transmission and propagation delays in packet switching?
Lecture 1
Transmission Delay 传输延迟
- : packet length (bits)
- : link bandwidth (bps)
Propagation Delay 传播延迟
- : length of physical link
- : propagation speed in medium (~ m/sec)
补充笔记:另外几种延迟
Processing Delay 处理延迟
- Check bit errors
- Determine output link
Queueing Delay 排队延迟
- Time waiting at output link for transmission
- Depends on congestion level of router
(c) What are the different services provided by TCP and UDP?
Lecture 2
UDP provides unreliable transfer of groups of bytes (“datagrams”) between client and server
- no “connection” between client & server
- transmitted data may be lost or received out-of order
TCP provides reliable, in-order byte-stream transfer (“pipe”) between client and server
- client must contact server
(d) What are the similarities and difference between ALOHA and slotted ALOHA?
Lecture 5
Similarities
- Both are random access protocols used for satellite and wireless communication.
- Both deal with collisions by requiring users to wait a random amount of time after a collision before retransmitting.
Difference
- With ALOHA, users can transmit at any time, making it completely asynchronous.
- With slotted ALOHA, time is divided into equal slots, and users can only transmit at the beginning of a time slot, making it synchronous.
Q4
(a) What is an internet checksum, provide one example of a checksum (for adding two 16-bit integers).
Lecture 5
Definition
- Summing: Add all the 16-bit words in the data together, treating each byte as part of a 16-bit word (if there is an odd number of bytes, a zero byte is added at the end).
- Wrapping: If any carry-out (overflow) occurs from the most significant bit, wrap it around and add it to the result.
- Complementing: Calculate the one’s complement of the sum.
(b) Consider the network shown in the figure below
using the equation, perform a complete calculation of the distance routing algorithm for this network.
Lecture 4
Q5
(a) Write down the HTTP request messages format.
- Request Line: Includes the HTTP method, the resource path, and the HTTP version. For example:
GET /index.html HTTP/1.1
.
- Headers: Key-value pairs providing additional information about the request. Common headers include
Host
,User-Agent
, andAccept
.
- Body (optional): Contains data sent to the server.
(b) Explain the concept of a Content Distribution Network.
Lecture 5
Content Distribution Network is a group of servers that are strategically placed across the globe with the purpose of accelerating the delivery of web content.
(c) What is domain namespace? Describe different types of domain namespace.
Lecture 2
Definition
Namespace is a set of possible names.
- 🤖: The domain namespace is a hierarchical structure of domain names used in the Internet to organize and manage identities across the global network.
Type
- Generic domains:
com
(commercial) .edu
(educational).
org
(non profit organization)
- Country domains:
.
ie
(Ireland),.cn
(China)
- Inverse domain: if we want to know what is the domain name of the website. IP to domain name mapping.
(d) Write down Dijkstra’s algorithm from this graph below
to find out the least cost path from A to F.
Step | A | B | C | D | E | F |
1 | 0, - | ∞, - | ∞, - | ∞, - | ∞, - | ∞, - |
2 | ㅤ | 2, A | 2, A | 4, A | ∞, - | ∞, - |
3 | ㅤ | ㅤ | 2, A | 4, A | 12, B | 6, B |
4 | ㅤ | ㅤ | ㅤ | 3, C | 12, B | 6, B |
5 | ㅤ | ㅤ | ㅤ | ㅤ | 7, D | 6, B |
Least cost path: A→B→F
Q6
(a) Describe the concept of a cyclic redundancy check by reference to a suitable example.
Definition
- The sender generates a CRC from the original data using a predefined polynomial and appends it to the data before transmission.
- The receiver calculates the CRC on the received data using the same polynomial. If the calculated CRC matches the received CRC, the data is considered to be error-free.
Example
循环冗余检测
Lecture 5
Cyclic Redundancy Check, CRC
核心思想:将传输的数据当做一个位数很长的数。将这个数除以另一个数。得到的余数作为校验数据附加到原数据后面。
发送端
模 2 除法 可以视为 XOR 运算
→ 如果两个输入位相同,则输出 0;如果两个输入位不同,则输出 1。
- 初始部分
1011
,执行 XOR1001
,结果为0100
。
- 将
0100
右移一位并添加下一个位:0100
,执行 XOR1001
,结果为1000
。
- 将
1000
右移一位并添加下一个位:0000
,执行 XOR1001
,结果为0010
。
- 将
0010
右移一位并添加下一个位:0100
,执行 XOR1001
,结果为1000
。
- 将
1000
右移一位并添加下一个位:0000
,执行 XOR1001
,结果为0010
。
- 将
0010
右移一位并添加下一个位:0100
,执行 XOR1001
,结果为1000
。
- 将
1000
右移一位并添加下一个位:0000
,执行 XOR1001
,结果为0100
。
- 将
0100
右移一位:010
,没有更多的位可以添加,即这是最终的余数。
接收端
与发送端使用相同的除数,余数为 0 说明数据正确
(b) What is a multiple access protocol? What are the desirable characteristics of Multiple access protocols?
Lecture 5
Definition
A multiple access protocol is a method that determines how multiple devices use a shared communication channel to transmit data without interference or collisions.
Desirable characteristics
Given: broadcast channel of rate bps
- When one node wants to transmit, it can send at rate .
- When nodes want to transmit, each can send at average rate
- Fully decentralized
- no special node to coordinate transmissions
- no synchronization of clocks, slots
- Simple
(c) What is a process? With reference to a suitable example, describe a processes communication technique.
Lecture 3
Definition
A process is an instance of a computer program that is being executed. It contains the program code and its current activity
Processes communication technique
Sockets allow for two-way communication and can be based on TCP for reliable communication or UDP for faster, but less reliable, communication.
Consider the Local Area Network shown below and answer the questions (d) and (e).
(d) Assign IP address to the leftmost interface of the router, given that the subnet part of IP addresses are 24 bits.
Lecture 5
111.111.111.110
路由器的接口地址用作在该子网中的设备的默认网关,第一个可用地址(子网地址加 1)常常分配给它,因为它是最容易记忆的,并且在逻辑上表示子网的起始。
- 分值就
2 marks
,不用解释太多
(e) Suppose wants to send an IP datagram to and knows ’s IP address. Must also know ’s MAC address to send the datagram to ? If so, how does get this info? If not, explain why not.
Yes. Since and are on the same local network, must know ’s MAC address to send the datagram to . obtains this information through ARP, where broadcasts an ARP request on the network asking who has ’s IP address, and B responds with its MAC address.
2023-CS320FZ-January
Q1
(a) Explain the application areas of computer networks.
Lecture 2
- The application layer in the TCP/IP model is the closest layer to the end user.
- It means that the application layer and end user can interact directly with the software application.
- The application layer programs are based on client and servers.
(b) State the technological differences between the half duplex and full duplex mode of communication in computer networks.
Lecture 1
- In half-duplex mode, each station can both transmit and receive, but not at the same time. When one device is sending, the other can only receive, and vice versa.
- In full-duplex mode, both stations can transmit and receive simultaneously.
(c) Explain different types of unguided media.
Lecture 1
- Radio waves are omnidirectional. When an antenna transmits radio waves, they are propagated in all directions. This means that the sending and receiving antennas do not have to be aligned.
- Radio waves are used in FM radio and television
- Microwaves are unidirectional. When an antenna transmits microwaves, they can be narrowly focused on a specific direction.
- They are used for unicast communication such as cellular telephones, satellite networks etc.
- Infrared signals, with frequencies from more than 300 Gigahertz to 400 terahertz can be used for short-range.communication. Infrared waves, having high frequencies, cannot penetrate walls.
- Used in remote controller with TV.
(d) In the figure below, there are 3 connections passing through the large cable . The throughput of a large cable is divided by 3 connections equally. Connection-1 has transmission rates of and at the server side and client side respectively. Connection-2 has transmission rates of and at the server side and client side respectively. Connection-3 has transmission rates of and at the server side and client side respectively.
How end to end throughput of each connection will be measured in this scenario?
Since the large cable is shared by all three connections and its throughput is divided equally, the maximum throughput for each connection cannot exceed .
The end-to-end throughput of each connection in a network is determined by the slowest link in the path from the server to the client. This is often referred to as the “bottleneck” in network theory.
Q2
(a) Describe three different phases of circuit switching, use diagrams to illustrate your explanation.
Lecture 1
- Circuit establishment
- When any user wants to communicate with another, a request signal is sent to the receiver, then the receiver sends back the acknowledgment to ensure the availability of the dedicated path and the circuit is established.
- Data transfer
- Once the connection is established, host A and host B can start to transfer data.
- Circuit disconnect
- When one of the hosts needs to disconnect, a signal is sent to switches to release the reserved channel.
(b) Consider the links shown in the figure below and solve the problem.
The length of a packet is 800000 bits, transmission rate is 80 kbps, 800 kbps and 8 kbps for link 1, link 2 and link 3 respectively. What is the total transmission delay for link 1, link 2 and link 3?
- Link 1 = 80 kbps = bps
- Link 2 = 800 kbps = bps
- Link 3 = 8 kbps = bps
(c) Explain the hypertext transfer protocol (HTTP) with appropriate diagram.
A client sends an HTTP request to a server, and the server responds with an HTTP response.
(d) Explain 3 different categories of cookies.
Lecture 2
- Session Cookies: These cookies expire after a specific time or when the browser is closed.
- Permanent Cookies: These remain in operation, even when we have closed the browser.
- Third-Party Cookies: These are installed by third parties for collectingcertain information.
Q3
(a) Calculate the total time required to transfer a 1.5MB file assuming a RTT of 0.1 sec. The bandwidth is 10 Mbps, and data packets can be sent continuously.
Lecture 2
- File size: 1.5 MB = 1.5 * 1024 * 1024 bytes = 1.5 * 1024 * 1024 * 8 bits
- Bandwidth: 10 Mbps = 10 million bits per second
- Transmission Time = File Size in Bits / Bandwidth + 2*RRT = 1.26 s + 0.1*2 = 1.46s
(b) Describe the method of two ways handshake for connection establishment. Discuss the faults that can occur in two ways handshake with the diagrams.
Lecture 3
In a two-way handshake, Host A initiates the connection by sending a SYN to hiost B. Upon receiving the SYN, host B responds with an ACK back to Entity A. If this exchange is successful, a connection is established.
(c) Define the formula of Timeout Interval.
Lecture 3
(d) Describe how the packet delay and packet losses can occur during network congestion.
Lecture 1
- The packet suffers from several types of delays at each node along the path, such as processing delay / queuing delay / transmission delay / propagation delay
- Since the amount of buffer space is finite, an arriving packet may find that the buffer is completely full with other packets waiting for transmission. In this case, packet loss will occur—either the arriving packet or one of the already-queued packets will be dropped.
Q4
(b) With a proper diagram discuss memory-based, bus-based and crossbar based switching fabrics.
Lecture 3
- Memory: Processor moves packets from input ports to output ports. This is typically done by copying the packet into the processor’s memory, determining the packet’s destination, and then copying it out to the appropriate output port.
- Bus: All the ports are connected to a shared communication bus. Packets from the input ports are placed on the bus and are read by the appropriate output ports.
- Crossbar: It involves a grid of switches where the rows represent input ports and the columns represent output ports. A crosspoint in the grid can connect any input to any output.
(c) Discuss the FIFO and Round Robin scheduling technique for choosing the packets to send.
Lecture 3
- FIFO: send in order of arrival to queue
- Round Robin: cyclically scan multiple class queues, sending one complete packet from each class (if available)
Q5
(a) In Error Detection Techniques what is parity checking. Explain the even parity and odd parity check with examples.
Definition
Sender
- The sender calculates the number of 1s in the data frame and adds a parity bit (0 or 1) to make the total number of 1s even (for even parity) or odd (for odd parity).
- The sender then transmits the data frame with the parity bit to the receiver.
Receiver
- The receiver counts the number of 1s in the received frame and checks if the total number is even (for even parity) or odd (for odd parity).
- If the count matches the expected parity, the frame is accepted; otherwise, it is rejected as an error is detected.
Example using even parity
(c) Explain Go-Back-N ARQ and Selective Repeat ARQ in Sliding window protocol.
- Go-Back-N ARQ: Sends multiple frames before acknowledgments but requires retransmission of all frames from a lost or erroneous frame onwards, as the receiver only accepts in-order frames.
- Selective Repeat ARQ: Allows out-of-order frame reception and only retransmits the specific lost or erroneous frames, reducing unnecessary retransmissions.
(d) What is a subnet?
Explain the characteristics of different subnets that exist in the diagram.
Lecture 4
A subnet is device interfaces with same subnet part of IP address. Hosts that belong to a same subnet can physically reach each other without intervening router.
The Network in the diagram is consisting of 3 subnets. First 24 bits(as 3 parts of IP are same) are common for each interface.