CN Unit 1
CN Unit 1
NETWORKS: Distributed Processing, Network Criteria, Physical Structures, Network Models, Categories of Networks.
LAYERS IN THE OSI MODEL: Physical Layer, Data Link Layer, Network Layer, Transport Layer
TCP/IP PROTOCOL SUITE: Physical and Data Link Layers, Network Layer, Transport Layer, Application Layer.
ADDRESSING: Physical Addresses, Logical Addresses, Port Addresses, and Specific Addresses
Book: Data Communication and Networking Behrouz A. Forouzan Tata McGraw-Hill.4th Edition
Introduction to Data Communication
Basics:
1. What is data?
2. What is Communication?
3. What is data communication?
4. What is the need for data communication?
Data
Meaning or information
1. Analog data - Varies continuously with respect to time eg: Voice, pressure, temperature,
video
2. Digital data - Discrete values eg: Text and Integers.
Data Communication
Facilitate the exchange of data.
1) Delivery
2) Accuracy
3) Timeliness
4) Jitter
Components
Components of Communication System
• Five components of a communication-system :
1) Message
2) Sender
3) Receiver
4) Transmission-Medium
5) Protocol
Data Representation
1. Text
a. Bit pattern
b. Sequence of bits ( 0 101 01 0 0)
2. Numbers
a. Numbers are also directly converted to binary numbers.
b. ASCII values are not considered.
3. Image
a. Matrix of pixels
b. Bit pattern
c. Size of image depends on pixels
Two types of images:
i) Black & White Image
¤ If an image is black & white, each pixel can be represented by a value either 0 or 1.
¤ For example: Chessboard
Video
Video is a representation of movie.
Video can either
→ be produced as a continuous entity (e.g., by a TV camera), or
→ be a combination of images arranged to convey the idea of motion.
Direction of Data Flow
Performance
Performance can be measured using
i) Transit-time
ii) Response-time
iii) Throughput
iv) Delay
Good performance can be obtained by achieving higher throughput and smaller delay times
Security
Security refers to the protection of data from the unauthorized access or damage.
It also involves implementing policies for recovery from data-losses.
Types of Connection
Structure
Physical Structures
Type of Connection
• Two types of connections :
1) Point-to-Point
Only two devices are connected by a dedicated-link
Entire-capacity of the link is reserved for transmission between those two devices.
For example: Point-to-Point connection b/w remote-control & TV for changing the channels.
2) Multipoint (Multi-Drop)
Three or more devices share a single link.
The capacity of the channel is shared, either spatially or temporally
i) If link is used simultaneously by many devices, then it is spatially shared connection.
ii) If user takes turns while using the link, then it is time shared (temporal) connection.
Physical Topology
• Advantages:
1) Easy installation.
2) Cable required is the least compared to mesh/star topologies.
3) Redundancy is eliminated.
4) Costs less (Compared to mesh/star topologies).
5) Mostly used in small networks. Good for LAN.
• Disadvantages:
1) Difficult to detect and troubleshoot fault.
2) Signal reflection at the taps can cause degradation in quality.
3) A fault/break in the cable stops all transmission.
4) There is a limit on
i) Cable length
ii) Number of nodes that can be connected.
5) Security is very low because all the devices receive the data sent from the source.
Ring Topology
• Each device is connected to the next, forming a ring.
• Data travels around the network in one direction till the destination is reached.
• Sending and receiving of data takes place by the help of token.
• Each device has a repeater.
Advantages:
1. Easy installation and reconfiguration.
2. Fault isolation is simplified.
3. Congestion reduced
Disadvantages:
1. Unidirectional traffic.
2. A fault in the ring/device stops all transmission.
3. Slower
Star Topology
• All the devices are connected to a central controller called a hub.
• Dedicated point-to-point link between a device & a hub.
• No direct traffic between devices.
• The hub acts as a junction:
Advantages:
1) Less expensive
2) Easy installation & re-configuration
3) Robustness
4) Easy to detect and troubleshoot fault.
5) Centralized management
• Disadvantages:
1) Single point of failure
2) Cable length required is the more compared to bus/ring topologies.
3) Number of nodes in network depends on capacity of hub.
Mesh Topology
• All the devices are connected to each other .
• There exists a dedicated point-to-point link between all devices.
• There are n(n-1) physical channels to link n devices.
• Every device not only sends its own data but also relays data from other nodes.
• For ‘n’ nodes,
→ there are n(n-1) physical-links
→ there are n(n-1)/2 duplex-mode links
• Every device must have (n–1) I/O ports to be connected to the other (n-1) devices.
• Advantages:
1) Congestion reduced
2) Robustness
3) Security
4) Easy fault identification & fault isolation
• Disadvantages:
1) Difficult installation and reconfiguration.
2) Bulk of wiring occupies more space than available space.
3) Very expensive
4) Not mostly used in computer networks.
5) High redundancy of the network-connections.
Network Types
• Two popular types of networks:
1) LAN (Local Area Network) &
2) WAN (Wide Area Network)
LAN
• LAN is used to connect computers in a single office, building or campus
• LAN is usually privately owned network.
• A LAN can be simple or complex.
• Each host in a LAN has an address that uniquely defines the host in the LAN.
• A packet sent by a host to another host carries both source host’s and destination host’s addresses.
• LANs use a smart connecting switch.
→ recognize the destination address of the packet &
→ guide the packet to its destination.
→ reduces the traffic in the LAN &
→ allows more than one pair to communicate with each other at the same time.
• Advantages:
1) Resource Sharing
Computer resources like printers and hard disks can be shared by all devices on the network.
2) Expansion
Nowadays, LANs are connected to WANs to create communication at a wider level.
WAN
WAN interconnects connecting devices such as switches, routers, or modems.
• Normally, WAN is
→ created & run by communication companies (Ex: BSNL, Airtel)
→ leased by an organization that uses it.
Point-to-Point WAN
A point-to-point WAN is a network that connects 2 communicating devices through a transmission media
Switched WAN
A switched WAN is a network with more than two ends.
The switched WAN can be the backbones that connect the Internet.
A switched WAN is a combination of several point-to-point WANs that are connected by switches
Internetwork:
Example:
When a host in the west coast office sends a message to another host in the same office, the router blocks the
message, but the switch directs the message to the destination.
On the other hand, when a host on the west coast sends a message to a host on the east coast, router R1
routes the packet to router R2, and the packet reaches the destination.
Switching
• An internet is a switched network in which a switch connects at least two links together.
• A switch needs to forward data from a network to another network when required.
• Two types of switched networks are 1) circuit-switched and 2) packet-switched networks.
Advantage:
A circuit-switched network is efficient only when it is working at its full capacity.
Disadvantage:
Most of the time, the network is inefficient because it is working at partial capacity.
Packet Switched Network
In a computer network, the communication between the 2 ends is done in blocks of data called packets.
The switch is used for both storing and forwarding because a packet is an independent entity that can be
stored and sent later.
¤ A router has a queue that can store and forward the packet.
¤ The high-capacity line has twice the capacity of the low-capacity line.
¤ If only 2 computers (one at each site) need to communicate with each other, there is no waiting for
the packets.
¤ However, if packets arrive at one router when high-capacity line is at its full capacity, the packets
should be stored and forwarded.
Advantages:
A packet-switched network is more efficient than a circuit switched network.
Disadvantage:
The packets may encounter some delays.
Internet
● A network is a group of connected, communicating devices such as computers and printers.
● An internet is two or more networks that can communicate with each other.
● The most notable internet is called the internet, composed of hundreds of thousands of
interconnected networks.
Standards
Standards are developed through the cooperation of standards creation committees, forums, and
government regulatory agencies.
An Internet standard is a thoroughly tested specification that is useful to and adhered to by those who
work with the Internet.
An Internet draft is a working document with no official status and a six-month lifetime.
Maturity Level
Requirement Level
INTERNET ADMINISTRATION
● The Internet, with its roots primarily in the research domain, has evolved and gained a broader user
base with significant commercial activity.
● Various groups that coordinate Internet issues have guided this growth and development.
● Appendix G gives the addresses, e-mail addresses, and telephone numbers for some of these groups.
Protocols
Protocols
Protocols define format, order of messages sent and received among the network entities, and action
taken on message transmission, receipt.
For instants: Specific messages sent Specific actions taken when messages received, or the other
events
Types of Protocols
Transmission Control Protocol (TCP): TCP is a popular communication protocol which is used for
communicating over a network. It divides any message into series of packets that are sent from
source to destination and there it gets reassembled at the destination.
Internet Protocol (IP): IP is designed explicitly as addressing protocol. It is mostly used with TCP.
The IP addresses in packets help in routing them through different nodes in a network until it
reaches the destination system. TCP/IP is the most popular protocol connecting the networks.
Types of Protocols
User Datagram Protocol (UDP): UDP is a substitute communication protocol to Transmission Control
Protocol implemented primarily for creating loss-tolerating and low-latency linking between different
applications.
Post office Protocol (POP): POP3 is designed for receiving incoming E-mails.
Types of Protocols
Simple mail transport Protocol (SMTP): SMTP is designed to send and distribute outgoing E-Mail.
File Transfer Protocol (FTP): FTP allows users to transfer files from one machine to another. Types of files may
include program files, multimedia files, text files, and documents, etc.
Hyper Text Transfer Protocol (HTTP): HTTP is designed for transferring a hypertext among two or more systems.
HTML tags are used for creating links. These links may be in any form like text or images. HTTP is designed on
Client-server principles which allow a client system for establishing a connection with the server machine for
making a request. The server acknowledges the request initiated by the client and responds accordingly.
Types of Protocols
Hyper Text Transfer Protocol Secure (HTTPS): It is a standard protocol to secure the communication among
two computers one using the browser and other fetching data from web server. HTTP is used for transferring
data between the client browser (request) and the web server (response) in the hypertext format, same in case
of HTTPS except that the transferring of data is done in an encrypted format. So it can be said that https thwart
hackers from interpretation or modification of data throughout the transfer of packets.
Telnet: Telnet is a set of rules designed for connecting one system with another. The connecting process here is
termed as remote login. The system which requests for connection is the local computer, and the system which
accepts the connection is the remote computer.
Gopher: Gopher is a collection of rules implemented for searching, retrieving as well as displaying documents
from isolated sites. Gopher also works on the client/server principle.
Connection-Oriented Service
A connection-oriented service is a network service that was designed and developed after the telephone system.
A connection-oriented service is used to create an end-to-end connection between the sender and the receiver
before transmitting the data over the same or different networks.
In connection-oriented service, packets are transmitted to the receiver in the same order the sender has sent them.
It uses a handshake method that creates a connection between the user and sender for transmitting the data over
the network.
Hence it is also known as a reliable network service.
Suppose, a sender wants to send data to the receiver.
Then, first, the sender sends a request packet to a receiver in the form of an SYN packet.
After that, the receiver responds to the sender's request with an (SYN-ACK) signal/packets.
That represents the confirmation is received by the receiver to start the communication between the sender and the
receiver.
Now a sender can send the message or data to the receiver.
Similarly, a receiver can respond or send the data to the sender in the form of packets.
After successfully exchanging or transmitting data, a sender can terminate the connection by sending a signal to the
receiver. In this way, we can say that it is a reliable network service.
Connectionless Service
A connection is similar to a postal system, in which each letter takes along different route paths from the source
to the destination address.
Connectionless service is used in the network system to transfer data from one end to another end without
creating any connection.
So it does not require establishing a connection before sending the data from the sender to the receiver.
It is not a reliable network service because it does not guarantee the transfer of data packets to the receiver, and
data packets can be received in any order to the receiver.
Therefore we can say that the data packet does not follow a defined path.
In connectionless service, the transmitted data packet is not received by the receiver due to network congestion,
and the data may be lost.
Connectionless Service
For example, a sender can directly send any data to the receiver without establishing any connection because it
is a connectionless service.
Data sent by the sender will be in the packet or data streams containing the receiver's address. In
connectionless service, the data can be travelled and received in any order.
However, it does not guarantee to transfer of the packets to the right destination.
TCP (Transmission Control Protocol) is a connection-oriented protocol that allows communication between
two or more computer devices by establishing connections in the same or different networks.
It is the most important protocol that uses internet protocol to transfer the data from one end to another.
Hence, it is sometimes referred to as TCP/IP.
It ensures that the connection is established and maintained until the data packet is transferring between the
sender and receiver is complete
The UDP (User Datagram Protocol) is a connectionless protocol that allows communication between two or
more devices without establishing any connection.
In this protocol, a sender sends the data packets to the receiver that holds the destination address.
A UDP does not ensure to deliver the data packets to the correct destination, and it does not generate any
acknowledgment about the sender's data.
Similarly, it does not acknowledge the receiver about the data. Hence, it is an unreliable protocol.
Chapter 2
Network Models
LAYERED TASKS
• A protocol defines the rules that both the sender and receiver and all intermediate
●devices need to follow to be able to communicate effectively.
• When communication is
• Simple -only one simple protocol.
• complex, we need to divide the task b/w different layers. We need a protocol at each layer, or
protocol layering.
Layered tasks has 3 things: Sender, Receiver, and Carrier
LAYERED TASKS
●First Scenario
• Communication is so simple that it can occur in only one layer.
• Assume Maria and Ann are neighbours with a lot of common ideas.
•Communication between Maria and Ann takes place in one layer, face to face, in the same
language
LAYERED TASKS
●Second Scenario
• Maria and Ann communicate using regular
mail through the post office .
• However, they do not want their ideas to be
revealed by other people if the letters are
intercepted.
• They agree on an encryption/decryption
technique.
• The sender of the letter encrypts it to make it
unreadable by an intruder; the receiver of
the letter decrypts it to get the original letter.
THE OSI MODEL
The interaction between layers in the
OSI model
An exchange using the OSI model
Physical layer
Physical layer
●The physical layer is also concerned with the following
• Physical characteristics of interfaces and medium
• Representation of bits.
• Data rate
• Synchronization of bits
• Line configuration
• Physical topology.
• Transmission mode
Data link layer
Data link layer
•
•The data link layer is responsible for moving frames from one hop (node) to
the next.
•It makes the physical layer appear error-free to the upper layer
Responsibilities of the data link layer
•Framing
•Physical Addressing
•Flow Control
•Access Control
•Error Control
Hop-to-hop delivery
Network layer
Network layer
•The network layer is responsible for the delivery of
individual packets from the source host to the destination
host.
Responsibilities of the network layer
•Logical Addressing
•Routing
Source-to-destination delivery
Transport layer
Transport layer
● The transport layer is responsible for the delivery of a message
from one process to another.
responsibilities of the transport layer
• Service point addressing (Port addressing)
•Segmentation and reassembly
•Error control
•Connection control
•Flow control
Reliable process-to-process delivery of a
message
Summary of layers
TCP/IP and OSI model
TCP/IP PROTOCOL SUITE
TCP/IP protocol suite is made of five layers:
physical, data link, network, transport, and
application.
TCP/IP PROTOCOL SUITE
• TCP/IP is a protocol-suite used in the Internet today.
• Protocol-suite refers a set of protocols organized in different layers.
• It is a hierarchical protocol made up of interactive modules, each of which
provides a specific functionality.
• The term hierarchical means that each upper level protocol is supported by
the services provided by one or more lower level protocols.
• TCP/IP is thought of as a five-layer model.
Physical and Data Link Layers
●Atthe physical and data link layers, TCP / IP does not
define any specific protocol. It supports all the standard
and proprietary protocols.
●A network in a TCP/IP internetwork can be a local-area
network or a wide-area network
Network Layer
•TCP/IP model defines 4 protocols:
1) IP (Internetworking Protocol): Internet address (IP address) is used to uniquely
& universally identify a device in the internet.
○ IP defines the format and the structure of addresses.
○ IP is also responsible for routing a packet from its source to
its destination. It is a connection-less & unreliable protocol.
○ It provides a best-effort delivery service.
○ IP does not provide services like flow control, error control, congestion control
services.
2) ARP (Address Resolution Protocol) & RARP: ARP is used to find the
physical-address of the node when its Internet-address is known. Physical
address is the 48-bit address that is imprinted on the NIC or LAN card.
3) ICMP (Internet Control Message Protocol) : used to inform the sender about
datagram-problems that occur during transit. Query and error reporting messages.
4) IGMP (Internet Group Message Protocol) : used to send the same message to a
group of recipients.
Transport Layer
•TCP/IP model defines 3 protocols: (as listed below)
1) TCP
TCP is a reliable connection-oriented protocol.
A connection is established b/w the sender and receiver before the data can be transmitted.
TCP provides
→ flow control
→ error control and
→ congestion control
2) UDP
UDP is the simplest of the 3 transport protocols. It is an
unreliable, connectionless protocol.
It does not provide flow, error, or congestion control. Each
datagram is transported separately & independently It is suitable
for application program that
→ needs to send short messages &
→ cannot afford the retransmission.
3) SCTP - Stream Control Transmission
SCTP provides support for newer applications such as voice over the Internet.
Application Layer
•The two application layers exchange messages between each other.
•Communication at the application layer is between two processes (two programs running at
this layer).
•To communicate, a process sends a request to the other process and receives a response.
•Process-to-process communication is the duty of the application layer.
•TCP/IP model defines following protocols:
1) SMTP (simple Mail Transfer Protocol) is used to transport email between a source and
destination.
2) TELNET is used for accessing a site remotely.
3) FTP (File Transfer Protocol)is used for transferring files from one host to another.
4) DNS (Domain Name System) is used to find the IP address of a computer.
5) SNMP(Simple Network Management Protocol) is used to manage the Internet at global
and local
6) HTTP (Hyper text transfer Protocol) is used for accessing the World Wide Web (WWW)
Encapsulation and decapsulation
Multiplexing and demultiplexing - network
layer
Addressing
Relationship of layers and addresses in
TCP/IP
Session layer
Session layer
•The session layer is responsible for dialog control and
synchronization.
•It establishes, maintains, and synchronizes the interaction among
communicating systems.
•Specific responsibilities of the session layer
• Dialog control : Bi-directional communication either full duplex or half duplex mode.
• Synchronization: adds checkpoints
Presentation layer
Presentation layer
•Thepresentation layer is concerned with the syntax
and semantics ofthe information exchanged between
two systems.
•The presentation layer is responsible for
•Translation,
•Compression and
•Encryption.
Application layer
Application layer
•The application layer is responsible for providing services to the user.
•It provides user interfaces and support for services such as electronic mail,
remote file access and transfer, shared database management, and other types
of distributed information services.
•Specific services provided by the application layer
•Network virtual terminal: A network virtual terminal is a software version of a
physical terminal, and it allows a user to log on to a remote host.
•File transfer, access and management
•Directory services
•Mail services
ADDRESSING
2.82
Physical Addresses
The physical address, also known as the link address, is the address of a node as
defined by its LAN or WAN.
The physical addresses have authority over the network (LAN or WAN).
The size and format of these addresses vary depending on the network.
For example, Ethernet uses a 6-byte (48-bit) physical address that is imprinted on the
network interface card (NIC).
Example : 7:01:02:01:2C:4B A 6-byte (12 hexadecimal digits) physical address.
Figure 1.34 Physical addressing
In Figure computer A sends a message to computer D via LAN1, router R1, and LAN2.
Show the contents of the packets and frames at the network and data link layer for each
hop interface.
2.85
Figure 1.36 Physical addressing
Most local-area networks use a 48-bit (6-byte) physical address written as 12 hexadecimal
digits; every byte (2 hexadecimal digits) is separated by a colon.
07:01:02:01 :2C:4B
A 6-byte (12 hexadecimal digits) physical address
Logical Addresses
Logical addresses are necessary for universal communications that are independent of
underlying physical networks.
Physical addresses are not adequate in an internetwork environment where different
networks can have different address formats.
A universal addressing system is needed in which each host can be identified
uniquely, regardless of the underlying physical network.
The logical addresses are designed for this purpose.
A logical address in the Internet is currently a 32-bit address that can uniquely define
a host connected to the Internet.
No two publicly addressed and visible hosts on the Internet can have the same IP
address.
Figure 1.37 IP addresses
The computer with logical address A and physical address 10 needs to send a packet to
the computer with logical address P and physical address 95.
We use letters to show the logical addresses and numbers for physical addresses, but
note that both are actually numbers.
The sender encapsulates its data in a packet at the network layer and adds two logical
addresses (A and P). Note that in most protocols, the logical source address comes
before the logical destination address (contrary to the order of physical addresses).
The network layer, however, needs to find the physical address of the next hop before
the packet can be delivered.
The network layer consults its routing table and finds the logical address of the next
hop (router I) to be F. The ARP discussed previously finds the physical address of
router 1 that corresponds to the logical address of 20.
Now the network layer passes this address to the data link layer, which in turn,
encapsulates the packet with physical destination address 20 and physical source
address 10.
The frame is received by every device on LAN 1, but is discarded by all except router 1, which
finds that the destination physical address in the frame matches with its own physical address.
The router decapsulates the packet from the frame to read the logical destination address P.
Since the logical destination address does not match the router's logical address, the router knows
that the packet needs to be forwarded.
The router consults its routing table and ARP to find the physical destination address of the next
hop (router 2), creates a new frame, encapsulates the packet, and sends it to router 2.
Note the physical addresses in the frame. The source physical address changes from 10 to 99. The
destination physical address changes from 20 (router 1 physical address) to 33 (router 2 physical
address).
The logical source and destination addresses must remain the same; otherwise the packet will be
lost.
At router 2 we have a similar scenario. The physical addresses are changed, and a new
frame is sent to the destination computer.
The destination logical address P matches the logical address of the computer.
The data are decapsulated from the packet and delivered to the upper layer.
Note that although physical addresses will change from hop to hop, logical addresses
remain the same from the source to destination.
The physical addresses will change from hop to hop, but the logical addresses
usually remain the same.
Port Addresses
The IP address and the physical address are necessary for a quantity of data to travel
from a source to the destination host.
However, arrival at the destination host is not the final objective of data
communications on the Internet.
A system that sends nothing but data from one computer to another is not complete.
Today, computers are devices that can run multiple processes at the same time.
The end objective of Internet communication is a process communicating with another
process.
For example, computer A can communicate with computer C by using TELNET.
At the same time, computer A communicates with computer B by using the File
Transfer Protocol (FTP).
For these processes to receive data simultaneously, we need a method to label the
different processes.
2.92
In other words, they need addresses. In the TCPIIP architecture, the label assigned to
a process is called a port address. A port address in TCPIIP is 16 bits in length.
Figure 1.38 shows two computers communicating via the Internet.
The sending computer is running three processes at this time with port addresses a, b,
and c.
The receiving computer is running two processes at this time with port addresses j
and k.
Process a in the sending computer needs to communicate with process j in the
receiving computer.
Note that although both computers are using the same application, FTP, for example,
the port addresses are different because one is a client program and the other is a
server program.
To show that data from process a need to be delivered to process j, and not k, the
transport layer encapsulates data from the application layer in a packet and adds two
port addresses (a and j), source and destination.
The packet from the transport layer is then encapsulated in another packet at the
network layer with logical source and destination addresses (A and P).
Finally, this packet is encapsulated in a frame with the physical source and destination
addresses of the next hop.
We have not shown the physical addresses because they change from hop to hop inside
the cloud designated as the Internet.
Note that although physical addresses change from hop to hop, logical and port
addresses remain the same from the source to destination.
Figure 1.38 port address
Fig shows two computers communicating
via the Internet.
The sending computer is running three
processes at this time with port addresses a,
b, and c.
The receiving computer is running two
processes at this time with port addresses j
and k.
Process a in the sending computer needs to
communicate with process j in the receiving
computer.
Note that although physical addresses
change from hop to hop, logical and port
addresses remain the same from the source
to destination.
2.95
Specific Addresses
Some applications have user-friendly addresses that are designed for that specific
address.
Examples include the e-mail address (for example, [email protected]) and the
Universal Resource Locator (URL) (for example, www.mhhe.com).
The first defines the recipient of an e-mail; the second is used to find a document on
the World Wide Web.
These addresses, however, get changed to the corresponding port and logical
addresses by the sending computer.
2.96
Summary of Addressing
1) Physical address – It is used to identify the host on the network. It is a 48 bit size, represented
in hexadecimal. It is a permanent address printed on the NIC.
Example – 07:01:02:01:2C:4B
2) Logical address – It is also called as IP address or Network address. It is a 32 bits size. It is
represented in 4 decimal dots.
Example- 10. 25. 26.45