SlideShare une entreprise Scribd logo
1  sur  63
Télécharger pour lire hors ligne
CCENT Notes

                               Part 3 – IP Routing




  Ref : CCENT/CCNA ICND1 Official Exam Certification Guide, Second Edition
                          by Wendell Odom




It is highly recommended that you read at least once the above study guide to make full
use of this notes, it is expected that there may be minor errors in this notes, please
always refer the study guide for accurate information.




                             (Jojo Jacob - CCENT)
TABLE OF CONTENTS

Chapter 12 – IP Addressing and Subnetting........................................................................3
Chapter 13 – Operating Cisco Routers..............................................................................38
Chapter 14 – Routing Protocol Concepts and Configuration............................................47
Chapter 15 – Troubleshooting IP Routing.........................................................................58




                                                                                                                  2
Chapter 12 – IP Addressing and Subnetting

List of all possible valid network numbers….reference table for the number of network,
size of the network part, size of the host part, for Class A,B and C ip networks.
                                           Class A          Class B         Class C
First Octect range                         1 to 126         128 - 191       192 – 223
Valid Network Numbers                      1.0.0.0 to       128.0.0.0       192.0.0.0 to
                                           126.0.0.0        191.255.0.0     223.255.255.0
Number of networks in this Class           2^7–2            2 ^ 14 =        2 ^ 21=
                                           = 128            16,384          2,097,152
Number of hosts per network                2 ^ 24 – 2 =      2 ^ 16 – 2 =   2^8–2=
                                           16,777,214       65,534          254
Size of network part of the address        1                2               3
(bytes)
Size of hosts part of the address          3                2               1
(bytes)
^ raised to
CLASS A (7 Network Bits)
0 N N N N N N N H H H H H H H H H H H H H H H H H H H H H H H H
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

 CLASS B (6 + 8 = 14 Network Bits)
1 0 N N N N N N H H H H H H H H H H H H H H H H H H H H H H H H
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

CLASS C (5 + 16 = 21 Network Bits)
1 1 0 N N N N N H H H H H H H H H H H H H H H H H H H H H H H H
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8




Class A , B and C network, network and host parts and default mask
Class of      Size of network part of       Size of host part of   Default mask for
Address       address in bits               address in bits        each class of
                                                                   network
A             8                             24                     255.0.0.0.
B             16                            16                     255.255.0.0
C             24                            8                      255.255.255.0




                                                                                      3
RFC 1918 Private IP Address Space
Private IP Networks                           Class of Networks      Number of Networks
10.0.0.0 through 10.0.0.0                     A                      1
172.16.0.0 through 172.31.0.0                 B                      16
192.168.0.0 through 192.168.255.0             C                      255


IPv6 – 128 bit IP address : can provide 10 ^ 38 IP Addresses.
Currently in the earth there are 10 ^ 10 people living.

IPv4 vs IPv6
Feature                 IPv4                  IPv6
Size of address         32 bits , 4 octects   128 bits , 16 octects
Example address         10.1.1.1              0000:0000:0000:0000:FFFF:FFFF:0A01:0101
Same address            ----                  ::FFFF:FFFF:0A01:0101
abrreviated
Number of possible      2 ^ 32                2 ^ 128 , or roughly 3.4 x 10 ^ 38
addresses, ignoring     Approx 4 billion
reseved addresses


Bitwise Boolean AND example
                    Decimal                   Binary
Address             150.150.2.1               10010110 10010110 00000010 00000001
Mask                255.255.255.0             11111111 11111111 11111111 00000000
Result of AND       150.150.2.0               10010110 10010110 00000010 00000000


255.255.255.0 – 11111111 11111111 11111111 00000000
Is written as a /24 subnet mask.


Binary process to convert between Dotted decimal and prefix notation

Step 1. Covert the dotted decimal mask to binary
Step 2. Count the number of binary 1s in the 32 bit binary mask, this is the value of the
prefix notation mask

Eg. 255.255.240.0 converts to….
11111111 11111111 11110000 00000000
The mask has 20 binary 1s, so the prefix notation of the same mask is /20.

Convert prefix notation to a dotted decimal format…

Step 1. write down x binary 1s, where x is the value listed in the prefix notation of the
mask


                                                                                            4
Step 2. Write down binary 0s after binary 1s until you have written down all the 32 bits

Step 3. Convert this binary number, 8 bit at a time to dotted decimal format.

Eg. /20 converts to
11111111 11111111 11110000 00000000
255.255.240.0

Nine possible Decimal Numbers in a subnet mask
Subnet mask’s        Binary Equivalent     Number of Binary            Number of Binary
Decimal Octect                             1s                          0s
0                    00000000              0                           8
128                  10000000              1                           7
192                  11000000              2                           6
224                  11100000              3                           5
240                  11110000              4                           4
248                  11111000              5                           3
252                  11111100              6                           2
254                  11111110              7                           1
255                  11111111              8                           0


Convert a dotted decimal subnet mask format to a prefix format….

Step 1. Start with a prefix value of 0
Step 2. For each dotted decimal octect, add the number of binary 1s, listed for that
decimal value in the table above
Step 3. Prefix length is /x , where x is the sum calculated in Step 2.

Eg. 255.255.240.0

Start from 0
First octect 255 add 8
Second octect 255 add 8
Third octect 240 add 4
Fourth octect 0 add 0

Prefix is 20

Converting a /20 subnet into dotted decimal format….

Step 1. Divide x by 8 ( x / 8) , noting the number of times 8 goes fully into x , the
dividend represented as d, and the number left over, the reminder represented as r.

Step 2. write down d octets of 255,


                                                                                           5
Step 3. for the next octet, find the decimal number that begins with r, binary 1s,
Followed by all binary 0s.

Step 4. for any remaining octets write down value 0



20 / 8 = 2 and a reminder of 4

2 octects with all binary 1s , third octed with 1 birary 1 and 4 binary 0 , and last one with
all binary 0s.

255.255.240.0


Appendix D. Problem Set 1.

255.240.0.0            - 8+4+0+0+ = /12
255.255.192.0          – 8+8+2+0 = /18
255.255.255.224        – 8+8+8+3 = /27
255.254.0.0            – 8+7+0+0 = /15
255.255.248.0          - 8+8+5+0 = /21

/30                    - 255.255.255.252
/25                    - 255.255.255.128
/11                    - 255.224.0.0
/22                    - 255.255.252.0
/24                    - 255.255.255.0

255.240.0.0            -   11111111 11110000 00000000 00000000            -           /12
255.255.192.0          –   11111111 11111111 11000000 00000000                        /18
255.255.255.224        –   11111111 11111111 11111111 11100000                         /27
255.254.0.0            –   11111111 11111110 00000000 00000000                         /15
255.255.248.0          -    11111111 11111111 11111000 00000000                        /21

/30                    - 11111111 11111111 11111111 11111100          255.255.255.252
/25                    - 11111111 11111111 11111111 10000000          255.255.255.128
/11                    - 11111111 11100000 00000000 00000000          255.224.0.0
/22                    - 11111111 11111111 11111100 00000000          255.255.252.0
/24                    - 11111111 11111111 11111111 00000000          255.255.255.0




                                                                                             6
ANALYSING AND CHOOSING SUBNET MASKS

SLSM – Static Length Subnet Mask
VLSM – Variable Length Subnet Mask

How to find the size of the Network , Subnet and Host part of an IP Address…

•   The network part of the address is always defined by the class rule
•   The host part of the address is defined by the subnet mask, the number of binary zeros
    in the subnet mask defines the number of host bits.
•   Subnet part of the address is what is left over in the 32 bit address




IP Address : 8.1.4.5
Mask : 255.255.0.0
Class : A
Network Bits : 8
Host bits : 16
Subnet bits : 32 – 24 = 8

IP Address : 130.4.102.1
Mask : 255.255.255.0
Class : B
Network Bits : 16
Host bits : 8
Subnet bits : 32 – 24 = 8

IP Address : 199.1.1.100
Mask : 255.255.255.0
Class : C
Network Bits : 24
Host bits : 8
Subnet bits : 32 – 32 = 0


Facts about how the subnet mask identifies part of the structure of an IP address

•   A subnet masks binary 1s define the combined network and subnet part of an IP
    address
•   The masks binary 0s define the hosts part of the IP address
•   Class rules define the size of the network part


                                                                                        7
Finding the Network, Subnet and Host part using binary…..

Step 1. Compare the first octet of the address to the table of Class A,B or C addresses,
write down the number of network bits depending on the address class.

Step 2. Find the number of hosts bits by

       a. Converting subnet masks to binary
       b. Counting the number of binary 0s in the mask

Step 3. Calculate the number of subnet bits by subtracting the combined network and
hosts bits from 32.



Decimal Process : Finding the Network, Subnet and Hosts bits in a subnet mask

Step 1. Compare the first octet of the address to the table of Class A,B or C addresses;
write down the number of network bits based on the address class.

Step 2. If the mask is in dotted decimal format, convert the mask to prefix format

Step 3. To find the number of host bits, subtract the prefix length from 32

Step 4. Calculate the number of subnet bits by subtracting the combined network and
hosts bits from 32

Given a class full network number and a single subnet mask is used throughout the
classfull network.

Number of subnets :- 2 ^ s , where s is the number of subnet bits
Number of hosts :- 2 ^ h , where h is the number of host bits


When to use which formula for number of subnets
Use the 2 ^ s – 2 formula, and avoid using Use the 2 ^ s formula, and use the zero and
the zero subnet and broadcast subnet if…   broadcast subnet if…
Classful routing protocol                  Classless routing protocol
RIP version 1 or IGRP as the routing       RIP Version 2, EIGRP or OSPF as the
protocol                                   routing protocol
The no ip subnet zero command is           The ip subnet zero command is configured
configured                                 or ommited (default)
                                           VLSM is used
                                           No other clues provided


                                                                                           8
Analysing the subnet mask

8.1.4.5 /16

Hosts bits : 32 – 16 = 16
Class A network bits : 8
Subnet bits : 32 – 24 = 8
Number of subnets = 2 ^ 8 = 256
Number of host = 2 ^ 16 – 2 = 65,534




130.4.102.1/24

Hosts bits : 32 – 24 = 8
Class B network bits : 16
Subnet bits : 32 – 24 = 8
Number of subnets = 2 ^ 8 = 256
Number of host = 2 ^ 8 – 2 = 254


199.1.1.100/24

Hosts bits : 32 – 24 = 8
Class C network bits : 24
Subnet bits : 32 – 32 = 0
Number of subnets = 2 ^ 0 = 1
Number of host = 2 ^ 8 – 2 = 254


130.4.102.1/22

Hosts bits : 32 – 22 = 10
Class B network bits : 16
Subnet bits : 32 – 26 = 6
Number of subnets = 2 ^ 6 = 64
Number of host = 2 ^ 8 – 2 = 1022




                                       9
199.1.1.100/27

Hosts bits : 32 – 27 = 5
Class C network bits : 24
Subnet bits : 32 – 29 = 3
Number of subnets = 2 ^ 3 = 8
Number of host = 2 ^ 5 – 2 = 30




Number of bits in the host     Maximum number of hosts       Maximum number of
or subnet field                (2 ^ h – 2)                   subnets (2 ^ s )
1                              0                             2
2                              2                             4
3                              6                             8
4                              14                            16
5                              30                            32
6                              62                            64
7                              126                           128
8                              254                           256
9                              510                           512
10                             1022                          1024
11                             2046                          2048
12                             4094                          4096
13                             8190                          8192
14                             16,382                        16,384



Finding the only possible MASK

With a Class B network 130.1.0.0 , what is the only subnet mask you can use to have
upto 200 subnets and 200 hosts per subnets???

To have 200 subnets you need to have atleast 8 subnet bits
( 2 ^ 8 = 256) , (2 ^ 7 is only 128)

Only possible subnet so is…(16 bits for network part as it is a Class B network).

NNNNNNNN NNNNNNNN SSSSSSSS HHHHHHHH

11111111 11111111 11111111 00000000

255.255.255.0 or a /24 mask.


                                                                                      10
Finding the multiple possible MASKs

With a Class B network, what are the subnet masks you can use to have upto 50 subnets
and 200 hosts in the largest subnet???

To have 50 subnets you need to have atleast 6 subnet bits
( 2 ^ 6 = 64) , (2 ^ 5 is only 32)

To have 200 hosts you need to have atleast 8 host bits
( 2 ^ 8 - 2 = 254) , (2 ^ 7 is only 128)


Possible subnet format is …(16 bits for network part as it is a Class B network).

NNNNNNNN NNNNNNNN SSSSSSXX HHHHHHHH

XX – can be either subnet or host bits

That mean you may get 2 ^ 2 = 4 possible combination of subnet masks, however

All masks must start with one unbroken consecutive string of binary 1s, followed by one
unbroken consecutive string of binary 0s.

So the possible mask are listed below but only three are valid.

11111111 11111111 11111111 00000000 (8 subnets , 8 hosts)
11111111 11111111 11111110 00000000 (7 subnets, 9 hosts)
11111111 11111111 11111100 00000000 (6 subnets, 10 hosts)
11111111 11111111 11111101 00000000 (INVALID MASK)

255.255.255.0    prefix format /24
255.255.254.0    prefix format /23
255.255.252.0    prefix format /22


Choosing the subnet that maximizes the number of subnets or hosts

The mask with the most subnet bits : the mask with the wildcard bits set to binary 1s,
there by increasing the subnet bits, maximizes the number of subnets and minimizes the
number of hosts per subnet.

The mask with most host bits : the mask with the wildcard bits set to binrary 0s, thereby
making the host part of the subnet address larger, maximizes the number of hosts per
subnet and minimizes the number of subnets.




                                                                                        11
Choosing a subnet mask steps …..

Step 1. Find the number of network bits (N) based on the Class A,B or C rules
Step 2 : Find the number of subnet bits (S) based on the formula 2 ^ s , such that 2 ^ s >
or = the number of required subnets.
Step 3. Find the number of host bits (H) based on the formula 2 ^ h – 2, such that 2 ^ h –
2 is >= the number of required hosts.
Step 4. Write down starting from the left N+S binary 1s
Step 5. Write down starting from right H binary 0s
Step 6. If the binary 1s and 0s together adds up to less than 32
 a. fill in the remaining ‘wildcard’ bit positions with X between binary 1s and 0s.
 b. find all combination of bits for the wildcard bit positions, meeting the requirement of
having one unbroken consecutive string of binary 1s on left.
Step 7. convert the mask to decimal or prefix format
Step 8. To find the mask that maximizes the number of subnets pick the mask with most
binary 1s init, and to find the mask that maximizes the number of hosts pick the mask
with most binary 0s.



Problem set 2. Analysing unsubnetted IP addresses

10.55.44.3

Class of the address :        A
Number of octets in the network part :       1
Number of octets in the host part     :      3
Network number        :       10.0.0.0
Network broadcast number :            10.255.255.255


128.77.6.7

Class of the address :        B
Number of octets in the network part :      2
Number of octets in the host part    :      2
Network number        :       128.77.0.0
Network broadcast number :           128.77.255.255

192.168.76.54

Class of the address :        C
Number of octets in the network part :      3
Number of octets in the host part    :      1
Network number        :       192.168.76.0
Network broadcast number :           192.168.76.255



                                                                                         12
190.190.190.190

Class of the address :        B
Number of octets in the network part :      2
Number of octets in the host part    :      2
Network number        :       190.190.0.0
Network broadcast number :           190.190.255.255




9.1.1.1

Class of the address :        A
Number of octets in the network part :       1
Number of octets in the host part     :      3
Network number        :       9.0.0.0
Network broadcast number :            9.255.255.255


200.1.1.1

Class of the address :        C
Number of octets in the network part :      3
Number of octets in the host part    :      1
Network number        :       200.1.1.0
Network broadcast number :           200.1.1.255


Problem Set 3. Interpreting existing subnet masks

10.66.5.99 255.255.254.0

Steps
Mask in prefix format /23
Class : A

Results
Network bits 8
Subnet bits  32 – (8+9) = 15
Host bits    9
Number of subnets in the network 2 ^ 15 = 32,768
Number of hosts per subnet 2 ^ 9 – 2 = 510



                                                       13
172.16.203.42 255.255.252.0

Steps
Mask in prefix format /22
Class : B

Results
Network bits 16
Subnet bits  32 – (16+10) = 6
Host bits    10
Number of subnets in the network 2 ^ 6 = 64
Number of hosts per subnet 2 ^ 10 – 2 = 1022


192.168.55.55 255.255.255.224

Steps
Mask in prefix format /27
Class : C

Results
Network bits 24
Subnet bits  32 – (24+5) = 3
Host bits    5
Number of subnets in the network 2 ^ 3 = 8
Number of hosts per subnet 2 ^ 5 – 2 = 30




10.22.55.87 /30

Steps
Class : A

Results
Network bits 8
Subnet bits  32 – (8+2) = 22
Host bits    2
Number of subnets in the network 2 ^ 22 = 4,194,304
Number of hosts per subnet 2 ^ 2 – 2 = 2



172.30.40.166 /26



                                                      14
Steps
Class : B

Results
Network bits 16
Subnet bits  32 – (16+6) = 10
Host bits    6
Number of subnets in the network 2 ^ 10 = 1024
Number of hosts per subnet 2 ^ 6 – 2 = 62




192.168.203.18 /29

Steps
Class : C

Results
Network bits 24
Subnet bits  32 – (24+3) = 5
Host bits    3
Number of subnets in the network 2 ^ 5 = 32
Number of hosts per subnet 2 ^ 3 – 2 = 6


Problem set 4 : Choosing Subnet Masks

Network 10.0.0.0 needs 50 subnets and 200 hosts/subnets

Class : A
Network bits : 8
Min. Subnet bits     6
Min. Host bits       8

NNNNNNNN SSSSSSXX XXXXXXXX HHHHHHHH

10.0.0.0 /14 (Maximum number of hosts)
10.0.0.0 /15
10.0.0.0 /16
10.0.0.0 /17
10.0.0.0 /18



                                                          15
10.0.0.0 /19
10.0.0.0 /20
10.0.0.0 /21
10.0.0.0 /22
10.0.0.0 /23
10.0.0.0 /24 (Maximum number of subnets)



Network 172.32.0.0 need 125 subnets and need 125 hosts/subnet

Class : B
Network bits : 16
Min. Subnet bits : 7
Min. Host bits : 7

NNNNNNNN NNNNNNNN SSSSSSSX XHHHHHHH
172.32.0.0 /23 255.255.254.0 (Maximum number of hosts)
172.32.0.0 /24 255.255.255.0
172.32.0.0 /25 255.255.255.128 (Maximum number of subnets)


Network 192.168.44.0 need 15 subnets and 6 host/subnet

Class : C
Network bits 24
Min. subnet bits : 4
Min. host bits : 3

NNNNNNNN NNNNNNNN NNNNNNNN SSSSXHHH

192.168.44.0 /28       255.255.255.240 (Maximum number of hosts/subnet)
192.168.44.0 /29       255.255.255.248 (Maximum number of subnets)



10.0.0.0   300 subnets and 500 hosts/subnet

Class : A
Network bits : 8
Min. subnet bits : 9
Min. host bits : 9

NNNNNNNN SSSSSSSS SXXXXXXH HHHHHHHH

10.0.0.0 /17   255.255.128.0        Maximum hosts/subnets



                                                                          16
