Computer Networking Basics
Computer Networking Basics
The term topology refers to the way a network is laid out, either physically or logically. A topology can be considered
as the network’s shape. It is the geometric representation of the relationship of all the links. There are five basic
topologies: bus, ring, star, tree, and mesh.
Bus Topology
Bus topology uses a common bus or backbone (a single cable) to connect all devices with terminators at both ends.
The backbone acts as a shared communication medium and each node (file server, workstations and peripherals) is
attached to it with an interface connector. Whenever a message is to be transmitted on the network, it is passed back
and forth along the cable, past the stations (computers) and between the two terminators, from one end of the
network to the other. As the message passes each station, the station checks the message’s destination address. If the
address in the message matches the station’s address, the station receives the message. If the addresses do not match,
the bus carries the message to the next station and so on. The following figure (Figure-1) illustrates how devices such
as file servers, workstations and printers are connected to the linear cable or the backbone.
In a mesh topology, every node has a dedicated point-to-point link to every other node (Figure 2). Messages sent on
a mesh network can take any of several possible paths from source to destination.
In this topology, computers are placed on a circle of cable without any terminated ends since there are no unconnected
ends (Figure 3). Every node has exactly two neighbours for communication purposes. All messages travel through a
ring in the same direction (clockwise or counter clockwise) until it reaches its destination. Each node in the ring
incorporates a repeater. When a node receives a signal intended for another device, its repeater regenerates the bits
and passes them along the wire
• Failure in any cable or node breaks the loop and can take down the entire network.
• Maximum ring length and number of nodes are limited.
Star Topology
In this topology, devices are not directly linked to each other; however, they are connected via a centralized network
component known as hub or concentrator (Figure 4). The hub acts as a central controller and if a node wants to send
data to another node, it boosts up the message and sends the message to the intended node. This topology commonly
uses twisted-pair cable; however, coaxial cable or fibre-optic cable can also be used.
• It is easy to install and wire. ‰The network is not disrupted even if a node fails or is removed from the network.
• Fault detection and removal of faulty parts are easier in star topology.
Tree Topology
A tree topology combines characteristics of linear bus and star topologies (Figure 5). It consists of groups of star-
configured workstations connected to a bus backbone cable. Not every node plugs directly to the central hub. The
majority of nodes connect to a secondary hub that, in turn, is connected to the central hub. Each secondary hub in this
topology functions as the originating point of a branch to which other nodes connect. A tree topology is best suited
when the network is widely spread and partitioned into many branches.
• The distance a signal can travel increases, as the signal passes through a chain of hubs.
• It allows isolating and prioritizing communications from different nodes.
• It allows for easy expansion of an existing network, which enables organizations to configure a network to meet
their needs.
Hybrid topology
It is the combination of two or more topologies such that the resultant network does not retain the characteristics of
any of the basic topologies including star, bus, ring and tree.
A hybrid topology is created when two different basic topologies are connected.
Calculation of number of links required to set up a network having n devices with mesh, ring, bus or star topologies
DIFFERENT CATEGORIES OF A NETWORK
There are no generally accepted criteria to classify the computer networks; however, two dimensions are considered
more important, which are scale and transmission technology. On the basis of scale, computer networks can be
classified into three types: local area network (LAN), metropolitan area network (MAN) and wide area network (WAN).
On the basis of transmission technology, computer networks can be categorized as point-to-point networks and
broadcast networks.
A network can be as few as several personal computers on a small network or as large as the Internet, a worldwide
network of computers. Today, when talking about networks, we are generally referring to three primary categories:
LAN, MAN, and WAN
Local Area Network A LAN is a computer network that covers only a small geographical area (usually within a square
mile or less) such as an office, home or building (Figure 6). In a LAN, connected computers have a network operating
system installed onto them. One computer is designated as the fil server, which stores all the software that controls
the network. It also stores the software that can be shared by the computers attached to the network. Other
computers connected to the file server are called workstations. The workstations can be less powerful than the file
server and they may have additional software on their hard drives. On most LANs, cables are used to connect the
computers. Generally, LAN offers a bandwidth of 10–100 Mbps.
WAN offers many advantages to business organizations. Some of them are as follows:
• It offers flexibility of location because not all the people using the same data have to work at the same site.
• Communication between branch offices can be improved using e-mail and file sharing
• It facilitates a centralized company wide data backup system.
• Companies located in a number of small and interrelated offices can store files centrally and access each other’s
information
The two types of transmission technology that are available include broadcast networks and point-to-point networks.
In broadcast networks, a single communication channel is shared by all the machines of that network. When
a short message, let us say a packet is sent by any machine, it is received by all the other machines on that network.
This packet contains an address field which stores the address of the intended recipient. Once a machine receives a
packet, it checks the address field. If the address mentioned in the address field of packet is matched with the address
of the recipient machine, it is processed; otherwise, the packet is ignored. In broadcast systems, there is a special code
in the address field of the packet which is intended for all the destinations. When a packet with this code is transmitted,
it is supposed to be received and processed by all the machines on that network. This mode of operation is called
broadcasting. Some of the networks also support transmission to a subset of machines what is called multicasting.
In point-to-point networks, there could be various intermediate machines (such as switching devices called
nodes) between the pair of end points called stations. Thus, there could be various possible routes of different lengths
for a packet to travel from the source to the destination. Various routing algorithms are considered and final, one of
them is chosen for the packets to travel from the source to the destination. Generally, for small geographically localized
network (such as LAN), broadcasting is considered favourable while larger networks (such as WAN) use point-to-point
networks. If there is specifically one sender and one receiver in any point-to-point network, it is sometimes considered
as unicasting.
OSI is a standard reference model for communication between end users in a network. By the term open system, we
mean a set of protocols using which a system can communicate with any other system irrespective of the differences
in their underlying hardware and software. In 1983, International Organization for Standardization (ISO) published a
document called ‘The Basic Reference Model for Open Systems Interconnection’, which visualizes network protocols
as a seven-layered model. The OSI model consists of seven separate but related layers, namely, physical, data link,
network, transport, session, presentation, and application layers as shown in Figure 9.
Fig.-9 Layers in OSI Model
Within a single machine, a layer in OSI model communicates with two other OSI layers. It services to the layer that is
located directly above it while uses the services offered by the layer that is located directly below it. For example, the
data link layer provides services to the network layer while calls upon the services of the physical layer. In contrast,
during communication between two machines, each layer on source machine communicates with the corresponding
layer (called the peer layer) on the destination machine using a set of protocols that are appropriate for the layer.
In 1983, Day and Zimmermann laid down certain principles which were used in defining the OSI layers. These principles
are as follows:
The seven layers of OSI model are divided into two groups according to their functionalities. Physical, data link and
network layers are put in one group, as all these layers help to move data between devices. Transport, session,
presentation and application layers are kept in other group, because they allow interoperability among different
software (Fig.-10). The functions of each layer are discussed as follows:
1. Physical Layer: This layer defines the physical and electrical characteristics of the network. It acts as a conduit
between computers’ networking hardware and their networking software. It handles the transfer of bits (0s and
1s) from one computer to another. This is where the bits are actually converted into electrical signals that travel
across the physical circuit. Physical layer communication media include various types of copper or fibre-optic cable,
as well as many different wireless media.
2. Data Link Layer: This layer is responsible for reliable delivery of data from node to node and for providing services
to the network layer. At sender’s side, the data link layer divides the packets received from the network layer into
manageable form known as frames. These data frames are then transmitted sequentially to the receiver. At the
receiver’s end, data link layer detects and corrects any errors in the transmitted data, which it gets from the
physical layer. Other functions of data link layer are error control and flow control. Error control ensures that all
frames have finally been delivered to the destination network layer and in the proper order. Flow control manages
the sender to send frames according to the receiving capability of the recipient.
3. Network Layer: This layer provides end-to-end communication and is responsible for transporting traffic between
devices that are not locally attached. Data in the network layer is called packet (group of bits) which in addition to
data contains source and destination address. Packets are sent from node to node with the help of any of two
approaches, namely, virtual circuit (connection-oriented) and datagram (connectionless). In virtual circuit method,
route is decided while establishing connection between two users and the same path is followed for the
transmission of all packets. In datagram method, there is no connection established; therefore, sequenced packets
take different paths to reach destination. Therefore, virtual circuit method resembles telephone system and
datagram method resembles postal system. Other functions of network layer include routing, deadlock prevention
and congestion control. Network layer makes routing decisions with the help of routing algorithms to ensure the
best route for packet from source to destination. Congestion control tries to reduce the traffic on the network, so
that delay can be reduced and overall performance can be increased.
4. Transport Layer: The basic function of this layer is to handle error recognition and recovery of the data packets. It
provides end-to-end communication between processes which are executing on different machines. It establishes,
maintains and terminates communications between the sender process and the receiver process. It splits the
message at the sender’s end and passes each one onto the network layer. At the receiver’s end, transport layer
rebuilds packets into the original message, and to ensure that the packets arrive correctly, the receiving transport
layer sends acknowledgements to the sender’s end.
5. Session Layer: The session layer comes into play primarily at the beginning and end of transmission. At the
beginning of the transmission, it lets the receiver know its intent to start transmission. At the end of the
transmission, it determines whether or not the transmission was successful. This layer also manages errors that
occur in the upper layers such as a shortage of memory or disk space necessary to complete an operation or printer
errors. Some services provided by the session layer are dialog control, synchronization and token management.
Dialog control service allows traffic to flow in both directions or in single direction at a time and also keeps track
of whose turn it is to transmit data. Synchronization helps to insert checkpoints in data streams, so that if
connection breaks during a long transmission then only the data which have not passed the checkpoint yet need
to be retransmitted. Token management prevents two nodes to execute the same operation at the same time.
6. Presentation Layer: The function of this layer is to ensure that information sent from the application layer of one
system would be readable by the application layer of another system. Therefore, presentation layer concerns with
the syntax and semantics of the information transmitted. This is the place where application data is packed or
unpacked and is made ready to use by the running application. This layer also manages security issues by providing
services such as data encryption and compression, so that fewer bits need to be transferred on the network.
7. Application Layer: This layer is the entrance point that programs use to access the OSI model and utilize network
resources. This layer represents the services that directly support applications. This OSI layer is closest to the end
users. Application layer includes network software that directly serves the end users of the network by providing
them user interface and application features such as electronic mail.
TCP/IP model was developed by the U.S. Department of Defense (DoD) to connect multiple networks and preserve
data integrity. TCP/IP protocol model came after the OSI model and the numbers of layers in TCP/IP differ from that
of the OSI model. TCP/IP model comprises of four layers, namely, network access (also called host-to-network layer),
Internet, transport and application layers (see Figure 11).
The network access layer of TCP/IP model corresponds to the combination of physical and data link layers of OSI model.
The Internet layer corresponds to the network layer of OSI model and the application layer performs tasks of session,
presentation and application layers of OSI model with the transport layer of TCP/IP performing a part of responsibilities
of session layer of OSI model. TCP/IP protocol suite contains a group of protocols forming a hierarchy such that the
lower layer protocols support upper layer protocols.
1. Network Access Layer: This layer does not rely on specific protocol hence supports all standard protocols. It
connects two nodes to the network with the help of some protocol and move data across two nodes which are
connected via same link. The nodes after connection can transfer IP packets to each other. This layer is also
referred to as host-to-network layer.
2. Internet Layer: The main function of this layer is to enable the hosts to transmit packets to different networks by
taking any of the routes available for reaching the destination. This layer strengthens the whole architecture and
defines the format of packet. The rules to be followed while delivering the packets are transparent to the users.
Internet layer supports many protocols such as IP, address resolution protocol (ARP), reverse ARP (RARP), Internet
control message protocol (ICMP) and Internet group message protocol (IGMP).
3. Transport Layer: The main function of this layer is to deliver a message from a process on the source machine to
a process on the destination machine. This layer is designed to allow end-to-end conversation between peer
entities. It uses three protocols, namely, TCP, user datagram protocol (UDP) and stream control message protocol
(SCMP) to accomplish its responsibilities. TCP is a connection-oriented protocol which means a connection must
be established between the source and the destination before any transmission begins. It is also a reliable
protocol, as it ensures error-free delivery of data to the destination. UDP is an unreliable and a connectionless
protocol that performs very limited error checking. SCTP is the combination of UDP and TCP and it supports
advanced features such as voice over the Internet.
4. Application Layer: This layer contains all the high-level protocols such as file transfer protocol (FTP) and virtual
terminal (TELNET). Some more protocols which were added later include domain name service (DNS), hyper text
transfer protocol (HTTP) and many more. With the help of various protocols, this layer integrates many activities
and responsibilities for effective communication.
OSI and TCP/IP are layered models that allow the computer systems to communicate with each other. The OSI
reference model was developed by ISO in order to standardize the protocols being used in various layers and the
TCP/IP model was developed by DoD to connect multiple networks. Both models have some similarities which are as
follows:
• Both OSI and TCP/IP models use set of independent protocols for enabling communication between users.
• In both the models, upper layers focus on application such as web browser and lower layers focus on end-to-
end delivery of data.
The differences between OSI and TCP/IP models are listed in Table 2.2.
Each layer in the TCP/IP model uses an address for the efficient delivery of data between communicating nodes. The
host-to-network layer (physical plus data link layer) relates to physical address, network layer relates to logical address,
transport layer concerns with port address and application layer defines specific address. The description of these
addresses is as follows:
• Physical Address: It is the address assigned to a node by the network (LAN or WAN) in which it is connected. It is
the lowest-level address that is included in the frames at the data link layer to identify the destination node. The
size and format of physical address is highly dependent on the underlying physical network. That is, different
networks can have different address formats. The most common physical address size is of 48-bits. Physical
address is also known by other names including link address, MAC address and hardware address.
• Logical Address: In an inter-networked environment connecting different networks having different address
formats, the physical addresses are inadequate for communication. Thus, a universal addressing system is used
that assigns each host in the network a unique address called logical address (also referred to as IP address or
software address) which is independent of the underlying physical network. For example, in Internet, each host
connected to the Internet is assigned a 32-bit IP address and no two hosts connected to the Internet can have the
same IP address. It is the responsibility of the network layer to translate the logical addresses into physical
addresses.
• Port Address: The data link layer (using physical address) and network layer (using IP address) ensure end-to-end
delivery of data, that is, data is reached the destination host. Now, since multiple processes may be running
simultaneously on the host machine, there should be some means to identify the process to which data is to be
communicated. To enable this, each running process on the host machine is assigned with a label what is known
as port address. Using the port address, the transport layer ensures process-to-process delivery. In TCP/IP
architecture, port address is of 16 bits.
• Specific Address: Some applications such as e-mail and World Wide Web (WWW) provide user-friendly addresses
designed for that specific address. Some examples of specific address include an e-mail address that helps to
identify the recipient of that e-mail and URL of a website that helps to search a document on the web.
SWITCHING ELEMENTS: The generic term used for various devices- fully hardware, partial hardware software or pure
software. A computer network can be seen as a combination of communication subnet & hosts. The hosts are
computers or nodes which are connected to communication subnet. The communication subnet or only subnet
includes transmission lines and switching elements. These transmission lines may be actually guided (coaxial, UTP, OFC
etc. or unguided media (micro waves, radio waves, infrared etc.) used for data transmission whereas the switching
elements include all those devices (repeater, hub, switch, router, gateways etc.) which are used to realize a computer
network. The type and number of such devices depend on the scope of network i.e. whether network is LAN, MAN or
WAN. Network devices help nodes to get connected in a network for efficient communication. Network devices include
NIC, switch, router, bridge and gateway.
Network Interface Card It is a hardware device that connects clients, servers and peripherals to the network through
a port. Most network interfaces come as small circuit board that can be inserted onto one of the computer
motherboard’s slots. Alternatively, modern computers sometimes include the network interface as part of their main
circuit boards (motherboards). Each network interface is associated with a unique address called its MAC address. The
MAC address helps in sending information to the intended destination. NICs are the major factor in determining the
speed and performance of a network. It is a good idea to use the fastest network card available for the type of
workstation one is using.
Fig.-13 Repeater
Repeaters are most commonly used to extend a network. All network cable standards have maximum cable length
specification. If the distance between two network devices is longer than this specification, a repeater is needed to
regenerate the signal. Without the repeater, the signal will be too weak for the computers on each end to reliably
understand. A good example of the use of repeaters would be in a LAN using a star topology with unshielded twisted
pair cabling. The length limit for unshielded twisted pair cable is 100 m. The repeater amplifies all the signals that pass
through it allowing for the total length of cable on the network to exceed the 100 m limit. Nonetheless, the repeaters
have no in-built intelligence and they do not look at the contents of the packet while regenerating the signal. Thus,
there is no processing overhead in sending a packet through a repeater. However, a repeater will repeat any errors in
the original signal.
Hub It is a small box that connects individual devices on a network, so that they can communicate with one another.
The hub operates by gathering the signals from individual network devices, optionally amplifying the signals, and then
sending them onto all other connected devices. Amplification of the signal ensures that devices on the network receive
reliable information. A hub can be thought of as the centre of a bicycle wheel, where the spokes (individual computers)
meet. Nowadays, the terms repeater and hub are used synonymously, but actually they are not same. Although at its
very basic level, a hub can be thought of as a multi-port repeater. Typically, hubs have anywhere from 4 to over 400
ports. When a signal is received on one port of the hub, it is regenerated out to all the other ports. It is most commonly
used to connect multiple machines to the same LAN. Administrators connect a computer to each port on the hub,
leaving one port free to connect to another hub or to a higher-level device such as a bridge or router.
Bridge This device allows the division of a large network into two or more smaller and efficient networks. It monitors
the information traffic on both sides of the network, so that it can pass packets of information to the correct location.
Most bridges can ‘listen’ to the network and automatically figure out the address of each computer on both sides of
the bridge. A bridge examines each packet as it enters though one of the ports. It first looks at the MAC address of the
sender and creates a mapping between the port and the sender’s MAC address. It then looks at the address of the
recipient, comparing the MAC address to the list of all learned MAC addresses. If the address is in the list, the bridge
looks up the port number and forwards the packet to the port where it thinks the recipient is connected. If the
recipient’s MAC address is not in the list, the bridge then does a flood; it sends the signal to all the ports except the
one from where it was received. As a result, a bridge reduces the amount of traffic on a LAN by dividing it into two
segments. It inspects incoming traffic and decides whether to forward or discard it (Figure 14).
Fig.-14 Bridge
Bridges can be used to connect networks with different types of cabling or physical topologies. They must, however,
be used between networks employing the same protocol. Since a bridge examines the packet to record the sender
and looks up the recipient, there is overhead in sending a packet through a bridge. On a modern bridge, this overhead
is miniscule and does not affect network performance.
Switch It is a multi-port bridge. It connects all the devices on a network, so that they can communicate with one
another. The behaviour of a switch is same as that of a bridge. It is capable of inspecting the data packets as they are
received, determining the source and destination device of that packet, and forwarding that packet appropriately. The
difference is that most switches implement these functions in hardware using a dedicated processor. This makes them
much faster than traditional software-based bridges.
Router It is an essential network device for interconnecting two or more networks. The router’s sole aim is to trace
the best route for information to travel.
As network traffic changes during the day, routers can
redirect information to take less congested routes. A
router creates and/or maintains a table, called a routing
table that stores the best routes to certain network
destinations. While bridges know the addresses of all
computers on each side of the network, routers know
the addresses of computers, bridges and other routers
on the network. Routers can even ‘listen’ to the entire
network to determine which sections are the busiest.
They can then redirect data around those sections until
they clear up (Figure 15).
Routers are generally expensive and difficult to
configure and maintain. They are critical components of
a network and if they fail, the network services will be
significantly impaired. Most routers operate by
examining incoming or outgoing signals for information
at the network layer. In addition, they can permit or
Fig.-15 Router
deny network communications with a particular
network.
Gateway It is an internetworking device, which joins networks operating on different protocols together. It is also
known as protocol converter. A gateway accepts the packet formatted for one protocol and converts the formatted
packet into another protocol. For example, a gateway can receive e-mail message in one format and convert it into
another format. A gateway can be implemented completely in software, hardware, or as a combination of both. One
can connect systems with different protocols, languages and architecture using a gateway (Figure 16).
Fig.-16 Gateway
Differences among bridge, router and repeater