UNIT-1 Chap-1 Computer Networks
UNIT-1 Chap-1 Computer Networks
COMMUNICATION
Course code: CS3001-1
1
Course Learning objectives
1.Outline the principles of computer networks and its application.
2.Understand the basic of physical and data link layer
functionalities and protocols .
3.Study the importance of network layer and differentiate various
routing algorithms .
4.Analyze the process of QoS and congestion control algorithms.
5.Acquire the knowledge of working of transport layer, its protocols
and some application layer protocols.
Syllabus
UNIT-I 15
Hours
UNIT-III 9 hours
5. Transport Layer: Transport Layer Services, Port Numbers, User Datagram
Protocol, Transmission Control Protocol
6. Application Layer: Introduction, Client/Server Paradigm, Standard Client-
Server Protocols: World Wide Web and HTTP, FTP, Electronic Mail, DNS,
(Textbook T1)
7. Telnet and SSH (self-learning)
Suggested List of Experiments
Part-A(Experiments using NS-2/ NS-3)
1. Simulate a three nodes’ point-to-point network with duplex links between them. Set
the queue size, vary the bandwidth and find the number of packets dropped.
2. Simulate a four-node point-to-point network, and connect the links as follows: n0-
n2, n1-n2 and n2-n3. Apply TCP agent between n0-n3 and UDP n1-n3. Apply
relevant applications over TCP and UDP agents changing the parameter and
determine the number of packets by TCP/UDP.
3. Simulate the different types of Internet traffic such as FTP a TELNET over a
network and analyze the throughput.
4. Simulate the transmission of ping messages over a network topology consisting of 6
nodes and find the number of packets dropped due to congestion.
5. Simulate an Ethernet LAN using N-nodes (6-10), change error rate and data rate and
compare the throughput.
6. Simulate an Ethernet LAN using N nodes and set multiple traffic nodes and
determine collision across different nodes.
7. Simulate an Ethernet LAN using N nodes and set multiple traffic nodes and plot
congestion window for different source/destination.
PART B (Experiments using C/C++/Python)
4. Using TCP/IP sockets, write a client-server program to make client sending the
filename and the server to send back the contents of the requested file if present.
5. Using UDP SOCKETS, write a client-server program to make the client sending two
numbers and an operator, and server responding with the result. Display the result
and appropriate messages for invalid inputs at the client side.
6. Write a program for Hamming Code generation for error detection and correction.
7. Write a program for simple RSA algorithm to encrypt and decrypt the data.
Course Outcomes:
9
Components of a data communication system
1. Message
2. Sender
3. Receiver
4. Transmission medium
5. Protocol
10
Data Representation
12
1
2
NETWORKS
A network is the interconnection of a set of devices capable of
communication.
13
Computer Network
A computer network is a system that connects two or more
computing devices for transmitting and sharing information.
14
NETWORKS
Network Criteria
1. Performance
• Transit time
• Response time
• Throughput
• Delay
2. Reliability:
•Accuracy of delivery
•Frequency of failure
•Time a link takes to recover from failure
•Robustness in a catastrophe(sudden damage or disaster)
3. Security
• Protecting data from unauthorised access
• Protecting data from damage and development.
• Implementing policies and procedures for recovery from breaches and
losses.
15
Physical structures of Networks
Types of Connections
Network is two or more devices connected through links.
There are two types of connections
• Point-to-point
• Multipoint (multidrop)
16
Point-To-Point Connection
Link
17
Multipoint Connection
Link
18
Physical Topology
• The term physical topology refers to the way in which
a network is laid out physically.
• Two or more device connect to a link
• The topology of a network is the geometric
representation of the relationship of all the links and
linking devices to one another.
• There are four basic topologies.
1. Mesh
2. Star
3. Bus
4. Ring
19
Mesh Topology
E
A
D
B C
• In mesh topology every device has a dedicated point to point link to every other device
• We need n(n-1) links
• Communication is duplex mode
• Every device on the network must have n-1 i/o ports to connect to the other n-1
20
devices.
Mesh Topology
• Pros:
– Dedicated links
– Robustness
– Privacy
– Easy to identify fault
• Cons:
– A lot of cabling
– I/O ports
– Difficult to move
17
22
Star Topology
A D
Hub
B C
23
Star Topology
A D
B C
24
Bus Topology
Drop
line
Cable Cable
End End
20
25
Bus Topology
26
Ring Topology
D
Repeater
B Repeater
Repeater
Repeater
27
Ring Topology
• Pros:
– Easy to install
– Easy to identify fault
• Cons:
– Delay in large ring
– Break in the ring stops all
transmission
28
Hybrid Topologies
24
29
Network Types
The criteria used for distinguishing the
network type
•Size
•Geographical coverage
•Ownership
Network types
• Local Area Network (LAN)
• Wide Area Network (WAN)
• Metropolitan Area Network (MAN)
30
Local Area Networks
• It is a privately owned network in a single office, building, or
campus.
• Each host in the LAN has an address.
• A packet carries source host address and destination host address
31
Wide Area Networks
• Has wider geographical coverage
• Spanning a town, a state, a country or even the world.
• WAN interconnects connecting devices.
32
Two distinct examples of WAN:
• Point-to-point WANs
• Switched WANs
Point-to-point WANs
• Two communicating devices are connected
33
Switched WANs
• Network with more than two ends
• WAN is combination of several point-to-pont WANs connected by switches
34
Examples
35
36
The Internet
37
Figure 1.13 The Internet today
A network topology representing the internet shows several backbones connected to several provider networks and
peering points. The peering points connect to the provider networks. The provider networks connect to multiple
customer networks. The provider networks establish connections between them. Similarly, the customer networks
have connections between them.
38
Accessing the Internet
39
Connection-Oriented Versus Connectionless Service
Layers can offer two different types of service to the layers above
them: connection- oriented and connectionless.
In this section we will look at these two types and examine the
differences between them.
To talk to someone, you pick up the phone, dial the number, talk, and
then hang up. Similarly, to use a connection-oriented network
service, the service user first establishes a connection, uses the
connection, and then releases the connection.
40
Connection-Oriented Versus Connectionless Service
41
Connection-Oriented Versus Connectionless Service
42
Connection-Oriented Versus Connectionless Service
45
Summary of the types of services discussed
46
Introduction to network Devices
1. Modem
The main purpose of a modem is to modulate and demodulate -- or
convert -- signals between devices, such as analog to digital.
Nowadays, the most common type of modem is an internet modem,
which facilitates internet access by receiving signals from an
ISP(Internet Service Provider) and converting them into a format
that connected devices can use, such as radio or digital signals.
47
Introduction to network Devices
48
Introduction to network Devices
2. Hub
• A hub is a physical device used to join multiple devices on the
same LAN. For example, a laptop, desktop computer and printer
can connect into a hub's ports with Ethernet cables and be part of
the same local network.
• Unlike a bridge, router or switch, a hub broadcasts messages it
receives from one port to all remaining ports without examining
the frames or isolating the message for the intended destination
• A hub must connect to a router or switch in order to communicate
outside its LAN.
49
Introduction to network Devices
3.Switch
• A network switch forwards data to its destination by examining an
incoming frame's MAC address and sending it to the device with
the matching address.
• Devices connect into a switch's ports usually via an Ethernet
cable. The switch stores those devices' MAC addresses in an
address table it uses as a reference when transferring frames.
• While a router forwards data to an IP address or network, a switch
sends the information directly to the specific destination port
50
Introduction to network Devices
4. Router
• A router directs data requests from one network to another.
Routers examine incoming packets to determine the appropriate
destination IP address and then forward the packet to that
destination.
• A router can also enable internet access through its connection to
a modem, or as a combined modem-router.
• As with a bridge, routers maintain and use routing tables that
contain route information, such as IP addresses and interfaces.
• Once a router inspects a packet, it refers to the routing table to
find the best path toward the destination.
• Routers use routing protocols to communicate and exchange data.
51
Introduction to network Devices
• edge routers
• core routers
• distribution routers
• wireless routers
52
Network Models:
53
The OSI model
54
55
The OSI 7 Layers
56
The interaction between layers in the OSI model
57
An exchange using the OSI model
58
LAYERS IN THE OSI MODEL
1. Physical layer:
Defining the Characteristics of the interface between the devices and the
transmission medium.
Representations of the bits : Sequences of 1’s and 0’s and encoding these bits into
signals.
Data rate : No. of bits sent per second
Synchronization of bits : Receiver and senders clock synchronization.
59
Physical layer
60
61
2. Data link layer
62
Data link layer functionalities
Access Control : Determining which device has the control over the
transmission line.
63
64
Hop-to-hop delivery
65
Figure 2.8 Network layer
Network layer functionalities
Responsible for source to destination delivery of packet
across multiple networks.
07:01:02:01:2C:4B
753
103
OSI versus TCP/IP
104
OSI versus TCP/IP
105