10.0.0.0 /18     255.255.192.0
10.0.0.0 /19     255.255.224.0
10.0.0.0 /20     255.255.240.0
10.0.0.0 /21     255.255.248.0
10.0.0.0 /22     255.255.252.0
10.0.0.0 /23     255.255.254.0       Maximum subnets



172.32.0.0 500 subnets and 15 hosts/subnet

Class : B
Network bits : 16
Min. subnets bits : 9
Min. host bits : 5

NNNNNNNN NNNNNNNN SSSSSSSS SXXHHHHH
172.32.0.0 / 25 255.255.255.128 Maximum hosts/subnet
172.32.0.0 / 26 255.255.255.192
172.32.0.0 / 27 255.255.255.224 Maximum subnets


Network 172.16.0.0 2000 subnets 2 hosts/subnet

Class : B
Network hosts : 16
Min. subnet bits : 11
Min. host bits : 2

NNNNNNNN NNNNNNNN SSSSSSSS SSSXXXHH

172.16.0.0 /27          255.255.255.224      Maximum number of hots/subnet
172.16.0.0 /28          255.255.255.240
172.16.0.0 /29          255.255.255.248
172.16.0.0 /30          255.255.255.252      Maximum number of subnets


ANALYSING EXISTING SUBNETS : BINARY

Learning resident subnet number using Boolean AND operation….

Step 1. Convert the IP address from decimal to binary
Step 2. Convert the subnet mask to binary and write it down under the binary ip address
Step 3. Perform a bit wise Boolean AND operation of the two numbers…
Step 4. Convert the resulting binary number back to decimal, to get the subnet number




                                                                                      17
Address       8.1.4.5                00001000 00000001 00000100 00000101
Mask          255.255.0.0            11111111 11111111 00000000 00000000
Subnet Number 8.1.0.0                00001000 00000001 00000000 00000000

Address       130.4.102.1            10000010 00000100 01100110 00000001
Mask          255.255.255.0          11111111 11111111 11111111 00000000
Subnet Number 130.4.102.0            10000010 00000100 01100110 00000000

Address     199.1.1.100              11000111 00000001 00000001 01100100
Mask        255.255.255.0            11111111 11111111 11111111 00000000
Sub. Number 199.1.1.0                11000111 00000001 00000001 00000000

Address        130.4.102.1           10000010 00000100 01100110 00000001
Mask           255.255.252.0         11111111 11111111 11111100 00000000
Subnet
Number         130.4.100.0           10000010 00000100 01100100 00000000


Address        199.1.1.100           11000111 00000001 00000001 01100100
Mask           255.255.255.224       11111111 11111111 11111111 11100000
Subnet
Number         199.1.1.96            11000111 00000001 00000001 01100000

Binary Short cut….

•   Record decimal mask in the first row of the table, and decimal IP address below it
•   For any mask octect of value 255, copy the IP address’s octet value for the same octet
    of the decimal subnet number
•   Similarly for any mask octet value of 0, write down decimal 0 for the same octet of
    the subnet number
•   If the subnet number has still has one remaining octet to be filled in, then
         o Convert the remaining octet of the ip address to binary
         o Convert the remaining octet of the mask to binary
         o AND the two 8-bit numbers together
         o Covert the 8 bit number to decimal, and place the value in the remaining octet
            of the subnet number

Address     199.1.1.100
Mask        255.255.255.0
Sub. Number 199.1.1.0

Address        130.4.102.1           01100110
Mask           255.255.252.0         11111100
Subnet
Number         130.4.100.0           01100100



                                                                                       18
Calculating the Broadcast address – Binary

Address       8.1.4.5
Mask          255.255.0.0           nnnnnnnn nnnnnnnn hhhhhhhhh hhhhhhh
Subnet
Address       8.1.0.0               00001000 00000001 00000000 00000000
Broadcast
Address       8.1.255.255           00001000 00000001 11111111 11111111


Address       130.4.102.1
Mask          255.255.255.0
Subnet
Address       130.4.102.0
Broadcast
Address       130.4.102.255
Address       199.1.1.100
Mask          255.255.255.0
Subnet
Address       199.1.1.0
Broadcast
Address       199.1.1.255


Address       130.4.102.1           01100110
Mask          255.255.252.0         11111100
Subnet
Address       130.4.100.0           01100100
Broadcast
Address       130.4.103.255         01100111


Address       199.1.1.100           0110 0100
Mask          255.255.255.224       1110 0000
Subnet
Address       199.1.1.96            0110 0000
Broadcast
Address       199.1.1.127           0111 1111


Steps to determine Subnet Broadcast Address…..

•   Step 1. Write down the subnet number (IP address), and subnet mask in binary form,
•   Step 2. Separate the network/subnet and host bits by a vertical line
•   Step 3. To find the subnet broadcast address in binary


                                                                                     19
o Copy the bits of the subnet number (IP address) that are to the left of the
         vertical line
       o Write down binary 1s for the (HOST) bits to the right of the vertical line

•   Step 4. Convert the 32 bit binary subnet broadcast address to decimal, 8 bits at a time,
    ignoring the vertical line


Steps to find the first and last IP address in a subnet

Step 1. To find the first IP address, Copy the subnet number but add 1 to the fourth octet
Step 2. To find the last IP address, Copy the subnet broadcast address but substract1 from
the fourth octet




Address        8.1.4.5
Mask           255.255.0.0             nnnnnnnn nnnnnnnn hhhhhhhhh hhhhhhh
Subnet
Address        8.1.0.0                 00001000 00000001 00000000 00000000
Broadcast
Address        8.1.255.255             00001000 00000001 11111111 11111111
First
Address        8.1.0.1
Last
Address        8.1.255.254


Address        130.4.102.1
Mask           255.255.255.0
Subnet
Address        130.4.102.0
Broadcast
Address        130.4.102.255
First
Address        130.4.102.1
Last
Address        130.4.102.254

Address        199.1.1.100
Mask           255.255.255.0
Subnet
Address        199.1.1.0
Broadcast


                                                                                         20
Address        199.1.1.255
First
Address        199.1.1.1
Last
Address        199.1.1.254



Address        130.4.102.1           01100110
Mask           255.255.252.0         11111100
Subnet
Address        130.4.100.0           01100100
Broadcast
Address        130.4.103.255         01100111
First
Address        130.4.100.1
Last
Address        130.4.103.254


Address        199.1.1.100           0110 0100
Mask           255.255.255.224       1110 0000
Subnet
Address        199.1.1.96            0110 0000
Broadcast
Address        199.1.1.127           0111 1111
First
Address        199.1.1.97
Last
Address        199.1.1.126

Finding subnet address, broadcast address and range of address using Decimal
– Difficult Mask
Subnet Chart 130.4.102.1 / 255.255.252.0
Octet                       1       2      3      4      Comments
Mask                        255     255 252       0
Address                     130. 4         102    1
Subnet Address              130     4      100    0      Magic number = 256 – 252 = 4
                                                         100 is the multiple of 4 closes to
                                                         but not higher than 102
First Address               130     4      100    1      Add 1 to the subnets last octet
Last Address                130     4      103    25 Subtract 1 from broadcast
                                                  4      address’s fourth octet
Broadcast Address           130     4      103    25 Subnet’s interesting octet +
                                                  5      magic number – 1 (100+4 – 1)



                                                                                        21
Summary of decimal process to find the subnet, broadcast and range

Step 1. Write down the subnet mask in the first empty row of the subnet chart, and the IP
address in the second empty row.

Step 2. Find the octet for which subnet mask’s value is not 255 or 0. This octet is called
the interesting octet. Draw a dark rectangle around the interesting octet’s column of the
table, top to bottom.

Step 3. Record the subnet numbers value for the uninteresting octets as follows

a. for each octet to the left of the rectangle, drawn in step 2, copy the IP address value in
the same octet.

b. for each octet to the right of the rectangle: write down decimal 0

Step 4. To find the subnet numbers value for this interesting octet

a. calculate the magic number by subtracting the subnet mask’s interesting octet value
from 256

b. calculate the multiple of magic number starting from 0 through to 256

c. write down the interesting octet value, calculated as follows, Find the multiple of
magic number that is closest to, but not higher than the IP Address’s interesting octet
value.


Step 5 : Find the subnet broadcast address as follows

a. for each subnet mask octet to the left of the rectangle, copy the IP address octet value

b. for each subnet mask octet to the right of the rectangle, write down 255

c. find the value for the interesting octet by adding the subnet number’s value in the
interesting octet to the magic number and subtract 1.


Step 6. To find the first IP address, copy the decimal subnet number, but add 1 to the
fourth octet.

Step 7. To find the last IP address, copy the decimal subnet broadcast address, but
subtract 1 from the fourth octet.




                                                                                            22
Problem 1
10.180.10.18 255.192.0.0

Size of Network Part         8
Size of Subnet Part          2
Size of Host part            22
Number of hosts per subnet   2 ^ 22 – 2 = 4,194,302
Number of subnets            2^2=4

                             255.192.0.0
                             10.180.10.18
                             (256 – 192 ) = 64
                             64 x 3 = 192
                             64 x 2 = 128

Subnet Number                10.128.0.0
Broadcast Address            10.191.255.255

Range of valid IP addresses
First Address               10.128.0.1
Last Address                10.191.255.254

Problem 2
10.200.10.18 255.224.0.0

Size of Network Part         8
Size of Subnet Part          3
Size of Host part            21
Number of hosts per subnet   2 ^ 21 – 2 = 2,097,150
Number of subnets            2^3=8

                             255.224.0.0
                             10.200.10.18
                             (256 – 224 ) = 32
                             32 x 6 = 192

Subnet Number                10.192.0.0
Broadcast Address            10.223.255.255

Range of valid IP addresses
First Address               10.192.0.1
Last Address                10.223.255.254




                                                      23
Problem 3
10.100.18.18 255.240.0.0

Size of Network Part         8
Size of Subnet Part          4
Size of Host part            20
Number of hosts per subnet   2 ^ 20 – 2 = 1,048,574
Number of subnets            2 ^ 4 = 16

                             255.240.0.0
                             10.100.18.18
                             (256 – 240 ) = 16
                             16 x 6 = 96

Subnet Number                10.96.0.0
Broadcast Address            10.111.255.255

Range of valid IP addresses
First Address               10.96.0.1
Last Address                10.111.255.254


Problem 4
10.100.18.18 255.248.0.0

Size of Network Part         8
Size of Subnet Part          5
Size of Host part            19
Number of hosts per subnet   2 ^ 19 – 2 = 524,286
Number of subnets            2 ^ 5 = 32

                             255.248.0.0
                             10.100.18.18
                             (256 – 248 ) = 8
                             8 * 12 = 96

Subnet Number                10.96.0.0
Broadcast Address            10.103.255.255

Range of valid IP addresses
First Address               10.96.0.1
Last Address                10.103.255.254




                                                      24
Problem 5
10.150.200.200       255.252.0.0

Size of Network Part         8
Size of Subnet Part          6
Size of Host part            18
Number of hosts per subnet   2 ^ 18 – 2 = 262,142
Number of subnets            2 ^ 6 = 64

                             255.252.0.0
                             10.150.200.200
                             (256 – 252 ) = 4
                             37 * 4 = 148

Subnet Number                10.148.0.0
Broadcast Address            10.251.255.255

Range of valid IP addresses
First Address               10.148.0.1
Last Address                10.251.255.254


Problem 6
10.150.200.200       255.254.0.0

Size of Network Part         8
Size of Subnet Part          7
Size of Host part            17
Number of hosts per subnet   2 ^ 17 – 2 = 131,070
Number of subnets            2 ^ 5 = 32

                             255.254.0.0
                             10.150.200.200
                             (256 – 254 ) = 2
                             75 * 2 = 150

Subnet Number                10.150.0.0
Broadcast Address            10.151.255.255

Range of valid IP addresses
First Address               10.150.0.1
Last Address                10.151.255.254




                                                    25
Problem 7
10.220.100.18        255.255.0.0

Size of Network Part         8
Size of Subnet Part          8
Size of Host part            16
Number of hosts per subnet   2 ^ 16 – 2 = 65,534
Number of subnets            2 ^ 8 = 256

                             255.255.0.0
                             10.220.100.18
                             (256 – 255 ) = 1
                             220 * 1 = 220

Subnet Number                10.220.0.0
Broadcast Address            10.220.255.255

Range of valid IP addresses
First Address               10.220.0.1
Last Address                10.220.255.254


Problem 8
10.220.100.18        255.255.128.0

Size of Network Part         8
Size of Subnet Part          9
Size of Host part            15
Number of hosts per subnet   2 ^ 15 – 2 = 32,766
Number of subnets            2 ^ 9 = 512

                             255.255.128.0
                             10.220.100.18
                             (256 – 128 ) = 128
                             0 * 128 = 0

Subnet Number                10.220.0.0
Broadcast Address            10.220.127.255

Range of valid IP addresses
First Address               10.220.0.1
Last Address                10.220.127.254




                                                   26
Problem 9
172.31.100.100               255.255.192.0

Size of Network Part         16
Size of Subnet Part          2
Size of Host part            14
Number of hosts per subnet   2 ^ 14 – 2 = 16,382
Number of subnets            2^2=4

                             255.255.192.0
                             172.31.100.100
                             (256 – 192 ) = 64
                             1 * 64 = 64

Subnet Number                172.31.64.0
Broadcast Address            172.31.127.255

Range of valid IP addresses
First Address               172.31.64.1
Last Address                172.31.127.254



Problem 10
172.31.100.100               255.255.224.0

Size of Network Part         16
Size of Subnet Part          3
Size of Host part            13
Number of hosts per subnet   2 ^ 13 – 2 = 8,190
Number of subnets            2^3=8

                             255.255.224.0
                             172.31.100.100
                             (256 – 224 ) = 32
                             3 * 32 = 96

Subnet Number                172.31.96.0
Broadcast Address            172.31.127.255

Range of valid IP addresses
First Address               172.31.96.1
Last Address                172.31.127.254




                                                   27
Problem 11
172.31.200.10                255.255.240.0

Size of Network Part         16
Size of Subnet Part          4
Size of Host part            12
Number of hosts per subnet   2 ^ 12 – 2 = 4,094
Number of subnets            2 ^ 4 = 16

                             255.255.240.0
                             172.31.200.10
                             (256 – 240 ) = 16
                             12 * 16 = 192

Subnet Number                172.31.192.0
Broadcast Address            172.31.207.255

Range of valid IP addresses
First Address               172.31.192.1
Last Address                172.31.207.254



Problem 12
172.31.200.10                255.255.248.0

Size of Network Part         16
Size of Subnet Part          5
Size of Host part            11
Number of hosts per subnet   2 ^ 11 – 2 = 2,046
Number of subnets            2 ^ 5 = 32

                             255.255.248.0
                             172.31.200.10
                             (256 – 248 ) = 8
                             25 * 8 = 200

Subnet Number                172.31.200.0
Broadcast Address            172.31.207.255

Range of valid IP addresses
First Address               172.31.200.1
Last Address                172.31.207.254




                                                  28
Problem 13
172.31.50.50                 255.255.252.0

Size of Network Part         16
Size of Subnet Part          6
Size of Host part            10
Number of hosts per subnet   2 ^ 10 – 2 = 1022
Number of subnets            2 ^ 6 = 64

                             255.255.252.0
                             172.31.50.50
                             (256 – 252 ) = 4
                             12 * 4 = 48

Subnet Number                172.31.48.0
Broadcast Address            172.31.51.255

Range of valid IP addresses
First Address               172.31.48.1
Last Address                172.31.51.254



Problem 14
172.31.50.50                 255.255.254.0

Size of Network Part         16
Size of Subnet Part          7
Size of Host part            9
Number of hosts per subnet   2 ^ 9 – 2 = 510
Number of subnets            2 ^ 7 = 128

                             255.255.254.0
                             172.31.50.50
                             (256 – 254 ) = 2
                             25 * 2 = 50

Subnet Number                172.31.50.0
Broadcast Address            172.31.51.255

Range of valid IP addresses
First Address               172.31.50.1
Last Address                172.31.51.254




                                                 29
Problem 15
172.31.140.14                255.255.255.0

Size of Network Part         16
Size of Subnet Part          8
Size of Host part            8
Number of hosts per subnet   2 ^ 8 – 2 = 254
Number of subnets            2 ^ 8 = 256

                             255.255.255.0
                             172.31.140.14

Subnet Number                172.31.140.0
Broadcast Address            172.31.140.255

Range of valid IP addresses
First Address               172.31.140.1
Last Address                172.31.140.254


Problem 16
172.31.140.14                255.255.255.128

Size of Network Part         16
Size of Subnet Part          9
Size of Host part            7
Number of hosts per subnet   2 ^ 7 – 2 = 126
Number of subnets            2 ^ 9 = 512

                             255.255.255.128
                             172.31.140.14
                             256 – 128 = 128
                             0 * 128 = 0

Subnet Number                172.31.140.0
Broadcast Address            172.31.140.127

Range of valid IP addresses
First Address               172.31.140.1
Last Address                172.31.140.126




                                               30
Problem 17
192.168.15.150                      255.255.255.192

Size of Network Part         24
Size of Subnet Part          2
Size of Host part            6
Number of hosts per subnet   2 ^ 6 – 2 = 62
Number of subnets            2^2=4

                             255.255.255.192
                             192.168.15.150
                             256 – 192 = 64
                             2 * 64 = 128

Subnet Number                192.168.15.128
Broadcast Address            192.168.15.191

Range of valid IP addresses
First Address               192.168.15.129
Last Address                192.168.15.190



Problem 18
192.168.15.150                      255.255.255.224

Size of Network Part         24
Size of Subnet Part          3
Size of Host part            5
Number of hosts per subnet   2 ^ 5 – 2 = 30
Number of subnets            2^3=8

                             255.255.255.224
                             192.168.15.150
                             256 – 224 = 32
                             4 * 32 = 128

Subnet Number                192.168.15.128
Broadcast Address            192.168.15.159

Range of valid IP addresses
First Address               192.168.15.129
Last Address                192.168.15.158




                                                      31
Problem 19
192.168.100.100                     255.255.255.240

Size of Network Part         24
Size of Subnet Part          4
Size of Host part            4
Number of hosts per subnet   2 ^ 4 – 2 = 14
Number of subnets            2 ^ 4 = 16

                             255.255.255.240
                             192.168.100.100
                             256 – 240 = 16
                             6 * 16 = 96

Subnet Number                192.168.100.96
Broadcast Address            192.168.100.111

Range of valid IP addresses
First Address               192.168.100.97
Last Address                192.168.100.110


Problem 20
192.168.100.100                     255.255.255.248

Size of Network Part         24
Size of Subnet Part          5
Size of Host part            3
Number of hosts per subnet   2^3–2=6
Number of subnets            2 ^ 5 = 32

                             255.255.255.248
                             192.168.100.100
                             256 – 248 = 8
                             12 * 8 = 96

Subnet Number                192.168.100.96
Broadcast Address            192.168.100.103

Range of valid IP addresses
First Address               192.168.100.97
Last Address                192.168.100.102

A NOTE : In the above examples, Number of subnets means, maximum number of
subnets possible for the subnets mask (eg. 255.255.255.248),




                                                                         32
Subnet address and Broadcast address are the subnet and broadcast address for the
subnet the given IP addresss 192.168.100.100 belongs to. (see the binary version in
appendix d for more details)

Problem 21
192.168.15.230                      255.255.255.252

