robbins.networking.d..

droppercauseNetworking and Communications

Oct 28, 2013 (4 years and 2 months ago)

126 views























Networking

Fundamentals

Philip Robbins


JAN

2012

(DRAFT
: CISCO CERTIFIED NETWORK ASSOCIATE
)

Robbins (2012)

2

TABLE OF CONTENTS


SECTION 1: NETWORKING


ETHERNET



ADDRESSING

SUBNETTING

SUBNET CHART

EXAMPLE 1
-

CLASS C SUBNETTING

EXAMPLE 2
-

CLASS B
SUBNETTING

EXAMPLE 3
-

CLASS A SUBNETTING

SUPERNETTING







SECTION 2
: ROUTING













SECTION
3
: SWITCHING








Robbins (2012)

3






















SECTION 1: NETWORKING

Robbins (2012)

4

ETHERNET


Topologies: Point
-
to
-
point, Star, Ring, Bus, Mesh


Implementation:

IEEE


CABL
ING


TOPOLOGY

SPEED/DUPLEX/MEDIA


MAX RANGE

802.3

10BASE
-
5


Bus


10Mbs/Half/Thicknet


500m

80
2.3

10BASE
-
2


Bus


10Mbs/Half/Thinnet


185m

802.3

10/
100BASE
-
T

S
tar


10/100Mbs/Half/UTP


100m

802.3u

100BASE
-
T


Star


100Mbs/Half/Full/UTP

100m



100BASE
-
TX

Star







100m



100BASE
-
CX

Star



802.3u

100BASE
-
FX

Star


100Mbs/Full/Fiber Optic

400m

802.3ab

1000BASE
-
T

Star


1000Mbs/Full/UTP


100m



1000BASE
-
SX

Star


Fiber




550m



1000BASE
-
LX

Star


Fiber




10km

802.3Z

1000BASE
-
ZX

S
tar


1000Mbs/Full/Fiber Optic

7
0km

80
2.3Z

1000BASE
-
ZR

Star


1000Mbs/Full/Fiber Optic

80km


*
Half Duplex =
Part of collision domain.

Solution: CSMA/CD uses a
jam signal and backoff algorithm.


WAN
CONNECTION


DESCRIPTION




PROTOCOL

Leased Line


Point
-
to
-
point




PPP, HDLC, SLIP

Circuit
-
Swit
ched

Phone company as SP



PPP, HDLC, SLIP

Packet
-
Switched

Shared Bandwidth



Frame Relay, X.25

Cell
-
Switched


Constant frame size



ATM


Cisco T
hree
-
L
ayer
H
ierarchical
M
odel:

LAYER



DESCRIPTION

CORE




-

Fast speed. Moves data from distribution.

DISTRIB
UTION


-

Provides routing, packet filtering, QoS.


ACCESS



-

Provides access; connecting end
-
users.


Advantages: Scalability, cost savings, easy troubleshooting.


OSI Model
:

PDU
#
LAYER


DESCRIPTION

D
7
APPLICATION

-

Programs that can store, send, retr
ieve data.

D
6
PRESENTATION

-

Data representation
. i.e. file extensions

D 5
SESSION


-

Interhost communication
.

Simp/half/full duplex

S
4
TRANSPORT

-

