Computernetworking 130909043556
Computernetworking 130909043556
Computernetworking 130909043556
Networking
Network
• LAN
Local Area Networks are used to connect networking devices that are in a
very close geographic area such as a floor of a building, a building itself or
within a campus.
• MAN
Metropolitan Area Network are used to connect networking devices that
may span around the entire city.
• WAN
Wide Area Networks which connects two or more LANs present at different
geographical locations.
LAN
Banjara Hills
HUB LAN
MAN
LAN LAN
HUB SWITCH
MAN
WAN
www.cms.com
Hyderabad vijayawada
WAN
Router Router
HUB SWITCH
LAN LAN
Basic requirements to form a network
• Media
• Protocols
• Ethernet cards have a unique 48 bit address called as MAC (Media access
control) address
– MAC address is also called as Physical address or hardware address
– Example: 0 0 1 6 . D 3 F C . 6 0 3 F
• The purpose of the media is to transport bits from one machine to another.
Media
Guided Unguided
UTP STP
Media
Co-axial cable
UTP Cable
Fiber optic
Networking devices
• Repeater
• Hub
• Bridge
• Switch
• Router
Hub / Repeater
• Bandwidth is shared.
• Half-duplex communication.
Functions of HUB
HUB Data
Data
Functions of HUB
Data
HUB Data
Data
Switch
• It is an Intelligent device.
• Forwarding
Functions of Switch
1
2 8
3 7
4 5 6
Functions of Switch
Source MAC 3
001C.C01A.0002
S Data
Destination MAC
DATA 4
001C.C01A.0004 5
001C-C01A-0002
6
D
7
001C-C01A-0004
8
Functions of Switch
Bridge Switch
• It is an Intelligent device
• Bus
• Ring
• Mesh
• Star
Bus Topology
• A break at any point along the backbone will result in total network failure.
Ring Topology
• The disadvantage is the number of NIC’s required on each device and the
complex cabling.
Star Topology
HUB/Switch
IP Address
01010101000001011011111100000001
• 32 bits are divided into 4 Octets:
1 1 1 1 1 1 1 1 = 255
IP Address Classification
• CLASS A
• CLASS C
• Most significant bit(s) from the first octet are selected for Priority Bit(s).
• In Class A : First bit of the first octet is reserved as priority bit, bit value is
zero.
• 0xxxxxxx. xxxxxxxx. xxxxxxxx. xxxxxxxx
27 2 6 25 24 23 22 21 20
0 0 0 0 0 0 0 0 = 0
0 0 0 0 0 0 0 1 = 1
Class A Range
0 0 0 0 0 0 1 0 = 2
0 . 0 . 0 . 0 to
0 0 0 0 0 0 1 1 = 3
127.255.255.255
0 0 0 0 0 1 0 0 = 4
Exception
0.X.X.X and 127.X.X.X networks
0 1 1 1 1 1 1 1 = 127 are reserved
Class B Range
• In Class B : First two bits of the first octet are reserved as priority bits, bit
value as 10.
• 10xxxxxx. xxxxxxxx. xxxxxxxx. Xxxxxxxx
27 2 6 25 24 23 22 21 20
1 0 0 0 0 0 0 0 = 128
1 0 0 0 0 0 0 1 = 129
1 0 0 0 0 0 1 0 = 130
1 0 0 0 0 0 1 1 = 131
1 0 0 0 0 1 0 0 = 132 Class B Range
128 . 0 . 0 . 0 to
1 0 1 1 1 1 1 1 = 191 191 . 255 . 255 .255
Class C Range
• In Class C : First three bits of the first octet are reserved as priority bits, bit
value as 110.
• 110xxxxx. xxxxxxxx. xxxxxxxx. Xxxxxxxx
27 2 6 25 24 23 22 21 20
1 1 0 0 0 0 0 0 = 192
1 1 0 0 0 0 0 1 = 193
1 1 0 0 0 0 1 0 = 194
1 1 0 0 0 0 1 1 = 195
1 1 0 0 0 1 0 0 = 196 Class C Range
192 . 0 . 0 . 0 to
1 1 0 1 1 1 1 1 = 223 223 . 255 . 255 .255
Class D Range
• In Class D : First four bits of the first octet are reserved as priority bits, bit
value as 1110.
• 1110xxxx. xxxxxxxx. xxxxxxxx. Xxxxxxxx
27 2 6 25 24 23 22 21 20
1 1 1 0 0 0 0 0 = 224
1 1 1 0 0 0 0 1 = 225
1 1 1 0 0 0 1 0 = 226
1 1 1 0 0 0 1 1 = 227
1 1 1 0 0 1 0 0 = 228 Class D Range
224 . 0 . 0 . 0 to
1 1 1 0 1 1 1 1 = 239 239 . 255 . 255 .255
Class E Range
• In Class E : First four bits of the first octet are reserved as priority bits, bit
value as 1111.
• 1111xxxx. xxxxxxxx. xxxxxxxx. Xxxxxxxx
27 2 6 25 24 23 22 21 20
1 1 1 1 0 0 0 0 = 240
1 1 1 1 0 0 0 1 = 241
1 1 1 1 0 0 1 0 = 242
1 1 1 1 0 0 1 1 = 243
1 1 1 1 0 1 0 0 = 244 Class E Range
240 . 0 . 0 . 0 to
1 1 1 1 1 1 1 1 = 255 255 . 255 . 255 .255
Octet Format
• No. of Host
= 2no of host bits -2
= 224 – 2 (-2 is for Network ID & Broadcast ID)
= 16777216 - 2
= 16777214 Hosts/Network
CLASS B – No. Networks & Hosts
• No. of Host
= 2no of host bits -2
= 216 – 2 (-2 is for Network ID & Broadcast ID)
= 65536 - 2
= 65534 Hosts/Network
CLASS C – No. Networks & Hosts
• No. of Host
= 2no of host bits -2
= 28 – 2 (-2 is for Network ID & Broadcast ID)
= 256 - 2
= 254 Hosts/Network
Network & Broadcast Address
• Network address: IP address with all bits as ZERO in the host portion.
• Broadcast address: IP address with all bits as ONES in the host portion.
• Valid IP Addresses lie between the Network Address and the Broadcast
Address.
• Class A : N.H.H.H
Network Address :
0xxxxxxx.00000000.00000000.00000000
Broadcast Address :
0 x x x x x x xClass
. 1 1A1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1
10.0.0.0 Network Address
10.0.0.1
10.0.0.2
10.0.0.3
Valid IP Addresses
10.255.255.254
10.255.255.255 Broadcast Address
Example - Class B
• Class B : N.N.H.H
Network Address :
10xxxxxx.xxxxxxxx.00000000.00000000
Broadcast Address :
1 0 x x x x x Class
x . x xBx x x x x x . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1
172.16.0.0 Network Address
172.16.0.1
172.16.0.2
172.16.0.3 Valid IP Addresses
172.16.255.254
172.16.255.255 Broadcast Address
Example - Class C
• Class C : N.N.N.H
Network Address :
110xxxxx.xxxxxxxx.xxxxxxxx.00000000
Broadcast Class
AddressC :
1 1 0 x x x x 192.168.1.0
x . x x x x x x x x . x x x x x x x x . 1 1Network
1 1 1 1 1Address
1
192.168.1.1
192.168.1.2
192.168.1.3
Valid IP Addresses
192.168.1.254
192.168.1.255 Broadcast Address
Private IP Address
• There are certain addresses in each class of IP address that are reserved for
Private Networks. These addresses are called private addresses.
• These addresses are not Routable (or) valid on Internet.
Class A
10.0.0.0 to 10.255.255.255
Class B
172.16.0.0 to 172.31.255.255
Class C
192.168.0.0 to 192.168.255.255
Subnet Mask
• Represented with all 1’s in the network portion and with all 0’s in the host
portion.
Subnet Mask - Examples
• Class A : N.H.H.H
11111111.00000000.00000000.00000000
Default Subnet Mask for Class A is 255.0.0.0
• Class B : N.N.H.H
11111111.11111111.00000000.00000000
Default Subnet Mask for Class B is 255.255.0.0
• Class C : N.N.N.H
11111111.11111111.11111111.00000000
Default Subnet Mask for Class C is 255.255.255.0
How Subnet Mask Works ?
IP Address : 192.168.1.1
Subnet Mask : 255.255.255.0
ANDING PROCESS :
192.168.1.1 = 11000000.10101000.00000001.00000001
255.255.255.0 = 11111111.11111111.11111111.00000000
==================================================
192.168.1.0 = 11000000.10101000.00000001.00000000
==================================================
Answer : Class C.
HUB
LAN
Scenario for subnetting
192.168.1.10
192.168.1.20 192.168.1.60
192.168.1.30 192.168.1.70
HUB
192.168.1.50 192.168.1.90
192.168.1.100
Scenario (…continued)
• Administrator’s Requirement :
Inter-department communication should not be possible ?
Solution.
Allocate a different Network to each Department
i.e.
HUB
LAN
Scenario for subnetting
192.168.1.1
192.168.1.2 192.168.2.1
192.168.1.3 192.168.2.2
HUB
192.168.1.50 192.168.2.4
192.168.2.50
Main Aim of Subnetting
POWER TABLE
Class C : N.N.N.H
110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
Class C : 192.168.1.0
No. of Subnet
= 2n – 2 ≥ Req. of Subnet
= 22 – 2 ≥ 2 (-2 is for First & Last Subnet Range)
= 4–2
= 2 Subnet
No. of Host
= 2h – 2 (-2 is for Network ID & Broadcast ID)
= 26 – 2
= 64 – 2
= 62 Hosts/Subnet
Example – 1 (Continued…)
CLASS C: N.N.N.H
110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
Class C : 192.168.1.0
No. of Subnet
= 2n – 2 ≥ Req. of Subnet
= 24 – 2 ≥ 14(-2 is for First & Last Subnet Range)
= 16– 2
= 14 Subnet
No. of Host
= 2h – 2 (-2 is for Network ID & Broadcast ID)
= 24 – 2
= 16 – 2
= 14 Hosts/Subnet
EXAMPLE – 2 (Continued…)
192.168.1.240 192.168.1.255
Requirement of Hosts is 40 ?
Example – 3
Class C : N.N.N.H
1 1 0 x x xx x .x x x xx x x x . x xx x x xx x .x x x xx x x x
Class C : 192.168.1.0
No. of Host
= 2h – 2 ≥ Req. of Host
= 26 – 2 ≥ 40 (-2 is for Network ID & Broadcast ID)
= 64 – 2
= 62 Hosts/Subnet
No. of Subnet
= 2n – 2 (-2 is for First & Last Subnet Range)
= 22 – 2
= 4–2
= 2 Subnet
Example – 3 (Continued…)
Class C : N.N.N.H
1 1 0 x x xx x .x x x xx x x x . x xx x x xx x .x x x xx x x x
Class C : 192.168.1.0
No. of Host
= 2h – 2 ≥ Req. of Host
= 22 – 2 ≥ 2 (-2 is for Network ID & Broadcast ID)
= 4–2
= 2 Hosts/Subnet
No. of Subnet
= 2n – 2 (-2 is for First & Last Subnet Range)
= 26 – 2
= 64 – 2
= 62 Subnet
Example – 2 (Continued…)
192.168.1.248 192.168.1.251
192.168.1.252 192.168.1.255
Requirement of Networks is 2 ?
Example – 4
Class B : N.N.H.H
1 0 x x x x x x .x x xx x x xx . xx x x xx x x .x xx x x xx x
Class B : 172.16.0.0
No. of Subnet
= 2n – 2 ≥ Req. of Subnet
= 22 – 2 ≥ 2 (-2 is for First & Last Subnet Range)
= 4–2
= 2 Subnet
No. of Host
= 2h – 2 (-2 is for Network ID & Broadcast ID)
= 214 – 2
= 16384 – 2
= 16382 Hosts/Subnet
Example – 4 (Continued…)
Range of Networks
Network ID Broadcast ID
172.16.0.0 172.16.63.255
172.16.64.0 172.16.127.255 Valid Subnets
172.16.128.0 172.16.191.255
172.16.192.0 172.16.255.255
Requirement of Hosts is 126 ?
Example – 5
Class B : N.N.H.H
1 0 x x x x x x .x x xx x x xx . xx x x xx x x .x xx x x xx x
Class B : 172.16.0.0
No. of Host
= 2h – 2 ≥ Req. of Host
= 27 – 2 ≥ 126 (-2 is for Network ID & Broadcast ID)
= 128 – 2
= 126 Hosts/Subnet
No. of Subnet
= 2n – 2 (-2 is for First & Last Subnet Range)
= 29 – 2
= 512 – 2
= 510 Subnet
Example – 2 (Continued…)
172.16.255.0 172.16.255.127
172.16.255.128 172.16.255.255
VLSM
• VLSMs provide the capability to include more than one subnet mask within
a major network
Scenario
Answer : You will use the subnet range to further divide it into smaller ranges,
this time its Subnetting of a Subnet i.e. VLSM.
Calculation of FLSM
Class C : N.N.N.H
1 1 0 x x xx x .x x x xx x x x . x xx x x xx x .x x x xx x x x
Class C : 192.168.1.0
No. of Subnet
= 2n – 2 ≥ Req. of Subnet
= 23 – 2 ≥ 5 (-2 is for First & Last Subnet Range)
= 8–2
= 6 Subnet
No. of Host
= 2h – 2 (-2 is for Network ID & Broadcast ID)
= 25 – 2
= 32 – 2
= 30 Hosts/Subnet
Example – 1 (Continued…)
ZOOM Technologies
– MCSE 192.168.1.32 – 1.63/27
– CISCO 192.168.1.64 – 1.95/27
– CCNA
– CCNP
– FIREWALL 192.168.1.96 – 1.127/27
– ISA
– Checkpoint
– NetASQ
– Clavister
– Cisco PIX
– SOLARIS 192.168.1.128 – 1.159/27
– Linux
– Unix
– Solaris
– TRAINING 192.168.1.160 – 1.191/27
Calculation of VLSM for CISCO Dept.
Class C : N.N.N.H
1 1 0 x x xx x .x x x xx x x x . x xx x x xx x .x x x xx x x x
Class C : 192.168.1.64
No. of Subnet
= 2n ≥ Req. of Subnet
= 21 ≥ 2
= 2
= 2 Subnet
No. of Host
= 2h – 2 (-2 is for Network ID & Broadcast ID)
= 24 – 2
= 16 – 2
= 14 Hosts/Subnet
VLSM (Continued…)
Range of Networks
Network ID Broadcast ID
192.168.1.64 192.168.1.79 Valid Subnets
192.168.1.80 192.168.1.95
Assigning of the Ranges
ZOOM Technologies
– MCSE 192.168.1.32 – 1.63/27
– CISCO 192.168.1.64 – 1.95/27
– CCNA 192.168.1.64 – 1.79/28
– CCNP 192.168.1.80 – 1.95/28
– FIREWALL 192.168.1.96 – 1.127/27
– ISA
– Checkpoint
– NetASQ
– Clavister
– Cisco PIX
– SOLARIS 192.168.1.128 – 1.159/27
– Linux
– Unix
– Solaris
– TRAINING 192.168.1.160 – 1.191/27
Calculation of VLSM for Firewall Dept.
Class C : N.N.N.H
1 1 0 x x xx x .x x x xx x x x . x xx x x xx x .x x x xx x x x xx
110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxx
Class C : 192.168.1.96
No. of Subnet
= 2n ≥ Req. of Subnet
= 23 ≥ 5
= 8
= 8 Subnet
No. of Host
= 2h – 2 (-2 is for Network ID & Broadcast ID)
= 22 – 2
= 4–2
= 2 Hosts/Subnet
VLSM (Continued…)
ZOOM Technologies
– MCSE 192.168.1.32 – 1.63/27
– CISCO 192.168.1.64 – 1.95/27
– CCNA 192.168.1.64 – 1.79/28
– CCNP 192.168.1.80 – 1.95/28
– FIREWALL 192.168.1.96 – 1.127/27
– ISA 192.168.1.96 – 1.99/30
– Checkpoint 192.168.1.100 – 1.103/30
– NetASQ 192.168.1.104 – 1.107/30
– Clavister 192.168.1.108 – 1.111/30
– Cisco PIX 192.168.1.112 – 1.115/30
– SOLARIS 192.168.1.128 – 1.159/27
– Linux
– Unix
– Solaris
– TRAINING 192.168.1.160 – 1.191/27
Calculation of VLSM for Solaris Dept.
Class C : N.N.N.H
1 1 0 x x xx x .x x x xx x x x . x xx x x xx x .x x x xx x x x
Class C : 192.168.1.128
No. of Subnet
= 2n ≥ Req. of Subnet
= 22 ≥ 3
= 4
= 4 Subnet
No. of Host
= 2h – 2 (-2 is for Network ID & Broadcast ID)
= 23 – 2
= 8–2
= 6 Hosts/Subnet
VLSM (Continued…)
Range of Networks
Network ID Broadcast ID
192.168.1.128 192.168.1.135
192.168.1.136 192.168.1.143
Valid Subnets
192.168.1.144 192.168.1.151
192.168.1.152 192.168.1.159
Assigning of the Ranges
ZOOM Technologies
– MCSE 192.168.1.32 – 1.63/27
– CISCO 192.168.1.64 – 1.95/27
– CCNA 192.168.1.64 – 1.79/28
– CCNP 192.168.1.80 – 1.95/28
– FIREWALL 192.168.1.96 – 1.127/27
– ISA 192.168.1.96 – 1.99/30
– Checkpoint 192.168.1.100 – 1.103/30
– NetASQ 192.168.1.104 – 1.107/30
– Clavister 192.168.1.108 – 1.111/30
– Cisco PIX 192.168.1.112 – 1.115/30
– SOLARIS 192.168.1.128 – 1.159/27
– Linux 192.168.1.128 – 1.135/29
– Unix 192.168.1.136 – 1.143/29
– Solaris 192.168.1.144 – 1.151/29
– TRAINING 192.168.1.160 – 1.191/27
OSI
communication.
OSI Model Layers
Layer - 7 Application
User support Layers
Layer - 6 Presentation or
Software Layers
Layer - 5 Session
Session
Transport
Network
Data Link
Physical
Examples of Networking Services
HTTP 80
FTP 21
SMTP 25
TELNET 23
TFTP 69
Data flow from Application Layer
Application Data
80 21 25 53 67 69
Presentation
Session
Transport
Network
Data Link
Physical
Presentation Layer
Physical
Data flow from Presentation Layer
Application Data
Presentation Data
Session
Transport
Network
Data Link
Physical
Session Layer
Session Layer
Application
It is responsible for establishing, maintaining
and terminating the sessions.
Presentation
Session ID is used to identify a session or
interaction.
Session
Examples :
RPC Remote Procedural Call
Transport SQL Structured Query Language
ASP AppleTalk Session protocol
Network
Data Link
Physical
Data flow from Session Layer
Application Data
Presentation Data
Session Data
Transport
Network
Data Link
Physical
Transport Layer
Transport Layer
Application
It provides data delivery mechanism between
the applications in the network.
Presentation
The major functions described at the Transport
Layer are..
Session
•Identifying Service
Transport •Multiplexing & De-multiplexing
•Segmentation
Network •Sequencing & Reassembling
•Error Correction
Data Link •Flow Control
Physical
Identifying a Service
Application
Presentation
Session
80 21 25 53 67 69
Transport
TCP - 6 UDP - 17
Network
Data Link
Physical
Transport Layer Protocols
TCP UDP
HELLO!
HOW HELLO! HOW ARE YOU ?
ARE YOU?
Data
Sequencing
HELLO!
HOW HELLO! HOW ARE YOU ?
ARE YOU?
Data
Sequencing
Data
Sequencing
Application Data
Presentation Data
Session Data
Transport THSegment
Data
Network
Data Link
Physical
Network Layer
Network Layer
Application
It provides Logical addressing & Path
determination (Routing)
Presentation
The protocols that work in this layer are:
Routed Protocols:
Session
IP, IPX, AppleTalk.. Etc
Routed protocols used to carry user data
Transport between hosts.
Routing Protocols:
Network RIP, OSPF.. Etc
Routing protocols performs Path determination
Data Link (Routing).
Physical
Data flow from Network Layer
Application Data
Presentation Data
Device that works at
Network Layer Session Data
is Router
Transport THSegment
Data
Network NH Packet
Segment
Data Link
Physical
Datalink Layer
Application Data
Presentation Data
Session Data
Physical
Physical Layer
Application Data
Presentation Data
Session Data
Transport THSegment
Data
Physical Bits
Comparison between OSI & TCP/IP Model
Application
Presentation Application
Session
Network Internet
Data Link
Network Access
Physical