1 of 27

https://www.tcetmumbai.in/EXTC/Syllabus/Autonomy/TE%20Sem%20VI_Syllabus.pdf

2 of 27

���Computer Communication Networks � �

Module 1: Introduction

3 of 27

Contents

  • Network Applications
  • Network Hardware
  • Network Software
  • Reference Models
  • Overview of TCP/IP
  • Layer Functions
  • Services
  • Sockets and ports
  • Encapsulation

4 of 27

Basic introduction to a network

  • Network is simply defined as something that connects things together for a specific purpose
  • The term network is used in a variety of contexts, including telephone, television, computer, or even people networks

5 of 27

Applications of Networks

Business applications

Resource sharing

Information sharing

VPNs

Email communication

IP telephony

Home applications

Internet access

    • Peer-to-peer communication
    • Social media
    • Instant messaging
    • E-commerce
      • Business-to-consumer
      • Business-to-business
      • Government-to-consumer
      • Consumer-to-consumer

Ubiquitous computing

Mobile users

Cellular networks

Communication through wireless hotspots

m-Commerce

Wearable devices

6 of 27

Network Hardware �

7 of 27

Network hardware (Contd..)

Hubs

Gateways

Router

Repeater

Bridge

Switch

They are generally used to connect computers in a LAN

A gateway is a network node that forms a passage between two networks operating with different transmission protocols

Routers are networking devices operating at layer 3 or a network layer of the OSI model

Its job is to regenerate the signal over the same network before the signal becomes too weak or corrupted so as to extend the length to which the signal can be transmitted over the same network

A bridge is a network device that connects multiple LANs (local area networks), that has a similar protocol, together to form a larger LAN

It is an intelligent network device that uses MAC addresses (addresses of medium access control sublayer) to send data packets to selected destination ports

A hub has many ports in it. A computer which intends to be connected to the network is plugged in to one of these ports

Gateway is located at the boundary of a network and manages all data that inflows or outflows from that network

They are responsible for receiving, analyzing, and forwarding data packets among the connected computer networks

Repeaters do not amplify the signal. When the signal becomes weak, they copy the signal bit by bit and regenerate it at the original strength

By joining multiple LANs, bridges help in multiplying the network capacity of a single LAN

It is supports unicast (one-to-one), multicast (one-to-many) and broadcast (one-to-all) communications

A hub cannot filter data. It is a non-intelligent network device that sends message to all ports

The feature that differentiates a gateway from other network devices is that it can operate at any layer of the OSI model

 When a data packet arrives, the router inspects the destination address, consults its routing tables to decide the optimal route and then transfers the packet along this route

It primarily broadcasts messages

They are passive devices and don’t have any software associated with it

8 of 27

Network hardware

9 of 27

Network software

  • Most networks are organized as a stack of layers or levels, each one built upon the one below it
  • The number of layers, the name of each layer, the contents of each layer, and the function of each layer differ from network to network
  • The purpose of each layer is to offer certain services to the higher layers while shielding those layers from the details of how the offered services are implemented
  • In a sense, each layer is a kind of virtual machine, offering certain services to the layer above it
  • When layer n on one machine carries on a conversation with layer n on another machine, the rules and conventions used in this conversation are collectively known as the layer n protocol
    • Basically, a protocol is an agreement between the communicating parties on how communication is to proceed
    • Violating the protocol will make communication more difficult, if not completely impossible

10 of 27

Network software (Contd..)

  • The entities comprising the corresponding layers on different machines are called peers
  • The peers may be software processes, hardware devices, or even human beings
  • In other words, it is the peers that communicate by using the protocol to talk to each other
  • No data are directly transferred from layer n on one machine to layer n on another machine
  • Instead, each layer passes data and control information to the layer immediately below it, until the lowest layer is reached
  • Below layer 1 is the physical medium through which actual communication occurs
  • Virtual communication is shown by dotted lines and physical communication by solid lines
  • Between each pair of adjacent layers is an interface.
  • The interface defines which primitive operations and services the lower layer makes available to the upper one
  • Interfaces minimize the amount of information that must be passed between layers
  • A set of layers and protocols is called a network architecture
  • The specification of an architecture must contain enough information to allow an implementer to write the program or build the hardware for each layer so that it will correctly obey the appropriate protocol
  • A list of the protocols used by a certain system, one protocol per layer, is called a protocol stack

11 of 27

Reference models

  • There are two important network architectures
    • OSI (Open Systems Interconnections) reference model
    • TCP/IP reference model

12 of 27