Size of Network Part         24
Size of Subnet Part          5
Size of Host part            3
Number of hosts per subnet   2^3–2=6
Number of subnets            2 ^ 5 = 32

                             255.255.255.248
                             192.168.100.100
                             256 – 248 = 8
                             12 * 8 = 96

Subnet Number                192.168.100.96
Broadcast Address            192.168.100.103

Range of valid IP addresses
First Address               192.168.100.97
Last Address                192.168.100.102


Problem 22
10.1.1.1                     255.248.0.0

Size of Network Part         8
Size of Subnet Part          5
Size of Host part            19
Number of hosts per subnet   2 ^ 19 – 2 = 524,286
Number of subnets            2 ^ 5 = 32

                             255.248.0.0
                             10.1.1.1
                             256 – 248 = 8
                             0*8=0

Subnet Number                10.0.0.0
Broadcast Address            10.7.255.255

Range of valid IP addresses
First Address               10.0.0.1
Last Address                10.7.255.254



                                                                                 33
Problem 23
172.16.1.200                 255.255.240.0

Size of Network Part         16
Size of Subnet Part          4
Size of Host part            12
Number of hosts per subnet   2 ^ 12 – 2 = 4094
Number of subnets            2 ^ 4 = 16

                             255.255.240.0
                             172.16.1.200
                             256 – 240 = 16
                             0 * 16 = 0

Subnet Number                172.16.0.0
Broadcast Address            172.16.15.255

Range of valid IP addresses
First Address               172.16.0.1
Last Address                172.16.15.254



Problem 24
172.16.0.200                 255.255.255.192

Size of Network Part         16
Size of Subnet Part          10
Size of Host part            6
Number of hosts per subnet   2 ^ 6 – 2 = 62
Number of subnets            2 ^ 10 = 1024

                             255.255.255.192
                             172.16.0.200
                             256 – 192 = 64
                             3 * 64 = 192

Subnet Number                172.16.0.192
Broadcast Address            172.16.0.255

Range of valid IP addresses
First Address               172.16.0.193
Last Address                172.16.0.254




                                                 34
Problem 25
10.1.1.1                      255.0.0.0

Size of Network Part          8
Size of Subnet Part           0
Size of Host part             24
Number of hosts per subnet    2 ^ 24 – 2 = 16,777,214
Number of subnets             2^0=1

Subnet Number                 10.0.0.0
Broadcast Address             10.255.255.255

Range of valid IP addresses
First Address               10.0.0.1
Last Address                10.255.255.254


Finding all subnets with fewer than 8 subnet bits

Generic list All Subnet Chart
Octect                                         1         2           3          4
Mask                                           255       255         252        0
Magic Number                                                         4
Network number/Zero subnet                     130       4           0          0
Next subnet                                    130       4           4          0
Next subnet                                    130       4           8          0
Last subnet                                    130       4           248        0
Broadcast subnet                               130       4           252        0
Out of range (used by process)                 130       4           256        0

Step 1. Write down the subnet mask in decimal, in the first empty row of the table
Step 2. Identify the interesting octet, which is the octet with value other than 255 or 0,
and draw a rectangle around the column of the interesting octet.
Step 3. Calculate the magic number by subtracting the mask’s interesting octet from 256
Step 4. Write down the classful network number (zero subnet number)
Step 5. To find each successive subnet number
        a. for the three un-interesting octets copy the previous subnet numbers value
        b. for the interesting octet add the magic number to the previous subnet numbers
        interesting octet value.
Step 6. Once the sum calculated in stp 5.b becomes 256, stop the process, the number
with 256 in it is out of range, and previous subnet number is the broadcast subnet
number.




                                                                                        35
Finding all subnets with exact 8 subnet bits

The subnet octet is the interesting octet, to find all the subnets add 1 to the interesting
octet till it reaches 256.

Finding all subnets with more than 8 subnet bits

The process follows the same five steps as with fewer than 8 subnet bits.

Step 6. When any steps addition results is in sum of 256
a. for the octet whose sum would have been 256 write down 0
b. for the octet to the left add 1 to the previous subnet’s value in that octet
c. for any other octet copy the value of the same octet in the previous subnet number
d. start again with step 5

Step 7. each time the process results in a sum of 256, repeat step 6 of this process

Step 8. Repeat the steps until the addition in step 6b, would actually change the value of
the network portion of the subnet number



Octect                                           1           2           3           4
Mask                                             255         255         255         192
Magic Number                                                                         64
Network number/Zero subnet                       130         4           0           0
First non-zero subnet number                     130         4           0           64
Next subnet                                      130         4           0           128
Next subnet                                      130         4           0           192
Next subnet (add 1 to the third octet, and       130         4           1           0
write 0 in the fourth octet)
Next subnet                                      130         4           1           64
Next subnet                                      130         4           1           128
Next subnet                                      130         4           1           192

Broadcast subnet                                 130         4           255         192

Definitions….


Bitwise Boolean AND : A Boolean AND between two numbers of the same length where
the first bit in each number is ANDed and the second bit and so on

Boolean AND : A math operation performed on a pair of one digit binary numbers, the
result is another one digit binary number, binary 1 and 1 yields a result of binary 1, all
other combinations yielding binary 0.


                                                                                              36
Broadcast subnet : When subnetting a Class A, B or C network, the one network in each
classful network, for which all subnet bits have a value of binary 1s. The subnet
broadcast address in this subnet has the same numeric value as the classful network’s
network wide broadcast address.


Classful network : An IPv4 Class A,B or C network, called classful network, because
these networks are defined by the class rules for IPv4 addressing.

Default Mask : The mask used in Class A,B or C network, that does not create any
subnets, specifically mask 255.0.0.0 for Class A, 255.255.0.0 for Class B, and
255.255.255.0 for a Class C network.

Prefix notation , CIDR notation : A shorter way to write subnet mask, in which number of
binary 1s in the mask is simply written in decimal. For instance /24 denotes the subnet
mask with 24 binary 1 bits in the subnet mask.

Private IP address : IP addresses within Class A,B and C, networks that are set aside for
use within a private organization. These addresses are defined by RFC 1918, and are not
routable through internet.

Public IP Address : An IP address that is part of a registered network number, as assigned
by an Internet Assigned Numbers Authority (IANA) member agency. Routers in the
internet forward (route) publicly assigned network numbers.

Subnet : Sub division of Class A, B or C network as configured by the network
administrator. Subnets allow single Class A,B or C network to be used, instead of
multiple networks but still allow multiple groups of ip addresses.

Subnet Mask : A 32 bit number that numerically represents the format of an IP address,
by representing the network and subnet part with a mask bit value of 1, and host part with
a mask bit value of binary 0s.

Subnet number/ Subnet address : In IPv4 a dotted decimal number that represents all
addresses in a single subnet. Numerically smallest value in the range of numbers in a
subnet, reserved so that it cannot be used as a uni cast IP address by a host.

Zero Subnet : For every class ful IPv4 network that is subnetted, the one subnet whose
subnet number has all binary 0s in the subnet part. In decimal zero subnet can be easily
identified, because it is the same number as the classful network number.




                                                                                           37
Chapter 13 – Operating Cisco Routers

Physical installation
Steps required to install a router…..
Step 1. Connect any LAN cables to LAN ports
Step 2. If using an external CSU/DSU connect the router’s serial interface to CSU/DSU
and the CSU/DSU to the line from telco.
Step 3. If using internal CSU/DSU connect the routers’ serial interface to the line from
telco
Step 4. connect the router’s console port to a pc using a rollover cable as needed to
configure the router
Step 5. Connect the power cable to power port on the router
Step 6. Turn on the router

Comparison between Switch CLI and Router CLI

The configuration commands used for the following features are the same on both routers
and switches…

Similarities between switch CLI and router CLI…

•   Use and Enable (privileged) mode
•   Entering and exiting configuration mode, using configure terminal, end and exit
    commands, and ctrl z key sequence
•   Configuration of console, telnet and enable secret password
•   Configuration of SSH encryption keys, and username/password login credentials.
•   Configuration of host names and interface descriptions
•   Speed and Duplex commands
•   Shutdown and no shutdown commands to administratively disable and enable an
    interface respectively
•   Navigation through different configuration context modes, using commands like line
    console 0 , and interface
•   CLI help, command editing and command recall
•   The meaning and use of start-up config in NVRAM, running config in RAM, external
    servers like TFTP, along with copy commands.
•   The process of reaching a setup mode either by re-loading the router with an empty
    start-up config, or by using setup command


Differences….

•   The configuration of IP address differ in someway between switches and routers
•   Questions asked in setup mode differ




                                                                                       38
•   Routers have an auxiliary port, intended to be connected to an external modem and
    phone line, to allow remote users to dial into the router and access the CLI, by
    making a phone call.


There is no show mac address-table dynamic command in a router, but a router has
show ip route command.

Router Interfaces

Routers generally have two types of physical interfaces : Ethernet Interfaces and Serial
Interfaces.

Ethernet Interfaces…
Interface Ethernet number
Interface fastethernet number
Interface gibabitethernet number

Serial Interfaces…
For PPP links and Frame relay links and uses HDLC or PPP protocols HDLC being the
default.

Valid configuration command formats….

Interface Ethernet 0
Interface fastethernet 0/1
Interface serial 1/0/1


Commands to view information about interfaces….

Show ip interface brief
Show protocols fa0/0
Show interfaces s1/0/1

Please refer to page 413 for a detailed listing example




                                                                                           39
Router Interface status codes and their meaning
Name              Location           General Meaning
Line Status       First Status       Refer to the layer – 1 status, eg. If the cable is
                  code               installed, is it the right/wrong cable, is the device on
                                     the other end powered on.
Protocol Status Second Status        Refer generally to the layer – 2 status, It is always
                  code               down if the line status is down. If the line status is up
                                     and protocol status is down, usually is caused by
                                     mismatch in the data link layer protocol
                                     configurations.



Typical combinations of two interface status codes and likely reasons….
Line and protocol status Typical Reasons
Administratively down, The interface has shutdown command configured on it
down
Down, down                The interface has no shutdown command configured but the
                          physical layer has a problem. Eg. No cable has been
                          connected to the interface, or with Ethernet, the switch
                          interface on the other end of the cable is shutdown, or the
                          switch is powered off.
Up, down                  Almost always refer to data link layer problems, most often
                          configuration problems. Eg. Serial link have this combination
                          when one router was configured to use PPP and the other
                          default to use HDLC.
Up, Up                    All is well, interface is functioning



Router Interface IP Address

Routers need an IP address on each interface.

Router1# configure terminal
Router1 <config> # interface fa0/1
Router1 <config-if> # ip address 10.1.1.1 255.255.255.0
Router1 <config-if> # ^z
Router1# show ip interface brief

Please refer to page 415 for the command output listing


Bandwidth and clock rate on serial interfaces




                                                                                           40
The clock rate speed sub command sets the rate in bits per second on the router that has
the DCE cable plugged into it. Show controllers serial 0/1/0 command will show if a
DCE/DTE cable is connected to a router interface. IOS accepts the clock rate command
on an interface only if it has a DCE cable attached to it, or if no cable is installed. If a
DTE cable is installed IOS silently rejects the clock rate command.

Bandwidth speed command tells the IOS the speed of the link, in kilobits, which are
mainly used by routing protocols (EIGRP, OSPF) etc in their default routing matrices.

For serial link the default bandwidth is 1544 , 1544 kbps, 1.544 Mbps, (a T1 line).
Router ethernett interface default to a bandwidth setting that reflects the current speed of
the interface. If router’s fasterethernet interface is running at 100 Mbps then the
bandwidth is 100,000 Kbps.


Clock rate uses a unit of kbps, whereas bandwidth command uses a unit of Kbps


Auxiliary Port can be configured using the
Line aux 0 command to reach the aux line configuration mode.


Summary of facts about Initial configuration Setup Mode dialogue.

•   Setup mode is intended to allow basic configurations by prompting the CLI user via a
    series of questions.
•   You can reach the setup mode, either by booting the router after erasing the startup-
    config file, or by using the setup enable mode EXEC command.
•   At the end of the process you get three options (0,1,2), to either ignore the answers
    and go back to the CLI (0), ignore the answers but begin again in setup mode (1), or
    to use the resulting config (2).
•   Ctrl C key combination to eject the user out of the setup mode
•   If the user selects to use the resulting config, the router writes the configuration file to
    the startup-config file as well as the running-config file.

The questions asked differ between switches and routers especially on IP configurations.



Cisco IOS Software boot sequence…
When a router first powers on, it follows these four steps…

1. The router performs Power On Self Test (POST) , to discover hardware components,
and to verify that all components work properly.




                                                                                             41
2. The router copies the bootstrap program from ROM into RAM, and runs the bootstrap
program

3. Bootstrap program decides which IOS (or other OS) to load into the RAM, and loads
the OS. After loading the IOS the bootstrap program hand over the control of the router
hardware to the newly loaded OS.

4. If the bootstrap program loads IOS, IOS find the configuration file typically the
startup-config from the NVRAM and loads it into the RAM as running-config.



Loading the Cisco IOS


                                                         RAM




      ROM                      Step 2                  Bootstrap



      Flash

      TFTP                     Step 3                 Cisco IOS
      ROM



     NVRAM
                                                       Running
      TFTP                     Step 4                 Config File

     Console




Router can get the Cisco IOS image from three different locations, and running config
file from other three different locations.




                                                                                        42
The Three Router Operating Systems
Comparison of ROMMON and RxBoot Operating Systems…
Operating        Common Name          Stored in  Used in
Environment
ROM Monitor      ROMMON               ROM        Older and new routers
Boot ROM         Rx Boot, Boot helper ROM        Only in older routers

Cisco routers use different OSs to perform some troubleshooting, to recover router
passwords, and to copy new IOS into the flash when the flash has been erased or
corrupted.


The configuration register

The configuration register is a special 16 bit number, that can be set on any cisco router.
Eg. The console speed, what IOS iamge to load etc are set using the configuration
register bits.

Config-register global configuration command sets the configuration register values.
Eg. Config-register 0x2100 sets the value to hex 2100, which causes the router to load
ROMMON OS, instead of IOS - a common practice when recovering lost passwords.

Config-register values are automatically saved, to both running config and startup-config,
but these new values will not be used until the router is re-loaded.

The show version command lists the configuration register’s current value, if different
the value that will be used once the router is re-loaded.

In most cisco routers the default configuration register setting is Hex 2102.

How routers choose which OS to load

A router chooses the OS to load based on the low order 4 bits in the configuration
register, and the details configured in any boot system global configuration command
found in start-up configuration command. The low order 4 bits, (the 4th hex digit) is the
configuration register are called boot-field.

Steps a routers uses to choose which IOS to load…

Step 1. If boot field = 0 , use the ROMMON OS
Step 2. If boot field = 1, load the first IOS file found in Flash memory
Step 3. If boot field = 2-F
a. try each boot system command in the startup-config file, in order until one works
b. if none of the boot system commands works, load the first IOS file found in the flash
memory


                                                                                            43
ROM


        Bootstrap and
         ROMMON
                           BOOT = 0
                                                     RAM
           FLASH
                                                                        IP Network

                            BOOT = 1
          1st IOS File                                                               TFTP
           ND
         2 IOS File
          3rd IOS File                          BOOT = 2...F
                …                            NVRAM (Startup Config)
               ….
         Last IOS File
                                             Boot System command 1
                                             Boot System command 2
                                                       ….
                                            Boot system command last




If all three steps fails, as it may be possible that flash memory is erased, the router send
broadcasts looking for tftp server and guessing IOS file name to load, if that fails, router
loads the ROMMON which provides the tools to recover.

From the factory Cisco routers have not boot system command configured, and comes
with a configuration register value of 0x2102, meaning boot field hex 2, the process tires
step 3, finds no boot system commands and loads the first IOS image from the flash
memory.
Boot System commands
Boot system command                 Result
Boot system flash                   The first file from flash memory is loaded
Boot system flash filename          IOS with name filename is loaded from flash memory
Boot system tftp filename           IOS with name filename loaded from TFTP server
10.1.1.1




                                                                                            44
The SHOW VERSION command

Show version command supplies a wide variety of information about the router,
including the current and future configuration register.

1. IOS Version
2 The uptime – the length of time passed since the last reload
3. The reason for the last reload of the IOS (reload command, power off/on, software
failure)
4. The time of the last loading of IOS (if the router’s clock has been set)
5. The source from which the router has loaded the current IOS
6. The amount of RAM memory
7. The number and types of interfaces
8. The amount of NVRAM memory
9. The amount Flash memory
10. The configuration register’s current and future settings (if different)

Please refer to page 430 for a detailed listing of the show version command



Bandwidth : A reference to the speed of a network link. Its origins come from earlier
communication technologies where the range or width of frequency bands dictated how
fast communication could occur.

Boot field : Low order 4 bits of the configuration register in a cisco router. The value in
the boot field in part tells the router where to look for the cisco IOS image to load.

Clock Rate : The speed at which a serial link encodes bits on the transmission medium

Configuration register : In cisco route a 16 bit use configurable value that determines how
router the router functions during initialization. In software, the bit position is set by
specifying a hex value using configuration commands.

IOS Image : A file that contains IOS – Cisco operating system that provides majority of
the router’s or switch’s features with the hardware providing the remaining features.

Power On Self Test (POST) : The process on any computer, including routers and
switches , in which computer hardware first runs hardware diagnostics on required
hardware before even trying to load a bootstrap program.

ROMMON : A shorter name of ROM Monitor , which is a low level operating system,
that can be into cisco routers for several seldom needed maintenance tasks, including
password recovery, and loading new IOS when flash memory has been corrupted.




                                                                                          45
RxBoot : A limited function version of IOS stored in the ROM, in some older models of
Cisco routers, for the purpose of performing seldom needed low level functions including
loading new IOS into flash memory, when flash memory has been corrupted or erased.



Configuration Command refernce…
Bandwidth kbps                    Interface command that sets the router’s perception
                                  of bandwidth in kpbs
Clock rate rate                   Interface command that sets the speed at which the
                                  router supplies a clocking signal, applicable when
                                  the router has a DCE cable installed. The unit is
                                  bit/second
Config-register value             Global command that sets the hexadecimal value of
                                  the configuration register
Boot system {file-url | filename} Global command that identifies an externally located
                                  IOS image using a URL.
Boot system flash [flash:fs:]     Global command that identifies the location of an
[filename]                        IOS image in flash memory
Boot system rom                   Global command that tells the router to load RxBoot
                                  OS found in ROM, if one exitsts.
Boot system {rcp|tftp|ftp}        Global command that identifies an external server,
filename [ip address]             protocol and file name to use to load IOS from an
                                  external server

EXEC Command reference….
Command                           Purpose
Show interfaces type number       Lists a large set of information about each interface, or
                                  about the one, if one is specified
Show ip interface brief           List a single line of information about each interface,
                                  including the IP address, line and protocol status, and
                                  the method with which address was configured.
                                  (manual or DHCP).
Show protocols type numebr        Lists a single line of information about the specified
                                  interface including ip address, line,protocol status.
Show controllers type number      List many line of information per interface, or for the
                                  specified interface, for the hardware contoller of the
                                  interface. On serial interfaces, this command identifies
                                  the cable as either a DCE or DTE cable.
Show version                      Lists IOS version as well as a lots of other usefil
                                  information
setup                             Starts the setup dialogue
Copy url-from url-to              Copies the file from source url to destination url
Show flash                        List the contents of the flash memory, including used
                                  and available memory
