You are on page 1of 33

Classful and Classless Routing

Classful vs Classless

• Some routing protocols must consider the Class A,


B, or C network number that a subnet resides in when
performing some of its tasks. Other routing protocols
can ignore Class A, B, and C rules altogether.

• Routing protocols that must consider class rules are


called classful routing protocols; those that do not
need to consider class rules are called classless
routing protocols.
Classful vs Classless

• Classfulrouting protocols do not transmit the mask


information along with the subnet number, whereas
classless routing protocols do transmit mask
information.

• Routing protocols that support VLSM do so because


they send mask information along with the routing
information.
Classful vs Classless

• IP routing is classless when the process of


forwarding packets ignores class rules, and it is
classful when routing must consider class rules when
making a decision.

• The choice of whether a router uses classful or


classless routing determines how that router uses its
default route.
Without ip classless command

10.3.3.0

Fa0/1 192.168.1.4/30

S0/0
BHM GAD
Fa0/0 192.168.13.2
10.1.1.0

To
10.2.2.4

Destination network Outbound interface


10.3.3.0 Fa0/1
10.1.1.0 Fa0/0
0.0.0.0 S0/0
With ip classless command

10.3.3.0

Fa0/1 192.168.1.4/30

S0/0
BHM GAD
Fa0/0 192.168.13.2
10.1.1.0

To
10.2.2.4

Destination network Outbound interface


10.3.3.0 Fa0/1
10.1.1.0 Fa0/0
0.0.0.0 S0/0
Classful vs Classless

• With classful routing, the only time the default route


is used is when a packet’s destination Class A, B, or C
network number is not in the routing table.

Router(config)# no ip classless

• With classless routing, the default is used whenever


the packet does not match a more specific route in the
routing table.

Router(config)# ip classless
Autosummarization

• A router receiving a routing update with a classful


routing protocol looks at the subnet number in the
update and “guesses” the correct mask.

• The classful routing protocols expect a fixed length


subnet mask (FLSM) throughout the network, because
they can then reasonably assume that the mask
configured for their own interfaces is the same mask
used throughout the network.
Autosummarization

• When a router has interfaces in more than one Class


A, B, or C network, it advertises a single route for an
entire Class A, B, or C network into the other network.
This feature is called autosummarization.

• When advertised on an interface whose IP address is


not in network X, routes related to subnets in network
X are summarized and advertised as one route. That
route is for the entire Class A, B, or C network X.
Interior IP Routing Protocol: Classless or Classful?
Variable Length Subnet Mask
Issues with IP Addressing

Internet

UNIVERSITY

• IP addressing crisis
• As early as 1992, the IETF identified two
specific concerns:
– IP address exhaustion
– Routing table growth
IP Addressing Solutions
• Short term to extension to IPv4
– Subneting masking: RFCs 950, 1812
– Variable-length subnet masks: RFC 1812
– Classless interdomain routing: RFCs 1518,
1519, 2050
– Address allocation for private Internets: RFC
1918
– Network Address Translation: RFC 1631
– Route summarization: RFC 1518
• Ultimate solution: IPv6 128-bit address
space
What is VLSM ?
192.168.0.32/27 192.168.0.192/30
A
192.168.0.128/27

192.168.0.64/27
192.168.0.196/30
B
HQ
HQ 192.168.0.0/24
192.168.0.96/27
192.168.0.160/27
192.168.0.200/30
C

• Subnet 192.168.0.0/24 is divided into


smaller subnets (Sub-subnet):
– Subnet with one mask at first (/27)
– Further subnet one of these subnets not
used elsewhere (/30)
VLSM is supported

• Open Shortest Path First (OSPF).


• Integrated Intermediate System to
Intermediate System (Integrated IS-IS).
• Enhanced Interior Gateway Routing
Protocol (EIGRP).
• RIP v2.
• Static routing.
A waste of space
When to use VLSM?
Exercise VLSM
Using VLSMs, define appropriate subnets for
addressing the networks using 192.168.10.0/24.
1 28 Hosts

2 3 4

60 Hosts 12 Hosts 12 Hosts


Exercise VLSM
192.168.10.0/24
192.168.10.64/27

1 28 Hosts

192.168.10.128/30
192.168.10.132/30 192.168.10.136/30

