Categories of Networks 

Categories of Networks

Today, when we talk about networks, we generally refer to two types: local-area networks and wide-area networks. The size of a network determines which category it belongs to. A LAN typically covers an area of less than 2 mi; a WAN can be global. Networks spanning tens of miles in size are commonly referred to as metropolitan area networks.

Local Area Network (LAN)

A local area network (LAN) is typically owned by a single company and connects devices in a single office, building, or campus (see Figure 10). LANs are currently limited to a few kilometers in length.

Figure 10 An isolated IAN connecting 12 computers to a hub in a closet

LANs are intended to enable resource sharing between personal computers or workstations. Shared resources can include hardware (for example, a printer), software (for example, an application programme), or data. Accounting PCs are a common example of a LAN. LANs are distinguished from other types of networks not only by their size, but also by their transmission media and topology. In most cases, a LAN will only use one type of transmission medium. The bus, ring, and star topologies are the most common LAN topologies. Early LANs had data rates ranging from 4 to 16 megabits per second (Mbps). Today, however, typical speeds are 100 or 1000 Mbps. Wireless LANs are the most recent advancement in LAN technology.

Wide Area Network

A wide area network (WAN) allows for the long-distance transmission of data, image, audio, and video information across large geographic areas, such as a country, continent, or even the entire world. The first is commonly referred to as a switched WAN, while the second is referred to as a point-to-point WAN (Figure11). The switched WAN links the end systems, which typically include a router (internetworking connecting device) that connects to another LAN or WAN. A point-to-point WAN is typically a telephone or cable TV line that connects a home computer or a small LAN to an Internet service provider (lSP). This WAN is frequently used to provide Internet access.
X.25, a network designed to connect end users, is an early example of a switched WAN. X.25 is gradually being phased out in favour of Frame Relay, a faster and more efficient network. The asynchronous transfer mode (ATM) network, which uses fixed-size data unit packets called cells, is a good example of a switched WAN. Another type of WAN is the wireless WAN, which is becoming increasingly popular.

Figure 11 WANs: a switched WAN and a point-to-point WAN

Metropolitan Area Networks 

A metropolitan area network (MAN) is a network that is between a local area network (LAN) and a wide area network (WAN). It usually refers to the area within a town or city. It is intended for customers who require high-speed Internet connectivity and have endpoints spread across a city or part of a city. A good example of a MAN is the portion of the telephone company network that can provide the customer with a high-speed DSL line. Another example is the cable TV network, which was originally intended for cable TV but is now used for high-speed data connections to the Internet.


Today, it is uncommon to see a LAN, MAN, or LAN operating in isolation; they are all interconnected. When two or more networks are linked, they form an internetwork, also known as the internet. Assume that an organisation has two offices, one on the east coast and one on the west coast. The established west coast office has a bus topology LAN, while the newly opened east coast office has a star topology LAN. The company's president lives somewhere in the middle and needs to be able to control the company from her home. A switched WAN (operated by a service provider such as a telecom company) has been leased to create a backbone WAN for connecting these three entities (two LANs and the president's computer). However, three point-to-point WANs are required to connect the LANs to this switched WAN. As shown in Figure 12, these point-to-point WANs can be a high-speed DSL line provided by a telephone company or a cable modern line provided by a cable TV provider.

Figure 12 A heterogeneous network made of four WANs and two LANs

The Internet is a well-structured and well-organized system. We'll start with an overview of the Internet's history. Following that is a description of the Internet today. It is made up of numerous wide- and local-area networks that are linked together by connecting devices and switching stations. Today, the majority of Internet users who want to connect to the Internet use the services of Internet service providers (lSPs). International service providers, national service providers, regional service providers, and local service providers are all available. The Internet is now run by private companies rather than the government. Figure 13 depicts a conceptual (rather than a geographical) view of the Internet.

Figure 13 Hierarchical organization of the Internet

Internet Service Providers Around the World
The international service providers that connect nations are at the top of the hierarchy.
Providers of National Internet Service
National Internet service providers are specialised companies that build and maintain backbone networks.

Internet Service Providers in Your Area
Regional internet service providers (ISPs) are smaller ISPs linked to one or more national ISPs. They are at the third level of the hierarchy and have a lower data rate.