reload                            Enable mode command to reboot the router


                                                                                        46
Chapter 14 – Routing Protocol Concepts and
  Configuration




                                                         `
                                                         10.1.1.0/24

                                                              Fa0/0
                                          10.1.1.251



                          10.1.128.251 S0/0/0                 S0/1/0   10.1.130.251
                                                Albequerque


                      10.1.128.0/24                                     10.1.130.0/24



                                                                                        10.1.130.253
    10.1.128.252                                                                              S0/0/1
          S0/0/1


                   10.1.2.252                                                                 10.1.3.253




              `                 `
                                                                                  `                   `

            10.1.2.0/24                                                         10.1.3.0/24




A router adds routes to its routing table for the subnets connected to each of the router’s
interfaces. For this to occur the router must have an ip address and mask configured on
the interface, and the interface must be in an up/up status.

Show running config – will show the ip address and mask on each interface
Show ip interface brief – will show the interface status (line/protocol)

Show I p route – will show the routing table entries

10.0.0.0/24 is subnetted , 3 subnets

c          10.1.1.0             directly connected,       Fastethernet 0/0
c           10.1.128.0          directly connected,       serial 0/0/0
c           10.1.130.0          directly connected,       serial0/1/0

terminal ip netmask-format decimal – will change the mask format to decimal



                                                                                                           47
Static Route

Adding a static route to router alberquerque for the subnet 10.1.2.0/24 and 10.1.3.0/24

Albuquerque# configure terminal
Albuquerque(config)# ip route 10.1.2.0          255.255.255.0   10.1.128.252
Albuquerque(config)# ip route 10.1.3.0          255.255.255.0   10.1.130.253

Albuquerque# show ip route static

10.0.0.0 /24 is subnetted , 5 subnets

S      10.1.3.0          [1/0]   via 10.1.130.253
S      10.1.2.0          [1/0]   via 10.1.128.252

Ip route global configuration command supplies the subnet number, mask and the next
hop id address.

If the outgoing interface of a router (Albuquerque’s s0/0/0 or s0/1/0) interface is not in
up/up state the static route will not be listed in the routing table.

Extended PING - a router enable mode command allows the CLI user to change many
option on Ping command, including the source ip address, which enables to issue a ping
command from a router which resembles more closely to a ping command issues by an
end user.

Cisco ping command by default uses the output interface’s ip address as the packet’s
source address, unless otherwise specified in an extended ping.

Default Routes


                                                                           Subnet 1


                                          172.16.3.2                                              Subnet 2
    Fa0/0
                                                                Rest of the enterprises network
                  S0/1
                             172.16.3.0
            R1                                         R2

                                                                              Subnet 3



As part of the routing process a router compares a packet’s destination ip address to its
routing table, if a no matching route is found the router discards the packet. A default


                                                                                                             48
route is a route that matches all destination ip addresses, and the router forwards using the
default route, when no other route is matched with packets destination ip address.


In the above example the router R1 can be configured in three ways…..

•    Configure hundreds of static routes on R1, but all with an outgoing interface of s0/1
     and next hop id address 172.16.3.2 (R2).
•    Enable routing protocols on routers to learn routes
•    Add a default route on R1 with outgoing interface as S0/1


R1(config)# ip route 0.0.0.0 0.0.0.0              172.16.3.2

R1# show ip route

172.16.0.0/24 is subnetted, three subnets

C       172.16.3.1        directly connected      fa0/0
C       172.16.3.2        directly connected      s0/1

S*      0.0.0.0/0 [1/0]          via 172.16.3.2

S* - statically configured default route




                                                                                          49
Routing Protocol Overview

RIP2 – Basic Concepts.

Example of how RIP-2 advertises routes



                                                                                         `
                                                                                                                                       3
                                                                                                                                 R3 IP Routing Table
                                      5                          172.16.5.253         Fa0/0                     Subnet                   Out.Int Next hop Metric
                                                                                                               ------------------------------------------------------------
                         I have a route to
                                                                                                               172.16.3.0                s0/1        172.16.6.252 1
                      172.16.3.0/24 , Metric 2

                                                                      S0/0                       S0/1

                                                                                 R3
                                                                                                                                              2
              5                                                                                                                  I have a route to
      I have a route to                                                                                                       172.16.3.0/24 , Metric 1
   172.16.3.0/24 , Metric 2


                              S0/1                                                                                                  172.16.6.252
                                                                                                          172.16.2.252                     S0/1
                                                                                                                 S0/0
                                          S0/0
    172.16.1.251
                             R1                                                              2                              R2
           Fa0/0                                                                                                        Fa0/1  172.16.3.252                                   1
                                                                                 I have a route to
                                                                              172 .16.3.0/24 , Metric 1




                  `                            `
                                                                                                                          `                             `

                                       4
                                 R1 IP Routing Table
                 Subnet                  Out.Int Next hop Metric
               ------------------------------------------------------------
               172.16.3.0                s0/0        172.16.2.252 1




1. Router r2 learns a connected route for subnet 172.6.3.0
2. R2 sends routing updates to its neighbors’ listing subnet, mask and a distance , metric
3. R3 hears the routing updates and add a route to its routing table for the subnet
172.16.3.0/24 with R2 as the next hop router.
4. At the same time R1 also hears the routing update sent directly from R2 to R1 and adds
the route to its routing table
5. R1 and R3 then send routing updates to each other for the subnet 172.16.3.0/24 with
metric value 2.

RIP routers send periodic routing message about every 30 seconds.


                                                                                                                                                                                  50
Interior and Exterior Routing Protocols

Interior Gateway Protocol (IGP) : A routing protocol that was designed and intended
for use inside a single autonomous system

Exterior Gateway Protocol (EGP) : A routing protocol that was designed and intended
for use between different autonomous systems.

BGP – Border Gateway Protocol is the used to exchange routes between routers in
different autonomous systems and is an EGP.

ICANN – assigns an ASN – Autonomous System Number


Routing protocols classes/algorithms and Protocols that use them
Class/Algorithm                              IGPs
Distance vector                              RIP-1, RIP-2, IGRP
Link-state                                   OSPF , Integrated IS-IS
Balanced Hybrid (also called advanced        EIGRP
distance verctor)


Metrics

Each routing protocol defines a metric that gives an objective numeric value to the
goodness of each route. The lower the metric the better the route.

RIP uses a metric called hop count, which counts the number of routers (hops) between a
router and a subnet.

EIGRP uses a metric which by default considers both the interface bandwidth and
interface delay settings as input into the mathematical formula to calculate the metric.

 ROUTERS generally perform routing more quickly with smaller routing table, Route
Summarization (Auto summarization and Manual Summarization) helps shorten the
routing table while retaining all the needed routes in the network.




                                                                                           51
Routing protocol that must consider Class (A,B,C) rules are called Classful Routing
Protocols, and that do not need to consider Class rules are called Classless Routing
Protocols.

Comparing Classful and Classless Routing Protocols

Feature                                                 Classless          Classful
Support VLSM                                            Yes                No
Send subnet masks in routing updates                    Yes                No
Support manual route summarization                      Yes                No



The process used by routing protocols to recognize changes in a network (a link comes
up or fail, a router is added or removed), to figure out now-best route to each subnet, and
to change each routers routing table is called Convergence.

Summary of Interior Gateway (routing) Protocols
Feature                  RIP-1        RIP-2           EIGRP         OSPF         IS-IS
Classless                No           Yes             Yes           Yes          Yes
Supports VLSM            No           Yes             Yes           Yes          Yes
Sends mask in updates    No           Yes             Yes           Yes          Yes
Distance Vector          Yes          Yes             No            No           No
Link-state               No           No              No            Yes          Yes
Support                  No           Yes             Yes           No           No
autosummarization
Support Manual           No           Yes             Yes           Yes          Yes
Summarization
Proprietary              No           No              Yes           No           No
Routing updates send to No            Yes             Yes           Yes          n/a
a multi cast ip address
Support Authentication   No           Yes             Yes           Yes          Yes
Convergence              Slow         Slow            V.Fast        Fast         Fast



Configuring and Verifying RIP-2

RIP-2 Configuration

Step 1. Router RIP configuration command to move into the RIP configuration mode
Step 2. Version 2 RIP subcommand to tell the router to use RIP Version 2
Step 3. Use one or more network net-number to enable RIP on the correct interface
Step 4. passive-interface type number to disable RIP on an interface

The RIP network command uses a classful network number as its net-number parameters.


                                                                                         52
For any of the router’s interface ip address within that clasful network, the router does the
following three things…

•   The router multicast routing updates, to a reserved IP multicast address 224.0.0.9
•   The router listens for the incoming routing updates on the same interface
•   The router advertises about the subnet connected to the interface


Sample RIP configuration…..


     10.1.1.2.



          Fa0/0
                                              199.1.1.1
                        S0/0


       Fa0/1            S0/1                   199.1.2.1
                  R1


      10.1.4.2.




R1# configure terminal
R1(config)# router rip
R1 (config-router)# version 2
R1(config-router)# network 199.1.1.0
R1(config-router)# network 199.1.2.0
R1(config-router)# network 10.0.0.0

S0/0 – 199.1.1.1. is in a class C network 199.1.1.0
S0/1 – 199.1.2.1. is in a class C network 199.1.2.0
Fa0/1 and fa0/0 10.1.4.2. and 10.1.1.2 are in class A network 10.0.0.0

To disable RIP on fa0/1 interface….

R1(config-router)# passive-interface fa0/1




                                                                                          53
RIP-2 Verification

RIP Operational commands…
Command                  Purpose
Show ip interface brief  List one line per interface, including ip address and interface
                         status; an interface must have an ip address and up/up status
                         for the RIP protocol to work
Show ip route [rip]      List the routing table, including RIP learned routes, and
                         optionally just RIP learned routes
Show ip protocols        Lists information about the RIP configuration, plus IP
                         addresses of neighbouring RIP routers, from which local
                         router has learned the routes.

Show ip route
Show ip route rip
Show ip route 10.1.2.1

Please refer to page 460 for a detailed listing of show ip route command.

Show ip route … listing contains…..

•   Subnet number with the mask at the heading line
•   Next hop router’s ip address
•   Local router’s outgoing interface
•   Length of time since the router heard a routing update about this route
•   The RIP metric for this route, second number in the square brackets [120/1]
•   Administrative Distance of the route first number in the bracket [120/1]

Administrative Distance : is numeric number representing the routing protocol, which is
used to determine the lower number (best route) in a network that uses multiple routing
protocols.

IOS defaults for administrative distance
Route Source                                 Administrative Distance
Connected Route                              0
Static routes                                1
EIGRP                                        90
IGRP                                         100
OSPF                                         110
IS-IS                                        115
RIP (V1 and V2)                              120


                                                                                     54
Unknown or unbelievable                           255




Normally a static route has lower administrative distance than a RIP learned route,
however a backup static route can be configured with an administrative status higher
than any default administrative distances say 150, so that this static route will be added to
the routing table only if no route is learned by any routing protocols.

Show ip protocol
Please refer to page 464 for a detailed listing…..

Q. How it can be used to trouble shoot RIP problems???
Ans. By checking the Version Information and Routing Information Sources of the show
ip protocol command output. It is possible that one Router is configured as RIP Version 2
and other one default Version 1. Also you could verify the router is getting RIP messages
from all the expected sources in the network.


Examining RIP messages using debug

Debug ip rip
Undebug all
Show process
Service timestamps

Please refer to page 465 for a detailed listing

RIP2 routing messages are sent to multicast IP address : 224.0.0.9
RIP1 routing messages are sent to broadcast IP address : 255.255.255.255

Definitions…

Administrative Distance : In cisco routers a mean for a router to choose between
multiple routes to reach the same subnet, when those routes learned by different routing
protocols. The lower the administrative distance, the better the source of the routing
information.

Autonomous Systems : An internetwork in the administrative control of a single
organization., in side which that organization typically runs a Interior Gateway Protocol
(IGP).

Backup Static Route : A static route configured with an administrative status higher than
any of the default routing protocol administrative statuses.



                                                                                          55
Balanced Hybrid : A general type of routing algorithm, other than distance vector and
link state, EIGRP is the only routing protocol that uses Balance Hybird algorithm.



Classful Routing Protocol : Does not transmit mask information along with the subnet
number, and therefore must consider Class A, B or C network boundaries, and perform
autosummarization at those boundaries. Does not support VLSM.

Classless Routing Protocol : An inherent characteristic of a routing protocol, specifically
that routing protocols send subnets masks in it routing updates, thereby removing any
need to make assumptions about the addresses in a particular network or subnet. Making
it able to support VLSM and manual route summarization.

Covergence : Time required for a routing protocol to react to a change in the network,
removing bad routes, and adding new, better routes so that the current best routes are in
all routers’ routing tables.

Default Route : On a router, the route that is considered to match all packets that are not
otherwise matched some more specific routes.

Distance Vector : Logic behind some of the Interior Routing Protocols such as RIP.
Distance Vector algorithm calls for each router to send its entire routing table in each
update, but only to its neighbours. Distance vector algorithm can be prone to routing
loops but are computationally simpler than the link state algoritm.

Exterior Gateway Protocol (EGP) :A routing protocol that was designed to exchange
routing information between two different autonomous systems.

Interior Gateway Protocol (IGP) : A routing protocol designed to use within an
organization (autonomous system).

Link State : A classification of underlying algorithm used in some routing protocols. Link
state protocols build a detailed database that lists links (subnets) and their states
(up/down) from which the best route is calculated.

Metric : A unit of measure used by routing protocol algorithms, to determine the best
route, for the traffic to use to reach a particular destination, in RIP-2 it is the hop-counts.

Routing Updates : A generic reference to any routing protocol message, in which it sends
the routing information to its neighbours.

Variable Length Subnet Masking (VLSM) : The capacity to specify different subnet
masks for the same Class A,B, or C network number on different subnets. VLSM can
help optimize available address space.



                                                                                             56
Configuration command reference…
Command                            Description
Router rip                         Global configuration command that moves the user
                                   to the RIP configuration mode.
Network network-number             RIP subcommand that lists a clasful network
                                   number, enabling RIP on all of that router’s
                                   interfaces in that classful network.
Version {1|2}                      RIP subcommand that sets the RIP version
Passive-interface [default]        RIP subcommand that tells the RIP to no longer
interface type, number             advertise RIP updates on the listed interface
Ip address ip-address mask         Interface subcommand that sets the routers inteface’s
                                   ip address and mask
Ip route prefix mask {ip-address | Global command that defines a static route
interface type, interface number}
(eg. Ip route 10.102.0
255.255.255.0 10.1.128.252)
Service timestamp                  Global command that tells the router to put a
                                   timestamp on log messages, including the debug
                                   messages



EXEC command reference…
Command                            Description
Show ip interface brief            Lists one line per router interface, including ip
                                   address and interface status
Show ip route [rip|static|         Lists the routing table
connected]
Show ip route ip-address           List the details of the routes the router would match
                                   for a packet sent to the listed ip-address
Show ip protocols                  Lists information about RIP configurations, plus the
                                   IP address of the neighbouring routers from which
                                   the local router has learned routes.
Show process                       Lists information on processes running in IOS, and
                                   also overall CPU utilization status
Terminal ip netmask-format         For the length of the user session, causes the router
decimal                            to display mask information in dotted decimal
                                   instead of prefix format
Debug ip rip                       Tells the router to generate detailed message logs for
                                   each send and received RIP updates.




                                                                                       57
Chapter 15 – Troubleshooting IP Routing
IP Troubleshooting Tips and Tools

Avoiding reserved IP addresses

•   Addresses that are always reserved
•   Two addresses that are reserved in each subnet (subnet number and subnet broadcast
    address)
•   Addresses in two special subnets of each classful network, namely zero subnet and
    broadcast subnet

First octet values of addresses that are always reserved, and that cannot be assigned to
hosts. Reserved IP addresses….as recognized based on the value of the first octect….
• 0 (because network 0.0.0.0 is always reserved)
• 127 (because network 127.0.0.0 is always reserved)
• 224 – 239 (all Class D – Multicast IP Addresses)
• 240 – 255 (all Class E – Experimental IP Addresses)


Summary of reasons why an exam question should or should not allow the use of the zero
and broadcast subnets. Determine whether a question allows the use of the Zero and
Broadcast subnets
Clue in the question                                             Subnet reserved?
Says nothing about it (default for the exam)                     No
List the ip subnet-zero configuration command                    No
Use a classless routing protocol (RIP-2, EIGRP, OSPF)            No
List the no ip subnet-zero configuration command                 YES
Use a classful routing protocol (RIP-1)                          YES


Summary of 4 tips when approaching IP Addressing related questions on the exam…

•   Check the mask used on each device in the same LAN; if different then the devices
    cannot have the same view of the range of addresses in the subnet.
•   On a point-to-point WAN link, check the IP addresses and masks on both end of the
    link, and confirm that the two ip address are in the same subnet.
•   When checking to confirm that hosts are in the same subnet, do not just examine the
    subnet number. Also check the subnet mask and the implied range of IP addresses.
•   Be ready to quickly use the commands in the table below, to find the ip address,
    masks, and subnet numbers.




                                                                                           58
Host Networking

Summary of how hosts think about routing, address assignment, name resolution and
ARP…

Routing : If the packet’s destination is in the same subnet, send the packet directly, if not
send the packet to the default gateway.

Address Assignment : Before sending any packets, the host may use DHCP client
services to learn its IP address, mask, default gateway, and DNS ip address. The host
could also be statically configured with the same details.

Name resolution : When the user directly or indirectly when a host references a host
name, the host typically uses DNS name resolution request to ask DNS to identify the
host’s ip address, unless the host already has the information in its name cache.

IP-to-MAC resolution: The host uses ARP requests to find the other host’s MAC
address, or the default gateway’s ip address, unless the information is already in the
host’s ARP cache.

Command                     Function
Ipconfig/all                Displays detailed IP configuration information for all
                            interface, including IP address, mask, default gateway, and
                            DNS IP address.
Ipconfig/release            Releases any DHCP leased IP addresses
Ipconfig/renew              Acquires an IP address and related information using DHCP
Nslookup name               Sends a DNS request for the listed name
Arp –a                      Lists the host’s ARP cache
Ipconfig/displaydns         List host’s name cache
Ipconfig/flushdns           Remove all dns-found name cache entries
Arp -d                      Flushes (removes) the host’s ARP cache
Netstat -rn                 Displays host’s routing table


Troubleshooting Host Routing Problems.
Two typical reasons why a hosts cannot ping other hosts in the same subnet.
If a ping of a same subnet host fails, the root cause typically falls into two categories…

•   The two hosts have incorrect ip address, and mask configuration, so that at least one
    of the two hosts thinks it is in a different subnet.
•   The two hosts have correct ip address and mask configuration, but the underlying
    Ethernet has a problem



                                                                                             59
Ccent notes part 3
Ccent notes part 3
Ccent notes part 3
Ccent notes part 3

Contenu connexe

Tendances

PST SC015 Chapter 2 Computer System 2017/2018
PST SC015 Chapter 2 Computer System 2017/2018PST SC015 Chapter 2 Computer System 2017/2018
PST SC015 Chapter 2 Computer System 2017/2018Fizaril Amzari Omar
 
PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)Fizaril Amzari Omar
 
