Module 1 – Introduction to Classless Routing CCNA 3 version 3.1 Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 2 Overview • Define VLSMand briefly describe the reasons fo
Trang 1Module 1 – Introduction to Classless
Routing
CCNA 3 version 3.1
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 2
Overview
• Define VLSMand briefly describe the reasons for its use
• Divide a major network into subnets of different sizes using VLSM
• Define route aggregation and summarizationas they relate to VLSM
• Configure a router using VLSM
• Identify the key features of RIP v1 and RIP v2
• Identify the important differences between RIP v1 and RIP v2
• Configure RIP v2
• Verify and troubleshoot RIP v2 operation
• Configure default routes using the ip route and ip
Trang 2Advanced IP Management
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 4
IPv4 Address Classes
• No medium size host networks
• In the early days of the Internet, IP addresses were allocated to
organizations based on request rather than actual need
Trang 3Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 5
IPv4 Address Classes
Class D Addresses
• A Class D address begins with binary 1110 in the first octet
• First octet range 224 to 239
• Class D address can be used to represent a group of hosts called a
host group, or multicast group
Class E Addresses
First octet of an IP address begins with 1111
• Class E addresses are reserved for experimentalpurposes and should
not be used for addressing hosts or multicast groups
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 6
IP addressing crisis
• Address Depletion
• Internet Routing Table Explosion
Trang 4Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 7
IPv4 Addressing
Subnet Mask
• One solution to the IP address shortage was thought to be the
subnet mask
• Formalized in 1985 (RFC 950), the subnet mask breaks a single
class A, B or C network in to smaller pieces
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 8
But internal routers think all these addresses are on different networks, called subnetworks
Externet routers still “see” this net as 190.52.0.0
Given the Class B address 190.52.0.0
Subnet Example
Trang 5Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 9
Using the 3rd octet, 190.52.0.0 was divided into:
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 10
All Zeros and All Ones Subnets
Using the All Ones Subnet
• There is no command to enable or disable the use of the all-ones subnet, it is
enabled by default.
Router(config)#ip subnet-zero
• The use of the all-ones subnet has always been explicitly allowed and the use
of subnet zero is explicitly allowed since Cisco IOS version 12.0.
RFC 1878 states, "This practice (of excluding all-zeros and all-ones subnets) is
obsolete! Modern software will be able to utilize all definable networks "
Today, the use of subnet zero and the all-ones subnet is generally accepted
and most vendors support their use, though, on certain networks,
particularly the ones using legacy software, the use of subnet zero and the
all-ones subnet can lead to problems.
CCO: Subnet Zero and the All-Ones Subnet
http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a
0080093f18.shtml
Trang 6Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 11
Long Term Solution: IPv6 (coming)
• IP v6, or IPng (IP – the Next Generation) uses a 128-bit address
space, yielding
340,282,366,920,938,463,463,374,607,431,768,211,456
possible addresses 3,4 e38
• IPv6 has been slow to arrive
• IPv4 revitalized by new features, making IPv6 a luxury, and not
a desperately needed fix
• IPv6 requires new software; IT staffs must be retrained
• IPv6 will most likely coexist with IPv4 for years to come
• Some experts believe IPv4 will remain for more than 10 years
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 12
Short Term Solutions: IPv4 Enhancements
• CIDR (Classless Inter-Domain Routing) – RFCs 1517,
Trang 7Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 13
• By 1992, members of the IETF were having serious concerns about the
exponential growth of the Internet and the scalability of Internet routing
tables
• The IETF was also concerned with the eventual exhaustion of 32-bit
IPv4 address space
• IETF’s response was the concept of Supernetting or CIDR, “cider”
• To CIDR-compliant routers, address class is meaningless
– The network portion of the address is determined by the network
subnet mask, network-prefix or prefix-length (/8, /19, etc.)
– The network address is NOT determined by the first octet (first two
bits), 200.10.0.0/16 or 15.10.160.0/19
• CIDR helped reduced the Internet routing table explosion with
supernetting and reallocation of IPv4 address space
CIDR (Classless Inter-Domain Routing)
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 14
2 Add all zeros after the last matching bit:
172.24.0.0 = 10101100 00011 000 00000000 00000000 Steps:
Trang 8Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 15
CIDR (Classless Inter-Domain Routing)
• By using a prefix address to summarizes routes,
administrators can keep routing table entries manageable,
which means the following
– More efficient routing
– A reduced number of CPU cycles when
recalculating a routing table, or when sorting through the
routing table entries to find a match
– Reduced router memory requirements
• Route summarization is also known as:
– Route aggregation
– Supernetting
• Supernetting is essentially the inverse of subnetting.
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 16
• Company XYZ needs to address 400 hosts
• Its ISP gives them two contiguous Class C addresses:
– 207.21.54.0/24
– 207.21.55.0/24
• Company XYZ can use a prefix of 207.21.54.0 /23 to supernet
these two contiguous networks (Yielding 510 hosts)
Trang 9Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 17
• With the ISP acting as the addressing authority for a CIDR block of
addresses, the ISP’s customer networks, which include XYZ, can be
advertised among Internet routers as a single supernet
Supernetting Example
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 18
CIDR and the Provider
Trang 10Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 19
CIDR and the provider
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 20
• Dynamic routing protocols must send network address and mask
(prefix-length) information in their routing updates
• In other words, CIDR requires classless routing protocolsfor dynamic
routing
CIDR Restrictions
Trang 11Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 21
Example from online curriculum
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 22
Another example from online curriculum
Trang 12Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 23
Short Term Solutions: IPv4 Enhancements
• CIDR (Classless Inter-Domain Routing) – RFCs 1517,
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 24
VLSM (Variable Length Subnet Mask)
• Limitation of using only a single subnet mask across a
given network-prefix (network address, the number of
bits in the mask) was that an organization is locked into a
fixed-number of of fixed-sized subnets.
• 1987, RFC 1009 specified how a subnetted network could
use more than one subnet mask.
• VLSM = Subnetting a Subnet
– “If you know how to subnet, you can do VLSM!”
Trang 13Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 25
VLSM – Simple Example
65,536 hosts per subnet.
10.0.0.0/8
10.0.0.0/ 16
1st octet 2nd octet 3rd octet 4th octet
Trang 14Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 27
256 /24 subnets with 254 hosts each.
the subnet mask with the network address in the routing updates.
10.2.8.0/24 10.8.0.0/16
10.2.6.0/24 10.2.1.0/24
Trang 15Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 29
Another VLSM Example using /30 subnets
207.21.24.0/24 network subnetted into eight /27 (255.255.255.224)
subnets
• This network has seven /27 subnets with 30 hosts each
AND eight /30 subnets with 2 hosts each.
• /30 subnets are very useful for serial networks.
207.21.24.192/27 subnet, subnetted into eight /30
Trang 16Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 31
/30 subnets with 2 hosts each (one left over).
serial networks
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 32
VLSM and the Routing Table
Routing Table without VLSM
RouterX#show ip route
207.21.24.0/27 is subnetted, 4 subnets
C 207.21.24.192 is directly connected, Serial0
C 207.21.24.196 is directly connected, Serial1
C 207.21.24.200 is directly connected, Serial2
C 207.21.24.204 is directly connected, FastEthernet0
Routing Table with VLSM
RouterX#show ip route
207.21.24.0/24 is variably subnetted, 4 subnets, 2 masks
C 207.21.24.192 /30 is directly connected, Serial0
C 207.21.24.196 /30 is directly connected, Serial1
C 207.21.24.200 /30 is directly connected, Serial2
C 207.21.24.96 /27 is directly connected, FastEthernet0
• Parent Route shows classful mask instead of subnet mask of the child
routes
• Each Child Routes includes its subnet mask
Displays one subnet mask for all child routes
Classful mask is assumed for the parent route.
Each child routes displays its own subnet mask
Classful mask is included for the parent route.
Trang 17Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 33
Route flapping
• Route flapping occurs when a router interface alternates rapidly between the
up and down states
• Route flapping, and it can cripple a router with excessive updates and
recalculations.
• However, the summarization configuration prevents the RTC route flapping
from affecting any other routers.
• The loss of one network does not invalidate the route to the supernet
• While RTC may be kept busy dealing with its own route flap, RTZ, and all
upstream routers, are unaware of any downstream problem
• Summarization effectively insulates the other routers from the problem of route
flapping.
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 34
Short Term Solutions: IPv4 Enhancements
• CIDR (Classless Inter-Domain Routing) – RFCs 1517,
Trang 18Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 35
Global addresses must be obtained from a provider or a registry at some expense.
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 36
Discontiguous subnets
• “Mixing private addresses with globally unique addresses can create
discontiguous subnets.” – Not the main cause however…
• Discontiguous subnets, are subnets from the same major network that
are separated by a completely different major network or subnet
do the routing updates look like between Site A router and Site B router?
Trang 19Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 37
Discontiguous subnets
• Classful routing protocols, notably RIPv1 and IGRP, can’t support
discontiguous subnets, because the subnet mask is not included in routing
updates
• RIPv1 and IGRP automatically summarize on classful boundaries.
• Site A and Site B are all sending each other the classful address of
• A classless routing protocol (RIPv2, EIGRP, OSPF) would be needed:
– to not summarize the classful network address and
– to include the subnet mask in the routing updates
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 38
Discontiguous subnets
• RIPv2 and EIGRP automatically summarize on classful boundaries
• When using RIPv2 and EIGRP, to disable automatic summarization (on both
routers):
Router(config-router)#no auto-summary
• SiteB now receives 207.21.24.0/27
• SiteA now receives 207.21.24.32/27
Trang 20Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 39
Short Term Solutions: IPv4 Enhancements
• CIDR (Classless Inter-Domain Routing) – RFCs 1517,
1518, 1519, 1520
• VLSM (Variable Length Subnet Mask) – RFC 1009
• Private Addressing - RFC 1918
• NAT/PAT (Network Address Translation / Port Address
Translation) – RFC – Latter on Semester 4
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 40
Classless routing protocols
• The true defining characteristic of classless routing protocols is the
capability to carry subnet masks in their route advertisements
• “One benefit of having a mask associated with each route is that the
all-zeros and all-ones subnets are now available for use.”
– Cisco allows the all-zeros and all-ones subnets to be used with
classful routing protocols
Trang 21Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com
RIP version 2
0 1 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| command (1) | version (1) | must be zero (2) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address Family Identifier (2) | Route Tag (2) |
+ -+ -+
| IP Address (4) |
+ -+
| Subnet Mask (4) |
+ -+
| Next Hop (4) |
+ -+
| Metric (4) |
+ -+
• ClasslessRouting Protocol, sent over UDP port 520
• Includes the subnet maskin the routing updates
• Automatic summarization at major network boundaries can be disabled.
• Updates sent as multicasts unless the neighbor command is uses which
sends them as unicasts
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 42
RIP v2 operation
• All of the operational procedures, timers, and stability functions of RIP v1 remain the same in RIP v2, with the exception of the broadcast updates
• RIP v2 updates use reserved Class D
address 224.0.0.9.
Trang 22Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 43
Issues addressed by RIP v2
The following four features are the most significant new features added to
RIP v2:
• Authentication of the transmitting RIP v2 node to other RIP v2
nodes
• Subnet Masks– RIP v2 allocates a 4-octet field to associate a subnet
mask to a destination IP address
• Next Hop IP addresses– The inclusion of a Next Hop identification
field helps make RIP v2 more efficient than RIP v1 by preventing
unnecessary hops
• Multicasting RIP v2 messages– Multicasting is a technique for
simultaneously advertising routing information to multiple RIP or RIP v2
devices
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 44
Same limitations of RIPv2 as with RIPv1
• Slow convergence and the need of holddown timers to
reduce the possibility of routing loops.
Note: See CCNA 2 for review if needed.
Trang 23Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 45
Same limitations of RIPv2 as with RIPv1
• RIP v2 continues to rely on counting to infinity as a means
of resolving certain error conditions within the network
• Dependent upon holddown timers.
• Triggered updates are also helpful.
Note: See CCNA 2 for review if needed.
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 46
Same limitations of RIPv2 as with RIPv1
• Perhaps the single greatest limitation that RIP v2 inherited from RIP is
that its interpretation of infinity remained at 16
Trang 24Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 47
Basic RIPv2 configuration
Other:
For RIP and IGRP, the passive interface command stops the router from
sending updates to a particular neighbor, but the router continues to
listen and use routing updates from that neighbor (More later.)
Router(config-router)# passive-interface interface
Default behavior of version 1 restored:
Router(config-router)# no version
Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 48
Compatibility with RIP v1
NewYork
interface fastethernet0/0
ip address 192.168.50.129 255.255.255.192
ip rip send version 1
ip rip receive version 1
• FastEthernet0/2 has no special
configuration and therefore
sends and receives version 2
by default.
RIPv2