Presentation on theme: "Introduction to Classless Routing"— Presentation transcript:
1Introduction to Classless Routing CCNA v3.0 Module 1Introduction to Classless Routing
2What is VLSM?A Variable Length Subnet Mask (VLSM) is a means of allocating IP addressing resources to subnets according to their individual need rather than some general network-wide rule.VLSM allows an organization to use more than one subnet mask within the same network address space. It is often referred to as ‘subnetting a subnet’, and can be used to maximize addressing efficiency.Large subnets are created for addressing LANs and small subnets are created for WAN links (a 30 bit mask is used to create subnets with only two host).
3Subnetting vs. VLSMSubnetting allows you to divide big networks into smaller, equal-sized slices.VLSM allows you to divide big networks into smaller, different-sized slices. This enables you to make maximum use of your valuable IP address space.So basically, you are now utilizing subnet masks in the same IP address space.
5Addressing a Network with Standard Subnetting Site A has two Ethernet networksSite B had one Ethernet networkSite C had one Ethernet network/24How many network addresses are needed?How many hosts are needed for the largest LAN?How many bits need to be borrowed to address this network?Site ASite BSite C25 users10 users8 users
6Addressing a Network with Standard Subnetting Site ASite BSite C25 users10 users8 usersSite A has two Ethernet networksSite B had one Ethernet networkSite C had one Ethernet networkIf we borrow 3 bits from a class C address, that will give us eight networks, but we can only use six of them. Each network will have 30 usable addresses.It will take four network addresses to accommodate the Ethernet networks at each site. That leaves us with two extra networks.There is also a point-to-point WAN connection between each site. These two connections will take up the remaining two networks.
7Addressing a Network with Standard Subnetting Borrowing 3 bits will meet the current needs of the company, but it leaves little room for growth.Each network will have 30 usable addresses, including the point-to-point WAN links (which only require two addresses).Site ASite BSite C25 users10 users8 users
8We can use subnet 0To enable subnet 0 on a Cisco router (if not already enabled), it is necessary to use the global configuration command ip subnet-zero.Router# configure terminal (config t) Router(config)# ip subnet-zeroTo disable subnet 0, use the no form of this command.Router(config)# no ip subnet-zero
9Provides 1 network with 256 addresses. Subnetting in a BoxIn a class C network there are 256 addresses.Provides 1 network with 256 addresses.When we subnet the address, we break it down in to smaller units or subnets.Subnet mask:256 addresses255
10Subnetting in a Box 128 addresses Borrowing 1 bit would break the 256 addresses in to two parts (networks)Providing 2 networks each with 128 addresses.Subnet mask:128127128 addresses255
11Subnetting in a Box Subnet mask: 255.255.255.192. 64 addresses Borrowing 2 bits would break each of the 2 networks in half again.Providing 4 networks, each with 64 addresses.Subnet mask:12812764 addresses64 addresses6463192191255
12Subnetting in a Box Subnet mask: 255.255.255.224. 32 addresses Borrowing 3 bits would break each of these 4 networks in half again.Providing 8 networks, each with 32 addresses.Subnet mask:12812732 addresses313232 addresses159160641926319132 addresses959632 addresses223224255
13Subnetting in a Box Subnet mask: 255.255.255.240. 16 addresses Borrowing 4 bits would break each of these 8 networks in half again.Providing 16 networks, each with 16 addresses.Subnet mask:1281273216016 addresses16 addresses16 addresses16 addresses161548471441431761756419263191311599622416 addresses16 addresses16 addresses16 addresses807911211120820724023995223255
14Addressing a Network Using VLSM When using VLSM to subnet an address, not all of the subnets have to be the same size.A different subnet mask may be applied to some of the subnets to further subnet the address.In order to take advantage of VLSM, the proper routing protocol must be selected.Not all routing protocols share subnetting information in their routing table updates.
15Addressing a Network Using VLSM To subnet using VLSM, identify the LAN with the largest number of hosts. Subnet the address /24 based on this information.Site A has two Ethernet networks (25 hosts each)Site B had one Ethernet network (10 hosts)Site C had one Ethernet network (8 hosts)Site ASite BSite C25 users10 users8 users
16Addressing a Network Using VLSM Subnet 1 & 2 to address Site A Ethernet networks.Subnet 5 to accommodate Site B & C Ethernet networks.Subnet 6 can be subnetted to accommodate the WAN links.Site ASite BSite C25 users10 users8 usersWAN linksFree AddressesWAN 1 & 2Site B & CSite BSite CSite AFree Addresses
17Addressing a Network Using VLSM Through applying VLSM, the topology was able to be addressed and still have two complete subnets available for future growth.Site ASite BSite C25 users10 users8 users/30/30/27/27/28/28
18Addressing a Network Using VLSM Exercise 1 Your company IP network is /24.Headquarters is connected to five branch offices by a WAN link, and to an ISP.Determine an appropriate IP addressing scheme.(the ISP owns the addresses on its link)HeadquartersBranch 160 users12 usersBranch 2Branch 3Branch 4Branch 5ISP
19Subnet according to the largest subnet needed. (Headquarters 60 hosts) /24Subnet according to the largest subnet needed. (Headquarters 60 hosts)1281276419263191Borrow 2 bits or /26. This would give you 4 networks with 64 host addresses on each subnet.255
20Playing it safe, we will not use the first subnet (subnet 0). 64128192We will start addressing with /26.Headquarters needs 60 hosts, so we will assign themHeadquarters60 hosts26 bit mask or /26( )
21The 5 Branch offices need 12 hosts each. 64128192160Branch 1 12 hosts /28 ( )Branch 2 12 hosts /28 ( )Branch 3 12 hosts /28 ( )Branch 4 12 hosts /28 ( )The next address block available is the block. Use VLSM.144176Headquarters60 hosts26 bit mask or /26( )Using a /28 mask will give us 16 hosts at each location. This will take care of 4 of the Branch offices.
22To obtain a block for Branch 5, we will need to subnet the. 192 - To obtain a block for Branch 5, we will need to subnet the block using a /28 mask.64128192160Branch 1 12 hosts /28 ( )Branch 2 12 hosts /28 ( )Branch 3 12 hosts /28 ( )Branch 4 12 hosts /28 ( )144176224Branch 5 12 hosts /28 ( )Headquarters60 hosts26 bit mask or /26( )208
23Now connect the 5 WAN links to the Branch offices. These are point-to-point connections and only require 2 addresses.160128Branch 1 12 hosts /28 ( )Branch 3 12 hosts /28 ( )144176Branch 2 12 hosts /28 ( )Branch 4 12 hosts /28 ( )23264192224WAN 1WAN 2WAN 3WAN 4Branch 5 12 hosts /28 ( )Here we will use a /30 mask to further subnet the subnets.Headquarters60 hosts26 bit mask or /26( )228236240248208WAN 5244
24Any remaining networks could be used for future growth of either LANs or WANs. Subnet 0 could also be further subnetted according to the needs of the network.160128Branch 1 12 hosts /28 ( )Branch 3 12 hosts /28 ( )144176Branch 2 12 hosts /28 ( )Branch 4 12 hosts /28 ( )23264192224WAN 1WAN 2WAN 3WAN 4Branch 5 12 hosts /28 ( )Headquarters60 hosts26 bit mask or /26( )228236240248208WAN 5244
25Address provided by ISP Applying the Addresses to the TopologyAddress provided by ISP/26/28/28/28/28/28/30/30/30/30/30
26Classful Addressing The IPv4 address architecture uses (a/n) Class A 8 bit network number for Class A addresses16 bit network number for Class B addresses24 bit network number for Class C addressesClass ANetworkHostClass BNetworkHost1Class CNetworkHost1
27Classful AddressingClassful addressing (A, B, C…) is obsolete.
28Classless Interdomain Routing CIDR (pronounced “cider”) ignores class.Using CIDR, a router views a bit mask to determine the network and host portions of an address.This allows CIDR to craft network address spaces according to the size of a network instead of force-fitting networks into pre-sized network address spaces.
29Classless Interdomain Routing CIDR sounds a lot like VLSMCIDR is usually discussed in general Internet context (ISPs)Uses custom length prefixes to reduce workload in key Internet routersVLSM is usually discussed in enterprise contextUses custom length prefixes to have better usage of enterprise address space
30Classless Interdomain Routing Routers use the network-prefix, rather than the first 3 bits of the IP address, to determine the dividing point between the network number and the host number.In the CIDR model, each piece of routing information is advertised with a bit mask or prefix-length ( /x ). The prefix-length is a way of specifying the number bits in the network-portion of each routing table entry.
31Classless Interdomain Routing For example, a network with 20 bits of network-number and 12 bits of host-number would be advertised with a 20 bit prefix (/20).The clever thing is that the IP address advertised with the /20 prefix could be a former Class A, Class B, or Class C.All addresses with a /20 prefix represent the same amount of address space (212 or 4,096 host addresses).20 bits network + 12 bits host
32Classless Interdomain Routing Address space can now be assigned in “chunks” that fit the need.If an organization needs 254 host addresses, what difference does it make whether they are given:a Class C ( /24)1/256th of a Class B ( /24)1/65,536th of a Class A ( /24)Using a /24 prefix, each of these specifies eight host bits which will support 254 hosts.
34Route Aggregation w/ CIDR or (Summarization) You need 500 addresses.Given two consecutive /24 addresses:( /24 and /24)This address space could be advertised to the rest of the Internet as /23.Why? (the two /24s have the first 23 bits in common).23 bits network prefix
35CIDR Scenario continued If the ISP owns all of the networks (256 /24s), why should it advertise all of them separately?Instead, it could simply advertise /16 (which would be /24 through /24).This would reduce the size of the routing tables on the router to which the routes are advertised..0.0.255.016 bits network prefix
36CIDR Scenario continued The summary of route /23 is called a “CIDR block” or a supernet.Because we are dealing with binary, the block size is always a power of two (2, 4, 8, 16, 32, etc.). The starting point of the block must be a multiple of the power of two that is being used (21 … 2, 4, 6, 8, etc.).Examples of starting addresses
40CIDR in a NutshellHand out pieces of classful networks (to avoid wasting addresses)Identify the network portion of an address with a network prefix ( /x)Advertise blocks of networks (to reduce the size of routing tables).
41CIDR Example Objective Create an addressing scheme using VLSM. ScenarioYou are assigned the CIDR address /22 and you must support the network shown in the diagram. Create an addressing scheme that will meet the diagram requirements.300 users100 users
42Dissect the problem Given the CIDR address 220.127.116.11 /22 How many /24 networks do we have?How many host addresses do we have?What is the largest LAN requirement?300 users100 users
43Host required - 300, 100, 100, 100, and 3 WAN links Address given /22Host required - 300, 100, 100, 100, and 3 WAN links255255255255
44Host required - 300, 100, 100, 100, and 3 WAN links Address given /22Host required - 300, 100, 100, 100, and 3 WAN links/23300 hosts255255255255
45Host required - 300, 100, 100, 100, and 3 WAN links Address given /22Host required - 300, 100, 100, 100, and 3 WAN links127128/25100 hosts/25/23300 hosts255255255255
46Host required - 300, 100, 100, 100, and 3 WAN links Address given /22Host required - 300, 100, 100, 100, and 3 WAN links128/25100 hosts/25100 hosts/23300 hosts255127255127128/25100 hosts255255
47Host required - 300, 100, 100, 100, and 3 WAN links Address given /22Host required - 300, 100, 100, 100, and 3 WAN links128/25100 hosts/25100 hosts/23300 hosts255127255128/25100 hosts191192223224240239248247WAN links /30243252251244255127255
48CIDR Result Given the CIDR address 18.104.22.168 /22 22.214.171.124 /23 300 users100 users/23/25/25/25/30/30/30Two /24s
49Classless Interdomain Routing For the router to operate in a classless manner and match destination IP addresses to a CIDR network address,The global command: ip classless must be configured.Router(config)# ip classless
50Routing Information Protocol (RIP) RIP is a relatively old, but still commonly used interior gateway protocol (IGP).It was created for use in small homogeneous networks.It is a distance-vector protocol that is used with classful IP addressing only.RIP v1 sends routing update messages at regular intervals (30 seconds) and when the network topology changes.RIP uses hop count as its only metric and maintains only the best route to a destination.
51RIP Version 2 Known as RIP V2 In RIP v2 all of the operation procedures, timers, and stability functions of RIP v1 remain the same in version 2, with the exception of the broadcast updates.RIP v2 has become the standard version of RIP used in networks today.
52RIP V2 is RIP V1 with extensions Subnet masks carried with each route entryAuthentication of routing updatesNext-hop addresses carried with each route entryExternal route tagsMulticast route updates
53RIP v2The most important of these extensions is the addition of a Subnet Mask fieldThis enables the use of variable-length subnet masks (VLSMs) and qualifies RIP v2 as a classless routing protocol.RIP v2 Packet FormatRIP v1 Packet Format
54RIP v2RIP v2 allocated a 4-octet field to associate a subnet mask to a destination IP address.When used in tandem, the IP address and its subnet mask enable RIP v2 to specifically identify the type of destination that the route leads to.This allows RIP v2 to route specific subnets, regardless of whether the subnet mask is fixed or of variable length.RIP v2 Packet Format
55RIP v2 RIP v2 differs from RIP v1 in the way update are sent out. RIP v1 sends updates as a broadcast (all stations receive the broadcast message)RIP v1 does not send subnet mask information in its updates.RIP v2 sends updates as a multi-cast. Multi-casting is a technique for simultaneously advertising routing information to multiple RIP devices via the class D address
56RIP v1 & RIP v2 comparisons Both use hop count as a metricBoth have the same metric value for infinite distance (16)Both use split horizon to prevent routing loops.RIP v1 broadcasts routing table updates, while RIP v2 multicasts its updates
57Configuring RIP v1To configure RIP v1 on a router, enter the following commands:Router# config tRouter(config)# router ripRouter(config-router)# networkNOTE - If no version is specified in the configuration, version 1 will be used. The router will listen for version 1 and 2 updates but send only version 1.
58Configuring RIP v2To take advantage of version 2s features, it is necessary to turn off version 1 support and enable version 2 updates with the following commands:Router(config)# router ripRouter(config-router)# version 2Router(config-router)# networkNOTE - The default behavior can be restored by entering the command no version in the config-router mode.Router(config-router)# no version
59Verifying & Troubleshooting RIP show ip route to make sure routers have learned all networks dynamicallyshow ip protocols to see information about the routing protocols used.debug ip RIP to see live routing updates
60Overriding Default Behavior of RIP You can override the default behavior of RIP by configuring a particular interface to behave differently.Router(config)# router rip Router(config-router)# version 2 Router(config-router)# network Router(config-router)# exitRIP v2 configured on the router.Router(config)# int e0 Router(config-if)# ip address Router(config-if)# ip rip send version 1 Router(config-if)# ip rip receive version 1Interface e0 sends and receives version 1 updates only.
61Overriding Default Behavior of RIP You can override the default behavior of RIP by configuring a particular interface to behave differently.Router(config)# int e1 Router(config-if)# ip address Router(config-if)# ip rip send version 1 2 Router(config-if)# ip rip receive version 1 2Interface e1 sends and receives both version 1 and 2 updates.Interface e2 has no special configuration and therefore sends and receives version 2 by default.Router(config)# int e2 Router(config-if)# ip address
64Configuring static routes w/ next-hop IP address Next hop interfaceAdministrative distance of 1 - default
65Configuring Static Routes Remember, an administrator actually enters these routes into the routing table.That makes them static route entries – because the router is not “discovering” those routes.If for some reason that outgoing interface goes down or is not available for some reason, then at that time the route will be removed from the routing table.Show ip route shows the routing table.The route would still be in the configuration (because it was entered globally), but that route could now no longer be used by the router because the interface it refers to is down for some reason.
66Administrative Distance What is the default for a outgoing interface?What is the default for the next-hop address?Defaults can always be changed!!!Just make it higher if you want it to be a “backup” route.ip route
67The LAN on Router B from Router A using next-hop? Router CS /24S /24/24/24/24What would you enter to configure a static route from Router C to the LAN on Router A using outgoing interface?The LAN on Router B from Router A using next-hop?
68The static default route A router should be configured with a special type of static route – a default route.This default route routes packets with destinations that do not match any of the other routes in the routing tableIt is a “gateway of last resort” that allows the router to forward “destination unknown” packets out a particular interfaceip route [next-hop-address | outgoing interface]
69Default Route on non-directly connected networks
70Default Route on non-directly connected networks
71Introduction to Classless Routing CCNA v3.0 Module 1Introduction to Classless Routing