OSI model

  • An open system is a set of protocols that allows any two different systems to communicate regardless of their underlying architecture
  • The purpose of the OSI model is to show how to facilitate communication between different systems without requiring changes to the logic of the underlying hardware and software
  • The OSI model is not a protocol; it is a model for understanding and designing a network architecture that is flexible, robust, and interoperable
  • The OSI model is a layered framework for the design of network systems that allows communication between all types of computer systems
  • It consists of seven separate but related layers, each of which defines a part of the process of moving information across a network

13 of 27

OSI model: Organization of the 7 layers

Physical, data link, network layers together acting as the ‘NETWORK SUPPORT LAYERS’

Session, Presentation, application layers together acting as the ‘USER SUPPORT LAYERS’

Transport

layer

Links the two subgroups and ensures that what the lower layers have transmitted is in a form that the upper layers can use

Deals with the physical aspects of moving data from one device to another

Allows interoperability between unrelated software systems

14 of 27

OSI model: Details of each layer https://www.youtube.com/watch?v=vv4y_uOneC0

Physical

Data link

Network

Transport

Session

Presentation

Application

Coordinates the movement of a bit stream

Makes the physical layer appear error-free to the upper layer

Responsible for source-to-destination delivery of packets

Responsible for process-to-process delivery of the message

Establishes, maintains and synchronizes the interaction between communicating systems

Concerned with the syntax and semantics of the information

Enables the user, whether human or software, to access the network

Defines the characteristics of the interface

Divides the stream of bits into frames

Performs logical addressing

Divides a given message into transmittable segments

Allows two systems to enter into a dialog

Responsible for interoperability between devices using different encoding systems

Supports services such as electronic mail, remote file access and transfer, shared database management etc.

Defines how 0s and 1s can be encoded

Imposes a flow control mechanism

Provides the mechanism of routing

Performs either connectionless or connection-oriented delivery

Allows a process to add checkpoints (synchronization points) into a stream of data

Assures privacy

Concerned with the connection of the devices to the media

Helps detect and retransmit damaged or lost frames as also recognize duplicate frames

Performs flow control but end to end rather than across a single link

Allows data compression while transmitting text, audio and video

Defines how the devices are connected to make a network

Determines which device has control over the link

Responsible for error control

Defines the direction of transmission

15 of 27

Different network topologies

Bus topology

Star topology

Ring topology

Mesh topology

16 of 27

TCP/IP reference model

  • It’s a five-layer model with the layer names like the ones in the OSI model
  • Observations:
      • Two layers, session and presentation are missing
      • Application layer considered as combination of 3 layers in the OSI model
  • Some of the functionalities of the session layer are available in some of the transport layer protocols

  • Application layer is just not one piece of software but a medium where many applications can be developed;
    • Therefore, if some of the functionalities mentioned in the session and presentation are needed for a particular application, it can be included in the development of the application layer itself

  • Modules of TCP/IP are not interdependent
    • OSI model specifies which protocol belong to each of its layers; however the layers of TCP/IP contain relatively independent protocols that can be mixed and matched

17 of 27

TCP/IP model: Details of each layer

Physical

Data link

Network

Transport

Application

TCP/IP does not define any specific protocol for the physical layer i.e., it supports all the standard and proprietary protocols

TCP/IP does not define any specific protocol for the data link layer

Also called as the internetwork layer

All nodes in a network need to have the network layer, only the two end computers need to have the transport layer

This layer is equivalent to the combined session, presentation and application layers in the OSI model

Unit of communication is a single bit

The unit of communication is a frame

TCP supports Internet Protocol (IP)

The unit of communication is a segment

The unit of communication at the application layer is a message

The responsibility of the physical layer is delivery of bits

At the data link layer, two nodes communicate logically but not physically

IP transports data in the form of packets called datagrams

Here again the communication is logical not physical

Communication at the application layer is end to end

The other functionalities matches with what is mentioned for the physical layer of the OSI model

Communication at network layer differs from the communication at the data link or physical layer wherein the communication at the network layer is end to end while the communication at the remaining two are node to node

The transport layer is represented by two protocols: UDP and TCP

Here again the communication is logical not physical

18 of 27

Communication at data link layer

Communication at network layer

Communication at transport layer

19 of 27

Addressing in TCP/IP architecture

Physical address

Logical address

Port address

Application specific address

Also called as MAC address, it is a unique address provided by the device's vendor at the time of manufacturing and embedded in its NIC (Network Interface Card)

Also called as IP address, is the identifier that enables your device to send or receive data packets across the internet