TCP (connection
-
oriented, UDP (connectionless)

P
3
NETWORK


-

Deals with logical addressing. (IP
/ARP/routing)

F
2
DATA LINK

-

Prepares frame. Uses flat addressing: MAC

B
1
PHYSICAL


-

Binary transmission

between devices.


TCP/IP Model:

Application
,
Transport
,
Internet
,
Network Interface


Robbins (2012)

5

ETHERNET

(continued)


Well Known Ports:


0


-

1023

Regist
ered:



1024


-

49151

Private:




49152

-

65535


Common L4 TCP Ports:

20/21

-

FTP


23


-

TELNET

25


-

SMTP

53


-

DNS

80


-

HTTP

110


-

POP

119


-

NNTP

443


-

HTTPS


Common L4 UDP Ports:

53


-

DNS

67/68

-

DHCP

69


-

TFTP

123


-

NTP

161


-

SNMP


L2 Protocol
s:

Ethernet, Frame Relay, PPP, HDLC, CDP


L3 Protocols:

IP, IPX, ICMP, OSPF, IGRP, EIGRP, RIP, ISIS,

ARP (IP to MAC), RARP (MAC to IP)



Broadcast vs Collision Domain:



A collision domain is a section of the network
where data packets can
collide with o
ne another.
A
Broadcast domain

is a

network segment
that allow
s

broadcast messages
.


A

broadcast domain can contain multiple collision domains, but a
collision domain can never have more than one broadcast domain
associated with it
.




Robbins (2012)

6

Ethernet Network D
evices:

Hub



OSI L1

Ingress data (bits) from one port is sent to all
ports. Shared bandwidth.

E
ntire

/ single

collision domain.


Bridge



OSI L2

Looks at the destination of a frame before sending.
Two interface (
port) device.


Two collision domains.



Switch



OSI L2/L3

Forwards
out a single port
based on MAC address
es
.
Identical to a Bridge instead with multiple ports.

Every port on a switch is its own collision domain.


Router


OSI L
3

Forwards packets based on an IP address
es
.

Routers
s
e
p
a
r
ate networks
. Only device to block

broadcast
messages

(non
-
forwarding).

Separate broadcast domain for each port.





Robbins (2012)

7

ADDRESSING

(IPv4)


MAC address:
6 octets x 8 bits each

=
12 he
xadecimal =
48 bits total

IP addr
ess: 4 octets x 8 bits each = 32

bits total


Classful Ranges:

Reserved Ranges:


A


0
.0.0.0


127.255.255.255

B

128
.0.0.0


191.255.255.255

C

192
.0.0.0


223.255.255.255

D

224
.0.0.0


239.255.255.255

E

240
.0.0.0


255
.255.
255.255



10
.X.X.X

127
.X.X.X

172
.
16
.0.0


172
.
31
.255.255

192
.
168
.X.X



127.0.0.0/8


Loopback Addresses

127.0.0.1/32


Localhost

0.0.0.0



All Addresses / Default Gateway

(Summarization)

255.255.255.255

Broadcast







ADDRESSING (IPv6)

Robbins (2012)

8

SUBNETTING


Subnett
ing

happens when the subnet mask extends past the default
boundary for the address of interest.


CIDR

= Classless Inter
-
Domain Routing (slash notation) represents the
number of contiguous string of 1s in a row in the subnet mask.


A
subnet mask

identifie
s which part of an IP address is the network
component and which part is the host component.



The number of 0s at the end of the mask
always

defines how many hosts
are on each subnet,
regardless

of the address in use.


First

determine what class the addr
ess belongs to and the
n the

corresponding default mask for that class.


The
increment

is the spacing between subnets (how many IP addresses
apart)

and is simply the decimal value of the last bit, represented by
a 1, in the subnet mask.



The increment is
really the key to subnetting.


Hosts

are any network component that can be assigned an IP address.

The formula for the number of hosts on any network or subnet is given
by:


#

of
HOSTS

= 2
H



2



where H is the number of 0s at the end of the mask.



Design
:

2
H



2

> (Required) # of Hosts

Put the correct number of 0s at the end of the mask such that
2
H



2
is greater than or equal to the desired number of hosts.


No host can have the IP address in which all the host bits are set to
0 (Network ID), and no ho
st can have the IP address in which all the
host bits are set to 1 (Broadcast ID).










Robbins (2012)

9

The formula for the number of subnets is given by:



#

of
SUBNETS

= 2
S



where S is the number of bits in the subnet field (the
number of
1s
in
the mask past the de
fault boundary for that address
).



Design:

2
S

> Required # of Subnetworks


Extend the mask by the correct numbers of subnet bits (1s)
such that



Z
ero subnet rule
:

(ip subnet zero), set by default,
renders the first
(zero)
and last

subne
ts valid
:



ip
subnet zero


no ip subnet zero

(
can be used
)

vs

(
can’t be used
)


The formula for the number of subnets is then given by:


# of S
UBNETS

= 2
S


2



The
broadcast ID

is the address of everybody on the network or subnet.


The usable host ranges are defi
ned as:



FIRST

(
Usable
)

Host = Network ID + 1

LAST

(
Usable
)

Host = Broadcast ID
-

1



Unofficially the gateway or router for a subnet is assigned the first
or the last IP address available.


If two NetIDs are different, traffic has to be sent through a ro
uter
to get to other network.


A logical AND between a host’s IP and its mask determines its Network
ID:


Network ID = Host IP X Subnet Mask





Robbins (2012)

10

SUBNET CHART


CIDR

INC

MASK




BINARY



# ADDRESSES

-------------------------
---------------------------------
---
--

/32

1

255.255.255.
255

N.N.N.sssssss
s


1

/31

2

255.255.255.
254

N.N.N.
ssssss
s
H


2

/30

4

255.255.255.
252

N.N.N.
sssss
s
HH


4

/29

8

255.255.255.
248

N.N.N.
ssss
s
HHH


8


/28

16

255.255.255.
240

N.N.N.
sss
s
HHHH


16

/27

32

255.255.255.
224

N.N.N.
s
s
s
HHHHH


32

/26

6
4

255.255.255.
192

N.N.N.
s
s
HHHHHH


64

/
25

128

255.255.255.
128


N.N.N.
s
HHHHHHH


128




/24

1

255.255.255
.0


N.N.
sssssss
s
.H


256

/23

2

255.255.
254
.0


N.N.
ssssss
s
H.H


512

/22

4

255.255.
252
.0


N.N.
sssss
s
HH.H


1
,
024

/21

8

255.255.
248
.0


N.N.
ssss
s
HHH.H


2
,
048

/20

16

255.255.
240
.0


N.N.
sss
s
HHHH.H


4,096

/19

32

255.255.
224
.0


N.N.
ss
s
HHHHH.H


8,192

/18

64

255.255.
192
.0


N.N.
s
s
HHHHHH.H


16,384

/17

128

255.255.
128
.0


N.N.
s
HHHHHHH.H


32,768



/16

1

255.
255
.0.0


N.
sssssss
s
.H.H


65,536

/15

2

255.
254
.0.0


N.
ssssss
s
H.H.H


1
31,072

/14

4

255.
252
.0.0


N.
sssss
s
HH.H.H


262,144

/13

8

255.
248
.0.0



N.
ssss
s
HHH.H.H


524,288

/12

16

255.
240
.0.0


N.
sss
s
HHHH.H.H


1,048,576

/11

32

255.
224
.0.0



N.
ss
s
HHHHH.H.H


2,097,152

/10

64

255.
192
.0.0


N.
s
s
HHHHHH.H.H


4,194,304

/9

128

255.
128
.0.0


N.
s
HHHHHHH.H.H


8,388,608


/8

1

255
.0.0.0



sssssss
s
.H.H.H


16,777,216

/7

2

254
.0.0.0



ssssss
s
H.H.H.H


33,554,432

/6

4

252
.0.0.0



sssss
s
HH.H.H.H


67,108,864

/5

8

248
.0.0.0



ssss
s
HHH.H.H.H


134,217,728

/4

16

240
.0.0.0



sss
s
HHHH.H.H.H


268,435,456

/3

32

224
.0.0.0



ss
s
HHHHH.H.H.H


536,870,912

/2

64

192
.0.0.0



s
s
HHHHHH.H.H.H


1,073,741,824

/1

128

128
.0.0.0



s
HHHHHHH.H.H.H


2,147,483,648




/0


0.0.0.0



H.H.H.H



4,294,967,296



---------------------------------------------------------------


/25 /26 /27 /2
8 /29 /30 /31 /32


---

---

---

---

---

---

---

---

.128.192.224.240.248.252.254.
255


128 64 32 16 8 4 2 1



Robbins (2012)

11

EXAMPLE

#1
:

CLASS C SUBNETTING


IP
: 192.168.1.0/2
7



(Class

C)


/25 /26
/27

/28 /29 /30 /31 /32

(CIDR)

-------------------------------

128 192
224

240 248 252 254 255

(
Decimal Rep
)


---

128 64
32

16 8 4 2 1


(Network Increment)


--

1 1 1 0 0 0 0 0


(Binary Rep)


-

Subnet mask: 255.255.255.224 (/27)

(SUBNETTING IN THE FOURTH OCTECT)


N.

N. N.
ss
s
HHHHH



2^S = 2^3 =
8 subnetworks (zero subnet valid)

2^H


2 =
2^5


2
= 30 usable hosts


#ip subnet zero


FIRST SUBNET


Range:


192.168.1.0
-

192.168.1.31


Network:

192.168.1.0


Usable:

192.168.1.1
-

192.168.1.30


Broadcast:

192.168.
1.31




SECOND SUBNET


Range:


192.168.1.
32

-

192.168.1.63


Network:

192.168.1.
32


Usable:

192.168.1.33
-

192.168.1.62


Broadcast:

192.168.1.63




THIRD SUBNET


Range:


192.168.1.
64

-

192.168.1.95


Network:

192.168.1.
64


Usable:

192.168.1.65
-

192.168.
1.94


Broadcast:

192.168.1.95





FOURTH SUBNET


Range:


192.168.1.
96

-

192.168.1.127


Network:

192.168.1.
96


Usable:

192.168.1.9
7
-

192.168.1.126


Broadcast:

192.168.1.127





FIFTH SUBNET


Range:


192.168.1.
128

-

192.168.1.159


Network:

192.168.1.
128


Us
able:

192.168.1.129
-

192.168.1.158


Broadcast:

192.168.1.159




SIXTH SUBNET


Range:


192.168.1.
160

-

192.168.1.191


Network:

192.168.1.
160


Usable:

192.168.1.161
-

192.168.1.190


Broadcast:

192.168.1.191




SEVENTH SUBNET


Range:


192.168.1.
192

-

192.
168.1.223


Network:

192.168.1.
192


Usable:

192.168.1.193
-

192.168.1.222


Broadcast:

192.168.1.223





EIGHTH SUBNET


Range:


192.168.1.
224

-

192.168.1.255


Network:

192.168.1.
224


Usable:

192.168.1.225
-

192.168.1.254


Broadcast:

192.168.1.255





Robbins (2012)

12

EXAMP
LE #
2
: CLASS
B

SUBNETTING


IP: 1
7
2.16.
0
.0/
18



(Class
B
)


/
17

/
18

/19

/2
0

/2
1

/
22

/
23

/
24

(CIDR)

-------------------------------

128
192

224

240 248 252 254 255

(Decimal Rep)


---


128
64

32
16 8 4 2 1


(Network Increment)


--


1 1

0

0 0 0 0 0


(Binary Rep)


-

Subnet mask: 255.255.
192
.
0

(/
18
)

(SUBNETTING IN THE
THIRD

OCTECT)


N. N.
s
s
HHHHHH
.
HHH
HHHHH



2^S =
2^2

= 4 subnetworks (zero subnet valid)

2^H


2 =
2^(5+8)


2
=
8190

usable hosts


#
ip subnet zero


FIRST SUBNET


Range:


1
72.16.0.0
-

192.16
.
63
.
255


Network:

172.16.0.0


Usable:

1
72.16.0.1
-

192.16
.
63
.
254


Broadcast:

192.16.
63
.
255




SECOND SUBNET


Range:


1
7
2.16.
64
.
0

-

1
7
2.16.
127
.
255


Network:

172.16.
64
.0


Usable:

1
7
2.16.
64
.
1

-

1
7
2
.16.
127
.
254


Broadcast:

172.16.127.255




THIRD SUBNET


Range:


1
72.16
.
128
.
0
-

192.16
.
191
.
255


Network:

172.16.
128
.0


Usable:

1
72.16.1
28
.1
-

192.16
.1
91
.
254


Broadcast:

192.16.191.255





FOURTH SUBNET


Range:


1
72.16
.
192
.
0
-

192.16
.
255.255


Network:

172.
16.
192
.0


Usable:

1
72.16.1
92
.
1

-

192.16
.
255.254


Broadcast:

192.16.255.255



Robbins (2012)

13


EXAMPLE #
3
: CLASS
A

SUBNETTING


IP:
10.0
.0.0/
9




(Class
A
)


/
9

/
10

/
11

/
12

/
13

/
14

/
15

/
16

(CIDR)

-------------------------------

1
28

192

224

240 248 252 254 255

(Decimal Re
p)

---


128

64

32 16 8 4 2 1


(Network Increment)

--


1
0

0 0 0 0 0 0


(Binary Rep)

-


Subnet mask: 255.255.192.0 (/18)

(SUBNETTING IN THE
SECOND

OCTECT)


N.
s
HHHHHHH
.
HHH
HHHHH.HHHHHHHH



2^S = 2^
1




=
2

subnetworks (zero subnet valid)

2^H


2 = 2^(5+8
+8
)


2 =
2,097,150

usable hosts


#ip subnet zero


FIRST SUBNET


Range:


10
.
0
.0.0
-

1
0
.
127
.
255
.255


Network:

10.0.0.0


Usable:

1
0
.
0
.0.1
-

1
0
.
127
.
255
.254


Broadcast:

10.127.255.255




SECOND S
UBNET


Range:


1
0
.
128
.
0
.
0

-

1
0
.
255
.
255
.255


Network:

10.
128
.0.1


Usable:

1
0
.
128
.
0
.1
-

1
0
.
255
.
255
.254


Broadcast:

10.255.255.255



























Robbins (2012)

14
























SECTION 2: ROUTING

Robbins (2012)

15

ROUTING



CONSOLE

-

Hyperterm
inal

Settings

for local man
agement
:


















Robbins (2012)

16























SECTION 3: SWITCHING

Robbins (2012)

17

SWITCHING


VLAN = BROADCAST DOMAIN