Beruflich Dokumente
Kultur Dokumente
COMPUTER NETWORKS
Computer Centre
Indian Institute of Technology Kanpur
Kanpur INDIA
Course Content
Course Content
Lecture 1: Overview of the Course and Network
Fundamentals: 2 Hour
Lecture 2: OSI Model& TCP/IP Model : 2 Hour
Lecture 3: Physical Media (Copper, Fiber Optic and
Wireless) : 2 Hour
Lab 1: IIT Kanpur Datacenter Visit: 2 Hour
Lecture 4: UTP & Fiber Cabling: 2 Hour
Lecture 5: LAN Technologies (Ethernet, Fast
Ethernet, Gigabit Ethernet, Wireless LAN) : 2 Hour
Lab 2: Demo and Practice of UTP & Fiber Cabling: 2
Hour
Lecture 6: LAN Technologies (contd.) : 2 Hour
Course Content
Course Content
Lecture 7: WAN Technologies (Dialup, Leased Line,
ISDN, ADSL, Cable Modem, VSAT) : 2 Hour
Lab 3: Demo and Practice of Ethernet & Wireless
LAN Setup : 2 Hour
Lecture 8: WAN Technologies (contd.) : 2 Hour
Lecture 9: Internet Protocol (IP) and IP Addressing: 2
Hour
Lab 4: Demo and Practice of Setting up Subnets and
IP Address Assignment : 2 Hour
Lecture 10: Routing, VLAN, TCP and UDP: 2 Hour
Lecture 11: SNMP, Natting, Firewall and VPN: 2 Hour
Lecture 12: Internet and Internet Applications (DNS,
Email, Web..): 2 Hour
Course Content
Course Content
Lecture 13: Cisco Basics: 2 Hour
Lecture 14: Cisco Switch and Router Configuration :
2 Hour
Lab 5: Demo and Practice of Cisco Switch
Configuration : 2 Hour
Lab 6: Demo and Practice of Cisco Router
Configuration : 2 Hour
Lecture 15: DNS & Web Server Setup on Linux : 2
Hour
Lab 7: Demo and Practice of DNS and Web Server
Setup : 2 Hour
Lecture 16: Enterprise Network Implementation: 2
Hour
Course Content
Course Content
Lecture 17: Mail Server, Proxy Server & Firewall
Setup on Linux : 2 Hour
Lab 8: Demo and Practice of Mail Server , Proxy
Server and Firewall Setup : 2 Hour
Books
References
Andrew S. Tanenbaum, Computer Network, PrenticeHall
Doughlas
Internet
E.
Comer,
Computer
Networks
and
http://www.cisco.com/public/support/tac/documenta
tion.html
http://www.redhat.com/docs
http://home.iitk.ac.in/~navi/sidbinetworkcourse
Grading
Grading Guidelines
Two Exams: 40% each
Lab Assignments: 20%
Minimum 80% attendance and minimum 60% marks
are necessary to clear the course.
INTRODUCTION TO COMPUTER
NETWORKS
Computer Networks
Computer
network
connects two or more
autonomous computers.
Applications of Networks
Resource Sharing
Hardware (computing resources, disks, printers)
Software (application software)
Information Sharing
Easy accessibility from anywhere (files, databases)
Search Capability (WWW)
Communication
Email
Message broadcast
Remote computing
Distributed processing (GRID Computing)
Network Topology
The network topology
defines the way in
which
computers,
printers,
and
other
devices are connected.
A network topology
describes the layout of
the wire and devices as
well as the paths used
by data transmissions.
Bus Topology
Commonly referred to
as a linear bus, all the
devices on a bus
topology are connected
by one single cable.
Ring Topology
A frame travels around the ring,
stopping at each node. If a node
wants to transmit data, it adds the
data as well as the destination
address to the frame.
The frame then continues around
the ring until it finds the
destination node, which takes the
data out of the frame.
Single ring All the devices on the
network share a single cable
Dual ring The dual ring topology
allows data to be sent in both
directions.
Mesh Topology
The mesh topology
connects all devices
(nodes) to each other
for redundancy and
fault tolerance.
It is used in WANs to
interconnect LANs and
for
mission
critical
networks like those
used by banks and
financial institutions.
Implementing the mesh
topology is expensive
and difficult.
Network Components
Physical Media
Interconnecting Devices
Computers
Networking Software
Applications
Networking Media
Networking media can
be defined simply as
the means by which
signals (data) are sent
from one computer to
another (either by cable
or wireless means).
Networking Devices
HUB, Switches, Routers,
Wireless Access Points,
Modems etc.
Applications
E-mail
Searchable Data (Web Sites)
E-Commerce
News Groups
Internet Telephony (VoIP)
Video Conferencing
Chat Groups
Instant Messengers
Internet Radio
OSI Model
OSI MODEL
OSI Model
Communication Architecture
Strategy for connecting host computers and other
communicating equipment.
Defines necessary elements for data communication
between devices.
A communication architecture, therefore, defines a
standard for the communicating hosts.
A programmer formats data in a manner defined by
the communication architecture and passes it on to
the communication software.
Separating communication functions adds flexibility,
for example, we do not need to modify the entire
host software to include more communication
devices.
OSI Model
Layer Architecture
Layer architecture simplifies the network design.
It is easy to debug network applications in a layered
architecture network.
The network management is easier due to the
layered architecture.
Network layers follow a set of rules, called protocol.
The protocol defines the format of the data being
exchanged, and the control and timing for the
handshake between layers.
OSI Model
(OSI)
reference
OSI Model
more
manageable
OSI Model
OSI Model
OSI Model
Physical Layer
Provides physical interface for transmission of
information.
Defines rules by which bits are passed from one
system to another on a physical communication
medium.
Covers all - mechanical, electrical, functional and
procedural - aspects for physical communication.
Such characteristics as voltage levels, timing of
voltage changes, physical data rates, maximum
transmission distances, physical connectors, and
other similar attributes are defined by physical layer
specifications.
OSI Model
OSI Model
Network Layer
Implements routing of frames (packets) through the
network.
Defines the most optimum path the packet should take
from the source to the destination
Defines logical addressing so that any endpoint can be
identified.
Handles congestion in the network.
Facilitates interconnection between heterogeneous
networks (Internetworking).
The network layer also defines how to fragment a packet
into smaller packets to accommodate different media.
OSI Model
Transport Layer
Purpose of this layer is to provide a reliable
mechanism for the exchange of data between two
processes in different computers.
Ensures that the data units are delivered error free.
Ensures that data units are delivered in sequence.
Ensures that there is no loss or duplication of data
units.
Provides connectionless or connection oriented
service.
Provides for the connection management.
Multiplex multiple connection over a single channel.
OSI Model
Session Layer
Session layer provides mechanism for controlling the
dialogue between the two end systems. It defines how to
start, control and end conversations (called sessions)
between applications.
This layer requests for a logical connection to be
established on an end-users request.
Any necessary log-on or password validation is also
handled by this layer.
Session layer is also responsible for terminating the
connection.
This layer provides services like dialogue discipline which
can be full duplex or half duplex.
Session layer can also provide check-pointing mechanism
such that if a failure of some sort occurs between
checkpoints, all data can be retransmitted from the last
checkpoint.
OSI Model
Presentation Layer
Presentation layer defines the format in which the
data is to be exchanged between the two
communicating entities.
Also handles data compression and data encryption
(cryptography).
OSI Model
Application Layer
Application layer interacts with application
programs and is the highest level of OSI model.
Application layer contains management functions to
support distributed applications.
Examples of application layer are applications such
as file transfer, electronic mail, remote login etc.
OSI Model
OSI in Action
A message begins at the top
application layer and moves down
the OSI layers to the bottom
physical layer.
As the message descends, each
successive OSI model layer adds a
header to it.
A
header
is
layer-specific
information that basically explains
what functions the layer carried
out.
Conversely, at the receiving end,
headers are striped from the
message as it travels up the
corresponding layers.
TCP/IP Model
TCP/IP MODEL
TCP/IP Model
TCP/IP Model
TCP/IP Model
Application Layer
Application programs using the network
Transport Layer (TCP/UDP)
Management of end-to-end message transmission,
error detection and error correction
Network Layer (IP)
Handling of datagrams : routing and congestion
Data Link Layer
Management of cost effective and reliable data delivery,
access to physical networks
Physical Layer
Physical Media
Physical Media
PHYSICAL MEDIA
Physical Media
Physical Media
Physical Media
Physical Media
Copper
Coaxial Cable - Thick or Thin
Unshielded Twisted Pair - CAT 3,4,5,5e&6
Optical Fiber
Multimode
Singlemode
Wireless
Short Range
Medium Range (Line of Sight)
Satellite
Physical Media
Category
Impedance
Use
RG-59
75
Cable TV
RG-58
50
Thin
Ethernet
RG-11
50
Thick
Ethernet
Repeater is used to
regenerate the weakened
signals.
Physical Media
Physical Media
Physical Media
Physical Media
Physical Media
Categories of UTP
UTP comes in several categories that are based on
the number of twists in the wires, the diameter of
the wires and the material used in the wires.
Category 3 is the wiring used primarily for telephone
connections.
Category 5e and Category 6 are currently the most
common Ethernet cables used.
Physical Media
Physical Media
Physical Media
Physical Media
Physical Media
Physical Media
Fiber Media
Optical fibers use light
to send information
through the optical
medium.
It uses the principal of
total internal reflection.
Modulated
light
transmissions are used
to transmit the signal.
Physical Media
Physical Media
Fiber Media
Light travels through the optical media by the way of
total internal reflection.
Modulation scheme used is intensity modulation.
Two types of Fiber media :
Multimode
Singlemode
Multimode Fiber can support less bandwidth than
Singlemode Fiber.
Singlemode Fiber has a very small core and carry
only one beam of light. It can support Gbps data
rates over > 100 Km without using repeaters.
Physical Media
Physical Media
Fiber Media
The bandwidth of the fiber is limited due to the
dispersion effect.
Distance Bandwidth product of a fiber is almost a
constant.
Fiber optic cables consist of multiple fibers packed
inside protective covering.
62.5/125 m (850/1310 nm) multimode fiber
50/125 m (850/1310 nm) multimode fiber
10 m (1310 nm) single-mode fiber
Physical Media
Fiber-Optic Cable
Contains one or several
glass fibers at its core
Surrounding the fibers is
a layer called cladding
Physical Media
Physical Media
Wireless Media
Very useful in difficult
terrain where cable
laying is not possible.
Provides mobility to
communication nodes.
Right of way and cable
laying costs can be
reduced.
Susceptible to rain,
atmospheric variations
and
Objects
in
transmission path.
Physical Media
Wireless Media
Indoor : 10 50m : BlueTooth, WLAN
Short range Outdoor : 50 200m: WLAN
Mid Range Outdoor : 200m 5 Km : GSM, CDMA,
WLAN Point-to-Point, Wi-Max
Long Range Outdoor : 5 Km 100 Km : Microwave
Point-to-Point
Long Distance Communication : Across Continents :
Satellite Communication
Physical Media
Frequency Bands
Band
Range
Propagatio
n
Application
VLF
330 KHz
Ground
LF
30300 KHz
Ground
MF
Sky
AM radio
HF
330 MHz
Sky
VHF
30300 MHz
Sky and
line-of-sight
VHF TV,
FM radio
UHF
Line-ofsight
SHF
330 GHz
Line-ofsight
Satellite communication
EHF
30300 GHz
Line-ofsight
Physical Media
Wireless LAN
PC
Access Point
Internet
Router
Switch
PC
Access Point
Physical Media
Terrestrial Microwave
Microwaves do not
follow the curvature of
earth
Line-of-Sight
transmission
Height
allows
the
signal to travel farther
Two frequencies for
two
way
communication
Repeater is used to
increase the distance
Hop-by-Hop
Physical Media
Satellite Communication
Cabling
Cabling
Cabling
Cabling
Patch Panel
Termination
punchdown in back
Patch cord plugin in
front
Cabling
Cabling
Color Codes
Data Tx: 1 & 2
Data Rx: 3 & 6
Crossover
13
26
PoE +VDC: 4 & 5
PoE -VDC: 7 & 8
Cabling
Cabling
Punching Tool
Terminates wires to back
of patch panels and in
Information Outlets
Cabling
Making Cables
Cabling
speed
Cabling
Cabling Rules
Try to avoid running cables parallel to power cables.
Do not bend cables to less than four times the diameter of the
cable.
If you bundle a group of cables together with cable ties (zip
ties), do not over-cinch them. You should be able to turn the tie
with fingers.
Keep cables away from devices which can introduce noise into
them. Here's a short list: copy machines, electric heaters,
speakers, printers, TV sets, fluorescent lights, copiers, welding
machines, microwave ovens, telephones, fans, elevators,
motors, electric ovens, dryers, washing machines, and shop
equipment.
Avoid stretching UTP cables (tension when pulling cables
should not exceed 25 LBS).
Do not run UTP cable outside of a building. It presents a very
dangerous lightning hazard!
Do not use a stapler to secure UTP cables. Use telephone
wire/RJ6 coaxial wire hangers which are available at most
hardware stores.
Cabling
Cabling
Cabling
Cabling
Cabling
Cabling
LAN Technologies
LAN TECHNOLOGIES
LAN Technologies
Technology Options
Ethernet
Fast Ethernet
Gigabit Ethernet
10 Gig Ethernet
WLAN
LAN Technologies
Media Access
Ethernet and
technologies
Wi-Fi
are
both
multi-access
LAN Technologies
802.3 Ethernet
Carrier-sense multiple
detection (CSMA/CD).
CS = carrier sense
MA = multiple access
CD = collision detection
access
with
collision
LAN Technologies
Ethernet CSMA/CD
CSMA/CD (carrier sense multiple access with
collision detection) media access protocol is used.
Data is transmitted in the form of packets.
Sense channel prior to actual packet transmission.
Transmit packet only if channel is sensed idle;
else, defer the transmission until channel becomes
idle.
After packet transmission is started, the node
monitors its own transmission to see if the packet
has experienced a collision.
If the packet is observed to be undergoing a
collision, the transmission is aborted and the
packet is retransmitted after a random interval of
time using Binary Exponential Backoff algorithm.
LAN Technologies
Ethernet Address
End nodes are identified by their Ethernet
Addresses (MAC Address or Hardware Address)
which is a unique 6 Byte address.
MAC Address is represented in Hexa Decimal format
e.g 00:05:5D:FE:10:0A
The first 3 bytes identify a vendor (also called prefix)
and the last 3 bytes are unique for every host or
device
LAN Technologies
Length
LAN Technologies
Ethernet
10 Base 5 (Thicknet) (Bus Topology)
10 Base 2 (Thinnet) (Bus Topology)
10 Base T (UTP) (Star/Tree Topology)
10 Base FL (Fiber) (Star/Tree Topology)
LAN Technologies
Repeater
LAN Technologies
Hub
LAN Technologies
Ethernet
Physical Media :10 Base5
10 Base2
10 BaseT
10 BaseFL
LAN Technologies
Fast Ethernet
100 Mbps bandwidth
Uses same CSMA/CD media access protocol and
packet format as in Ethernet.
100BaseTX (UTP) and 100BaseFX (Fiber) standards
Physical media :100 BaseTX
- UTP Cat 5e
100 BaseFX - Multimode / Singlemode Fiber
Full Duplex/Half Duplex operations.
LAN Technologies
Fast Ethernet
Provision for Auto-Negotiation of media speed:
10 Mbps or 100Mbps (popularly available for copper
media only).
Maximum Segment Length
100 Base TX - 100 m
100 Base FX - 2 Km (Multimode Fiber)
100 Base FX - 20 km (Singlemode Fiber)
LAN Technologies
Gigabit Ethernet
1 Gbps bandwidth.
Uses same CSMA/CD media access protocol as in
Ethernet and is backward compatible (10/100/100
modules are available).
1000BaseT (UTP), 1000BaseSX (Multimode Fiber)
and 1000BaseLX (Multimode/Singlemode Fiber)
standards.
Maximum Segment Length
1000 Base T
- 100m (Cat 5e/6)
1000 Base SX - 275 m (Multimode Fiber)
1000 Base LX - 512 m (Multimode Fiber)
1000 Base LX - 20 Km (Singlemode Fiber)
1000 Base LH - 80 Km (Singlemode Fiber)
LAN Technologies
10 Gig Ethernet
10 Gbps bandwidth.
Uses same CSMA/CD media access protocol as in
Ethernet.
Propositioned for Metro-Ethernet
Maximum Segment Length
1000 Base-T
- Not available
10GBase-LR
- 10 Km (Singlemode Fiber)
10GBase-ER
- 40 Km (Singlemode Fiber)
LAN Technologies
Desktop
with PCI 802.11 LAN card
Access Point
Laptop
with PCMCIA 802.11 LAN card
LAN Technologies
LAN Technologies
sender
RTS
receiver
other node in
receivers range
CTS
data
ACK
LAN Technologies
WLAN : 802.11b
The most popular 802.11 standard currently in
deployment.
Supports 1, 2, 5.5 and 11 Mbps data rates in the 2.4
GHz ISM (Industrial-Scientific-Medical) band
LAN Technologies
WLAN : 802.11a
Operates in the 5 GHz UNII (Unlicensed National
Information Infrastructure) band
Incompatible with devices operating in 2.4GHz
Supports Data rates up to 54 Mbps.
LAN Technologies
WLAN : 802.11g
Supports data rates as high as 54 Mbps on the 2.4
GHz band
Provides backward
equipment
compatibility
with
802.11b
Repeater
A repeater receives a signal, regenerates it, and passes it
on.
It can regenerate and retime network signals at the bit
level to allow them to travel a longer distance on the
media.
It operates at Physical Layer of OSI
The Four Repeater Rule for 10-Mbps Ethernet should be
used as a standard when extending LAN segments.
This rule states that no more than four repeaters can be
used between hosts on a LAN.
This rule is used to limit latency added to frame travel by
each repeater.
Hub
Hubs are used to connect
multiple nodes to a single
physical device, which connects
to the network.
Hubs are
repeaters.
actually
multiport
Bridge
Bridges are used to logically separate
network segments within the same
network.
They operate at the OSI data link layer
(Layer 2) and are independent of higherlayer protocols.
The function of the bridge is to make
intelligent decisions about whether or
not to pass signals on to the next
segment of a network.
When a bridge receives a frame on the
network, the destination MAC address is
looked up in the bridge table to
determine whether to filter, flood, or
copy the frame onto another segment
Broadcast Packets are forwarded
Switch
Switches are Multiport Bridges.
Switches provide a unique network segment on each
port, thereby separating collision domains.
Today, network designers are replacing hubs in their
wiring closets with switches to increase their network
performance and bandwidth while protecting their
existing wiring investments.
Like bridges, switches learn certain information about
the data packets that are received from various
computers on the network.
Switches use this information to build forwarding
tables to determine the destination of data being sent
by one computer to another computer on the network.
direct
switch
C
B
WAN Technologies
WAN TECHNOLOGIES
WAN Technologies
Technology Options
Dial-up
Leased Line
ISDN
X.25
Frame Relay
ATM
DSL
Cable Modem
Microwave Point-to-Point Link
VSAT
WAN Technologies
Dial-up
Uses POTS (Plain Old Telephone System)
Provides a low cost need based access.
Bandwidth 33.6 /56 Kbps.
On the Customer End: Modem is connected to a
Telephone Line
On the Service Provider End: Remote Access Server
(RAS) is connected to Telephone Lines (33.6 Kbps
connectivity) or E1/R2 Line (56 Kbps connectivity)
RAS provide dialin connectivity, authentication and
metering.
Achievable bandwidth depends on the line quality.
WAN Technologies
Dial-up
WAN Technologies
Dial-up
RAS
WAN Technologies
Dial-up
33.6 Kbps
Analog line
Telephone
switch
Telephone
switch
Modem
Modem
56 Kbps
Access server
Telephone
switch
Modem
E1
WAN Technologies
Leased Line
Used to provide point-to-point dedicated network
connectivity.
Analog leased line can provide maximum bandwidth
of 9.6 Kbps.
Digital leased lines can provide bandwidths :
64 Kbps, 2 Mbps (E1), 8 Mbps (E2), 34 Mbps (E3) ...
WAN Technologies
ISP
Router
Interface
Converter
ISP PREMISES
PSTN
LL
Modem
G.703
LL
Modem
V.35
Router
CUSTOMER PREMISES
WAN Technologies
ISDN
Another alternative to using
analog telephones lines to
establish a connection is ISDN.
Speed is one advantage ISDN
has
over
telephone
line
connections.
ISDN network is a switched
digital network consisting of
ISDN Switches.
Each node in the network is
identified by hierarchical ISDN
address which is of 15 digits.
ISDN user accesses network
through a set of standard
interfaces provided by ISDN
User Interfaces.
WAN Technologies
ISDN
Two types of user access are defined
Basic Access - Consists of two 64Kbps user channels
(B channel) and one 16Kbps signally channel (D channel)
providing service at 144 Kbps.
B
D
Signaling 16Kbps
B
Primary
B
D
WAN Technologies
ISDN
TE1
ISDN devices
4W
S/T interface
TE2
NT1
2W
U interface
TA
Devices
NT1 - Interface Converter
TE1 - ISDN devices
TE2 Non ISDN Devices (need TA)
TA - Terminal Adapter (ISDN Modem)
WAN Technologies
X.25
Packet switched
switches.
Network
consisting
of
X.25
WAN Technologies
WAN Technologies
Frame Relay
Designed to be more efficient than X.25
Developed before ATM
Call control carried in separate logical connection
No hop by hop error or flow control
End to end flow and error control (if used) are done
by higher layer
Single user data frame sent from source to
destination and ACK (from higher layer) sent back
Two type of Virtual Circuits defined
Permanent virtual circuits (PVCs)
Switched virtual circuits (SVCs)
WAN Technologies
ATM
Small fixed size packets of 53 bytes, called cells, are
used for transferring information.
Each cell has 5 bytes of header and 48 bytes of
payload for user information.
Connection oriented protocol.
A virtual Circuit is established between the
communicating nodes before data transfer takes
place.
Can be seamlessly used in LANs and WANs.
Almost unlimited scalability.
Provides quality of service guaranties.
WAN Technologies
WAN Technologies
ADSL
WAN Technologies
Cable Modems
The cable modem connects a computer
to the cable company network through
the same coaxial cabling that feeds
cable TV (CATV) signals to a television
set.
Uses Cable Modem at Home End and
CMTS (Cable Modem Termination
System) at Head End.
Characteristics:
Shared bandwidth technology
10 Mbps to 30 Mbps downstream
128Kbps-3 Mbps upstream
Maximum Distance from provider to
customer site: 30 miles
WAN Technologies
Cable Modems
WAN Technologies
MICROWAVE LINK
Router
ISP
Network
RF
Modem
RF
Modem
Router
Network
CUSTOMER PREMISES
ISP PREMISES
WAN Technologies
WAN Technologies
VSAT
Very Small Aperture Terminal (VSAT) provide
communication between two nodes through a
powerful Earth station called a Hub.
If two terminals want to communicate, they send
their messages to the satellite, which sends it to the
Hub and the Hub then broadcasts the message
through the satellite.
Typical
Bandwidth
9.6/19.2/32/64/128/256/512 Kbps.
offered
is
WAN Technologies
VSAT
Each satellite sends and receives
over two bands
Uplink: From the earth to the
satellite
Downlink: From the satellite to
the earth
Satellite frequency bands
Band
Downlink
C
3.7-4.2 GHz
Ku
11.7-12.2 GHz
Uplink
5.925-6.425 GHz
14-14.5 GHz
Internet Protocol
INTERNET PROTOCOL
Internet Protocol
IP as a Routed Protocol
IP
is
a
connectionless,
unreliable, best-effort delivery
protocol.
IP accepts whatever data is
passed down to it from the
upper layers and forwards the
data in the form of IP Packets.
All the nodes are identified
using an IP address.
Packets are delivered from the
source to the destination using
IP address
Internet Protocol
Packet Propagation
Internet Protocol
IP Address
IP address is for the INTERFACE of a host. Multiple
interfaces mean multiple IP addresses, i.e., routers.
32 bit IP address in dotted-decimal notation for ease
of reading, i.e., 193.140.195.66
Address 0.0.0.0, 127.0.0.1
carries special meaning.
and
255.255.255.255
Internet Protocol
IP Address
Internet Protocol
IP Address
Internet Protocol
IP Address
Class A : Address begins with bit 0. It has 8 bit
network number (range 0.0.0.0-to-127.255.255.255),
24 bit host number.
Class B : Address begins with bits 10. It has 16 bit
network
number
(range
128.0.0.0-to191.255.255.255), 16 bit host number.
Class C : Address begins with bits 110. It has 24 bit
network
number
(range
192.0.0.0-to223.255.255.255), 8 bit host number.
Class D : Begins with 1110, multicast addresses
(224.0.0.0-to-239.255.255.255)
Class E : Begins with 11110, unused
Internet Protocol
Subnet Mask
Consider IP address = 192.168.2.25
First few bits (left to right) identify network/subnet
Remaining bits identify host/interface
Number of subnet bits is called subnet mask, e.g.
Subnet IP Address range is 192.168.2.0
192.168.2.255 or Mask = 255.255.255.0
Internet Protocol
Internet Protocol
IP Configuration of an Interface
Static
DHCP
Internet Protocol
ARP
ARP (Address Resolution Protocol) is used in
Ethernet Networks to find the MAC address of a
node given its IP address.
Source node (say 192.168.2.32) sends broadcast
message (ARP Request) on its subnet asking ``Who
is 192.168.2.33.
All computers on subnet receive this request
Destination responds (ARP Reply) since it has
192.168.2.33
Provides its MAC address in response
Internet Protocol
IPv6
Internet Protocol Version 4 is the most popular protocol in
use today, although there are some questions about its
capability to serve the Internet community much longer.
IPv4 was finished in the 1970s and has started to show its
age.
The main issue surrounding IPv4 is addressingor, the
lack of addressingbecause many experts believe that we
are nearly out of the four billion addresses available in
IPv4.
Although this seems like a very large number of addresses,
multiple large blocks are given to government agencies
and large organizations.
IPv6 could be the solution to many problems posed by IPv4
Internet Protocol
IPv6
IPv6 uses 128 bit address instead of 32 bit address.
The IPv6 addresses are being distributed and are
supposed to be used based on geographical
location.
Routing
ROUTING
Routing
Router
A router is a device that determines the next
network point to which a packet should be
forwarded toward its destination
Allow different networks to communicate with each
other
A router creates and maintain a table of the
available routes and their conditions and uses this
information to determine the best route for a given
packet.
A packet will travel through a number of network
points with routers before arriving at its destination.
There can be multiple routes defined. The route with
a lower weight/metric will be tried first.
Routing
Routing
Routing
Routing Protocols
Static Routing
Dynamic Routing
IGP (Interior Gateway
Autonomous System
Protocol):
Route
data
within
an
EGP
Route
data
between
Internetworking Devices
Internetworking Devices
Device
Description
Hub
Bridge
Switch
Router
VLAN
VLAN
VLAN
VLANs
VLANs (Virtual LAN) enable network managers to
group users logically (based on functions, project
teams or applications) rather than by physical
location.
Traffic can only be routed between VLANs.
VLANs provide the segmentation traditionally
provided by physical routers in LAN configuration.
VLAN
VLAN
TCP/UDP
TCP/UDP
TCP/UDP
TCP/UDP
Transport Layer Protocol
TCP is connection Oriented (uses checksum and
acknowledgment)
UDP is Connectionless
Both use the concept of Connection Port Number
(16 Bit Source Port Number and Destination Port
Number)
Standard Applications have standard Port Numbers
(Email 25, Telnet 23, FTP 20 & 21, SSH 22)
Natting
NATTING
Natting
Natting
NAT
NAT (Network Address Translation) Maps Private
IPs to Public IPs
It is required because of shortage of IPv4 Address
H1
H3
H2
10.0.1.2
10.0.1.3
Private network 1
H5
213.168.112.3
10.0.1.1
Router/NAT
128.195.4.119
H4
10.0.1.2
10.0.1.1
Internet
10.0.1.3
Private network 2
Router/NAT
128.143.71.21
Natting
NAT
Static NAT : Maps unique Private IP to unique
Public IP
Dynamic NAT : Maps Multiple Private IP to a Pool of
Public IPs (Port Address Translation : Maps a Public
IP and Port Number to a service in Private IP)
Source = 128.143.71.21
Source port = 3200
Source = 10.0.1.2
Source port = 2001
Private address: 10.0.1.2
H1
Private network
Private address: 10.0.1.3
H2
Source = 10.0.1.3
Source port = 1090
NAT
128.143.71.21
Internet
Source = 128.143.71.21
Destination = 4444
SNMP
SNMP
SNMP
SNMP
SNMP
SNMP is based on the
manager/agent
model
consisting of a manager, an
agent,
a
database
of
management
information,
called as MIB.
The manager provides the
interface between the human
network manager and the
management system.
The agent provides the
interface
between
the
manager and the physical
device(s) being managed.
SNMP
SNMP
SNMP uses five basic messages (GET, GET-NEXT, GETRESPONSE, SET, and TRAP) to communicate between the
manager and the agent.
The GET and GET-NEXT messages allow the manager to
request information for a specific variable. The agent, upon
receiving a GET or GET-NEXT message, will issue a GETRESPONSE message to the manager with either the
information requested or an error indication as to why the
request cannot be processed.
A SET message allows the manager to request a change be
made to the value of a specific variable in the case of an alarm
remote that will operate a relay. The agent will then respond
with a GET-RESPONSE message indicating the change has
been made or an error indication as to why the change cannot
be made.
The TRAP message allows the agent to spontaneously inform
the manager of an important event.
VPN
VPN
VPN
VPN
VPN is a private connection between two systems
or networks over a shared or public network
(typically Internet).
VPN technology lets an organization securely
extend its network services over the Internet to
remote users, branch offices, and partner
companies.
In other words, VPN turns the Internet into a
simulated private WAN.
VPN is very appealing since the Internet has a
global presence, and its use is now standard
practice for most users and organizations.
VPN
VPN
VPN
VPN
VPN
Enterprise Network
ENTERPRISE NETWORK
IMPLEMENTATION
Enterprise Network
Enterprise Network
Firewall
Backbone Switch
Distribution Switch
Access Switch
Internet
Enterprise Network
Enterprise Network
Distribution
Switch
Backbone
Switch
Distribution
Switch
Distribution
Switch
Distribution
Switch
Distribution
Switch
Backbone
Switch
Distribution
Switch
Distribution
Switch
Distribution
Switch
Backbone
Switch
Distribution
Switch
Enterprise Network
Campus Network
The residential connectivity can be provided on
Ethernet/Dial-up/ADSL.
The Internet connectivity can be provided on leased
line.
Enterprise Network
Enterprise Network
Enterprise Network
Enterprise Network
Enterprise Network
Enterprise WAN
Server
Farm
Corporate Head Office
Branch Office
Service Provider
Network
Branch Office
Branch Office
Enterprise Network
Enterprise Network
Enterprise Network
Enterprise Network
ISP
networ
k
Bandwidth-limited
links
ISP
network
Customer Networks
Backbone
networks
Customers connect to
an ISP
ISPs connect to
backbone
Enterprise Network
Cisco Devices
CONFIGURING CISCO
SWITCH AND ROUTER
Cisco Devices
Cisco Devices
Ciscos Routers
Cisco Devices
Hardware Components
Depending on the model/series (at least)
Mother Board/Back Plane
CPU (RISC - MIPS or Motorola)
Memory
Bus
I/O interfaces/Modules
Cisco Devices
Memory Components
Flash Memory Holds the IOS; is not
erased when the router is reloaded; is an
EEPROM
[Electrically
Erasable
Programmable
Read-Only
Memory]
created by Intel, that can be erased and
reprogrammed repeatedly through an
application of higher than normal electric
voltage
NVRAM Non-Volatile RAM - holds
router configuration; is not erased when
router is reloaded
RAM Holds packet buffers, ARP cache,
routing table, software and data structure
that allows the router to function; runningconfig is stored in RAM, as well as the
decompressed IOS in later router models
ROM Starts and maintains the router
Cisco Devices
What is IOS?
Internetwork Operating System
Operating System of all Cisco Devices
A derivative of BSD UNIX
Custom built by Cisco for each platform
Pre-packaged and static. Complete IOS is upgraded.
Features available in different versions (for a price!)
GUIs available, but 90%+ of users still prefer commandline configuration.
IOS is designed to be hardware independent.
Cisco Devices
Cisco Devices
Mode
Only
Status
monitored
can
be
Enable
Mode
Configuration
can
changed and seen
be
Cisco Devices
CLI Commands
Exhaustive Command List
Type help or ? to see list of commands
Type command ? to see the possible command
options
Commands can be auto-completed using TAB
Up-Arrow, Down-Arrow
command history
can
be
used
to
see
Cisco Devices
Show Configuration
sh run : To see running configuration
sh conf : To see saved configuration
Cisco Devices
Save Configuration
wr mem
Cisco Devices
Configuration Mode
conf t
Cisco Devices
Cisco Devices
General Commands
hostname
ip default-gateway
ip name-server
ip routing
ip route
ip multicast-routing
banner
Cisco Devices
Cisco Devices
Interface Commands
ip address < ip address > < netmask >
ip address < ip address > < netmask > secondary
duplex full/half/auto
speed 10/100/1000/auto
bandwidth < bandwidth in kbps >
description < interface description >
shutdown
encapsultaion hdlc/ppp
Cisco Devices
Cisco Devices
Cisco Devices
Cisco Devices
Cisco Devices
Diagnostic Commands
ping
traceroute
Cisco Devices
Cisco Devices
Internet Applications
INTERNET
APPLICATIONS
Internet Applications
Internet Applications
Domain Name Service
Proxy Service
Mail Service
Web Service
DNS
DNS
DNS
.com
.net
.org
.tcd
.in
.ac
.iitk
www
www
.co
DNS Setup
DNS Operation
A DNS server maintains the name to IP address mapping
of the domain for which it is the name server.
The DNS server for a domain is registered with the
domain registrar and the entry is maintained by the
Internet Root-Servers (13) or Country Level Root-Servers.
Whenever a server is queried, if doesnt have the answer,
the root servers are contacted.
The root servers refer to the DNS server for that domain
(in case the domain is a top level domain) or the Country
Root Server (in case the domain is country level domain).
Proxy Server
PROXY SERVER
Proxy Server
Internet Connections
ISP
networ
k
ISP
networ
k
Bandwidth-limited
links
ISP
network
Customer Networks
Backbone
networks
Customers connect to
an ISP
ISPs connect to
backbone
Proxy Server
Internet Connections
Cost of connections is based on bandwidth
Cost of connection is a major part of network cost
Organisations only obtain as much bandwidth as
they
can afford
Many organisations in Asia-Pacific only have 64kb/s
2Mb/s connections (as compared to their counterpart
in US and Europe who have bandwidths of 2.4 Gbps
10 Gbps)
Proxy Server
browser
proxy
web
Proxy Server
Browser caches
Proxy caches
Proxy Server
Why Cache?
Shorter response time
Reduced bandwidth requirement
Reduced load on servers
Access control and logging
Proxy Server
it
is
powerful,
Web Server
WEB SERVER
Web Server
Web Server
HTTP (Hyper Text Transfer Protocol) is used to
transfer web pages from a Web Server to Web
Client (Browser)
Web Pages are arranged in a directory structure in
the Web Server
HTTP supports CGI (Common Gateway interface)
HTTP supports Virtual Hosting (Hosting multiple
sites on the same server)
Popular Web Servers
Apache
Windows IIS
IBM Websphere
Mail Architecture
Internet
Mail
Server
Mail Client
Mail
Server
Mail Client
Mail Architecture
Mail Architecture
Simple Mail Transfer Protocol (SMTP) is used to
transfer mail between Mail Servers over Internet
Post Office Protocol (PoP) and Interactive Mail
Access Protocol (IMAP) is used between Client and
Mail Server to retrieve mails
The mail server of a domain is identified by the MX
record of that domain
Popular Mail Servers
Sendmail/Postfix
Microsoft Exchange Server
IBM Lotus
DNS Setup
DNS CONFIGURATION
DNS Setup
DNS Configuration
named daemon is used
A DNS Server may be caching/master/slave server
The named.ca file has information of all Root Servers.
There is a Forward Zone file and a Reverse Zone file for every
domain.
Configuration file:
/var/named/chroot/etc/named.conf
Forward Zone File:
/var/named/chroot/var/named/<forward_zone_file>
Reverse Zone File:
/var/named/chroot/var/named/<reverse_zone_file>
DNS Setup
DNS Setup
DNS Setup
DNS Setup
DNS Setup
Test DNS
nslookup
host
dig
Test your DNS with the following DNS diagnostics
web site: dnsstuff.com
Apache Setup
APACHE SETUP
Web Server
Apache Web Server is used
Daemon is httpd (service httpd start/stop/restart)
Basic Settings
Change the default value for ServerName
www.<your-domain.com> in httpd.conf and put the
website content in /var/www/html
Additionally you can configure Name based Virtual
Hosting (allow more than one websites to run on
the same server)
Virtual Hosting
NameVirtualHost
*:80
<VirtualHost *:80>
ServerName server-name
DocumentRoot path-to-virtual-document-root
</VirtualHost>
<VirtualHost *:80>
ServerName server-name
DocumentRoot path-to-virtual-document-root
</VirtualHost>
Squid Setup
SQUID SETUP
Squid Setup
Obtaining Squid
Source code (in C) from www.squid-cache.org
Binary executables
Linux (comes with RedHat and others)
FreeBSD
Windows
Pre-installed in Fedora/Enterprise Linux
Squid Setup
Basic Settings
Edit the /etc/squid/squid.conf file to configure squid
Configuration options:
Disk Cache size and location
Authentication
Allowed Hosts
Any other access restrictions (sites, content, size,
time of access etc.) using ACL
service squid start/stop/restart
Squid Setup
Disc Requirements
Squid makes very heavy use of disc because of
heavy read/write in cache
Needs discs with low seek times
SCSI is better
Can spread cache over 2 or more discs
Raid not recommended
Cached data is not critical
Squid Setup
Squid Setup
program
Sendmail Setup
SENDMAIL SETUP
Sendmail Configuration
Daemon: sendmail
Configuration File: /etc/mail/sendmail.mc
Edit the following lines
LOCAL_DOMAIN(`localhost.localdomain')dnl
(Replace localhost.localdomain by the domain name for which
the mail server is being configured)
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1,
Name=MTA')dnl
(comment this line by adding dnl at the start of the line)
dnl MASQUERADE_AS(`mydomain.com')dnl
(remove dnl & replace mydomain.com by the domain name)
Sendmail Setup
Sendmail Configuration
Add the range of IP addresses of your network in
access file
(e.g. 172.31.
Relay)
Run make C /etc/mail command to compile
sendmail.mc and generate sendmail.cf file.
Restart sendmail and watch for errors
Sendmail Setup
Firewall
FIREWALL
Firewall
Basic Setup
Internet
Application
Web Server
Database
Firewall
Firewall
Firewall Rules
IP Address of Source (Allow from Trusted Sources)
IP Address of
Destinations)
Destination
(Allow
to
trusted
Firewall
Firewall Implementation
Hardware Firewall: Dedicated Hardware Box (Cisco
PIX, Netscreen )
Software Firewall: Installable on a Server ( )
Host OSs (Windows XP/Linux) also provide
software firewall features to protect the host
Linux Security
LINUX Firewall
Use GUI (Applications ->System Settings->
Security Level) to activate the firewall
Allow standard services and any specific port
based application
All other services and ports are blocked
Linux Security
LINUX Firewall