Port number identifies a specific process to which an Internet or other network message is to be forwarded when it arrives at a server

 User-friendly addresses that are designed for that specific application

It is 12 digit and 48 bits long

It is 32 bits long and is expressed in the form of four pairs

It is 16 bits long

E.g.: 00:0a:95:9d:67:16

E.g. 192.16.100.1

E.g. 80 for HTTP, 123 for NTP, 67 and 68 for DHCP traffic, 22 for SSH etc

E.g. e-mail address, Universal Resource Locator

Application-Specific addresses

Port addresses

Logical addresses

Physical addresses

20 of 27

Services

  • A service is specified by a set of operations available to user processes to access the service
  • These operations tell the service to perform some action or report on an action taken by a peer entity
  • The set of operations available depends on the nature of the service being provided.
  • The operations for connection-oriented service are different from those of connectionless service
  • These operations might be used for a request-reply interaction in a client-server environment

21 of 27

Services (Contd..)

  • The service defines what operations the layer is prepared to perform on behalf of its users, but it says nothing at all about how these operations are implemented while a protocol, in contrast, is a set of rules governing the format and meaning of the packets, or messages that are exchanged by the peer entities within a layer
    • Services relate to the interfaces between layers while protocols relate to the packets sent between peer entities on different machines

22 of 27

Sockets and ports: Ports

  • The end objective of internet communication is a process communicating with another process
  • For more than one process to be received simultaneously a method of labeling different processes is required
  • In TCP/IP architecture, the labels assigned are called as port address (or port number)
  • Some important points to be remembered:
    • Transport layer is the layer providing process-to-process communication
    • In any client/server application, a server process waits for incoming requests by listening to a port
      • A port is an address that identifies which process is to receive a message
    • Client host and server host are defined using IP addresses, however processes running between these hosts is defined by another set of identifiers called as port numbers
    • In TCP/IP protocol suite, port numbers are integers between 0 and 65,535

23 of 27

Sockets and ports: Ports

  • ICANN i.e. Internet Corporation for Assigned Names and Numbers has divided port numbers into three ranges:
    • Well-known ports: The ports ranging from 0 to 1023 are assigned and controlled by ICANN
      • TCP/IP has decided to use universal port numbers for servers
    • Registered ports: The ports ranging from 1024 to 49151 are not assigned or controlled by ICANN
      • These are only registered with ICANN to prevent duplication
      • Client end defines itself by the ephemeral port number
    • Dynamic ports: The ports ranging from 49152 to 65535 are neither controlled nor registered
      • They can be used as temporary or private port numbers
      • Client end defines itself by the ephemeral port number
    • https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
    • IP address defines the host among the different hosts in the world and after the host has been selected, the port number defines one of the processes on this particular host

24 of 27

Sockets and ports: Sockets

  • For a client process to communicate with a server process following needs to be done
    • A client process is nothing but a set of predefined instructions telling the client host what to do
    • This set of instructions is needed:
      • to tell the transport layer to open the connection
      • send data to other end
      • receive data from the other end
      • close the connection
  • This set of instructions designed for interaction between two entities is called an interface
  • Network communication at the application layer is dealt with by the Socket interface
  • The socket interface, as a set of instructions, is located between the operating system and the application program.
  • To access the services provided by the TCP/IP protocol suite, an application needs to use the instructions defined in the socket interface

25 of 27

Sockets and ports: Sockets (Contd..)

The interaction between a process and the OS is done through a list of predefined functions:

  • The socket function

int socket(int family, int type, int protocol)

      • The bind function

int bind(int sockfd, const struct sockaddress* localAddress, socklen_t addreLen)

      • The connect function

int connect(int sockfd, const struct sockaddress* remoteAddress, socklen_t addreLen)

      • The listen function

int listen(int sockfd, int backlog)

      • The accept function

int accept(int sockfd, const struct sockaddress* clientAddr, socklen_t addreLen)

      • The fork function
      • The close function
      • The send and recv functions
      • The sendto and recvfrom functions
      • .
      • .

26 of 27

Encapsulation

  • Involves appending additional information to the message at a given layer (say x) which is moving down from an immediate upper layer (x+1)
  • The appended information allows the receiver side layer x to deliver the message up to the appropriate application
    • The appended information might also include error detection bits that allows the receiver to determine whether bits in the message have been changed in the route
  • Encapsulation reduces the dependencies between adjacent layers to service definition only
    • I.e. layer x+1 as a user of the service provided by layer x is only interested in the correct execution of the service required to transfer its message

An exchange using the OSI model

27 of 27

Encapsulation (Contd..)

  • Significance of encapsulation