2 3 4

192.168.10.0/26 192.168.10.96/28 192.168.10.112/28

60 Hosts 12 Hosts 12 Hosts


Configuring VLSM
192.168.10.0/24
192.168.10.64/27

KL 28 Hosts
S0
10.137

192.168.10.128/30 192.168.10.136/30
192.168.10.132/30
S0 10.138

Perth Sydney Singapore

192.168.10.0/26 192.168.10.96/28 192.168.10.112/28

60 Hosts 12 Hosts 12 Hosts


Route aggregation with VLSM
192.168.48.0/24
192.168.49.0/24 19
192.168.50.0/24 2 2.
1 68
192.168.51.0/24 .4
8.
0/
2 2
192.168.48.0/20
192.168.52.0/24
192.168.53.0/24
192.168.54.0/24
Upstream
Upstream
3 1 provider
192.168.55.0/24 provider
192.168.52.0/22
1
. 0 /2
8.5 6
192.168.56.0/24 6
192.168.57.0/24 9 2.1
1
192.168.63.0/24
4

Route summarization reduces routing table size by


aggregating routes to multiple networks into one
supernet
Route summarization example
11000000.10101000.00110000.00000000 = 192.168.48.0/24
11000000.10101000.00110001.00000000 = 192.168.49.0/24
11000000.10101000.00110010.00000000 = 192.168.50.0/24
11000000.10101000.00110011.00000000 = 192.168.51.0/24
11000000.10101000.00110000.00000000 = 192.168.48.0/22

11000000.10101000.00110100.00000000 = 192.168.52.0/24
11000000.10101000.00110101.00000000 = 192.168.53.0/24
11000000.10101000.00110110.00000000 = 192.168.54.0/24
11000000.10101000.00110111.00000000 = 192.168.55.0/24
11000000.10101000.00110100.00000000 = 192.168.52.0/22
11000000.10101000.00111000.00000000 = 192.168.56.0/24
11000000.10101000.00111001.00000000 = 192.168.57.0/24
11000000.10101000.00111111.00000000 = 192.168.63.0/24
11000000.10101000.00111000.00000000 = 192.168.56.0/21
RIP Version 2
RIP v1: Characteristics
• IGP protocol, is classful routing.
• It is a distance vector protocol that uses a hop
count metric.
• The maximum number of hops is 15.
• By default, routing updates are broadcast every
30 seconds.
• The router applies the one subnet mask that is
configured on the receiving interface to receive
network information.
• Load balancing over as many as six equal-cost
paths, with four paths as the default.
RIP v1: Limitations

• It does not send subnet mask information


in its updates.
• It sends updates as broadcasts on
255.255.255.255.
• It does not support authentication.
• It is not able to support VLSM or classless
interdomain routing (CIDR).
RIP v2 features
• Send out subnet mask information with the
route update.
• Support VLSM or classless interdomain routing
(CIDR).
• Provides for authentication in its updates.
• Provides Multicast routing updates, using
the Class D address 224.0.0.9.
• Use external route tags
• Routing update is includes a next-hop
route ip address.
Comparing RIP v1 and v2

RIP v1 RIP v2
• Easy to configure. • Easy to configure.
• Only supports classful routing • Supports classless routing
• No subnet information with • Send subnet information with routing
routing update. updates.
• Doesn’t support VLSM • Support VLSM
• No authentication in updates • Provides authentication in updates.
• Broadcast Routing Update • Provides multicast routing updates
RIP v2: Configuration
150.100.2.0/24

150.100.4.0/24 150.100.3.0/24

Kuala Lumpur Bangkok

router rip router rip


version 2 version 2
network 150.100.0.0 network 150.100.0.0
• NOTE:
– Assigning IP network numbers without
specifying subnet values
SHOW IP PROTOCOLS

172.16.1.0 192.168.1.0

A B B
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
SHOW IP ROUTE
172.16.1.0 192.168.1.0

A B B
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
DEBUG IP RIP
172.16.1.0 192.168.1.0

A B B
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
Default routes

HongKong1(config)# ip default-network 192.168.20.0 (RIP, IGRP, EIGRP)


HongKong1(config-router)# default-information originate (RIP, OSPF)
33

You might also like