Internet Service Providers
End users receive direct service from local Internet service providers. Local ISPs can be linked to regional ISPs or to national ISPs directly. The majority of end users are connected to local ISPs. Each of these local ISPs can be linked to a regional or national network.

Communication occurs in computer networks between entities from different systems. An entity is anything that can send or receive information. However, two entities cannot simply exchange bit streams and expect to be understood. To communicate, the entities must agree on a protocol. A protocol is a set of rules that govern the transmission of data. What is communicated, how it is communicated, and when it is communicated are all defined by a protocol. Syntax, semantics, and timing are the three most important aspects of a protocol.

The term syntax refers to the data's structure or format, or the order in which it is presented. A simple protocol might expect the first 8 bits of data to be the sender's address, the second 8 bits to be the receiver's address, and the rest of the stream to be the message itself.
Semantics. The term semantics refers to the meaning of each bit section. How should a specific pattern be interpreted, and what action should be taken based on that interpretation? For example, does an address specify the route to be taken or the message's final destination?
Timing. Timing refers to two aspects: when data should be sent and how quickly it can be sent. For example, if a sender generates data at 100 Mbps but the receiver can only process data at 1 Mbps, the transmission will overload the receiver, resulting in data loss.

Network Models

Different entities build computer networks. Standards are required for these disparate networks to communicate with one another. The OSI model and the Internet model are the two most well-known standards. The OSI (Open Systems Interconnection) model specifies a seven-layer network, whereas the Internet standard specifies a five-layer network.

The OSI Model

The Open Systems Interconnection model is an ISO standard that covers all aspects of network communications. The OSI model's purpose is to demonstrate how to facilitate communication between different systems without requiring changes to the underlying hardware and software logic. The OSI model is not a protocol; it is a model for understanding and designing a flexible, robust, and interoperable network architecture.
The OSI model is a layered framework for network system design that enables communication between various types of computer systems. It is made up of seven distinct but related layers, each of which defines a different aspect of the process of moving data across a network.

Figure 2.3 The interaction between layers in the OSI model

Architecture with Layers The OSI model is organised into seven layers: physical (layer 1), data link (layer 2), network (layer 3), transport (layer 4), session (layer 5), presentation (layer 6), and application (layer 7). (layer 7). Figure 2.3 depicts the layers involved in sending a message from device A to device B. Each layer specifies a set of functions. Each layer within a single machine uses the services of the layer below it. Layer 3, for example, uses layer 2's services and provides services to layer 4. Layer x communicates with layer x on another machine between machines. This communication is governed by protocols, which are a set of agreed-upon rules and conventions. Peer-to-peer processes are the processes on each machine that communicate at a specific layer.

Peer-to-Peer Processes

Device A sends a stream of bits to device B in Figure 2.3. (through intermediate nodes). Each layer in the sending device adds its own information to the message received from the layer above it before passing the entire package to the layer below it.
The message is unwrapped layer by layer at the receiving machine, with each process receiving and removing the data intended for it. Layer 2 removes the data intended for it, then passes the rest to layer 3. Layer 3 then removes the data that was intended for it and passes the remainder to Layer 4, and so on.

Interfaces between Layers
An interface allows data and network information to be passed down through the layers of the sending device and back up through the layers of the receiving device. Each interface specifies the data and services that a layer must provide to the layer above it.

The Layers' Organization
The seven layers can be classified into three subgroups. The network support layers are Layers I, 2, and 3 (physical, data link, and network); they deal with the physical aspects of moving data from one device to another (such as electrical specifications, physical connections, physical addressing, and transport timing and reliability). Layers 5, 6, and 7 (session, presentation, and application) are the user support layers; they enable interoperability between unrelated software systems. Layer 4, the transport layer, connects the two subgroups and ensures that the lower layers' transmissions are in a format that the upper layers can understand. Upper OSI layers are almost always implemented in software; lower layers, with the exception of the physical layer, are a combination of hardware and software. In Figure 2.4, which depicts the OSI layers in general, D7 denotes the data unit at layer 7, D6 the data unit at layer 6, and so on. The procedure begins at layer 7 (the application layer) and progresses from there.The process begins at layer 7 (the application layer) and proceeds in descending, sequential order. A header, or possibly a trailer, can be added to the data unit at each layer. Typically, the trailer is only added at layer 2. The formatted data unit is converted into an electromagnetic signal and transported along a physical link as it passes through the physical layer (layer 1).
When the signal arrives at its destination, it enters layer 1 and is converted back into digital form. The data units then progress back up the OSI layers. When a data block reaches the next higher layer, the headers and trailers attached to it at the sending layer are removed, and the appropriate layer actions are taken. When it reaches layer 7, the message is in a format suitable for the application and is made available to the recipient.