Ipaddressingandsubnettingworkbookv1 2
Ipaddressingandsubnettingworkbookv1 2Ipaddressingandsubnettingworkbookv1 2
Ipaddressingandsubnettingworkbookv1 2isc2008
 
Binary reference guide csit vn1202
Binary reference guide csit vn1202Binary reference guide csit vn1202
Binary reference guide csit vn1202jrwalker2012
 
Computer math
Computer mathComputer math
Computer mathPDE1D
 
Binary Numbers
Binary NumbersBinary Numbers
Binary Numbersikjsamuel
 
Ip Subredes
Ip SubredesIp Subredes
Ip SubredesEspol
 
Bits, Bytes and Blobs
Bits, Bytes and BlobsBits, Bytes and Blobs
Bits, Bytes and BlobsMrinal Wadhwa
 

Tendances (12)

PST SC015 Chapter 2 Computer System 2017/2018
PST SC015 Chapter 2 Computer System 2017/2018PST SC015 Chapter 2 Computer System 2017/2018
PST SC015 Chapter 2 Computer System 2017/2018
 
PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)
 
IP Addresing
IP AddresingIP Addresing
IP Addresing
 
Subneting2
Subneting2Subneting2
Subneting2
 
Ipaddressingandsubnettingworkbookv1 2
Ipaddressingandsubnettingworkbookv1 2Ipaddressingandsubnettingworkbookv1 2
Ipaddressingandsubnettingworkbookv1 2
 
Numbering Systems
Numbering SystemsNumbering Systems
Numbering Systems
 
Binary reference guide csit vn1202
Binary reference guide csit vn1202Binary reference guide csit vn1202
Binary reference guide csit vn1202
 
Computer math
Computer mathComputer math
Computer math
 
Binary Numbers
Binary NumbersBinary Numbers
Binary Numbers
 
Lec 02
Lec 02Lec 02
Lec 02
 
Ip Subredes
Ip SubredesIp Subredes
Ip Subredes
 
Bits, Bytes and Blobs
Bits, Bytes and BlobsBits, Bytes and Blobs
Bits, Bytes and Blobs
 

En vedette (10)

Chap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packetsChap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packets
 
PACE-IT: Wan Technologies (part 4) - N10 006
PACE-IT: Wan Technologies (part 4) - N10 006PACE-IT: Wan Technologies (part 4) - N10 006
PACE-IT: Wan Technologies (part 4) - N10 006
 
IP Routing
IP RoutingIP Routing
IP Routing
 
Lesson.7: Configuring IP Routing B
Lesson.7: Configuring IP Routing BLesson.7: Configuring IP Routing B
Lesson.7: Configuring IP Routing B
 
Wan Technologies
Wan TechnologiesWan Technologies
Wan Technologies
 
PACE-IT: Wan Technologies (part 3) - N10-006
PACE-IT: Wan Technologies (part 3) - N10-006 PACE-IT: Wan Technologies (part 3) - N10-006
PACE-IT: Wan Technologies (part 3) - N10-006
 
PACE-IT: WAN Technologies (part 2) - N10 006
PACE-IT: WAN Technologies (part 2) - N10 006 PACE-IT: WAN Technologies (part 2) - N10 006
PACE-IT: WAN Technologies (part 2) - N10 006
 
PACE-IT: WAN Technologies (part 1) - N10 006
PACE-IT: WAN Technologies (part 1) - N10 006 PACE-IT: WAN Technologies (part 1) - N10 006
PACE-IT: WAN Technologies (part 1) - N10 006
 
Computer Networking: LAN and WAN Technologies
Computer Networking: LAN and WAN TechnologiesComputer Networking: LAN and WAN Technologies
Computer Networking: LAN and WAN Technologies
 
IP Routing Tutorial
IP Routing TutorialIP Routing Tutorial
IP Routing Tutorial
 

Similaire à Ccent notes part 3

Similaire à Ccent notes part 3 (20)

Lesson 2: Subnetting basics
Lesson 2: Subnetting basicsLesson 2: Subnetting basics
Lesson 2: Subnetting basics
 
subnet.ppt
subnet.pptsubnet.ppt
subnet.ppt
 
Ipaddressing
IpaddressingIpaddressing
Ipaddressing
 
How IP address works
How IP address worksHow IP address works
How IP address works
 
Ip -subnetting
Ip  -subnettingIp  -subnetting
Ip -subnetting
 
Chap3. i pv4
Chap3. i pv4Chap3. i pv4
Chap3. i pv4
 
Ip addresses
Ip addressesIp addresses
Ip addresses
 
Subnetting Made Easy
Subnetting Made EasySubnetting Made Easy
Subnetting Made Easy
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
I Paddress
I PaddressI Paddress
I Paddress
 
ACIT Mumbai - CCNA Training Coourse- IP ADDRESS ASSIGNMENT
ACIT Mumbai - CCNA Training Coourse- IP ADDRESS ASSIGNMENTACIT Mumbai - CCNA Training Coourse- IP ADDRESS ASSIGNMENT
ACIT Mumbai - CCNA Training Coourse- IP ADDRESS ASSIGNMENT
 
IP classes and subnetting.
IP classes and subnetting.IP classes and subnetting.
IP classes and subnetting.
 
Assignment 1 iap
Assignment 1 iapAssignment 1 iap
Assignment 1 iap
 
Mod6
Mod6Mod6
Mod6
 
Wipro telecom training i pv4 concepts
Wipro telecom training   i pv4 conceptsWipro telecom training   i pv4 concepts
Wipro telecom training i pv4 concepts
 
IP Addressing
IP AddressingIP Addressing
IP Addressing
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
Subnetting Made Easy
Subnetting Made EasySubnetting Made Easy
Subnetting Made Easy
 
Subnetting
SubnettingSubnetting
Subnetting
 
IP Addressing Subnetting Workbook
IP Addressing Subnetting WorkbookIP Addressing Subnetting Workbook
IP Addressing Subnetting Workbook
 

