0% found this document useful (0 votes)
14 views93 pages

Computer Networks Course Overview

The document provides an overview of a Computer Networks course taught by Dr. N. Sandeep Varma, detailing his qualifications, course structure, outcomes, and key topics covered. It includes information on network fundamentals, types, devices, protocols, and socket programming, along with various communication methods and performance measures. The course aims to equip students with the skills to apply networking principles and security mechanisms effectively.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views93 pages

Computer Networks Course Overview

The document provides an overview of a Computer Networks course taught by Dr. N. Sandeep Varma, detailing his qualifications, course structure, outcomes, and key topics covered. It includes information on network fundamentals, types, devices, protocols, and socket programming, along with various communication methods and performance measures. The course aims to equip students with the skills to apply networking principles and security mechanisms effectively.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

COMPUTER NETWORKS

Dr. N. Sandeep Varma, Ph.D.


Associate Professor
About Me 

• [Link] in Information Technology (JNTU, Hyderabad)

• M. Tech Dual Degree in Software Engineering (Andhra University, and BTH,


Sweden)

• Ph.D. Computer Science and Systems Engineering (Andhra University)

• Papers in International Conferences – 15

• Papers in International Journals – 09

• Languages I Know ( Technical – C, C#, Java, HTML5, CSS, Java Script, Python)

• Speaking ( Telugu, Hindi, English, Kannada)

• Funded Projects – Worth 56.86 Lakhs

• Research Interns – 15 students (With Stipend)

• Ph.D. students – 2

Well Not a Sadistic Professor


Course Overview

• Course Code : 24AM5PCCNS

• Course Credits : 2-0-0

• No. of Hrs./Week – 2 Hrs. (Direct Contact Hours)

• CIE – 50M

• SEE – (100 M) – 50% Weightage


Course Outcomes
CO Apply protocols and routing mechanism
1 principles and practices for error free
data transmission over a network.
Analyze IP mechanisms for designing and
CO implementing appropriate network
2
requirements
Examine various security mechanisms to
CO protect data from various network attacks
3
Text Book

Computer Networks : A
Systems Approach, Larry L
Peterson and Bruce S Davie,
5th Edition, Morgan
Kufmann,2010
Topics
• Module I – Overview of Computer Networks – 6Hrs.

• Module II – Encoding, Error Correction and Detection Mechanisms –


5Hrs.

• Module III – Internetworking and Routing – 5Hrs.

• Module IV – Protocols and Congestion Control – 5Hrs.

• Module V - Network Security and Applications – 5Hrs.


Early Days of Internet
Internet Growth

Image Src: [Link]


Fundamentals of Networks
A computer network is a group of computers/devices(Nodes) that use
a set of common communication protocols over digital interconnections
for the purpose of sharing resources located on or provided by the
network nodes

Nodes: Protocol: Interconnections:


Computers Set of Rules Physically Wired
Servers Optical
Laptops Wireless
Specialized hosts
Mobile Devices
IoT Devices / Sensors Different Protocols
Different corporate Divisions
Sample Network
Design
Network
Types
Network Topologies
Communication Modes
Communication - Speeds
MB/s vs Mbps
• Mbps (or Mb/s) with a lowercase "b" means megabits per
second. Mb/s is used to measure internet download and upload
speeds

• MBps (or MB/s) with an uppercase "B" means megabytes per


second. MB/s is used to measure file size, or the speed of data
transfer.
Devices
• Network Interface Card
• Repeaters
• Hubs
• Bridges
• Switches
• Routers
• Gateways
Network Interface Card (NIC)
Straight Connections – Wiring
Standards

Both ends use


T568A wiring
standard or both
ends use T568B
wiring standard

T568A : Old Standards still in use to provide backward compatibility with legacy phone
systems.
T568B : New Standards with better signal isolation and noise protection.
Cross Over Connections – Wiring Standards

One end uses the T568A wiring standard, and the other end
uses the T568B wiring standard
CAT CABLE TYPES
Distances
IEEE
Standards
Physical layer networking device
A hub has many ports in it
When a data frame arrives at a
port, it is broadcast to every
other port
Not an intelligent device (No
idea whether it is destined for a
particular destination or not)
Repeater

Amplifies incoming
signals and
rebroadcasts them
over a wider area or
higher network layer
Bridges
Switches

 A switch is a data link layer networking device which


connects devices in a network

 Intelligent as the data frame is sent to the intended


destination only (Through MAC Address)
Routers

A gateway that passes data


between one or more local area
networks (LANs)
Multiplexing
• Techniques that allows the simultaneous transmission of
multiple signals across a single data link

• Hardware is Termed as MUX


Wave Length Based -
Multiplexing
Wavelengths are typically
measured in the
following units:
• Kilometers (km).
• Meters.
• Millimeters.
• Micrometers (μm).
• Nanometers.
• Picometers (pm).
• Femtometers (fm).
Cost-Effective Resource Sharing
• Resource: links and nodes
• How to share a link?
• Multiplexing
• De-multiplexing
• Synchronous Time-division
Multiplexing
• Time slots/data transmitted in
predetermined slots

Multiplexing multiple logical flows over a


single physical link
Cost-Effective Resource
Sharing
• FDM: Frequency Division Multiplexing
• Statistical Multiplexing
• Data is transmitted based on demand of
each flow.
• Packets vs. Messages
• FIFO, Round-Robin, Priorities (Quality-of-
Service (QoS))
• Congested?
• LAN, MAN, WAN
A switch multiplexing packets
from • SAN (System Area Networks)
multiple sources onto one shared
link
7 – Layered Architecture
Description of Layers
• Physical Layer
• Handles the transmission of raw bits over a communication link

• Data Link Layer


• Collects a stream of bits into a larger aggregate called a frame
• Network adaptor along with device driver in OS implement the protocol
in this layer
• Frames are actually delivered to hosts

• Network Layer
• Handles routing among nodes within a packet-switched network
• Unit of data exchanged between nodes in this layer is called a packet

The lower three layers are implemented on all network nodes.


Description of
Layers
• Transport Layer
• Implements a process-to-process channel
• Unit of data exchanges in this layer is called a message

• Session Layer
• Provides a name space that is used to tie together the potentially different
transport streams that are part of a single application

• Presentation Layer
• Concerned about the format of data exchanged between peers

• Application Layer
• Standardize common type of exchanges

The transport layer and the higher layers typically run only on end-hosts
and not on the intermediate switches and routers
The Bigger Picture
Physical Address / MAC Address (Unique for Each
NIC)
Video – Internet under the hood

[Link]
Crimping Mechanism

• [Link]
Testing
• [Link]
Internet Working
• [Link]
Amazon Snowmobile
• [Link]
Guided Transmission Data

• Twisted Pair
• Coaxial Cable
• Fiber Optics
Twisted Pair

(a) Category 3 UTP.


(b) Category 5 UTP.
Coaxial Cable

transmit high-frequency signals with minimal interference


Fiber Optics

(a)Three examples of a light ray from inside a silica fiber


impinging on the air/silica boundary at different angles.
(b) Light trapped by total internal reflection.
Transmission of Light through Fiber

Attenuation of light through fiber in the infrared region.


Fiber Cables

(a) Side view of a single fiber.


(b) End view of a sheath with three fibers.
Fiber Cables (2)

A comparison of semiconductor diodes and LEDs as light


sources.
Wireless Transmission
• The Electromagnetic
Spectrum
• Radio Transmission
• Microwave Transmission
• Infrared and Millimeter
Waves
• Lightwave Transmission
The Electromagnetic Spectrum

The electromagnetic spectrum and its uses for communication.


Radio Transmission

(a) In the VLF, LF, and MF bands, radio waves follow


the curvature of the earth.
(b) In the HF band, they bounce off the ionosphere.
Lightwave Transmission

Convection currents can interfere with laser communication systems.


A bidirectional system with two lasers is pictured here.
Communication Satellites

• Geostationary Satellites
• Medium-Earth Orbit Satellites
• Low-Earth Orbit Satellites
• Satellites versus Fiber
Communication Satellites

Communication satellites and some of their properties,


including altitude above the earth, round-trip delay time and
number of satellites needed for global coverage.
Communication Satellites (2)
The principal satellite bands.
Communication Satellites (3)

VSATs using a hub.


Low-Earth Orbit Satellites Iridium

(a) The Iridium satellites from six necklaces around the earth.
(b) 1628 moving cells cover the earth.
Globalstar

(a) Relaying in space.


(b) Relaying on the ground.
Application Programming
Interfaces
Socket Programming
Socket
Programming
Why
Sockets?

Provides an abstraction for


interprocess communication
Port
 A port is a virtual point where network connections start
and end.

 Ports are software-based and managed by a computer's


operating system.

 Each port is associated with a specific process or service.

 Ports allow computers to easily differentiate between


different kinds of traffic: emails go to a different port than
webpages, for instance, even though both reach a
computer over the same Internet connection.
Functions

• Define an “end- point” for communication


• Initiate and accept a connection
• Send and receive data
• Terminate a connection gracefully

Examples

 File transfer apps (FTP), Web browsers


 (HTTP), Email (SMTP/ POP3), etc…
Types of Sockets
• Two different types of sockets :
– stream vs. datagram

• Stream socket :( a. k. a. connection- oriented socket)


– It provides reliable, connected networking service
– Error free; no out- of- order packets (uses TCP)
– applications: telnet/ ssh, http, …

• Datagram socket :( a. k. a. connectionless socket)


– It provides unreliable, best- effort networking service
– Packets may be lost; may arrive out of order (uses UDP)
– applications: streaming audio/ video (realplayer), …
Ftp Commands,
Responses
Sample Commands: Sample Return Codes
• sent as ASCII text over control
• status code and phrase
channel
• 331 Username OK,
• USER username
password required
• PASS password
• 125 data connection
• LIST return list of files in already open;
current directory transfer starting
• RETR filename retrieves • 425 Can’t open data
(gets) file connection
• STOR filename stores • 452 Error writing
(puts) file onto remote host file
High level view
Create a socket
Create a socket

Bind the socket

Setup the server address


Listen for connections

Connect to the server


Accept new client connections

Read/write data
Read/write to client connections

Shutdown connection
Shutdown connection

Client Server
TCP Client Server Interaction
BSD Socket Programming
(connectionless)

76
Example app: UDP client
Python UDPClient
include Python’s socket
library from socket import *
serverName = ‘servername’
serverPort = 12000
create UDP socket for
server clientSocket = socket(AF_INET,
SOCK_DGRAM)
get user keyboard
input message = raw_input(’Input lowercase sentence:’)
Attach server name, port to [Link]([Link](),
message; send into socket
(serverName, serverPort)) Buffer size

read reply characters from modifiedMessage, serverAddress =


socket into string
[Link](2048)
print out received string print [Link]()
and close socket
[Link]()

77
BSD Socket Programming Flows
(connection-oriented)

78
Socket programming with TCP
client must contact server
• server process must first be running
• server must have created socket
(door) that welcomes client’s
contact
client contacts server by:
• Creating TCP socket, specifying IP
address, port number of server
process
• when client creates socket: client
TCP establishes connection to server
TCP

79
Socket programming with TCP
• when contacted by client, server
TCP creates new socket for server
process to communicate with that
particular client
• allows server to talk with
multiple clients
• source port numbers used to
distinguish clients (more in
Chap 3)

application viewpoint:
TCP provides reliable, in-order
byte-stream transfer (“pipe”)
between client and server

80
Client/server socket interaction:
TCP
server (running on hostid) client
create socket,
port=x, for incoming
request:
serverSocket = socket()

wait for incoming create socket,


connection request
TCP connect to hostid, port=x
connectionSocket = connection setup clientSocket = socket()
[Link]()

send request using


read request from clientSocket
connectionSocket

write reply to
connectionSocket read reply from
clientSocket
close
connectionSocket close
clientSocket

81
Example app: TCP server
Python TCPServer
from socket import *
create TCP welcoming serverPort = 12000
socket serverSocket = socket(AF_INET,SOCK_STREAM)
[Link]((‘’,serverPort))
server begins listening for
incoming TCP requests [Link](1)
print ‘The server is ready to receive’
while True:
server waits on accept()
for incoming requests, new connectionSocket, addr = [Link]()
socket created on return

read bytes from socket sentence = [Link](1024).decode()


capitalizedSentence = [Link]()
[Link](capitalizedSentence.
encode())
close connection to this [Link]()
client (but not welcoming
socket)

82
Example app: TCP client
Python TCPClient
from socket import *
serverName = ’servername’
create TCP socket for
serverPort = 12000
server, remote port 12000 clientSocket = socket(AF_INET, SOCK_STREAM)
[Link]((serverName,serverPort))
sentence = raw_input(‘Input lowercase sentence:’)
No need to attach server
name, port
[Link]([Link]())
modifiedSentence = [Link](1024)
print (‘From Server:’, [Link]())
[Link]()

83
Two Different Server Behaviors

• Iterative server
• Concurrent server
• At any time, only handles one client request
• Multiple client requests can be handled
simultaneously
• create a new process/thread to handle
for (;;) { each request
accept a client request; for (;;) {
handle it accept a client request;
} create a new process / thread to
handle request;
parent process / thread continues
}

84
Assignment – Implement either in c
or java
Network Requirements and Performance
Measures

 Bandwidth
 Throughput
 Latency/Delay
Bandwidth
• Volume of data that can be
transferred over a network per unit
time.
• Transmitted = put into the pipe(wire)

• Standard Measurement is (Mbps).


• Example 10Mbps (10 Millions bits per
second)

• Bandwidth in hertz, refers to the


range of frequencies.

• Basically it is a Speed of bit


Throughput

• How much data is transferred across


the network.

• Standard Measurement is (Mbps).


Throughput
A network with bandwidth of 10 Mbps
can pass only an average of 12,000
frames per minute with each frame
carrying an average of 10,000 bits. What
is the throughput of this network?
Latency

• Time it takes to get to its destination


across the network

• Commonly measured as a round trip


delay

• Measured in milliseconds
Propagation Delay = Distance/Propagation
speed

Transmission Delay = Message


size/bandwidth bps

Latency = Propagation delay + Transmission


delay +
Queueing time + Processing time
What is the propagation time if
the distance between the two
points is 12,000 km? Assume the
propagation speed to be 2.4 ×
10^8 m/s in cable.

The example shows that a bit can go over the


Atlantic Ocean in only 50 ms if there is a direct
cable between the source and the destination.
Relative importance of bandwidth and
latency depends on application

– For large file transfer, bandwidth is critical


– For small messages (HTTP, NFS, etc.), latency
is critical
– Variance in latency (jitter) can also affect some
applications (e.g., audio/video conferencing)

• Jitter is measured in milliseconds


(ms). A delay of around 30 ms or
more can result in distortion and
disruption to a call

You might also like