A level 7 packet (header and data) is encapsulated in a level 6 packet. The entire level 6 packet is encapsulated in a level 5 packet, and so on. The data portion of a packet at level N - 1 transports the entire packet (data, header, and possibly trailer) from level N. Encapsulation is the concept; level N - 1 is unaware of which part of the encapsulated packet is data and which part is the header or trailer, which are treated as one integral unit.

Layers in the Osi Model

The Physical Layer The physical layer coordinates the functions needed to transport a bit stream across a physical medium. It also specifies the procedures and functions that physical devices and interfaces must carry out in order for transmission to Occur to occur. In addition, the physical layer is concerned with the following:

Interface and medium physical properties

The physical layer specifies the interface between the devices and the transmission medium. It also specifies the medium of transmission.

Bit Representation
The physical layer data consists of an uninterpreted stream of bits (a sequence of Os or 1s). Bits must be encoded into electrical or optical signals before they can be transmitted. The type of encoding is determined by the physical layer (how Os and Is are changed to signals).

Data transfer rate
The physical layer also defines the transmission rate—the number of bits sent per second.
Bit synchronisation. The sender and receiver must not only use the same bit rate, but they must also be bit-synchronized.
Line arrangement The physical layer is responsible for connecting devices to the media. A dedicated link connects two devices in a point-to-point configuration. A link is shared among several devices in a multipoint configuration.

Topology of matter
The physical topology specifies how devices are connected to form a network. The physical layer also specifies the transmission direction between two devices, which can be simplex, half-duplex, or full-duplex.

The Data Link Layer

The data link layer is in charge of transferring frames from one hop (node) to the next. The data link layer is also responsible for the following tasks:
Framing. The data link layer divides the network layer's stream of bits into manageable data units called frames.

Physical location
The data link layer appends a header to the frame to identify the sender and/or receiver.
Flow control. To avoid overloading the receiver, the data link layer imposes a flow control mechanism if the rate at which data are absorbed by the receiver is less than the rate at which data are produced in the sender.

Error Control
The data link layer improves the physical layer's reliability by including mechanisms for detecting and retransmitting damaged or lost frames. It also employs a mechanism to detect duplicate frames. Normally, error control is accomplished by adding a trailer to the end of the frame.
Access Control. When two or more devices share a link, the data link layer determines which device has control of the link at any given time.

Figure 2.7 Hop-fa-hop delivery

Communication at the data link layer occurs between two adjacent nodes, as shown in the diagram. Three partial deliveries are made to send data from A to F. First, data link layer A sends a frame to data link layer B. (a router). Second, the data link layer at B communicates with the data link layer at E by sending a new frame. Finally, the data link layer at E communicates with the data link layer at F by sending a new frame.

Network Layer

The network layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links). Whereas the data link layer oversees the delivery of the packet between two systems on the same network (links), the network layer ensures that each packet gets from its point of origin to its final destination. If two systems are connected to the same link, there is usually no need for a network layer. However, if the two systems are attached to different networks (links) with connecting devices between the networks (links), there is often a need for the network layer to accomplish source-to-destination delivery. 
Individual packets must be delivered from the source host to the destination host via the network layer. The network layer also has the following responsibilities:

Logical addressing
The data link layer's physical addressing solves the addressing problem on a local level. We need another addressing system to help distinguish the source and destination systems whenever a packet crosses the network boundary. The network layer adds a header to the packet coming from the top layer that includes the sender and receiver's logical addresses, among other things.

