When a connection stops working, guessing wastes time. A few short commands typed at the command prompt can tell you whether a device is reachable, what address your computer has, and how long data takes to travel. Those numbers also describe how well a network performs.
Chapter 1 of the PECTAA Computer Science 12 book covers computer networks. After home network setup and Wi-Fi security (section 1.10), section 1.11 covers network diagnostic tools and commands, and section 1.12 covers network performance. This note is for FSc Part 2 (2nd year, Class 12) students in Lahore, Faisalabad, Sargodha, Rawalpindi, Multan, Gujranwala and the other Punjab boards. Gujrat district comes under the Gujranwala board. PECTAA writes the books. Your own board sets your paper.
What to know
Diagnostic tools (section 1.11). These tools find network problems. They check internet and network connections and show whether devices can communicate properly. Commands are typed at the command prompt or terminal, and they help spot slow or broken connections.
Troubleshooting. Troubleshooting finds and fixes network issues. It detects connection and speed problems by checking cables, devices and settings. It reduces downtime and errors, keeps communication smooth and improves performance.
Ping. The ping command tests connectivity:
- It checks whether a device is reachable on the network.
- It sends small data packets to another device. In the book's Figure 1.16, Host A sends an ICMP Echo Request and Host B answers with an ICMP Echo Reply.
- It measures the response time from the destination, so it helps detect delays.
- It is commonly used to check an internet connection.
Each reply line in the book's sample output shows the number of bytes (32), the time in milliseconds (24 to 26 ms) and a TTL value.
ipconfig and ifconfig. ipconfig is used on Windows; ifconfig on Linux and macOS. Both display network settings: IP address, subnet mask, gateway and network status. They help in troubleshooting.
Telnet, PuTTY and SSH.
- Telnet: remote access to a device, but data is sent without encryption.
- PuTTY: a widely used tool for remote login.
- SSH (Secure Shell): secure remote access; it encrypts the data.
All three help manage network devices.
Network performance (section 1.12). Performance means how well a network works: the speed and quality of data transfer. Good performance gives fast, smooth communication; poor performance gives slow internet and delays. It depends on factors such as bandwidth and latency.
- Bandwidth: the amount of data sent in a given time, the carrying capacity of the network. Usually measured in Mbps. Higher bandwidth means faster transfer. More devices use more bandwidth, and low bandwidth can slow the connection.
- Latency: the time data takes to travel, the delay between sending and receiving. Measured in milliseconds. Low latency means quick response; high latency causes lag. Online games and video calls need low latency.
Causes of network delay. The book lists: too many users, poor-quality cables, long distance between devices, network congestion and hardware problems.
The tools at a glance.
| Tool | Main job | Encrypts data? |
|---|---|---|
| ping | test reachability and response time | not relevant |
| ipconfig / ifconfig | show IP address, subnet mask, gateway, status | not relevant |
| Telnet | remote access to a device | no |
| SSH | secure remote access | yes |
Key points
- Ping answers "can I reach it, and how fast?"
- ipconfig (Windows) and ifconfig (Linux, macOS) answer "what are my settings?"
- Prefer SSH to Telnet because SSH encrypts.
- Bandwidth is capacity (Mbps); latency is delay (ms).
Worked examples
Example 1 (reading ping output). Four replies arrive with times 25, 24, 26 and 25 ms.
- All four packets got replies, so the destination is reachable.
- Average time = (25 + 24 + 26 + 25) ÷ 4 = 100 ÷ 4 = 25 ms.
- That 25 ms is the round-trip latency.
Example 2 (choosing a tool). A student's laptop connects to Wi-Fi but cannot open any page.
- Run ipconfig (Windows) to see whether the laptop has an IP address and a gateway.
- Ping the gateway, for example 192.168.0.1 as in the book's figure.
- If the gateway replies, the local link works and the problem lies further out; if not, check the router, cables and settings.
Example 3 (bandwidth or latency?). A large file downloads slowly, but a video call is smooth.
- A smooth call means latency is low.
- The slow download points to limited bandwidth, perhaps shared with many devices.
Common mistakes in the exam
- Mixing up ipconfig and ifconfig systems. ipconfig is Windows.
- Saying Telnet is secure. It does not encrypt; SSH does.
- Swapping bandwidth and latency units. Mbps for bandwidth, ms for latency.
- Thinking ping repairs a fault. It only tests reachability and delay.
- Listing one cause of delay when the question asks for several.
Exam technique
- Define each tool in one line, then give its use.
- For "compare" questions, use a two-column table such as Telnet against SSH.
- Quote units with every value.
- Check your board's notice for the sections in your paper.
Practice questions
Which protocol messages does ping use? Answer: ICMP Echo Request and ICMP Echo Reply.
Which command shows the IP address on Windows? Answer: ipconfig.
In what unit is latency measured? Answer: Milliseconds.
Give two causes of network delay. Answer: Too many users and network congestion (also poor cables, long distance, hardware problems).
Why is SSH used for managing a router remotely? Answer: It encrypts data, so login details are protected.
A ping gets no reply at all. Give one thing to check next. Answer: The cables, the device or its network settings, as in troubleshooting.
Ready to practise this? Continue in 2nd Year Computer Science.