Ccent notes part 3

  • 1. CCENT Notes Part 3 – IP Routing Ref : CCENT/CCNA ICND1 Official Exam Certification Guide, Second Edition by Wendell Odom It is highly recommended that you read at least once the above study guide to make full use of this notes, it is expected that there may be minor errors in this notes, please always refer the study guide for accurate information. (Jojo Jacob - CCENT)
  • 2. TABLE OF CONTENTS Chapter 12 – IP Addressing and Subnetting........................................................................3 Chapter 13 – Operating Cisco Routers..............................................................................38 Chapter 14 – Routing Protocol Concepts and Configuration............................................47 Chapter 15 – Troubleshooting IP Routing.........................................................................58 2
  • 3. Chapter 12 – IP Addressing and Subnetting List of all possible valid network numbers….reference table for the number of network, size of the network part, size of the host part, for Class A,B and C ip networks. Class A Class B Class C First Octect range 1 to 126 128 - 191 192 – 223 Valid Network Numbers 1.0.0.0 to 128.0.0.0 192.0.0.0 to 126.0.0.0 191.255.0.0 223.255.255.0 Number of networks in this Class 2^7–2 2 ^ 14 = 2 ^ 21= = 128 16,384 2,097,152 Number of hosts per network 2 ^ 24 – 2 = 2 ^ 16 – 2 = 2^8–2= 16,777,214 65,534 254 Size of network part of the address 1 2 3 (bytes) Size of hosts part of the address 3 2 1 (bytes) ^ raised to CLASS A (7 Network Bits) 0 N N N N N N N H H H H H H H H H H H H H H H H H H H H H H H H 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 CLASS B (6 + 8 = 14 Network Bits) 1 0 N N N N N N H H H H H H H H H H H H H H H H H H H H H H H H 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 CLASS C (5 + 16 = 21 Network Bits) 1 1 0 N N N N N H H H H H H H H H H H H H H H H H H H H H H H H 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 Class A , B and C network, network and host parts and default mask Class of Size of network part of Size of host part of Default mask for Address address in bits address in bits each class of network A 8 24 255.0.0.0. B 16 16 255.255.0.0 C 24 8 255.255.255.0 3
  • 4. RFC 1918 Private IP Address Space Private IP Networks Class of Networks Number of Networks 10.0.0.0 through 10.0.0.0 A 1 172.16.0.0 through 172.31.0.0 B 16 192.168.0.0 through 192.168.255.0 C 255 IPv6 – 128 bit IP address : can provide 10 ^ 38 IP Addresses. Currently in the earth there are 10 ^ 10 people living. IPv4 vs IPv6 Feature IPv4 IPv6 Size of address 32 bits , 4 octects 128 bits , 16 octects Example address 10.1.1.1 0000:0000:0000:0000:FFFF:FFFF:0A01:0101 Same address ---- ::FFFF:FFFF:0A01:0101 abrreviated Number of possible 2 ^ 32 2 ^ 128 , or roughly 3.4 x 10 ^ 38 addresses, ignoring Approx 4 billion reseved addresses Bitwise Boolean AND example Decimal Binary Address 150.150.2.1 10010110 10010110 00000010 00000001 Mask 255.255.255.0 11111111 11111111 11111111 00000000 Result of AND 150.150.2.0 10010110 10010110 00000010 00000000 255.255.255.0 – 11111111 11111111 11111111 00000000 Is written as a /24 subnet mask. Binary process to convert between Dotted decimal and prefix notation Step 1. Covert the dotted decimal mask to binary Step 2. Count the number of binary 1s in the 32 bit binary mask, this is the value of the prefix notation mask Eg. 255.255.240.0 converts to…. 11111111 11111111 11110000 00000000 The mask has 20 binary 1s, so the prefix notation of the same mask is /20. Convert prefix notation to a dotted decimal format… Step 1. write down x binary 1s, where x is the value listed in the prefix notation of the mask 4
  • 5. Step 2. Write down binary 0s after binary 1s until you have written down all the 32 bits Step 3. Convert this binary number, 8 bit at a time to dotted decimal format. Eg. /20 converts to 11111111 11111111 11110000 00000000 255.255.240.0 Nine possible Decimal Numbers in a subnet mask Subnet mask’s Binary Equivalent Number of Binary Number of Binary Decimal Octect 1s 0s 0 00000000 0 8 128 10000000 1 7 192 11000000 2 6 224 11100000 3 5 240 11110000 4 4 248 11111000 5 3 252 11111100 6 2 254 11111110 7 1 255 11111111 8 0 Convert a dotted decimal subnet mask format to a prefix format…. Step 1. Start with a prefix value of 0 Step 2. For each dotted decimal octect, add the number of binary 1s, listed for that decimal value in the table above Step 3. Prefix length is /x , where x is the sum calculated in Step 2. Eg. 255.255.240.0 Start from 0 First octect 255 add 8 Second octect 255 add 8 Third octect 240 add 4 Fourth octect 0 add 0 Prefix is 20 Converting a /20 subnet into dotted decimal format…. Step 1. Divide x by 8 ( x / 8) , noting the number of times 8 goes fully into x , the dividend represented as d, and the number left over, the reminder represented as r. Step 2. write down d octets of 255, 5
  • 6. Step 3. for the next octet, find the decimal number that begins with r, binary 1s, Followed by all binary 0s. Step 4. for any remaining octets write down value 0 20 / 8 = 2 and a reminder of 4 2 octects with all binary 1s , third octed with 1 birary 1 and 4 binary 0 , and last one with all binary 0s. 255.255.240.0 Appendix D. Problem Set 1. 255.240.0.0 - 8+4+0+0+ = /12 255.255.192.0 – 8+8+2+0 = /18 255.255.255.224 – 8+8+8+3 = /27 255.254.0.0 – 8+7+0+0 = /15 255.255.248.0 - 8+8+5+0 = /21 /30 - 255.255.255.252 /25 - 255.255.255.128 /11 - 255.224.0.0 /22 - 255.255.252.0 /24 - 255.255.255.0 255.240.0.0 - 11111111 11110000 00000000 00000000 - /12 255.255.192.0 – 11111111 11111111 11000000 00000000 /18 255.255.255.224 – 11111111 11111111 11111111 11100000 /27 255.254.0.0 – 11111111 11111110 00000000 00000000 /15 255.255.248.0 - 11111111 11111111 11111000 00000000 /21 /30 - 11111111 11111111 11111111 11111100 255.255.255.252 /25 - 11111111 11111111 11111111 10000000 255.255.255.128 /11 - 11111111 11100000 00000000 00000000 255.224.0.0 /22 - 11111111 11111111 11111100 00000000 255.255.252.0 /24 - 11111111 11111111 11111111 00000000 255.255.255.0 6
  • 7. ANALYSING AND CHOOSING SUBNET MASKS SLSM – Static Length Subnet Mask VLSM – Variable Length Subnet Mask How to find the size of the Network , Subnet and Host part of an IP Address… • The network part of the address is always defined by the class rule • The host part of the address is defined by the subnet mask, the number of binary zeros in the subnet mask defines the number of host bits. • Subnet part of the address is what is left over in the 32 bit address IP Address : 8.1.4.5 Mask : 255.255.0.0 Class : A Network Bits : 8 Host bits : 16 Subnet bits : 32 – 24 = 8 IP Address : 130.4.102.1 Mask : 255.255.255.0 Class : B Network Bits : 16 Host bits : 8 Subnet bits : 32 – 24 = 8 IP Address : 199.1.1.100 Mask : 255.255.255.0 Class : C Network Bits : 24 Host bits : 8 Subnet bits : 32 – 32 = 0 Facts about how the subnet mask identifies part of the structure of an IP address • A subnet masks binary 1s define the combined network and subnet part of an IP address • The masks binary 0s define the hosts part of the IP address • Class rules define the size of the network part 7
  • 8. Finding the Network, Subnet and Host part using binary….. Step 1. Compare the first octet of the address to the table of Class A,B or C addresses, write down the number of network bits depending on the address class. Step 2. Find the number of hosts bits by a. Converting subnet masks to binary b. Counting the number of binary 0s in the mask Step 3. Calculate the number of subnet bits by subtracting the combined network and hosts bits from 32. Decimal Process : Finding the Network, Subnet and Hosts bits in a subnet mask Step 1. Compare the first octet of the address to the table of Class A,B or C addresses; write down the number of network bits based on the address class. Step 2. If the mask is in dotted decimal format, convert the mask to prefix format Step 3. To find the number of host bits, subtract the prefix length from 32 Step 4. Calculate the number of subnet bits by subtracting the combined network and hosts bits from 32 Given a class full network number and a single subnet mask is used throughout the classfull network. Number of subnets :- 2 ^ s , where s is the number of subnet bits Number of hosts :- 2 ^ h , where h is the number of host bits When to use which formula for number of subnets Use the 2 ^ s – 2 formula, and avoid using Use the 2 ^ s formula, and use the zero and the zero subnet and broadcast subnet if… broadcast subnet if… Classful routing protocol Classless routing protocol RIP version 1 or IGRP as the routing RIP Version 2, EIGRP or OSPF as the protocol routing protocol The no ip subnet zero command is The ip subnet zero command is configured configured or ommited (default) VLSM is used No other clues provided 8
  • 9. Analysing the subnet mask 8.1.4.5 /16 Hosts bits : 32 – 16 = 16 Class A network bits : 8 Subnet bits : 32 – 24 = 8 Number of subnets = 2 ^ 8 = 256 Number of host = 2 ^ 16 – 2 = 65,534 130.4.102.1/24 Hosts bits : 32 – 24 = 8 Class B network bits : 16 Subnet bits : 32 – 24 = 8 Number of subnets = 2 ^ 8 = 256 Number of host = 2 ^ 8 – 2 = 254 199.1.1.100/24 Hosts bits : 32 – 24 = 8 Class C network bits : 24 Subnet bits : 32 – 32 = 0 Number of subnets = 2 ^ 0 = 1 Number of host = 2 ^ 8 – 2 = 254 130.4.102.1/22 Hosts bits : 32 – 22 = 10 Class B network bits : 16 Subnet bits : 32 – 26 = 6 Number of subnets = 2 ^ 6 = 64 Number of host = 2 ^ 8 – 2 = 1022 9
  • 10. 199.1.1.100/27 Hosts bits : 32 – 27 = 5 Class C network bits : 24 Subnet bits : 32 – 29 = 3 Number of subnets = 2 ^ 3 = 8 Number of host = 2 ^ 5 – 2 = 30 Number of bits in the host Maximum number of hosts Maximum number of or subnet field (2 ^ h – 2) subnets (2 ^ s ) 1 0 2 2 2 4 3 6 8 4 14 16 5 30 32 6 62 64 7 126 128 8 254 256 9 510 512 10 1022 1024 11 2046 2048 12 4094 4096 13 8190 8192 14 16,382 16,384 Finding the only possible MASK With a Class B network 130.1.0.0 , what is the only subnet mask you can use to have upto 200 subnets and 200 hosts per subnets??? To have 200 subnets you need to have atleast 8 subnet bits ( 2 ^ 8 = 256) , (2 ^ 7 is only 128) Only possible subnet so is…(16 bits for network part as it is a Class B network). NNNNNNNN NNNNNNNN SSSSSSSS HHHHHHHH 11111111 11111111 11111111 00000000 255.255.255.0 or a /24 mask. 10
  • 11. Finding the multiple possible MASKs With a Class B network, what are the subnet masks you can use to have upto 50 subnets and 200 hosts in the largest subnet??? To have 50 subnets you need to have atleast 6 subnet bits ( 2 ^ 6 = 64) , (2 ^ 5 is only 32) To have 200 hosts you need to have atleast 8 host bits ( 2 ^ 8 - 2 = 254) , (2 ^ 7 is only 128) Possible subnet format is …(16 bits for network part as it is a Class B network). NNNNNNNN NNNNNNNN SSSSSSXX HHHHHHHH XX – can be either subnet or host bits That mean you may get 2 ^ 2 = 4 possible combination of subnet masks, however All masks must start with one unbroken consecutive string of binary 1s, followed by one unbroken consecutive string of binary 0s. So the possible mask are listed below but only three are valid. 11111111 11111111 11111111 00000000 (8 subnets , 8 hosts) 11111111 11111111 11111110 00000000 (7 subnets, 9 hosts) 11111111 11111111 11111100 00000000 (6 subnets, 10 hosts) 11111111 11111111 11111101 00000000 (INVALID MASK) 255.255.255.0 prefix format /24 255.255.254.0 prefix format /23 255.255.252.0 prefix format /22 Choosing the subnet that maximizes the number of subnets or hosts The mask with the most subnet bits : the mask with the wildcard bits set to binary 1s, there by increasing the subnet bits, maximizes the number of subnets and minimizes the number of hosts per subnet. The mask with most host bits : the mask with the wildcard bits set to binrary 0s, thereby making the host part of the subnet address larger, maximizes the number of hosts per subnet and minimizes the number of subnets. 11
  • 12. Choosing a subnet mask steps ….. Step 1. Find the number of network bits (N) based on the Class A,B or C rules Step 2 : Find the number of subnet bits (S) based on the formula 2 ^ s , such that 2 ^ s > or = the number of required subnets. Step 3. Find the number of host bits (H) based on the formula 2 ^ h – 2, such that 2 ^ h – 2 is >= the number of required hosts. Step 4. Write down starting from the left N+S binary 1s Step 5. Write down starting from right H binary 0s Step 6. If the binary 1s and 0s together adds up to less than 32 a. fill in the remaining ‘wildcard’ bit positions with X between binary 1s and 0s. b. find all combination of bits for the wildcard bit positions, meeting the requirement of having one unbroken consecutive string of binary 1s on left. Step 7. convert the mask to decimal or prefix format Step 8. To find the mask that maximizes the number of subnets pick the mask with most binary 1s init, and to find the mask that maximizes the number of hosts pick the mask with most binary 0s. Problem set 2. Analysing unsubnetted IP addresses 10.55.44.3 Class of the address : A Number of octets in the network part : 1 Number of octets in the host part : 3 Network number : 10.0.0.0 Network broadcast number : 10.255.255.255 128.77.6.7 Class of the address : B Number of octets in the network part : 2 Number of octets in the host part : 2 Network number : 128.77.0.0 Network broadcast number : 128.77.255.255 192.168.76.54 Class of the address : C Number of octets in the network part : 3 Number of octets in the host part : 1 Network number : 192.168.76.0 Network broadcast number : 192.168.76.255 12
  • 13. 190.190.190.190 Class of the address : B Number of octets in the network part : 2 Number of octets in the host part : 2 Network number : 190.190.0.0 Network broadcast number : 190.190.255.255 9.1.1.1 Class of the address : A Number of octets in the network part : 1 Number of octets in the host part : 3 Network number : 9.0.0.0 Network broadcast number : 9.255.255.255 200.1.1.1 Class of the address : C Number of octets in the network part : 3 Number of octets in the host part : 1 Network number : 200.1.1.0 Network broadcast number : 200.1.1.255 Problem Set 3. Interpreting existing subnet masks 10.66.5.99 255.255.254.0 Steps Mask in prefix format /23 Class : A Results Network bits 8 Subnet bits 32 – (8+9) = 15 Host bits 9 Number of subnets in the network 2 ^ 15 = 32,768 Number of hosts per subnet 2 ^ 9 – 2 = 510 13
  • 14. 172.16.203.42 255.255.252.0 Steps Mask in prefix format /22 Class : B Results Network bits 16 Subnet bits 32 – (16+10) = 6 Host bits 10 Number of subnets in the network 2 ^ 6 = 64 Number of hosts per subnet 2 ^ 10 – 2 = 1022 192.168.55.55 255.255.255.224 Steps Mask in prefix format /27 Class : C Results Network bits 24 Subnet bits 32 – (24+5) = 3 Host bits 5 Number of subnets in the network 2 ^ 3 = 8 Number of hosts per subnet 2 ^ 5 – 2 = 30 10.22.55.87 /30 Steps Class : A Results Network bits 8 Subnet bits 32 – (8+2) = 22 Host bits 2 Number of subnets in the network 2 ^ 22 = 4,194,304 Number of hosts per subnet 2 ^ 2 – 2 = 2 172.30.40.166 /26 14
  • 15. Steps Class : B Results Network bits 16 Subnet bits 32 – (16+6) = 10 Host bits 6 Number of subnets in the network 2 ^ 10 = 1024 Number of hosts per subnet 2 ^ 6 – 2 = 62 192.168.203.18 /29 Steps Class : C Results Network bits 24 Subnet bits 32 – (24+3) = 5 Host bits 3 Number of subnets in the network 2 ^ 5 = 32 Number of hosts per subnet 2 ^ 3 – 2 = 6 Problem set 4 : Choosing Subnet Masks Network 10.0.0.0 needs 50 subnets and 200 hosts/subnets Class : A Network bits : 8 Min. Subnet bits 6 Min. Host bits 8 NNNNNNNN SSSSSSXX XXXXXXXX HHHHHHHH 10.0.0.0 /14 (Maximum number of hosts) 10.0.0.0 /15 10.0.0.0 /16 10.0.0.0 /17 10.0.0.0 /18 15
  • 16. 10.0.0.0 /19 10.0.0.0 /20 10.0.0.0 /21 10.0.0.0 /22 10.0.0.0 /23 10.0.0.0 /24 (Maximum number of subnets) Network 172.32.0.0 need 125 subnets and need 125 hosts/subnet Class : B Network bits : 16 Min. Subnet bits : 7 Min. Host bits : 7 NNNNNNNN NNNNNNNN SSSSSSSX XHHHHHHH 172.32.0.0 /23 255.255.254.0 (Maximum number of hosts) 172.32.0.0 /24 255.255.255.0 172.32.0.0 /25 255.255.255.128 (Maximum number of subnets) Network 192.168.44.0 need 15 subnets and 6 host/subnet Class : C Network bits 24 Min. subnet bits : 4 Min. host bits : 3 NNNNNNNN NNNNNNNN NNNNNNNN SSSSXHHH 192.168.44.0 /28 255.255.255.240 (Maximum number of hosts/subnet) 192.168.44.0 /29 255.255.255.248 (Maximum number of subnets) 10.0.0.0 300 subnets and 500 hosts/subnet Class : A Network bits : 8 Min. subnet bits : 9 Min. host bits : 9 NNNNNNNN SSSSSSSS SXXXXXXH HHHHHHHH 10.0.0.0 /17 255.255.128.0 Maximum hosts/subnets 16
  • 17. 10.0.0.0 /18 255.255.192.0 10.0.0.0 /19 255.255.224.0 10.0.0.0 /20 255.255.240.0 10.0.0.0 /21 255.255.248.0 10.0.0.0 /22 255.255.252.0 10.0.0.0 /23 255.255.254.0 Maximum subnets 172.32.0.0 500 subnets and 15 hosts/subnet Class : B Network bits : 16 Min. subnets bits : 9 Min. host bits : 5 NNNNNNNN NNNNNNNN SSSSSSSS SXXHHHHH 172.32.0.0 / 25 255.255.255.128 Maximum hosts/subnet 172.32.0.0 / 26 255.255.255.192 172.32.0.0 / 27 255.255.255.224 Maximum subnets Network 172.16.0.0 2000 subnets 2 hosts/subnet Class : B Network hosts : 16 Min. subnet bits : 11 Min. host bits : 2 NNNNNNNN NNNNNNNN SSSSSSSS SSSXXXHH 172.16.0.0 /27 255.255.255.224 Maximum number of hots/subnet 172.16.0.0 /28 255.255.255.240 172.16.0.0 /29 255.255.255.248 172.16.0.0 /30 255.255.255.252 Maximum number of subnets ANALYSING EXISTING SUBNETS : BINARY Learning resident subnet number using Boolean AND operation…. Step 1. Convert the IP address from decimal to binary Step 2. Convert the subnet mask to binary and write it down under the binary ip address Step 3. Perform a bit wise Boolean AND operation of the two numbers… Step 4. Convert the resulting binary number back to decimal, to get the subnet number 17
  • 18. Address 8.1.4.5 00001000 00000001 00000100 00000101 Mask 255.255.0.0 11111111 11111111 00000000 00000000 Subnet Number 8.1.0.0 00001000 00000001 00000000 00000000 Address 130.4.102.1 10000010 00000100 01100110 00000001 Mask 255.255.255.0 11111111 11111111 11111111 00000000 Subnet Number 130.4.102.0 10000010 00000100 01100110 00000000 Address 199.1.1.100 11000111 00000001 00000001 01100100 Mask 255.255.255.0 11111111 11111111 11111111 00000000 Sub. Number 199.1.1.0 11000111 00000001 00000001 00000000 Address 130.4.102.1 10000010 00000100 01100110 00000001 Mask 255.255.252.0 11111111 11111111 11111100 00000000 Subnet Number 130.4.100.0 10000010 00000100 01100100 00000000 Address 199.1.1.100 11000111 00000001 00000001 01100100 Mask 255.255.255.224 11111111 11111111 11111111 11100000 Subnet Number 199.1.1.96 11000111 00000001 00000001 01100000 Binary Short cut…. • Record decimal mask in the first row of the table, and decimal IP address below it • For any mask octect of value 255, copy the IP address’s octet value for the same octet of the decimal subnet number • Similarly for any mask octet value of 0, write down decimal 0 for the same octet of the subnet number • If the subnet number has still has one remaining octet to be filled in, then o Convert the remaining octet of the ip address to binary o Convert the remaining octet of the mask to binary o AND the two 8-bit numbers together o Covert the 8 bit number to decimal, and place the value in the remaining octet of the subnet number Address 199.1.1.100 Mask 255.255.255.0 Sub. Number 199.1.1.0 Address 130.4.102.1 01100110 Mask 255.255.252.0 11111100 Subnet Number 130.4.100.0 01100100 18
  • 19. Calculating the Broadcast address – Binary Address 8.1.4.5 Mask 255.255.0.0 nnnnnnnn nnnnnnnn hhhhhhhhh hhhhhhh Subnet Address 8.1.0.0 00001000 00000001 00000000 00000000 Broadcast Address 8.1.255.255 00001000 00000001 11111111 11111111 Address 130.4.102.1 Mask 255.255.255.0 Subnet Address 130.4.102.0 Broadcast Address 130.4.102.255 Address 199.1.1.100 Mask 255.255.255.0 Subnet Address 199.1.1.0 Broadcast Address 199.1.1.255 Address 130.4.102.1 01100110 Mask 255.255.252.0 11111100 Subnet Address 130.4.100.0 01100100 Broadcast Address 130.4.103.255 01100111 Address 199.1.1.100 0110 0100 Mask 255.255.255.224 1110 0000 Subnet Address 199.1.1.96 0110 0000 Broadcast Address 199.1.1.127 0111 1111 Steps to determine Subnet Broadcast Address….. • Step 1. Write down the subnet number (IP address), and subnet mask in binary form, • Step 2. Separate the network/subnet and host bits by a vertical line • Step 3. To find the subnet broadcast address in binary 19
  • 20. o Copy the bits of the subnet number (IP address) that are to the left of the vertical line o Write down binary 1s for the (HOST) bits to the right of the vertical line • Step 4. Convert the 32 bit binary subnet broadcast address to decimal, 8 bits at a time, ignoring the vertical line Steps to find the first and last IP address in a subnet Step 1. To find the first IP address, Copy the subnet number but add 1 to the fourth octet Step 2. To find the last IP address, Copy the subnet broadcast address but substract1 from the fourth octet Address 8.1.4.5 Mask 255.255.0.0 nnnnnnnn nnnnnnnn hhhhhhhhh hhhhhhh Subnet Address 8.1.0.0 00001000 00000001 00000000 00000000 Broadcast Address 8.1.255.255 00001000 00000001 11111111 11111111 First Address 8.1.0.1 Last Address 8.1.255.254 Address 130.4.102.1 Mask 255.255.255.0 Subnet Address 130.4.102.0 Broadcast Address 130.4.102.255 First Address 130.4.102.1 Last Address 130.4.102.254 Address 199.1.1.100 Mask 255.255.255.0 Subnet Address 199.1.1.0 Broadcast 20
  • 21. Address 199.1.1.255 First Address 199.1.1.1 Last Address 199.1.1.254 Address 130.4.102.1 01100110 Mask 255.255.252.0 11111100 Subnet Address 130.4.100.0 01100100 Broadcast Address 130.4.103.255 01100111 First Address 130.4.100.1 Last Address 130.4.103.254 Address 199.1.1.100 0110 0100 Mask 255.255.255.224 1110 0000 Subnet Address 199.1.1.96 0110 0000 Broadcast Address 199.1.1.127 0111 1111 First Address 199.1.1.97 Last Address 199.1.1.126 Finding subnet address, broadcast address and range of address using Decimal – Difficult Mask Subnet Chart 130.4.102.1 / 255.255.252.0 Octet 1 2 3 4 Comments Mask 255 255 252 0 Address 130. 4 102 1 Subnet Address 130 4 100 0 Magic number = 256 – 252 = 4 100 is the multiple of 4 closes to but not higher than 102 First Address 130 4 100 1 Add 1 to the subnets last octet Last Address 130 4 103 25 Subtract 1 from broadcast 4 address’s fourth octet Broadcast Address 130 4 103 25 Subnet’s interesting octet + 5 magic number – 1 (100+4 – 1) 21
  • 22. Summary of decimal process to find the subnet, broadcast and range Step 1. Write down the subnet mask in the first empty row of the subnet chart, and the IP address in the second empty row. Step 2. Find the octet for which subnet mask’s value is not 255 or 0. This octet is called the interesting octet. Draw a dark rectangle around the interesting octet’s column of the table, top to bottom. Step 3. Record the subnet numbers value for the uninteresting octets as follows a. for each octet to the left of the rectangle, drawn in step 2, copy the IP address value in the same octet. b. for each octet to the right of the rectangle: write down decimal 0 Step 4. To find the subnet numbers value for this interesting octet a. calculate the magic number by subtracting the subnet mask’s interesting octet value from 256 b. calculate the multiple of magic number starting from 0 through to 256 c. write down the interesting octet value, calculated as follows, Find the multiple of magic number that is closest to, but not higher than the IP Address’s interesting octet value. Step 5 : Find the subnet broadcast address as follows a. for each subnet mask octet to the left of the rectangle, copy the IP address octet value b. for each subnet mask octet to the right of the rectangle, write down 255 c. find the value for the interesting octet by adding the subnet number’s value in the interesting octet to the magic number and subtract 1. Step 6. To find the first IP address, copy the decimal subnet number, but add 1 to the fourth octet. Step 7. To find the last IP address, copy the decimal subnet broadcast address, but subtract 1 from the fourth octet. 22
  • 23. Problem 1 10.180.10.18 255.192.0.0 Size of Network Part 8 Size of Subnet Part 2 Size of Host part 22 Number of hosts per subnet 2 ^ 22 – 2 = 4,194,302 Number of subnets 2^2=4 255.192.0.0 10.180.10.18 (256 – 192 ) = 64 64 x 3 = 192 64 x 2 = 128 Subnet Number 10.128.0.0 Broadcast Address 10.191.255.255 Range of valid IP addresses First Address 10.128.0.1 Last Address 10.191.255.254 Problem 2 10.200.10.18 255.224.0.0 Size of Network Part 8 Size of Subnet Part 3 Size of Host part 21 Number of hosts per subnet 2 ^ 21 – 2 = 2,097,150 Number of subnets 2^3=8 255.224.0.0 10.200.10.18 (256 – 224 ) = 32 32 x 6 = 192 Subnet Number 10.192.0.0 Broadcast Address 10.223.255.255 Range of valid IP addresses First Address 10.192.0.1 Last Address 10.223.255.254 23
  • 24. Problem 3 10.100.18.18 255.240.0.0 Size of Network Part 8 Size of Subnet Part 4 Size of Host part 20 Number of hosts per subnet 2 ^ 20 – 2 = 1,048,574 Number of subnets 2 ^ 4 = 16 255.240.0.0 10.100.18.18 (256 – 240 ) = 16 16 x 6 = 96 Subnet Number 10.96.0.0 Broadcast Address 10.111.255.255 Range of valid IP addresses First Address 10.96.0.1 Last Address 10.111.255.254 Problem 4 10.100.18.18 255.248.0.0 Size of Network Part 8 Size of Subnet Part 5 Size of Host part 19 Number of hosts per subnet 2 ^ 19 – 2 = 524,286 Number of subnets 2 ^ 5 = 32 255.248.0.0 10.100.18.18 (256 – 248 ) = 8 8 * 12 = 96 Subnet Number 10.96.0.0 Broadcast Address 10.103.255.255 Range of valid IP addresses First Address 10.96.0.1 Last Address 10.103.255.254 24
  • 25. Problem 5 10.150.200.200 255.252.0.0 Size of Network Part 8 Size of Subnet Part 6 Size of Host part 18 Number of hosts per subnet 2 ^ 18 – 2 = 262,142 Number of subnets 2 ^ 6 = 64 255.252.0.0 10.150.200.200 (256 – 252 ) = 4 37 * 4 = 148 Subnet Number 10.148.0.0 Broadcast Address 10.251.255.255 Range of valid IP addresses First Address 10.148.0.1 Last Address 10.251.255.254 Problem 6 10.150.200.200 255.254.0.0 Size of Network Part 8 Size of Subnet Part 7 Size of Host part 17 Number of hosts per subnet 2 ^ 17 – 2 = 131,070 Number of subnets 2 ^ 5 = 32 255.254.0.0 10.150.200.200 (256 – 254 ) = 2 75 * 2 = 150 Subnet Number 10.150.0.0 Broadcast Address 10.151.255.255 Range of valid IP addresses First Address 10.150.0.1 Last Address 10.151.255.254 25
  • 26. Problem 7 10.220.100.18 255.255.0.0 Size of Network Part 8 Size of Subnet Part 8 Size of Host part 16 Number of hosts per subnet 2 ^ 16 – 2 = 65,534 Number of subnets 2 ^ 8 = 256 255.255.0.0 10.220.100.18 (256 – 255 ) = 1 220 * 1 = 220 Subnet Number 10.220.0.0 Broadcast Address 10.220.255.255 Range of valid IP addresses First Address 10.220.0.1 Last Address 10.220.255.254 Problem 8 10.220.100.18 255.255.128.0 Size of Network Part 8 Size of Subnet Part 9 Size of Host part 15 Number of hosts per subnet 2 ^ 15 – 2 = 32,766 Number of subnets 2 ^ 9 = 512 255.255.128.0 10.220.100.18 (256 – 128 ) = 128 0 * 128 = 0 Subnet Number 10.220.0.0 Broadcast Address 10.220.127.255 Range of valid IP addresses First Address 10.220.0.1 Last Address 10.220.127.254 26
  • 27. Problem 9 172.31.100.100 255.255.192.0 Size of Network Part 16 Size of Subnet Part 2 Size of Host part 14 Number of hosts per subnet 2 ^ 14 – 2 = 16,382 Number of subnets 2^2=4 255.255.192.0 172.31.100.100 (256 – 192 ) = 64 1 * 64 = 64 Subnet Number 172.31.64.0 Broadcast Address 172.31.127.255 Range of valid IP addresses First Address 172.31.64.1 Last Address 172.31.127.254 Problem 10 172.31.100.100 255.255.224.0 Size of Network Part 16 Size of Subnet Part 3 Size of Host part 13 Number of hosts per subnet 2 ^ 13 – 2 = 8,190 Number of subnets 2^3=8 255.255.224.0 172.31.100.100 (256 – 224 ) = 32 3 * 32 = 96 Subnet Number 172.31.96.0 Broadcast Address 172.31.127.255 Range of valid IP addresses First Address 172.31.96.1 Last Address 172.31.127.254 27
  • 28. Problem 11 172.31.200.10 255.255.240.0 Size of Network Part 16 Size of Subnet Part 4 Size of Host part 12 Number of hosts per subnet 2 ^ 12 – 2 = 4,094 Number of subnets 2 ^ 4 = 16 255.255.240.0 172.31.200.10 (256 – 240 ) = 16 12 * 16 = 192 Subnet Number 172.31.192.0 Broadcast Address 172.31.207.255 Range of valid IP addresses First Address 172.31.192.1 Last Address 172.31.207.254 Problem 12 172.31.200.10 255.255.248.0 Size of Network Part 16 Size of Subnet Part 5 Size of Host part 11 Number of hosts per subnet 2 ^ 11 – 2 = 2,046 Number of subnets 2 ^ 5 = 32 255.255.248.0 172.31.200.10 (256 – 248 ) = 8 25 * 8 = 200 Subnet Number 172.31.200.0 Broadcast Address 172.31.207.255 Range of valid IP addresses First Address 172.31.200.1 Last Address 172.31.207.254 28
  • 29. Problem 13 172.31.50.50 255.255.252.0 Size of Network Part 16 Size of Subnet Part 6 Size of Host part 10 Number of hosts per subnet 2 ^ 10 – 2 = 1022 Number of subnets 2 ^ 6 = 64 255.255.252.0 172.31.50.50 (256 – 252 ) = 4 12 * 4 = 48 Subnet Number 172.31.48.0 Broadcast Address 172.31.51.255 Range of valid IP addresses First Address 172.31.48.1 Last Address 172.31.51.254 Problem 14 172.31.50.50 255.255.254.0 Size of Network Part 16 Size of Subnet Part 7 Size of Host part 9 Number of hosts per subnet 2 ^ 9 – 2 = 510 Number of subnets 2 ^ 7 = 128 255.255.254.0 172.31.50.50 (256 – 254 ) = 2 25 * 2 = 50 Subnet Number 172.31.50.0 Broadcast Address 172.31.51.255 Range of valid IP addresses First Address 172.31.50.1 Last Address 172.31.51.254 29
  • 30. Problem 15 172.31.140.14 255.255.255.0 Size of Network Part 16 Size of Subnet Part 8 Size of Host part 8 Number of hosts per subnet 2 ^ 8 – 2 = 254 Number of subnets 2 ^ 8 = 256 255.255.255.0 172.31.140.14 Subnet Number 172.31.140.0 Broadcast Address 172.31.140.255 Range of valid IP addresses First Address 172.31.140.1 Last Address 172.31.140.254 Problem 16 172.31.140.14 255.255.255.128 Size of Network Part 16 Size of Subnet Part 9 Size of Host part 7 Number of hosts per subnet 2 ^ 7 – 2 = 126 Number of subnets 2 ^ 9 = 512 255.255.255.128 172.31.140.14 256 – 128 = 128 0 * 128 = 0 Subnet Number 172.31.140.0 Broadcast Address 172.31.140.127 Range of valid IP addresses First Address 172.31.140.1 Last Address 172.31.140.126 30
  • 31. Problem 17 192.168.15.150 255.255.255.192 Size of Network Part 24 Size of Subnet Part 2 Size of Host part 6 Number of hosts per subnet 2 ^ 6 – 2 = 62 Number of subnets 2^2=4 255.255.255.192 192.168.15.150 256 – 192 = 64 2 * 64 = 128 Subnet Number 192.168.15.128 Broadcast Address 192.168.15.191 Range of valid IP addresses First Address 192.168.15.129 Last Address 192.168.15.190 Problem 18 192.168.15.150 255.255.255.224 Size of Network Part 24 Size of Subnet Part 3 Size of Host part 5 Number of hosts per subnet 2 ^ 5 – 2 = 30 Number of subnets 2^3=8 255.255.255.224 192.168.15.150 256 – 224 = 32 4 * 32 = 128 Subnet Number 192.168.15.128 Broadcast Address 192.168.15.159 Range of valid IP addresses First Address 192.168.15.129 Last Address 192.168.15.158 31
  • 32. Problem 19 192.168.100.100 255.255.255.240 Size of Network Part 24 Size of Subnet Part 4 Size of Host part 4 Number of hosts per subnet 2 ^ 4 – 2 = 14 Number of subnets 2 ^ 4 = 16 255.255.255.240 192.168.100.100 256 – 240 = 16 6 * 16 = 96 Subnet Number 192.168.100.96 Broadcast Address 192.168.100.111 Range of valid IP addresses First Address 192.168.100.97 Last Address 192.168.100.110 Problem 20 192.168.100.100 255.255.255.248 Size of Network Part 24 Size of Subnet Part 5 Size of Host part 3 Number of hosts per subnet 2^3–2=6 Number of subnets 2 ^ 5 = 32 255.255.255.248 192.168.100.100 256 – 248 = 8 12 * 8 = 96 Subnet Number 192.168.100.96 Broadcast Address 192.168.100.103 Range of valid IP addresses First Address 192.168.100.97 Last Address 192.168.100.102 A NOTE : In the above examples, Number of subnets means, maximum number of subnets possible for the subnets mask (eg. 255.255.255.248), 32
  • 33. Subnet address and Broadcast address are the subnet and broadcast address for the subnet the given IP addresss 192.168.100.100 belongs to. (see the binary version in appendix d for more details) Problem 21 192.168.15.230 255.255.255.252 Size of Network Part 24 Size of Subnet Part 5 Size of Host part 3 Number of hosts per subnet 2^3–2=6 Number of subnets 2 ^ 5 = 32 255.255.255.248 192.168.100.100 256 – 248 = 8 12 * 8 = 96 Subnet Number 192.168.100.96 Broadcast Address 192.168.100.103 Range of valid IP addresses First Address 192.168.100.97 Last Address 192.168.100.102 Problem 22 10.1.1.1 255.248.0.0 Size of Network Part 8 Size of Subnet Part 5 Size of Host part 19 Number of hosts per subnet 2 ^ 19 – 2 = 524,286 Number of subnets 2 ^ 5 = 32 255.248.0.0 10.1.1.1 256 – 248 = 8 0*8=0 Subnet Number 10.0.0.0 Broadcast Address 10.7.255.255 Range of valid IP addresses First Address 10.0.0.1 Last Address 10.7.255.254 33
  • 34. Problem 23 172.16.1.200 255.255.240.0 Size of Network Part 16 Size of Subnet Part 4 Size of Host part 12 Number of hosts per subnet 2 ^ 12 – 2 = 4094 Number of subnets 2 ^ 4 = 16 255.255.240.0 172.16.1.200 256 – 240 = 16 0 * 16 = 0 Subnet Number 172.16.0.0 Broadcast Address 172.16.15.255 Range of valid IP addresses First Address 172.16.0.1 Last Address 172.16.15.254 Problem 24 172.16.0.200 255.255.255.192 Size of Network Part 16 Size of Subnet Part 10 Size of Host part 6 Number of hosts per subnet 2 ^ 6 – 2 = 62 Number of subnets 2 ^ 10 = 1024 255.255.255.192 172.16.0.200 256 – 192 = 64 3 * 64 = 192 Subnet Number 172.16.0.192 Broadcast Address 172.16.0.255 Range of valid IP addresses First Address 172.16.0.193 Last Address 172.16.0.254 34
  • 35. Problem 25 10.1.1.1 255.0.0.0 Size of Network Part 8 Size of Subnet Part 0 Size of Host part 24 Number of hosts per subnet 2 ^ 24 – 2 = 16,777,214 Number of subnets 2^0=1 Subnet Number 10.0.0.0 Broadcast Address 10.255.255.255 Range of valid IP addresses First Address 10.0.0.1 Last Address 10.255.255.254 Finding all subnets with fewer than 8 subnet bits Generic list All Subnet Chart Octect 1 2 3 4 Mask 255 255 252 0 Magic Number 4 Network number/Zero subnet 130 4 0 0 Next subnet 130 4 4 0 Next subnet 130 4 8 0 Last subnet 130 4 248 0 Broadcast subnet 130 4 252 0 Out of range (used by process) 130 4 256 0 Step 1. Write down the subnet mask in decimal, in the first empty row of the table Step 2. Identify the interesting octet, which is the octet with value other than 255 or 0, and draw a rectangle around the column of the interesting octet. Step 3. Calculate the magic number by subtracting the mask’s interesting octet from 256 Step 4. Write down the classful network number (zero subnet number) Step 5. To find each successive subnet number a. for the three un-interesting octets copy the previous subnet numbers value b. for the interesting octet add the magic number to the previous subnet numbers interesting octet value. Step 6. Once the sum calculated in stp 5.b becomes 256, stop the process, the number with 256 in it is out of range, and previous subnet number is the broadcast subnet number. 35
  • 36. Finding all subnets with exact 8 subnet bits The subnet octet is the interesting octet, to find all the subnets add 1 to the interesting octet till it reaches 256. Finding all subnets with more than 8 subnet bits The process follows the same five steps as with fewer than 8 subnet bits. Step 6. When any steps addition results is in sum of 256 a. for the octet whose sum would have been 256 write down 0 b. for the octet to the left add 1 to the previous subnet’s value in that octet c. for any other octet copy the value of the same octet in the previous subnet number d. start again with step 5 Step 7. each time the process results in a sum of 256, repeat step 6 of this process Step 8. Repeat the steps until the addition in step 6b, would actually change the value of the network portion of the subnet number Octect 1 2 3 4 Mask 255 255 255 192 Magic Number 64 Network number/Zero subnet 130 4 0 0 First non-zero subnet number 130 4 0 64 Next subnet 130 4 0 128 Next subnet 130 4 0 192 Next subnet (add 1 to the third octet, and 130 4 1 0 write 0 in the fourth octet) Next subnet 130 4 1 64 Next subnet 130 4 1 128 Next subnet 130 4 1 192 Broadcast subnet 130 4 255 192 Definitions…. Bitwise Boolean AND : A Boolean AND between two numbers of the same length where the first bit in each number is ANDed and the second bit and so on Boolean AND : A math operation performed on a pair of one digit binary numbers, the result is another one digit binary number, binary 1 and 1 yields a result of binary 1, all other combinations yielding binary 0. 36
  • 37. Broadcast subnet : When subnetting a Class A, B or C network, the one network in each classful network, for which all subnet bits have a value of binary 1s. The subnet broadcast address in this subnet has the same numeric value as the classful network’s network wide broadcast address. Classful network : An IPv4 Class A,B or C network, called classful network, because these networks are defined by the class rules for IPv4 addressing. Default Mask : The mask used in Class A,B or C network, that does not create any subnets, specifically mask 255.0.0.0 for Class A, 255.255.0.0 for Class B, and 255.255.255.0 for a Class C network. Prefix notation , CIDR notation : A shorter way to write subnet mask, in which number of binary 1s in the mask is simply written in decimal. For instance /24 denotes the subnet mask with 24 binary 1 bits in the subnet mask. Private IP address : IP addresses within Class A,B and C, networks that are set aside for use within a private organization. These addresses are defined by RFC 1918, and are not routable through internet. Public IP Address : An IP address that is part of a registered network number, as assigned by an Internet Assigned Numbers Authority (IANA) member agency. Routers in the internet forward (route) publicly assigned network numbers. Subnet : Sub division of Class A, B or C network as configured by the network administrator. Subnets allow single Class A,B or C network to be used, instead of multiple networks but still allow multiple groups of ip addresses. Subnet Mask : A 32 bit number that numerically represents the format of an IP address, by representing the network and subnet part with a mask bit value of 1, and host part with a mask bit value of binary 0s. Subnet number/ Subnet address : In IPv4 a dotted decimal number that represents all addresses in a single subnet. Numerically smallest value in the range of numbers in a subnet, reserved so that it cannot be used as a uni cast IP address by a host. Zero Subnet : For every class ful IPv4 network that is subnetted, the one subnet whose subnet number has all binary 0s in the subnet part. In decimal zero subnet can be easily identified, because it is the same number as the classful network number. 37
  • 38. Chapter 13 – Operating Cisco Routers Physical installation Steps required to install a router….. Step 1. Connect any LAN cables to LAN ports Step 2. If using an external CSU/DSU connect the router’s serial interface to CSU/DSU and the CSU/DSU to the line from telco. Step 3. If using internal CSU/DSU connect the routers’ serial interface to the line from telco Step 4. connect the router’s console port to a pc using a rollover cable as needed to configure the router Step 5. Connect the power cable to power port on the router Step 6. Turn on the router Comparison between Switch CLI and Router CLI The configuration commands used for the following features are the same on both routers and switches… Similarities between switch CLI and router CLI… • Use and Enable (privileged) mode • Entering and exiting configuration mode, using configure terminal, end and exit commands, and ctrl z key sequence • Configuration of console, telnet and enable secret password • Configuration of SSH encryption keys, and username/password login credentials. • Configuration of host names and interface descriptions • Speed and Duplex commands • Shutdown and no shutdown commands to administratively disable and enable an interface respectively • Navigation through different configuration context modes, using commands like line console 0 , and interface • CLI help, command editing and command recall • The meaning and use of start-up config in NVRAM, running config in RAM, external servers like TFTP, along with copy commands. • The process of reaching a setup mode either by re-loading the router with an empty start-up config, or by using setup command Differences…. • The configuration of IP address differ in someway between switches and routers • Questions asked in setup mode differ 38
  • 39. Routers have an auxiliary port, intended to be connected to an external modem and phone line, to allow remote users to dial into the router and access the CLI, by making a phone call. There is no show mac address-table dynamic command in a router, but a router has show ip route command. Router Interfaces Routers generally have two types of physical interfaces : Ethernet Interfaces and Serial Interfaces. Ethernet Interfaces… Interface Ethernet number Interface fastethernet number Interface gibabitethernet number Serial Interfaces… For PPP links and Frame relay links and uses HDLC or PPP protocols HDLC being the default. Valid configuration command formats…. Interface Ethernet 0 Interface fastethernet 0/1 Interface serial 1/0/1 Commands to view information about interfaces…. Show ip interface brief Show protocols fa0/0 Show interfaces s1/0/1 Please refer to page 413 for a detailed listing example 39
  • 40. Router Interface status codes and their meaning Name Location General Meaning Line Status First Status Refer to the layer – 1 status, eg. If the cable is code installed, is it the right/wrong cable, is the device on the other end powered on. Protocol Status Second Status Refer generally to the layer – 2 status, It is always code down if the line status is down. If the line status is up and protocol status is down, usually is caused by mismatch in the data link layer protocol configurations. Typical combinations of two interface status codes and likely reasons…. Line and protocol status Typical Reasons Administratively down, The interface has shutdown command configured on it down Down, down The interface has no shutdown command configured but the physical layer has a problem. Eg. No cable has been connected to the interface, or with Ethernet, the switch interface on the other end of the cable is shutdown, or the switch is powered off. Up, down Almost always refer to data link layer problems, most often configuration problems. Eg. Serial link have this combination when one router was configured to use PPP and the other default to use HDLC. Up, Up All is well, interface is functioning Router Interface IP Address Routers need an IP address on each interface. Router1# configure terminal Router1 <config> # interface fa0/1 Router1 <config-if> # ip address 10.1.1.1 255.255.255.0 Router1 <config-if> # ^z Router1# show ip interface brief Please refer to page 415 for the command output listing Bandwidth and clock rate on serial interfaces 40
  • 41. The clock rate speed sub command sets the rate in bits per second on the router that has the DCE cable plugged into it. Show controllers serial 0/1/0 command will show if a DCE/DTE cable is connected to a router interface. IOS accepts the clock rate command on an interface only if it has a DCE cable attached to it, or if no cable is installed. If a DTE cable is installed IOS silently rejects the clock rate command. Bandwidth speed command tells the IOS the speed of the link, in kilobits, which are mainly used by routing protocols (EIGRP, OSPF) etc in their default routing matrices. For serial link the default bandwidth is 1544 , 1544 kbps, 1.544 Mbps, (a T1 line). Router ethernett interface default to a bandwidth setting that reflects the current speed of the interface. If router’s fasterethernet interface is running at 100 Mbps then the bandwidth is 100,000 Kbps. Clock rate uses a unit of kbps, whereas bandwidth command uses a unit of Kbps Auxiliary Port can be configured using the Line aux 0 command to reach the aux line configuration mode. Summary of facts about Initial configuration Setup Mode dialogue. • Setup mode is intended to allow basic configurations by prompting the CLI user via a series of questions. • You can reach the setup mode, either by booting the router after erasing the startup- config file, or by using the setup enable mode EXEC command. • At the end of the process you get three options (0,1,2), to either ignore the answers and go back to the CLI (0), ignore the answers but begin again in setup mode (1), or to use the resulting config (2). • Ctrl C key combination to eject the user out of the setup mode • If the user selects to use the resulting config, the router writes the configuration file to the startup-config file as well as the running-config file. The questions asked differ between switches and routers especially on IP configurations. Cisco IOS Software boot sequence… When a router first powers on, it follows these four steps… 1. The router performs Power On Self Test (POST) , to discover hardware components, and to verify that all components work properly. 41
  • 42. 2. The router copies the bootstrap program from ROM into RAM, and runs the bootstrap program 3. Bootstrap program decides which IOS (or other OS) to load into the RAM, and loads the OS. After loading the IOS the bootstrap program hand over the control of the router hardware to the newly loaded OS. 4. If the bootstrap program loads IOS, IOS find the configuration file typically the startup-config from the NVRAM and loads it into the RAM as running-config. Loading the Cisco IOS RAM ROM Step 2 Bootstrap Flash TFTP Step 3 Cisco IOS ROM NVRAM Running TFTP Step 4 Config File Console Router can get the Cisco IOS image from three different locations, and running config file from other three different locations. 42
  • 43. The Three Router Operating Systems Comparison of ROMMON and RxBoot Operating Systems… Operating Common Name Stored in Used in Environment ROM Monitor ROMMON ROM Older and new routers Boot ROM Rx Boot, Boot helper ROM Only in older routers Cisco routers use different OSs to perform some troubleshooting, to recover router passwords, and to copy new IOS into the flash when the flash has been erased or corrupted. The configuration register The configuration register is a special 16 bit number, that can be set on any cisco router. Eg. The console speed, what IOS iamge to load etc are set using the configuration register bits. Config-register global configuration command sets the configuration register values. Eg. Config-register 0x2100 sets the value to hex 2100, which causes the router to load ROMMON OS, instead of IOS - a common practice when recovering lost passwords. Config-register values are automatically saved, to both running config and startup-config, but these new values will not be used until the router is re-loaded. The show version command lists the configuration register’s current value, if different the value that will be used once the router is re-loaded. In most cisco routers the default configuration register setting is Hex 2102. How routers choose which OS to load A router chooses the OS to load based on the low order 4 bits in the configuration register, and the details configured in any boot system global configuration command found in start-up configuration command. The low order 4 bits, (the 4th hex digit) is the configuration register are called boot-field. Steps a routers uses to choose which IOS to load… Step 1. If boot field = 0 , use the ROMMON OS Step 2. If boot field = 1, load the first IOS file found in Flash memory Step 3. If boot field = 2-F a. try each boot system command in the startup-config file, in order until one works b. if none of the boot system commands works, load the first IOS file found in the flash memory 43
  • 44. ROM Bootstrap and ROMMON BOOT = 0 RAM FLASH IP Network BOOT = 1 1st IOS File TFTP ND 2 IOS File 3rd IOS File BOOT = 2...F … NVRAM (Startup Config) …. Last IOS File Boot System command 1 Boot System command 2 …. Boot system command last If all three steps fails, as it may be possible that flash memory is erased, the router send broadcasts looking for tftp server and guessing IOS file name to load, if that fails, router loads the ROMMON which provides the tools to recover. From the factory Cisco routers have not boot system command configured, and comes with a configuration register value of 0x2102, meaning boot field hex 2, the process tires step 3, finds no boot system commands and loads the first IOS image from the flash memory. Boot System commands Boot system command Result Boot system flash The first file from flash memory is loaded Boot system flash filename IOS with name filename is loaded from flash memory Boot system tftp filename IOS with name filename loaded from TFTP server 10.1.1.1 44
  • 45. The SHOW VERSION command Show version command supplies a wide variety of information about the router, including the current and future configuration register. 1. IOS Version 2 The uptime – the length of time passed since the last reload 3. The reason for the last reload of the IOS (reload command, power off/on, software failure) 4. The time of the last loading of IOS (if the router’s clock has been set) 5. The source from which the router has loaded the current IOS 6. The amount of RAM memory 7. The number and types of interfaces 8. The amount of NVRAM memory 9. The amount Flash memory 10. The configuration register’s current and future settings (if different) Please refer to page 430 for a detailed listing of the show version command Bandwidth : A reference to the speed of a network link. Its origins come from earlier communication technologies where the range or width of frequency bands dictated how fast communication could occur. Boot field : Low order 4 bits of the configuration register in a cisco router. The value in the boot field in part tells the router where to look for the cisco IOS image to load. Clock Rate : The speed at which a serial link encodes bits on the transmission medium Configuration register : In cisco route a 16 bit use configurable value that determines how router the router functions during initialization. In software, the bit position is set by specifying a hex value using configuration commands. IOS Image : A file that contains IOS – Cisco operating system that provides majority of the router’s or switch’s features with the hardware providing the remaining features. Power On Self Test (POST) : The process on any computer, including routers and switches , in which computer hardware first runs hardware diagnostics on required hardware before even trying to load a bootstrap program. ROMMON : A shorter name of ROM Monitor , which is a low level operating system, that can be into cisco routers for several seldom needed maintenance tasks, including password recovery, and loading new IOS when flash memory has been corrupted. 45
  • 46. RxBoot : A limited function version of IOS stored in the ROM, in some older models of Cisco routers, for the purpose of performing seldom needed low level functions including loading new IOS into flash memory, when flash memory has been corrupted or erased. Configuration Command refernce… Bandwidth kbps Interface command that sets the router’s perception of bandwidth in kpbs Clock rate rate Interface command that sets the speed at which the router supplies a clocking signal, applicable when the router has a DCE cable installed. The unit is bit/second Config-register value Global command that sets the hexadecimal value of the configuration register Boot system {file-url | filename} Global command that identifies an externally located IOS image using a URL. Boot system flash [flash:fs:] Global command that identifies the location of an [filename] IOS image in flash memory Boot system rom Global command that tells the router to load RxBoot OS found in ROM, if one exitsts. Boot system {rcp|tftp|ftp} Global command that identifies an external server, filename [ip address] protocol and file name to use to load IOS from an external server EXEC Command reference…. Command Purpose Show interfaces type number Lists a large set of information about each interface, or about the one, if one is specified Show ip interface brief List a single line of information about each interface, including the IP address, line and protocol status, and the method with which address was configured. (manual or DHCP). Show protocols type numebr Lists a single line of information about the specified interface including ip address, line,protocol status. Show controllers type number List many line of information per interface, or for the specified interface, for the hardware contoller of the interface. On serial interfaces, this command identifies the cable as either a DCE or DTE cable. Show version Lists IOS version as well as a lots of other usefil information setup Starts the setup dialogue Copy url-from url-to Copies the file from source url to destination url Show flash List the contents of the flash memory, including used and available memory reload Enable mode command to reboot the router 46
  • 47. Chapter 14 – Routing Protocol Concepts and Configuration ` 10.1.1.0/24 Fa0/0 10.1.1.251 10.1.128.251 S0/0/0 S0/1/0 10.1.130.251 Albequerque 10.1.128.0/24 10.1.130.0/24 10.1.130.253 10.1.128.252 S0/0/1 S0/0/1 10.1.2.252 10.1.3.253 ` ` ` ` 10.1.2.0/24 10.1.3.0/24 A router adds routes to its routing table for the subnets connected to each of the router’s interfaces. For this to occur the router must have an ip address and mask configured on the interface, and the interface must be in an up/up status. Show running config – will show the ip address and mask on each interface Show ip interface brief – will show the interface status (line/protocol) Show I p route – will show the routing table entries 10.0.0.0/24 is subnetted , 3 subnets c 10.1.1.0 directly connected, Fastethernet 0/0 c 10.1.128.0 directly connected, serial 0/0/0 c 10.1.130.0 directly connected, serial0/1/0 terminal ip netmask-format decimal – will change the mask format to decimal 47
  • 48. Static Route Adding a static route to router alberquerque for the subnet 10.1.2.0/24 and 10.1.3.0/24 Albuquerque# configure terminal Albuquerque(config)# ip route 10.1.2.0 255.255.255.0 10.1.128.252 Albuquerque(config)# ip route 10.1.3.0 255.255.255.0 10.1.130.253 Albuquerque# show ip route static 10.0.0.0 /24 is subnetted , 5 subnets S 10.1.3.0 [1/0] via 10.1.130.253 S 10.1.2.0 [1/0] via 10.1.128.252 Ip route global configuration command supplies the subnet number, mask and the next hop id address. If the outgoing interface of a router (Albuquerque’s s0/0/0 or s0/1/0) interface is not in up/up state the static route will not be listed in the routing table. Extended PING - a router enable mode command allows the CLI user to change many option on Ping command, including the source ip address, which enables to issue a ping command from a router which resembles more closely to a ping command issues by an end user. Cisco ping command by default uses the output interface’s ip address as the packet’s source address, unless otherwise specified in an extended ping. Default Routes Subnet 1 172.16.3.2 Subnet 2 Fa0/0 Rest of the enterprises network S0/1 172.16.3.0 R1 R2 Subnet 3 As part of the routing process a router compares a packet’s destination ip address to its routing table, if a no matching route is found the router discards the packet. A default 48
  • 49. route is a route that matches all destination ip addresses, and the router forwards using the default route, when no other route is matched with packets destination ip address. In the above example the router R1 can be configured in three ways….. • Configure hundreds of static routes on R1, but all with an outgoing interface of s0/1 and next hop id address 172.16.3.2 (R2). • Enable routing protocols on routers to learn routes • Add a default route on R1 with outgoing interface as S0/1 R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.3.2 R1# show ip route 172.16.0.0/24 is subnetted, three subnets C 172.16.3.1 directly connected fa0/0 C 172.16.3.2 directly connected s0/1 S* 0.0.0.0/0 [1/0] via 172.16.3.2 S* - statically configured default route 49
  • 50. Routing Protocol Overview RIP2 – Basic Concepts. Example of how RIP-2 advertises routes ` 3 R3 IP Routing Table 5 172.16.5.253 Fa0/0 Subnet Out.Int Next hop Metric ------------------------------------------------------------ I have a route to 172.16.3.0 s0/1 172.16.6.252 1 172.16.3.0/24 , Metric 2 S0/0 S0/1 R3 2 5 I have a route to I have a route to 172.16.3.0/24 , Metric 1 172.16.3.0/24 , Metric 2 S0/1 172.16.6.252 172.16.2.252 S0/1 S0/0 S0/0 172.16.1.251 R1 2 R2 Fa0/0 Fa0/1 172.16.3.252 1 I have a route to 172 .16.3.0/24 , Metric 1 ` ` ` ` 4 R1 IP Routing Table Subnet Out.Int Next hop Metric ------------------------------------------------------------ 172.16.3.0 s0/0 172.16.2.252 1 1. Router r2 learns a connected route for subnet 172.6.3.0 2. R2 sends routing updates to its neighbors’ listing subnet, mask and a distance , metric 3. R3 hears the routing updates and add a route to its routing table for the subnet 172.16.3.0/24 with R2 as the next hop router. 4. At the same time R1 also hears the routing update sent directly from R2 to R1 and adds the route to its routing table 5. R1 and R3 then send routing updates to each other for the subnet 172.16.3.0/24 with metric value 2. RIP routers send periodic routing message about every 30 seconds. 50
  • 51. Interior and Exterior Routing Protocols Interior Gateway Protocol (IGP) : A routing protocol that was designed and intended for use inside a single autonomous system Exterior Gateway Protocol (EGP) : A routing protocol that was designed and intended for use between different autonomous systems. BGP – Border Gateway Protocol is the used to exchange routes between routers in different autonomous systems and is an EGP. ICANN – assigns an ASN – Autonomous System Number Routing protocols classes/algorithms and Protocols that use them Class/Algorithm IGPs Distance vector RIP-1, RIP-2, IGRP Link-state OSPF , Integrated IS-IS Balanced Hybrid (also called advanced EIGRP distance verctor) Metrics Each routing protocol defines a metric that gives an objective numeric value to the goodness of each route. The lower the metric the better the route. RIP uses a metric called hop count, which counts the number of routers (hops) between a router and a subnet. EIGRP uses a metric which by default considers both the interface bandwidth and interface delay settings as input into the mathematical formula to calculate the metric. ROUTERS generally perform routing more quickly with smaller routing table, Route Summarization (Auto summarization and Manual Summarization) helps shorten the routing table while retaining all the needed routes in the network. 51
  • 52. Routing protocol that must consider Class (A,B,C) rules are called Classful Routing Protocols, and that do not need to consider Class rules are called Classless Routing Protocols. Comparing Classful and Classless Routing Protocols Feature Classless Classful Support VLSM Yes No Send subnet masks in routing updates Yes No Support manual route summarization Yes No The process used by routing protocols to recognize changes in a network (a link comes up or fail, a router is added or removed), to figure out now-best route to each subnet, and to change each routers routing table is called Convergence. Summary of Interior Gateway (routing) Protocols Feature RIP-1 RIP-2 EIGRP OSPF IS-IS Classless No Yes Yes Yes Yes Supports VLSM No Yes Yes Yes Yes Sends mask in updates No Yes Yes Yes Yes Distance Vector Yes Yes No No No Link-state No No No Yes Yes Support No Yes Yes No No autosummarization Support Manual No Yes Yes Yes Yes Summarization Proprietary No No Yes No No Routing updates send to No Yes Yes Yes n/a a multi cast ip address Support Authentication No Yes Yes Yes Yes Convergence Slow Slow V.Fast Fast Fast Configuring and Verifying RIP-2 RIP-2 Configuration Step 1. Router RIP configuration command to move into the RIP configuration mode Step 2. Version 2 RIP subcommand to tell the router to use RIP Version 2 Step 3. Use one or more network net-number to enable RIP on the correct interface Step 4. passive-interface type number to disable RIP on an interface The RIP network command uses a classful network number as its net-number parameters. 52
  • 53. For any of the router’s interface ip address within that clasful network, the router does the following three things… • The router multicast routing updates, to a reserved IP multicast address 224.0.0.9 • The router listens for the incoming routing updates on the same interface • The router advertises about the subnet connected to the interface Sample RIP configuration….. 10.1.1.2. Fa0/0 199.1.1.1 S0/0 Fa0/1 S0/1 199.1.2.1 R1 10.1.4.2. R1# configure terminal R1(config)# router rip R1 (config-router)# version 2 R1(config-router)# network 199.1.1.0 R1(config-router)# network 199.1.2.0 R1(config-router)# network 10.0.0.0 S0/0 – 199.1.1.1. is in a class C network 199.1.1.0 S0/1 – 199.1.2.1. is in a class C network 199.1.2.0 Fa0/1 and fa0/0 10.1.4.2. and 10.1.1.2 are in class A network 10.0.0.0 To disable RIP on fa0/1 interface…. R1(config-router)# passive-interface fa0/1 53
  • 54. RIP-2 Verification RIP Operational commands… Command Purpose Show ip interface brief List one line per interface, including ip address and interface status; an interface must have an ip address and up/up status for the RIP protocol to work Show ip route [rip] List the routing table, including RIP learned routes, and optionally just RIP learned routes Show ip protocols Lists information about the RIP configuration, plus IP addresses of neighbouring RIP routers, from which local router has learned the routes. Show ip route Show ip route rip Show ip route 10.1.2.1 Please refer to page 460 for a detailed listing of show ip route command. Show ip route … listing contains….. • Subnet number with the mask at the heading line • Next hop router’s ip address • Local router’s outgoing interface • Length of time since the router heard a routing update about this route • The RIP metric for this route, second number in the square brackets [120/1] • Administrative Distance of the route first number in the bracket [120/1] Administrative Distance : is numeric number representing the routing protocol, which is used to determine the lower number (best route) in a network that uses multiple routing protocols. IOS defaults for administrative distance Route Source Administrative Distance Connected Route 0 Static routes 1 EIGRP 90 IGRP 100 OSPF 110 IS-IS 115 RIP (V1 and V2) 120 54
  • 55. Unknown or unbelievable 255 Normally a static route has lower administrative distance than a RIP learned route, however a backup static route can be configured with an administrative status higher than any default administrative distances say 150, so that this static route will be added to the routing table only if no route is learned by any routing protocols. Show ip protocol Please refer to page 464 for a detailed listing….. Q. How it can be used to trouble shoot RIP problems??? Ans. By checking the Version Information and Routing Information Sources of the show ip protocol command output. It is possible that one Router is configured as RIP Version 2 and other one default Version 1. Also you could verify the router is getting RIP messages from all the expected sources in the network. Examining RIP messages using debug Debug ip rip Undebug all Show process Service timestamps Please refer to page 465 for a detailed listing RIP2 routing messages are sent to multicast IP address : 224.0.0.9 RIP1 routing messages are sent to broadcast IP address : 255.255.255.255 Definitions… Administrative Distance : In cisco routers a mean for a router to choose between multiple routes to reach the same subnet, when those routes learned by different routing protocols. The lower the administrative distance, the better the source of the routing information. Autonomous Systems : An internetwork in the administrative control of a single organization., in side which that organization typically runs a Interior Gateway Protocol (IGP). Backup Static Route : A static route configured with an administrative status higher than any of the default routing protocol administrative statuses. 55
  • 56. Balanced Hybrid : A general type of routing algorithm, other than distance vector and link state, EIGRP is the only routing protocol that uses Balance Hybird algorithm. Classful Routing Protocol : Does not transmit mask information along with the subnet number, and therefore must consider Class A, B or C network boundaries, and perform autosummarization at those boundaries. Does not support VLSM. Classless Routing Protocol : An inherent characteristic of a routing protocol, specifically that routing protocols send subnets masks in it routing updates, thereby removing any need to make assumptions about the addresses in a particular network or subnet. Making it able to support VLSM and manual route summarization. Covergence : Time required for a routing protocol to react to a change in the network, removing bad routes, and adding new, better routes so that the current best routes are in all routers’ routing tables. Default Route : On a router, the route that is considered to match all packets that are not otherwise matched some more specific routes. Distance Vector : Logic behind some of the Interior Routing Protocols such as RIP. Distance Vector algorithm calls for each router to send its entire routing table in each update, but only to its neighbours. Distance vector algorithm can be prone to routing loops but are computationally simpler than the link state algoritm. Exterior Gateway Protocol (EGP) :A routing protocol that was designed to exchange routing information between two different autonomous systems. Interior Gateway Protocol (IGP) : A routing protocol designed to use within an organization (autonomous system). Link State : A classification of underlying algorithm used in some routing protocols. Link state protocols build a detailed database that lists links (subnets) and their states (up/down) from which the best route is calculated. Metric : A unit of measure used by routing protocol algorithms, to determine the best route, for the traffic to use to reach a particular destination, in RIP-2 it is the hop-counts. Routing Updates : A generic reference to any routing protocol message, in which it sends the routing information to its neighbours. Variable Length Subnet Masking (VLSM) : The capacity to specify different subnet masks for the same Class A,B, or C network number on different subnets. VLSM can help optimize available address space. 56
  • 57. Configuration command reference… Command Description Router rip Global configuration command that moves the user to the RIP configuration mode. Network network-number RIP subcommand that lists a clasful network number, enabling RIP on all of that router’s interfaces in that classful network. Version {1|2} RIP subcommand that sets the RIP version Passive-interface [default] RIP subcommand that tells the RIP to no longer interface type, number advertise RIP updates on the listed interface Ip address ip-address mask Interface subcommand that sets the routers inteface’s ip address and mask Ip route prefix mask {ip-address | Global command that defines a static route interface type, interface number} (eg. Ip route 10.102.0 255.255.255.0 10.1.128.252) Service timestamp Global command that tells the router to put a timestamp on log messages, including the debug messages EXEC command reference… Command Description Show ip interface brief Lists one line per router interface, including ip address and interface status Show ip route [rip|static| Lists the routing table connected] Show ip route ip-address List the details of the routes the router would match for a packet sent to the listed ip-address Show ip protocols Lists information about RIP configurations, plus the IP address of the neighbouring routers from which the local router has learned routes. Show process Lists information on processes running in IOS, and also overall CPU utilization status Terminal ip netmask-format For the length of the user session, causes the router decimal to display mask information in dotted decimal instead of prefix format Debug ip rip Tells the router to generate detailed message logs for each send and received RIP updates. 57
  • 58. Chapter 15 – Troubleshooting IP Routing IP Troubleshooting Tips and Tools Avoiding reserved IP addresses • Addresses that are always reserved • Two addresses that are reserved in each subnet (subnet number and subnet broadcast address) • Addresses in two special subnets of each classful network, namely zero subnet and broadcast subnet First octet values of addresses that are always reserved, and that cannot be assigned to hosts. Reserved IP addresses….as recognized based on the value of the first octect…. • 0 (because network 0.0.0.0 is always reserved) • 127 (because network 127.0.0.0 is always reserved) • 224 – 239 (all Class D – Multicast IP Addresses) • 240 – 255 (all Class E – Experimental IP Addresses) Summary of reasons why an exam question should or should not allow the use of the zero and broadcast subnets. Determine whether a question allows the use of the Zero and Broadcast subnets Clue in the question Subnet reserved? Says nothing about it (default for the exam) No List the ip subnet-zero configuration command No Use a classless routing protocol (RIP-2, EIGRP, OSPF) No List the no ip subnet-zero configuration command YES Use a classful routing protocol (RIP-1) YES Summary of 4 tips when approaching IP Addressing related questions on the exam… • Check the mask used on each device in the same LAN; if different then the devices cannot have the same view of the range of addresses in the subnet. • On a point-to-point WAN link, check the IP addresses and masks on both end of the link, and confirm that the two ip address are in the same subnet. • When checking to confirm that hosts are in the same subnet, do not just examine the subnet number. Also check the subnet mask and the implied range of IP addresses. • Be ready to quickly use the commands in the table below, to find the ip address, masks, and subnet numbers. 58
  • 59. Host Networking Summary of how hosts think about routing, address assignment, name resolution and ARP… Routing : If the packet’s destination is in the same subnet, send the packet directly, if not send the packet to the default gateway. Address Assignment : Before sending any packets, the host may use DHCP client services to learn its IP address, mask, default gateway, and DNS ip address. The host could also be statically configured with the same details. Name resolution : When the user directly or indirectly when a host references a host name, the host typically uses DNS name resolution request to ask DNS to identify the host’s ip address, unless the host already has the information in its name cache. IP-to-MAC resolution: The host uses ARP requests to find the other host’s MAC address, or the default gateway’s ip address, unless the information is already in the host’s ARP cache. Command Function Ipconfig/all Displays detailed IP configuration information for all interface, including IP address, mask, default gateway, and DNS IP address. Ipconfig/release Releases any DHCP leased IP addresses Ipconfig/renew Acquires an IP address and related information using DHCP Nslookup name Sends a DNS request for the listed name Arp –a Lists the host’s ARP cache Ipconfig/displaydns List host’s name cache Ipconfig/flushdns Remove all dns-found name cache entries Arp -d Flushes (removes) the host’s ARP cache Netstat -rn Displays host’s routing table Troubleshooting Host Routing Problems. Two typical reasons why a hosts cannot ping other hosts in the same subnet. If a ping of a same subnet host fails, the root cause typically falls into two categories… • The two hosts have incorrect ip address, and mask configuration, so that at least one of the two hosts thinks it is in a different subnet. • The two hosts have correct ip address and mask configuration, but the underlying Ethernet has a problem 59