When multiple networks or links are linked together to form an internetwork (network of networks) or a big network, the connecting devices (known as routers or switches) route or switch packets to their eventual destination. The packet is sent from network layer A to network layer B. When the packet arrives at router B, the router decides what to do with it based on the packet's eventual destination (F). Router B utilizes its routing table to determine that router E is the next hop. As a result, the network layer at B transfers the packet to the network layer at E. The packet is sent to the network layer at F by the network layer at E.

Transport Layer 

The transport layer is in charge of delivering the full message from process to process. A process is a computer programme that runs on a server. While the network layer is in charge of ensuring that individual packets are delivered from point A to point B, it is unaware of any relationships between those packets. It treats each one separately, as if each piece belonged to a different message, which it does not. The transport layer, on the other hand, oversees both error control and flow management at the source-to-destination level, ensuring that the entire message arrives intact and in sequence.
The transport layer also has the following responsibilities:

Addressing of service points Several apps are frequently run at the same time on computers. As a result, source-to-destination delivery encompasses not just distribution from one computer to the next, but also delivery from one computer's specific process (running programme) to another's specific process (running programme). As a result, a form of address known as a service-point address must be included in the transport layer header (or port address). Each packet is delivered to the correct computer by the network layer, and the full message is delivered to the correct process on that computer by the transport layer.

Segmentation and reassembly
A message is broken down into transmittable parts, each with its own sequence number. These numbers allow the transport layer to accurately reassemble the message once it arrives at its destination, as well as identify and replace packets lost during transmission.

Connection control
Connectionless or connection-oriented transport layers are both possible. A connectionless transport layer interprets each segment as a separate packet and sends it to the destination machine's transport layer. Before delivering packets, a connection oriented transport layer establishes a link with the transport layer at the target computer. The connection is terminated once all of the data has been transferred.

Flow control
The ability to control the flow of information. The transport layer, like the data connection layer, is in charge of flow control. Flow control at this layer, on the other hand, is done end to end rather than across a single link.

Error control
Error detection and correction. The transport layer, like the data connection layer, is in charge of error control. At this layer, however, error control is done process per process rather than over a single link. The sending transport layer ensures that the complete message is delivered without error to the receiving transport layer (damage, loss, or duplication).

Session Layer 

For some processes, the services supplied by the first three levels (physical, data connection, and network) are insufficient. The session layer is in charge of dialogue synchronization and control.
The session layer's specific tasks include the following:

Control of the dialogue
The session layer allows two systems to communicate with each other. It enables half-duplex (one way at a time) or full-duplex (two ways at a time) communication between two processes.

Synchronization is a term used to describe the process of synchronising two or A process can use the session layer to add checkpoints, or synchronisation points, to a data stream.

Presentation layer

Translation, compression, and encryption are all handled by the presentation layer. The presentation layer's specific tasks include the following:

In most cases, two systems' processes (running programmes) exchange data in the form of character strings, numbers, and so on. Before being transferred, the data must be converted to bit streams.

Encryption is a security feature
A system must be able to maintain privacy when transporting sensitive data. Encryption refers to the process by which the sender converts the original data into a different format and then delivers the resulting message over the network. Decryption reverses the encryption process, restoring the communication to its original state.

Data compression is the process of reducing the amount of bits in a piece of data. The transmission of multimedia, such as text, music, and video, necessitates the
use of data compression.

Application Layer 

The application layer allows the user to connect to the internet. It provides user interfaces and support for a variety of distributed information services, including electronic mail, remote file access and transfer, shared database administration, and other forms of distributed information services. The application layer is in charge of offering user services.
The following are some of the services provided by the application layer:

A virtual terminal that can be shared over a network. A network virtual terminal is a software equivalent to a physical terminal that allows a user to connect to a remote host.

File transfer, management, and access. This application enables a user to view files on a distant computer, extract files from a remote computer for use on a local computer, and manage or control files on a remote computer from a local computer.

Mail delivery services This programme is the foundation for e-mail forwarding and storage.

Directory services are available. This application allows access to global information about numerous objects and services from dispersed database sources.

TCP/IP Protocol Suite 

