Escolar Documentos
Profissional Documentos
Cultura Documentos
www.ciscopress.com
VLSM
Variable-length subnet masks were developed to allow multiple levels of subnetted IP addresses within a single network The routing protocol you use must support VLSM
Open Shortest Path First (OSPF) Enhanced Interior Gateway Routing Protocol (EIGRP) Routing Information Protocol version 2 (RIPv2)
VLSM
Prefix Length
Prefix length is a shorthand way for expressing the subnet mask for a particular network
Number of 1s in the binary representation of the subnet mask
When bits are taken from the host part of an address and added to the network part, the number of the bits in the host part decreases
You create additional subnets at the expense of the number of host devices on each network segment
www.ciscopress.com
VLSM
Prefix Length
Number of subnets can be calculated using the 2s formula, where s is the number of bits by which the default mask is extended In IOS releases prior to 12.0, you must explicitly allow subnet 0 In IOS releases 12.0 and later, subnet 0 is enabled by default The all-1s subnet has always been allowed
www.ciscopress.com
VLSM
Prefix Length
Bits that are not part of the network or subnetwork portions of the address are the range of host address Use the 2h 2 formula (where h is the number of host bits) to calculate available host addresses; all 0s in host portion is the subnet identifier address, all 1s in host portion is the subnet broadcast address
www.ciscopress.com
VLSM
Prefix Length
Network Mask and IP Address for the Range 192.168.1.64 Through 192.168.1.79, with Host Bits Shaded
In the IP network number that accompanies the network mask, the following are true:
When the host bits are all binary 0s, that address is the beginning of the address range When the host bits are all binary 1s, that address is at the end of the address range
www.ciscopress.com
VLSM
Prefix Length
Fourth Octet for the Range 192.168.1.64 Through 192.168.1.79 (continued on next slide)
www.ciscopress.com
VLSM
Prefix Length (continued)
www.ciscopress.com
VLSM
Prefix Length
In this example, PCs use the prefix length of 28 (the subnet mask 255.255.255.240) to determine which other devices on their local network have their first 28 bits in common
A 28-bit prefix length permits 14 hosts per subnet
The PC uses ARP to find the corresponding destination MAC address if communication with any of these devices is necessary If the destination IP address is not in the range for the subnet, the packet is forwarded to the default gateway
www.ciscopress.com
VLSM
Prefix Length
VLSM
Prefix Length
The router determines from the table where to send the packet destined for 192.168.1.67
In this table, there are four entries for network 192.168.1.0 The third entry is for the 192.168.1.64 subnet, which is the subnet to which 192.168.1.67 belongs Note that the next subnet, 192.168.1.80, begins with a number larger than 192.168.1.67
www.ciscopress.com
VLSM
Benefits of VLSM
VLSM
Benefits of VLSM
VLSM Permits Flexible, Efficient Subnet Address Allocation
www.ciscopress.com
VLSM
VLSM Calculations
With VLSM, you can subnet a subnet! Next slide will show how the subnet 172.16.32.0/20 is further subnetted with a /26 prefix
www.ciscopress.com
VLSM
VLSM Calculations
www.ciscopress.com
VLSM
VLSM Example
VLSM Used to Define Subnets of 172.16.32.0 Across the Boundary Between Octets Three and Four
www.ciscopress.com
VLSM
CIDR and Route Summarization
The definition of classless inter-domain routing (CIDR):
Allocation of one or more blocks of Class C network numbers to each network service provider Organizations using the network service provider for Internet connectivity are allocated bitmask-oriented subsets of the providers address space as required
CIDR (cider) was developed to address the problem of IP address space running out and core Internet routers running out of capacity Route summarization is the representation by a single network of a group of contiguous networks
www.ciscopress.com
VLSM
CIDR and Route Summarization
www.ciscopress.com
VLSM
CIDR and Route Summarization
Route Summarization of Contiguous Subnets of a Class B Network (continued) Router D in previous slide has these networks in its routing table
172.16.12.0/24 172.16.13.0/24 172.16.14.0/24 172.16.15.0/24
VLSM
CIDR and Route Summarization
Route Summarization of Contiguous Subnets of a Class B Network (continued) Follow these guidelines when calculating summary routes:
Addresses that do not share the same number of bits as the prefix length of the summary route are not included in the summarization block The IP addressing plan is hierarchical in nature to allow router to aggregate the largest number of IP addresses into a single summary route IP networks can only be summarized in 2n networks (for some n), where the last octet of the first network in the sequence is divisible by 2n
www.ciscopress.com
VLSM
Route Aggregation
By using a prefix length instead of an address class to determine the network portion of the address, CIDR allows routers to aggregate routing information
Shrinks routing table One address and mask combination can represent the routes to multiple networks
Route aggregation is used more loosely than CIDR; describes the summarization of classful networks Without CIDR, routers must maintain tables for individual networks
www.ciscopress.com
VLSM
Route Aggregation
CIDR Permits the Aggregation of Contiguous Class B Networks
www.ciscopress.com
VLSM
Route Aggregation
Summarization Employs the Furthest-to-the-Right Principle
www.ciscopress.com
VLSM
Route Aggregation
In previous slide, the router can summarize routes to these networks using a 13-bit prefix which these 8 networks share
10101100 00011000 00000000 00000000 = 172.24.0.0 11111111 11111000 00000000 00000000 = 255.248.0.0
A single address and mask define a classless prefix that summarizes routes to the eight networks: 172.24.0.0/13
www.ciscopress.com
VLSM
Route Aggregation
www.ciscopress.com
VLSM
Supernetting
The practice of using a summary network to group multiple classful networks into a single address is called supernetting
Subnetting breaks down a classful network Supernetting pastes together classful networks
With Class A and B address space almost exhausted, large organizations requested multiple Class C network addresses from their service providers A block of contiguous Class C addresses can appear as a single large network, or supernet
www.ciscopress.com
VLSM
Supernetting
Many networking professionals use the terms route summarization and route aggregation interchangeably
www.ciscopress.com
VLSM
CIDR Example
CIDR Permits the Aggregation of Several Classful Networks into a Single Route Advertisement
www.ciscopress.com
In the real world, classful routing protocols are close to becoming irrelevant
www.ciscopress.com
The router applies two options when receiving a routing update packet
If the routing update information contains the same major network number as configured on the receiving interface, the router applies the subnet mask that is configured on that interface If the routing update information contains a different major network than the one configured on the the receiving interface, the router applies the default subnet mask
www.ciscopress.com
The router applies two options when receiving a routing update packet (continued)
The default classful masks are:
Class A: 255.0.0.0 Class B: 255.255.0.0 Class C: 255.255.255.0
All subnets of the same major network (Classes A, B, and C) must use the same mask when using a classful routing protocol
www.ciscopress.com
www.ciscopress.com
When a router using a classful protocol sends an update regarding information of a subnet of a classful network across an interface belonging to a different classful network, the router assumes the remote router will use the default subnet mask for that IP address class
www.ciscopress.com
www.ciscopress.com
The process in the previous slide is automatic summarization across the network boundary
Router sends a summary of all the subnets by sending only major network information Classful routing protocols automatically create a classful summary route at major network boundaries Classful routing protocols do not allow summarization at other points within the major network space
www.ciscopress.com
When using classful routing protocols, assigning the same subnet mask to all subnets is called fixed-length subnet masking (FLSM) sometimes called static-length subnet masking
www.ciscopress.com
Do not permit the use of discontiguous networks when using a classful routing protocol
www.ciscopress.com
www.ciscopress.com
www.ciscopress.com
www.ciscopress.com
The 0s represent any destination with any mask Default routes are often referred to as quad-zero routes
www.ciscopress.com
What does a router running a classful routing protocol do with packets that lie in subnets that have no entry in the routing table?
The router discards the packets!
All routing protocols except RIPv1 and IGRP are classless routing protocols RIPv2, OSPF, IS-IS, EIGRP, and BGPv4 are classless routing protocols that support VLSM and CIDR With classless routing protocols, different subnets in the same major network can have different subnet masks
Maximizes use of addresses
www.ciscopress.com
Classful routing protocols automatically summarize to the classful network boundary; classless routing protocols allow you to control the route summarization process manually (might be needed to limit size of routing tables) Classless routing protocols do not automatically advertise every subnet By default, classless routing protocols perform automatic network summarization at classful boundaries, just like classful protocols
www.ciscopress.com
Difference between classless routing protocols and their predecessors is that you can manually turn off automatic summarization
Use the no auto-summary command Not needed with OSPF or IS-IS
www.ciscopress.com
www.ciscopress.com
www.ciscopress.com
www.ciscopress.com
RIP Version 2
RIP Version 1 characteristics
Uses hop count as the metric for path selection Maximum allowable hop count is 15, so infinite distance equals 16 hops Uses hold-down timers to prevent routing loops with a default of 180 seconds Employs split horizon to prevent routing loops Failure to receive routing updates in a timely manner results in removal of routes previously learned from a neighbor
www.ciscopress.com
RIP Version 2
RIP Version 1 characteristics (continued)
The administrative distance is 120 Routing updates are broadcast every 30 seconds by default Is capable of load-balancing over as many as six equal-cost paths; four is the default Does not support authentication Does not support VLSM because it is a classful routing protocol
www.ciscopress.com
RIP Version 2
RIP Version 2 characteristics
Uses hop count as the metric for path selection Maximum allowable hop count is 15, so infinite distance equals 16 hops Uses hold-down timers to prevent routing loops with a default of 180 seconds Employs split horizon to prevent routing loops Failure to receive routing updates in a timely manner results in removal of routes previously learned from a neighbor
www.ciscopress.com
RIP Version 2
RIP Version 2 characteristics (continued)
The administrative distance is 120 Routing updates are multicast every 30 seconds by default Is capable of load-balancing over as many as six equal-cost paths; four is the default Supports clear text and Message Digest 5 (MD5) authentication Supports VLSM because it is a classless routing protocol Supports manual route summarization
www.ciscopress.com
RIP Version 2
Major improvements with RIPv2:
Support of authentication
Clear text is the default MD5 used to encrypt enable secret passwords
RIP Version 2
Multicasting routing updates (continued)
Keeps PCs and servers from having to process the broadcast (continued)
IP sends the packet to the User Datagram Protocol (UDP) and UDP checks whether RIP port 520 is available; most PCs and servers do not have a process running on this port and discard the packet Sometimes it is running as a gateway discovery technique in TCP/IP services, such as UNIX or Windows
www.ciscopress.com
RIP Version 2
Broadcast disadvantages of RIPv1
RIPv1 can fit up to 25 networks/subnets in each update; updates are sent every 30 seconds
If the routing table has 1000 subnets, 40 packets will be sent every 30 seconds Each of these broadcasts will have to be looked at by all devices on the network
www.ciscopress.com
RIP Version 2
Multicast advantages of RIPv2
The IP multicast address for RIPv2 has its own MAC address: 0x0100.5e00.0009 Devices such as PCs and servers read this MAC address and determine it is not for them; they discard the frame If a device cant distinguish this MAC address, the packet will be discarded at the IP layer (OSI network layer) as the multicast IP address is not the IP address of the device
www.ciscopress.com
RIPv2 Configuration
The router rip command starts a RIP routing process; the network command causes the implementation of these three functions:
Routing updates are multicast out an interface Routing updates are processed if they enter that same interface The subnet that is directly connected to that interface is advertised
www.ciscopress.com
RIPv2 Configuration
Sample Network and Configuration of RIPv2
www.ciscopress.com
RIPv2 Configuration
In the previous slide, these commands were used to configure Router A:
Enable RIP as the routing protocol: router RIP Identify Version 2 as the RIP being used: version 2 Specifying a directly connected network: network 172.16.0.0 Specifying a directly connected network: network 10.0.0.0
www.ciscopress.com
www.ciscopress.com
www.ciscopress.com
www.ciscopress.com
www.ciscopress.com
www.ciscopress.com
The debug ip rip command displays real-time RIP routing updates as they are sent and received To turn off debugging, use the no debug ip rip or the undebug all (u all) commands
www.ciscopress.com
www.ciscopress.com
www.ciscopress.com
Summary
Classless IP addressing is implemented with:
VLSM: the ability to subnet a subnet and use different subnet masks in the same classful network CIDR: the allocation of blocks of contiguous address space to customers by ISPs Route summarization: a generic term that describes the use of a single network to represent a sequence of logically contiguous networks Route aggregation: a generalized form of supernetting Supernetting: pasting together classful networks into supernets
www.ciscopress.com
Summary
Classful routing protocols:
RIPv1 IGRP
www.ciscopress.com
Summary
RIPv2, EIGRP, and BGPv4 can turn automatic route summarization on and off RIPv2 is an improvement to RIPv1 Adds authentication, VLSM support, passing of subnet masks in routing updates, and multicasting of routing updates Configuring RIPv2 requires adding the version 2 command; adding no auto-summary is recommended All connected networks participating in RIP are defined with the network command in the form of classful networks
www.ciscopress.com
Summary
RIP configuration can be verified with several commands: show ip protocols, show ip interface brief, show running-config, and show ip route You can troubleshoot RIP with the debug ip rip command
www.ciscopress.com