Computer Networks: Topologies, Devices and OSI Layers
Computer Networks notes for competitive exams: LAN, MAN and WAN, the six topologies, network devices and their OSI layers, protocols, port numbers and IP addressing.
By GK24 Editorial Team· Published · 5 min read

A computer network is two or more computers, servers, printers or phones joined by a communication link so that they can exchange data and share hardware and software. One printer serving a whole office, a bank branch reading an account opened in another city, and a student opening a website all work because of a network. Examiners treat this chapter as the backbone of the Computer Awareness section: the types of network, the topologies, the devices and the layers come up in almost every SSC, Railway and Banking paper.
Types of network by the area they cover
Networks are classified first by how far they reach. The bigger the area, the slower and costlier the link becomes.
| Network | Full form | Area covered | Example |
|---|---|---|---|
| PAN | Personal Area Network | About 10 metres around a person | Bluetooth between a phone and earphones |
| LAN | Local Area Network | A room, building or campus | Computer lab joined by Ethernet cable |
| MAN | Metropolitan Area Network | A city | Cable television network of a city |
| WAN | Wide Area Network | A country or the whole world | The internet, the largest WAN |
A LAN is owned by one organisation and is the fastest of the four; a WAN is usually built on leased lines and satellite links owned by telecom companies. A network limited to one campus is sometimes called a CAN, and a wireless LAN is a WLAN, better known by its trade name Wi-Fi.
Network topologies
Topology means the shape in which the machines are wired. Six arrangements are asked.
| Topology | Arrangement | Point to remember |
|---|---|---|
| Bus | All nodes tap one common backbone cable | Needs terminators at both ends; the cheapest, but one break stops the network |
| Star | Every node joins a central hub or switch | Most common in modern LANs; failure of the hub kills the network |
| Ring | Nodes form a closed loop, data moves in one direction | Uses token passing; a single break breaks the ring |
| Mesh | Every node is linked to every other node | A full mesh of n nodes needs n(n-1)/2 cables; most reliable, most costly |
| Tree | Stars joined to a root in a hierarchy | Also called a hierarchical topology |
| Hybrid | Two or more of the above combined | The internet itself is a hybrid |
Transmission media and modes
Data travels either through a cable, called guided or wired media, or through the air, called unguided or wireless media. Twisted pair cable, the cheapest, ends in an RJ-45 connector and carries almost all office LANs. Coaxial cable, once used for bus networks, still carries cable television. Optical fibre carries light instead of electricity, works on total internal reflection, gives the highest bandwidth and is immune to electromagnetic interference. Wireless media include radio waves, microwaves, infrared and satellite links.
Data can flow in three modes. In simplex mode it moves one way only, as from a keyboard to a computer. In half duplex mode it moves both ways but only one way at a time, as in a walkie-talkie. In full duplex mode both ends can send at the same time, as in a telephone call. Speed is measured in bits per second, so 1 Mbps means ten lakh bits every second.
Network devices
Each device works at a fixed level of the network and this is the favourite question of paper setters.
| Device | Work | OSI layer |
|---|---|---|
| Repeater | Regenerates a weak signal so it can travel further | Physical |
| Hub | Joins LAN nodes and broadcasts data to all of them | Physical |
| Switch | Sends a frame only to the port of the destination MAC address | Data Link |
| Bridge | Joins two segments of the same network | Data Link |
| Router | Joins different networks and chooses the path using IP addresses | Network |
| Gateway | Joins two networks using different protocols | All layers |
| Modem | Modulator-demodulator: turns digital signals into analog and back | Physical |
| NIC | Network Interface Card; carries the machine's MAC address | Data Link |
The OSI and TCP/IP models
The OSI reference model, published by the International Organization for Standardization, divides communication into seven layers: Physical, Data Link, Network, Transport, Session, Presentation and Application, counted from the bottom. Students remember them by the sentence Please Do Not Throw Sausage Pizza Away. The unit of data has a different name at each level: a bit at the physical layer, a frame at the data link layer, a packet at the network layer and a segment at the transport layer. The practical TCP/IP model compresses the same work into four layers: Network Access, Internet, Transport and Application.
At the transport layer, TCP is connection oriented and delivers data in order with acknowledgement, while UDP is connectionless, faster and used for live video and voice. Common port numbers are 21 for FTP, 22 for SSH, 23 for Telnet, 25 for SMTP, 53 for DNS, 80 for HTTP and 443 for HTTPS.
Addressing on a network
A MAC address is the 48-bit physical address burned into the NIC and written as twelve hexadecimal digits. An IPv4 address is a 32-bit logical address written as four decimal numbers separated by dots, such as 192.168.1.1, and is divided into five classes: A, B and C for ordinary hosts, D for multicast and E for experiments. The block starting with 127 is reserved for loopback testing. Because IPv4 space ran short, IPv6 was defined with 128-bit addresses written as eight groups of hexadecimal digits separated by colons. The Domain Name System translates a readable name such as gk24.in into the numeric IP address of the server.
Network security in brief
A firewall, which may be hardware or software, filters traffic entering or leaving a network. Encryption scrambles data so only the holder of the key can read it, and a Virtual Private Network builds an encrypted tunnel across the public internet. The whole set of points through which an intruder could get in is called the attack surface, and shrinking it is the first step of network security. On mobile networks, GPRS, which stands for General Packet Radio Service, first carried packet data over 2G cellular links.
Exam Point of View
Examiners ask six things from this chapter. First, match the network to its area: PAN, LAN, MAN and WAN, with the internet as the largest WAN. Second, the topologies, especially the central hub of a star, token passing in a ring and the n(n-1)/2 cable formula of a mesh. Third, the OSI layer at which each device works, which is the single most repeated question; hub and repeater at layer one, switch and bridge at layer two, router at layer three. Fourth, expansions and port numbers: TCP, UDP, GPRS, NIC, HTTP 80, HTTPS 443, FTP 21, SMTP 25 and DNS 53. Fifth, address lengths in bits, where the trap is swapping the 48-bit MAC address with the 32-bit IPv4 address. Sixth, the three transmission modes with their stock examples, the walkie-talkie for half duplex and the telephone for full duplex.
Important Facts
| Largest WAN | The internet, a network of networks running on TCP/IP |
|---|---|
| Range of a PAN | About 10 metres, as in Bluetooth |
| Cables in a full mesh | n(n-1)/2 for n nodes |
| Topology using token passing | Ring topology |
| Commonest LAN topology today | Star, built around a hub or switch |
| Layers in the OSI model | Seven, from Physical up to Application |
| Layers in the TCP/IP model | Four: Network Access, Internet, Transport, Application |
| MAC address length | 48 bits, written as twelve hexadecimal digits |
| IPv4 and IPv6 address length | 32 bits and 128 bits |
| Loopback address block | Addresses beginning with 127 |
| Ethernet standard | IEEE 802.3 |
| Wi-Fi and Bluetooth standards | IEEE 802.11 and IEEE 802.15 |
| Connector on twisted pair cable | RJ-45, an eight-pin jack |
| Connection oriented transport protocol | TCP, which uses a three-way handshake |
| Full form of GPRS | General Packet Radio Service |
| Attack surface | All the points through which an intruder could enter a system |
Practice MCQs on this topic
In terms of computers, the set of ways in which an adversary can enter a system and can potentially cause damage is called:
- A.Attack Surface
- B.Attack Signature
- C.Attack Pattern
- D.Attack Path
Show answer
Correct answer: A. Attack Surface
Explanation
The correct answer is A, Attack Surface. The attack surface of a system is the total collection of every point at which an unauthorised person could try to enter it or pull data out of it: open ports, running services, user accounts, login pages, removable drives and even the employees who can be tricked. Network administrators reduce risk by shrinking this surface, that is by closing unused ports and removing software that is not needed. Option B is wrong because an attack signature is the recognisable pattern of bytes or behaviour by which antivirus and intrusion detection software identify a known attack. Option C is wrong because an attack pattern is a general description of how a class of attacks is carried out, used while designing defences. Option D is wrong because an attack path, also called an attack vector chain, is the particular route a single intruder actually followed from entry to target, not the whole set of possible entry points.
Which of the following devices performs signal conversion?
- A.Modulator
- B.Mouse
- C.Plotter
- D.Keyboard
Show answer
Correct answer: A. Modulator
Explanation
The correct answer is A, Modulator. A modulator changes the form of a signal: it loads the digital bits produced by a computer onto an analog carrier wave so that they can travel over a telephone line, a cable or a radio link. The reverse device, a demodulator, recovers the bits at the far end, and the two together make the modem, whose very name is short for modulator-demodulator. Option B is wrong because a mouse is a pointing input device; it sends position and click data to the computer but does not convert one form of signal into another. Option C is wrong because a plotter is an output device that draws large line diagrams, maps and engineering drawings with pens on paper. Option D is wrong because a keyboard is an input device that turns keystrokes into character codes for the processor, which is coding rather than signal conversion between digital and analog forms.
What is the full form of GPRS in mobile computing?
- A.General Packet Radio Service
- B.General Packet Route service
- C.General Package Radio Service
- D.General Packet Radiation Service
Show answer
Correct answer: A. General Packet Radio Service
Explanation
The correct answer is A, General Packet Radio Service. GPRS was added to the 2G cellular system so that the same radio channel could carry data in packets instead of holding a circuit open the way a voice call does. Because the user is charged for the volume of data rather than for the minutes of connection, it was called an always-on service, and it made mobile browsing, WAP pages and picture messaging possible; the faster EDGE and then 3G grew out of it. Option B is wrong because the R stands for radio, the medium used, not for route. Option C is wrong because the unit of data in this system is a packet, and package is not a networking term here. Option D is wrong because radiation has nothing to do with the expansion; it only resembles the word radio and is placed there as a distractor.
In which network topology is every node connected to a single central device?
- A.Bus topology
- B.Ring topology
- C.Star topology
- D.Mesh topology
Show answer
Correct answer: C. Star topology
Explanation
The correct answer is C, Star topology. In a star network every computer has its own cable running to a central hub or switch, so the shape resembles the spokes of a wheel. Adding or removing one machine disturbs nobody else and a broken cable affects only that one node, which is why almost every office and laboratory LAN is wired this way; the weakness is that failure of the central device stops the whole network. Option A is wrong because a bus topology has all nodes tapping one common backbone cable with terminators at its two ends. Option B is wrong because in a ring the machines form a closed loop, each joined to two neighbours, and data circulates in one direction using a token. Option D is wrong because a mesh links every node directly to every other node, needing n(n-1)/2 cables for n nodes and having no central device at all.
How many cables are needed to connect 6 computers in a fully connected mesh topology?
- A.12
- B.15
- C.18
- D.30
Show answer
Correct answer: B. 15
Explanation
The correct answer is B, 15. In a full mesh every node is joined directly to every other node, so the number of links equals the number of pairs that can be formed from the nodes, given by the formula n(n-1)/2. Putting n equal to 6 gives 6 multiplied by 5, that is 30, divided by 2, which equals 15 cables; each machine also needs 5 network ports, so the port count is n(n-1) in total. Option A is wrong because 12 would be twice the number of nodes and has no basis in the formula. Option C is wrong because 18 is three times the number of nodes and again does not follow from counting pairs. Option D is wrong because 30 is the value of n(n-1), which counts each link twice, once from either end, and must be halved since one cable serves both directions.
A router works at which layer of the OSI reference model?
- A.Physical layer
- B.Data Link layer
- C.Network layer
- D.Transport layer
Show answer
Correct answer: C. Network layer
Explanation
The correct answer is C, Network layer. A router joins two or more different networks and decides, for every packet, which outgoing line will carry it towards its destination. It makes that decision by reading the destination IP address, and the IP address is a network layer address, which is the third layer of the OSI model counting from the bottom. Option A is wrong because devices of the physical layer, such as a repeater or a hub, only pass on or regenerate electrical signals and cannot read any address. Option B is wrong because data link layer devices, namely the switch and the bridge, forward frames using MAC addresses and work within one network rather than between networks. Option D is wrong because the transport layer is where TCP and UDP break data into segments and manage acknowledgements; a gateway may operate up to that level and above, but an ordinary router does not.
A MAC address is how many bits long?
- A.16 bits
- B.32 bits
- C.48 bits
- D.128 bits
Show answer
Correct answer: C. 48 bits
Explanation
The correct answer is C, 48 bits. The Media Access Control address is the permanent physical address written into the network interface card by its maker, and it is 48 bits long, shown to users as twelve hexadecimal digits in six pairs such as 00:1A:2B:3C:4D:5E. The first half identifies the manufacturer and the second half the particular card, so no two cards in the world should carry the same value. Option A is wrong because 16 bits is the width of a port number, which identifies an application and not a machine. Option B is wrong because 32 bits is the length of an IPv4 address, a logical address that changes when the machine moves to another network. Option D is wrong because 128 bits is the length of an IPv6 address, adopted because the supply of 32-bit IPv4 addresses was running out.
Token passing is the access method traditionally associated with which topology?
- A.Star topology
- B.Ring topology
- C.Bus topology
- D.Tree topology
Show answer
Correct answer: B. Ring topology
Explanation
The correct answer is B, Ring topology. In a ring the machines form a closed loop and a small control frame called a token keeps circulating around it; only the computer holding the token may put data on the ring, and when it finishes it releases the token to the next machine. Because permission is passed around in turn, no two nodes transmit together and collisions cannot occur, which was the chief attraction of the old Token Ring networks. Option A is wrong because a star network depends on a central hub or switch and uses contention or switching, not a circulating token. Option C is wrong because a bus network uses CSMA/CD, in which a node listens to the backbone, sends when it is free and backs off if a collision is detected. Option D is wrong because a tree is only a hierarchy of star segments and inherits their access method.
Which connector is used with twisted pair cable in a LAN?
- A.BNC
- B.RJ-45
- C.RJ-11
- D.SC
Show answer
Correct answer: B. RJ-45
Explanation
The correct answer is B, RJ-45. The registered jack numbered 45 is the eight-pin plastic plug crimped on the end of an unshielded twisted pair Ethernet cable, and it is what clicks into the network port of a computer, a switch or a router. Option A is wrong because a BNC connector, with its bayonet twist lock, belongs to coaxial cable and was used in old bus networks and in test instruments. Option C is wrong because RJ-11 is the smaller six-position jack of an ordinary telephone line, which carries at most two pairs and cannot serve an Ethernet link. Option D is wrong because SC, the subscriber connector, is one of the push-pull connectors used on optical fibre, along with the LC and ST types, and it terminates glass strands carrying light rather than copper pairs carrying electricity.
Which of the following is an example of full duplex communication?
- A.Keyboard to computer
- B.Walkie-talkie
- C.Telephone conversation
- D.Television broadcast
Show answer
Correct answer: C. Telephone conversation
Explanation
The correct answer is C, Telephone conversation. Full duplex means both ends can send and receive at the very same moment, and on a telephone call each speaker can talk while still hearing the other, so traffic flows in both directions together. Option A is wrong because a keyboard only sends characters to the computer and never receives any from it, which makes it simplex, a one-way mode. Option B is wrong because a walkie-talkie is the standard example of half duplex: the user must press the button to speak and release it to listen, so the two directions take turns on one channel. Option D is wrong because a television broadcast travels only from the transmitter to the viewer's set, with no return path from the viewer, and is therefore simplex as well.
Which protocol is connection oriented and delivers data with acknowledgement?
- A.UDP
- B.TCP
- C.IP
- D.ICMP
Show answer
Correct answer: B. TCP
Explanation
The correct answer is B, TCP. The Transmission Control Protocol first sets up a connection through a three-way handshake, then numbers every segment, waits for an acknowledgement for each and sends it again if none arrives, and finally hands the data to the application in the original order. Because of this care it is used for web pages, email and file transfer, where a missing byte cannot be tolerated. Option A is wrong because UDP is connectionless: it fires datagrams without a handshake, acknowledgement or reordering, which makes it fast and suitable for live voice, video and DNS queries. Option C is wrong because IP is a network layer protocol that only addresses and routes packets and gives no delivery guarantee at all. Option D is wrong because ICMP carries control and error messages, such as the replies used by the ping command, and does not carry user data.
Which of the following is the largest Wide Area Network in existence?
- A.Ethernet
- B.The internet
- C.Bluetooth
- D.Intranet of a company
Show answer
Correct answer: B. The internet
Explanation
The correct answer is B, the internet. The internet joins networks in every country through undersea cables, optical fibre on land and satellite links, all of them following the common TCP/IP rules, and no single organisation owns it, so it is rightly called the largest wide area network and a network of networks. Option A is wrong because Ethernet is the family of standards, numbered IEEE 802.3, used to wire a local area network inside a building, not a wide area network. Option C is wrong because Bluetooth is a short range radio technology standardised as IEEE 802.15, which reaches about ten metres and builds a personal area network. Option D is wrong because the intranet of a company is a private network restricted to its own staff; it may be spread over several offices, yet it is far smaller than the public internet and usually rides on it.
Frequently Asked Questions
What is the difference between a hub and a switch?
A hub is a physical layer device that copies an incoming signal to every other port, so all machines receive traffic meant for one of them and collisions are common. A switch is a data link layer device that reads the destination MAC address and forwards the frame only to the port where that machine sits, which saves bandwidth and avoids collisions. This is why switches replaced hubs in offices.
Is a router the same thing as a modem?
No. A modem converts digital signals into analog form and back so that data can travel over a telephone line, cable or fibre link, and it is the point where the service provider's line ends. A router works at the network layer, reads IP addresses and decides the path for each packet between networks. Home devices often combine both functions in one box, which is why the two names get mixed up.
Which topology is the most reliable and why?
The mesh topology, because every node has a direct link to every other node, so a broken cable only removes one path and the traffic takes another. The price of that reliability is cost: a full mesh of n nodes needs n(n-1)/2 cables and n-1 ports on every machine, so it is used only for backbones and critical links, not for ordinary offices.
How many layers does the OSI model have and how are they remembered?
Seven. Counting from the bottom they are Physical, Data Link, Network, Transport, Session, Presentation and Application, remembered by the sentence Please Do Not Throw Sausage Pizza Away. The practical TCP/IP model does the same work in four layers, and exams sometimes ask which OSI layers the TCP/IP application layer covers, the answer being the session, presentation and application layers together.
Why was IPv6 introduced when IPv4 was already working?
An IPv4 address is only 32 bits long, which allows about 429 crore addresses in all, and the growth of phones, servers and smart devices exhausted that supply. IPv6 uses 128-bit addresses written as eight groups of hexadecimal digits separated by colons, which gives a practically unlimited pool, and it also simplifies the header and builds in support for encryption.
What is the difference between the internet, an intranet and an extranet?
The internet is the public global network open to everyone. An intranet uses the same technology but is closed to one organisation, carrying its circulars, attendance and internal portals. An extranet extends part of that private network to trusted outsiders such as suppliers, dealers or branch partners, usually through a login over an encrypted link.
Sources
- Internet Protocol, Version 6 (IPv6) Specification, RFC 8200 — IETF
- Service Name and Transport Protocol Port Number Registry — IANA
- Computer Science, Textbook for Class XI, unit on computer networks — NCERT