Prior to the OSI paradigm, the TCP/IP protocol suite was created. As a result, the TCP/IP protocol suite's layers do not perfectly match those of the OSI model. The four layers of the TCP/IP protocol suite were originally defined as host-to-network, internet, transport, and application. When comparing TCP/IP to the OSI model, we may conclude that the host-to-network layer is similar to the physical and data connection layers together. The internet layer is the network layer's counterpart, while the application layer performs the functions of the session, presentation, and application layers, with the transport layer in TCP/IP handling some of the session layer's responsibilities. We'll suppose the TCP/IP protocol suite consists  of five layers: physical, data connection, network, transport, and application.
TCP/IP is a hierarchical protocol made up of interacting modules that each perform a specialised function; however, the modules are not always interconnected. The levels of the TCP/IP protocol suite contain relatively independent protocols that can be mixed and matched depending on the needs of the system, unlike the OSI model, which specifies which functions belong to each of its layers. Each upper-level protocol is supported by one or more lower-level protocols, which is referred to as hierarchical.

TCP/IP defines three protocols at the transport layer: Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Stream Control Transmission Protocol (SCTP) (SCTP). The Internetworking Protocol (IP) is the main protocol defined by TCP/IP at the network layer; other protocols that facilitate data flow are also established at this layer.

Physical and Data Link Layers

TCP/IP does not specify any protocol at the physical or data link layers. All standard and proprietary protocols are supported.
Network Layer 
TCP/IP supports the Internetworking Protocol at the network layer (or, more precisely, the internetwork layer). ARP, RARP, ICMP, and IGMP are the four supporting protocols used by IP.
Internetworking Protocol (IP)
The TCP/IP protocols use the Internetworking Protocol (IP) as its transmission mechanism. It's a shaky protocol that doesn't require any connections. IP carries data in packets called datagrams, which are sent one at a time. Datagrams can take a variety of paths, arriving out of order or being duplicated. IP does not maintain track of routes and does not allow datagrams to be reordered once they arrive at their destination.

Address Resolution Protocol 
A logical address is associated with a physical address via the Address Resolution Protocol (ARP). Each device on a link on a conventional physical network, such as a LAN, is identifiable by a physical or station address, which is normally imprinted on the network interface card (NIC). When a node's Internet address is known, ARP is used to determine the node's physical address.

Reverse Address Resolution Protocol
When a host just knows its physical address, the Reverse Address Resolution Protocol (RARP) allows it to obtain its Internet address.

Internet Control Message Protocol (ICMP)
The Internet Control Message Protocol (ICMP) is a protocol that allows hosts and gateways to notify senders of datagram faults.

Internet Group Message Protocol (IGMP)
The Internet Group Message Protocol (IGMP) is a protocol that allows a message to be sent to a group of people at the same time.

Transport layer
In TCP/IP, the transport layer was traditionally represented by two protocols: TCP and UDP. IP is a host-to-host protocol, which means it may transport data from one physical device to another. UDP and TCP are transport level protocols that allow a message to be sent from one process (running programme) to another. SCTP, a new transport layer protocol, was created to fulfil the requirements of some emerging applications.

The User Datagram Protocol (UDP)
The User Datagram Protocol (UDP) is the more straightforward of the two TCP/IP transport protocols. Only port addresses, checksum error control, and length information are added to the data from the higher layer in this process-to-process protocol.

Transmission Control Protocol
The Transmission Control Protocol (TCP) provides applications with full transport-layer functions. TCP is a dependable protocol for transporting streams. In this usage, the term stream refers to a connection-oriented transmission, in which both endpoints of a transmission must establish a connection before either can transfer data. TCP breaks a stream of data into smaller units called segments at the sending end of each transmission. Each segment has a sequence number that can be used to reorder segments after they've been received, as well as an acknowledgment number for the segments that have been received. IP datagrams are used to transport segments across the internet. TCP collects each datagram as it arrives at the receiving end and reorders the transmission based on sequence numbers.

Stream Control Transmission Protocol
Newer applications, such as telephony over the Internet, are supported via the Stream Control Transmission Protocol (SCTP). It's a transport layer protocol that combines UDP and TCP's greatest characteristics.

Application Layer
TCP/application IP's layer is equal to the OSI modeL's combined session, presentation, and application layers. At this layer, many protocols are defined.