Beruflich Dokumente
Kultur Dokumente
Ch. 1 – Introduction to
Classless Routing
Note
1
IPv4 Address Classes 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 experimental purposes and should
not be used for addressing hosts or multicast groups.
• Address Depletion
• Internet Routing Table Explosion
2
IPv4 Addressing Subnet Example
Subnet Mask
Given the Class B address 190.52.0.0
• One solution to the IP address shortage was thought to be the
subnet mask. Class B Network Network Host Host
• Formalized in 1985 (RFC 950), the subnet mask breaks a single
class A, B or C network in to smaller pieces. Using /24
subnet... Network Network Subnet Host
3
Subnet Example All Zeros and All Ones Subnets
Subnet 0 (all 0’s subnet) issue: The address of the subnet, Using the All Ones and All Zeroes Subnet
190.52.0.0/24 is the same address as the major network, • There is no command to enable or disable the use of the all-ones subnet, it is
190.52.0.0/16. enabled by default.
Network Network Subnet Host Router(config)#ip subnet-zero
• The use of the all-ones subnet has always been explicitly allowed and the use
190 52 0 Host Subnets of subnet zero is explicitly allowed since Cisco IOS version 12.0.
190 52 1 Host 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."
190 52 Etc. Host
255 Today, the use of subnet zero and the all-ones subnet is generally accepted
190 52 254 Host Subnets and most vendors support their use, though, on certain networks,
particularly the ones using legacy software, the use of subnet zero and the
28 - 1 all-ones subnet can lead to problems.
190 52 255 Host
CCO: Subnet Zero and the All-Ones Subnet
Last subnet (all 1’s subnet) issue: The broadcast address for http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a
the subnet, 190.52.255.255 is the same as the broadcast 0080093f18.shtml
address as the major network, 190.52.255.255.
• If you need a Review of Subnets, please review the • IPv6, or IPng (IP – the Next Generation) uses a 128-bit address
following links on my web site: space, yielding
– Subnet Review (PowerPoint) 340,282,366,920,938,463,463,374,607,431,768,211,456
– Subnets Explained (Word Doc) possible addresses.
• 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.
4
Short Term Solutions: IPv4 Enhancements CIDR (Classless Inter-Domain Routing)
• CIDR (Classless Inter-Domain Routing) – RFCs 1517, • By 1992, members of the IETF were having serious concerns about the
exponential growth of the Internet and the scalability of Internet routing
1518, 1519, 1520 tables.
• VLSM (Variable Length Subnet Mask) – RFC 1009 • The IETF was also concerned with the eventual exhaustion of 32-bit
IPv4 address space.
• Private Addressing - RFC 1918
• Projections were that this problem would reach its critical state by 1994
• NAT/PAT (Network Address Translation / Port Address or 1995.
Translation) • 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 or prefix-length (/8, /19, etc.)
– The first octet (first two bits) of the network address (or network-
prefix) is NOT used to determine the network and host portion of the
network address.
• CIDR helped reduced the Internet routing table explosion with
supernetting and reallocation of IPv4 address space.
Report last updated at Thu, 16 Jan 2003 • First deployed in 1994, CIDR dramatically improves IPv4’s scalability
and efficiency by providing the following:
– Eliminates traditional Class A, B, C addresses allowing for more
efficient allocation of IPv4 address space.
– Supporting route aggregation (summarization), also known as
supernetting, where thousands of routes could be represented by a
single route in the routing table.
• Route aggregation also helps prevent route flapping on Internet
routers using BGP. Flapping routes can be a serious concern
with Internet core routers.
• CIDR allows routers to aggregate, or summarize, routing information
and thus shrink the size of their routing tables.
– Just one address and mask combination can represent the routes to
multiple networks.
– Used by IGP routers within an AS and EGP routers between AS.
http://bgp.potaroo.net/
5
Without CIDR, a
router must CIDR (Classless Inter-Domain Routing)
maintain
individual
routing table
entries for these • By using a prefix address to summarizes routes, administrators can
class B keep routing table entries manageable, which means the following
networks. – More efficient routing
– A reduced number of CPU cycles when recalculating a routing
With CIDR, a
router can table, or when sorting through the routing table entries to find a
summarize match
these routes – Reduced router memory requirements
using a single • Route summarization is also known as:
network
address by – Route aggregation
using a 13-bit – Supernetting
prefix: • Supernetting is essentially the inverse of subnetting.
172.24.0.0 /13
• CIDR moves the responsibility of allocation addresses away from a
Steps: centralized authority (InterNIC).
1. Count the number of left-most matching bits, /13 (255.248.0.0) • Instead, ISPs can be assigned blocks of address space, which they
2. Add all zeros after the last matching bit: can then parcel out to customers.
172.24.0.0 = 10101100 00011000 00000000 00000000
23 bits in common
6
Supernetting Example CIDR Restrictions
• 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.
ISP
Summarized Update Specific Route Update
172.16.0.0/16 172.16.5.0/24
172.16.5.0/24
172.16.1.0/24
Sub1 Sub2
172.16.2.0/24 172.16.10.0/24
• ISP receives a summarized /16 update from Sub1 and a more specific
/24 update from Sub2.
• ISP will include both routes in the routing table.
• ISP will forward all packets matching at least the first 24 bits of
172.16.5.0 to Sub2 (172/16/5/0/24), longest-bit match.
• ISP will forward all other packets matching at least the first 16 bits to
Sub1 (172.16.0.0/16).
7
Another example from online curriculum Route flapping
• Route flapping occurs when a router interface alternates rapidly between the
up and down states.
• Route flapping 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.
Short Term Solutions: IPv4 Enhancements VLSM (Variable Length Subnet Mask)
• CIDR (Classless Inter-Domain Routing) – RFCs 1517, • Limitation of using only a single subnet mask across a
1518, 1519, 1520 given network-prefix (network address, the number of
• VLSM (Variable Length Subnet Mask) – RFC 1009 bits in the mask) was that an organization is locked into a
• Private Addressing - RFC 1918 fixed-number of of fixed-sized subnets.
• NAT/PAT (Network Address Translation / Port Address • 1987, RFC 1009 specified how a subnetted network could
Translation) – RFC use more than one subnet mask.
• VLSM = Subnetting a Subnet
– “If you know how to subnet, you can do VLSM!”
8
VLSM Example using /30 subnets
9
Final Notes on VLSM Discontiguous subnets
• Classful routing protocols, notably RIPv1 and IGRP, can’t support • RIPv2 and EIGRP automatically summarize on classful boundaries.
discontiguous subnets, because the subnet mask is not included in routing • When using RIPv2 and EIGRP, to disable automatic summarization (on both
updates.
routers):
• RIPv1 and IGRP automatically summarize on classful boundaries.
Router(config-router)#no auto-summary
• Site A and Site B are all sending each other the classful address of
207.21.24.0/24.
• A classless routing protocol (RIPv2, EIGRP, OSPF) would be needed: • SiteB now receives 207.21.24.0/27
– to not summarize the classful network address and • SiteB now receives 207.21.24.32/27
– to include the subnet mask in the routing updates.
10
Short Term Solutions: IPv4 Enhancements Private IP addresses (RFC 1918)
If addressing any of the following, these private addresses can be used instead of globally
unique addresses:
• A non-public intranet
• A test lab
• A home network
Global addresses must be obtained from a provider or a registry at some expense.
11
Network Address Translation (NAT)
Benefits:
• All-zeros and all-ones subnets
• The true defining characteristic of classless routing protocols is the
– - Although some vendors, like Cisco, can also handle this with
capability to carry subnet masks in their route advertisements. classful routing protocols.
• “One benefit of having a mask associated with each route is that the
all-zeros and all-ones subnets are now available for use.”
• VLSM
– Cisco allows the all-zeros and all-ones subnets to be used with – Can have discontiguous subnets
classful routing protocols. – Better IP addressing allocation
• CIDR
– More control over route summarization
12
Classless Routing Protocols RIP version 1
Classless Routing Protocols: • Classful Routing Protocol, sent over UDP port 520
• RIPv2 • Does not include the subnet mask in the routing updates.
• EIGRP • Automatic summarization done at major network boundaries.
• OSPF • Updates sent as broadcasts unless the neighbor command is used
• IS-IS which sends them as unicasts.
• BGPv4 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note: Remember classful/classless routing protocols is different than | command (1) | version (1) | must be zero (2) |
classful/classless routing behavior. Classlful/classless routing protocols +---------------+---------------+-------------------------------+
| address family identifier (2) | must be zero (2) |
(RIPv1, RIPv2, IGRP, EIGRP, OSPF, etc.) has to do with how routes get into
+-------------------------------+-------------------------------+
the routing table; how the routing table gets built. Classful/classless routing | IP address (4) |
behavior (no ip classless or ip classless) has to do with the lookup process of +---------------------------------------------------------------+
routes in the routing table (after the routing table has been built). It is possible | must be zero (4) |
to have a classful routing protocol and classless routing behavior or visa +---------------------------------------------------------------+
versa. It is also possible to have both a classful routing protocol and classful | must be zero (4) |
routing behavior; or both a classless routing protocol and classless routing +---------------------------------------------------------------+
behavior. | metric (4) |
+---------------------------------------------------------------+
13
RIP v2 message format Authentication
• All the extensions to the original protocol are carried in the unused
• RFC 1723 describes only simple password authentication
fields. • Cisco IOS provides the option of using MD5 authentication
• The Address Family Identifier (AFI) field is set to two for IP. The only instead of simple password authentication.
exception is a request for a full routing table of a router or host, in
which case it will be set to zero.
Same limitations of RIPv2 as with RIPv1 Same limitations of RIPv2 as with RIPv1
• Slow convergence and the need of holddown timers to • RIP v2 continues to rely on counting to infinity as a means
reduce the possibility of routing loops. of resolving certain error conditions within the network.
• Dependent upon holddown timers.
Note: See CCNA 2 for review if needed. • Triggered updates are also helpful.
14
Same limitations of RIPv2 as with RIPv1 Basic RIPv2 configuration
• Perhaps the single greatest limitation that RIP v2 inherited from RIP is Other:
that its interpretation of infinity remained at 16. 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
interface fastethernet0/0
ip address 192.168.50.129 255.255.255.192
ip rip send version 1 router rip
ip rip receive version 1 version 2
RIPv2 no auto-summary
interface fastethernet0/1
ip address 172.25.150.193 255.255.255.240
ip rip send version 1 2
15
Configuring authentication (EXTRA) Show commands
• If the command ip rip authentication mode md5 is not added, the interface will
use the default clear text authentication. Although clear text authentication may be
necessary to communicate with some RIP v2 implementations, for security concerns use
the more secure MD5 authentication whenever possible.
16
Debug commands RIPv2 Example
Scenario: 207.0.0.0/16
207.1.0.0/16
Internet
• Discontiguous subnets static route to
207.2.0.0/16
207.3.0.0/16
•
etc.
207.0.0.0/8
VLSM 10.0.0.0/8
• CIDR .1
.1 e0
172.30.1.0/24 172.30.100.0/24
version 2
172.30.200.32/28
no auto-summary Lo2
.26 s0 s0 .22 `
172.30.200.16/28
Lo1
Lo0
ip route 207.0.0.0 255.0.0.0 null0 172.30.2.0/24
.1 SantaCruz1 SantaCruz2 Lo0
.1
.1 e0 .1 e0 172.30.110.0/24
172.30.1.0/24 172.30.100.0/24
17
RIPv2: Sending and Receiving Updates Adding a default Routes to RIPv2
ISP 207.0.0.0/16
207.1.0.0/16
ISP(config)# line console 0 Internet 207.2.0.0/16
router rip static route to 207.3.0.0/16
ISP(config-line)# logging synchronous etc.
ISP#debug ip rip redistribute static 10.0.0.0/8 207.0.0.0/8
ISP#01:23:34: RIP: received v2 update from 192.168.4.22 on Serial1 network 192.168.4.0 ISP
.25 s0 s1 .21
01:23:34: 172.30.100.0/24 -> 0.0.0.0 in 1 hops
version 2
01:23:34: 172.30.110.0/24 -> 0.0.0.0 in 1 hops
Includes mask no auto-summary 192.168.4.24/30
ISP# 192.168.4.20/30
default-information originate
01:23:38: RIP: received v2 update from 192.168.4.26 on Serial0
172.30.200.32/28
01:23:38: 172.30.2.0/24 -> 0.0.0.0 in 1 hops Lo2
01:23:38: 172.30.1.0/24 -> 0.0.0.0 in 1 hops multicast ip route 207.0.0.0 255.0.0.0 null0 .26 s0 s0 .22 Lo1 `
172.30.200.16/28
Lo0
ISP# ip route 0.0.0.0 0.0.0.0 10.0.0.2 172.30.2.0/24
.1 SantaCruz1 SantaCruz2 Lo0
.1
172.30.110.0/24
etherenet0 .1 e0 .1 e0
01:24:31: RIP: sending v2 update to 224.0.0.9 via Ethernet0 (10.0.0.1)
172.30.1.0/24 172.30.100.0/24
01:24:31: 172.30.2.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 172.30.1.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 172.30.100.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 172.30.110.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 192.168.4.24/30 -> 0.0.0.0, metric 1, tag 0
01:24:31: 192.168.4.20/30 -> 0.0.0.0, metric 1, tag 0
<text omitted>
18