Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © 2003 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Classless Routing.

Similar presentations


Presentation on theme: "1 © 2003 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Classless Routing."— Presentation transcript:

1 1 © 2003 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Classless Routing

2 © 2003 Cisco Systems, Inc. All rights reserved. IPv4 Addressing Review IP addresses have two parts: Network—identifies the network or subnet Host—identifies the device on that network/subnet An IP Address’ 32 bits are expressed in 4 octets (called dotted-decimal notation). IP addresses are divided into five class types depending upon the value of bit positions in the first octet.

3 © 2003 Cisco Systems, Inc. All rights reserved. IP Address Classes Class A: 1.0.0.0 to 127.0.0.0 NetworkHost 1 st Octet Bits: ___ ___ ___ ___ ___ ___ ___ ___ (The 128 bit is off.) Host 0XXXXXXX Class B: 128.0.0.0 to 191.255.0.0 Network Host 1 st Octet Bits: ___ ___ ___ ___ ___ ___ ___ ___ (The 128 bit is on and the 64 bit is off.) 10XXXXXX Class C: 192.0.0.0 to 223.255.255.0 Network Host 1 st Octet Bits: ___ ___ ___ ___ ___ ___ ___ ___ (The 128 and 64 bits are on. The 32 bit is off.) 110XXXXX

4 © 2003 Cisco Systems, Inc. All rights reserved. 1 st Octet Bits: ___ ___ ___ ___ ___ ___ ___ ___ (The 128, 64, 32, and 16 bit are all on.) Reserved IP Address Classes Experimental Class E: 240.0.0.0 to 255.0.0.0 1111XXXX Multicasting Class D: 224.0.0.0 to 239.0.0.0 1 st Octet Bits: ___ ___ ___ ___ ___ ___ ___ ___ (The 128, 64, and 32 bit are on. The 16 bit is off.) 1110XXXX

5 © 2003 Cisco Systems, Inc. All rights reserved. Private IP Addresses Private IP Addresses cannot exist on the public Internet. Your gateway router uses Name Address Translation (NAT) to give outbound packets a “legitimate” IP source address. Class B: 172.16.0.0 to 172.31.0.0 (In the 3 rd Octet, the 128, 64, and 32 bit are off. The 16 bit is on.) Class C: 192.168.0.0 to 192.168.255.0 (256 separate Class C Addresses) Class A: 10.0.0.0 (Favored by large enterprises because of its flexibility)

6 © 2003 Cisco Systems, Inc. All rights reserved. IP v4 Depletion Issue The Internet Engineering Task Force identified two problems in 1992: Exhaustion of unassigned IPv4 network addresses. Class B was on verge of depletion Rapid increase in the size of the Internet’s routing tables. Therefore, over the next several years they came up with solutions: Route Summarization using CIDR Notation Variable Length Subnet Masking Private Addressing and NAT IP Unnumbered on WAN links IP version 6

7 © 2003 Cisco Systems, Inc. All rights reserved. IP version 6 IPv4 will eventually perish even though private addressing and NAT has extended IPv4’s life. Future proliferation of IP addressable devices will eventually exceed IPv4’s limit of 4 billion addresses. Ultimate solution: IPv6 128 bit address space Allows for 2128 or: 340,282,366,920,938,463,374,607,431,768,211,456 possibilities. Will require network administrators to re-engineer their enterprises with new software and new hardware.

8 © 2003 Cisco Systems, Inc. All rights reserved. Classful vs. Classless Routing Classful routing protocols do not pass subnet mask information in their routing updates. Routers receiving the updates either… Apply the default subnet mask based on IP Class or, Use the subnet mask assigned to the interface. Classful routing protocols include: RIP v1 IGRP EGP BGP v3

9 © 2003 Cisco Systems, Inc. All rights reserved. Classful vs. Classless Routing Classless routing protocols send subnet mask information in their routing updates. This allows the use of Variable Length Subnet Masking (VLSM). Classless routing protocols include: RIP v2 EIGRP OSPF IS-IS BGP v4 Static routing also supports VLSM.

10 © 2003 Cisco Systems, Inc. All rights reserved. VLSM Overview When subnetting you no longer need to subtract two subnets. Use of ip subnet-zero, enabled by default on Cisco IOS 12.0 and higher, allows the use of subnet zero. In addition, the “all-ones” subnet can also be used. Addressing a WAN link often results in a waste of host addresses. VLSM allows for the “subnetting of a subnet”. WAN links only need 2 addresses for hosts. Using VLSM results in a CIDR notation of /30 on WAN links.

11 VLSM Example 11 © 2003 Cisco Systems, Inc. All rights reserved. Presentation_ID

12 © 2003 Cisco Systems, Inc. All rights reserved. VLSM Example Given network 172.16.4.0/24, you should create 8 subnets. Since you have 8 bits available for hosts, you can borrow 3 bits for subnets and leave 5 bits for addressing hosts. 2 3 subnets = 8 2 5 hosts = 32 This is “standard” subnetting up to this point.

13 © 2003 Cisco Systems, Inc. All rights reserved. Simple VLSM Example 1 st Octet2 nd Octet3 rd Octet 4 th Octet Subnet Address 172164 0172.16.4.0/24 101011000001000000000100 000 00172.16.4.0/27 101011000001000000000100 00100000172.16.4.32/27 101011000001000000000100 01000000172.16.4.64/27 101011000001000000000100 01100000172.16.4.96/27 101011000001000000000100 10000000172.16.4.128/27 101011000001000000000100 10100000172.16.4.160/27 101011000001000000000100 11000000172.16.4.192/27 101011000001000000000100 11100000172.16.4.224/27

14 © 2003 Cisco Systems, Inc. All rights reserved. Simple VLSM Example Assign subnets to the LANs. WANs still need to be addressed. 1 st Octet2 nd Octet3 rd Octet 4 th OctetSubnet Address 172164 0172.16.4.0/24 101011000001000000000100 000 00172.16.4.0/27 101011000001000000000100 00100000172.16.4.32/27 101011000001000000000100 01000000172.16.4.64/27 101011000001000000000100 01100000172.16.4.96/27 101011000001000000000100 10000000172.16.4.128/27 101011000001000000000100 10100000172.16.4.160/27 101011000001000000000100 11000000172.16.4.192/27 101011000001000000000100 11100000172.16.4.224/27 Assigned to LANs

15 © 2003 Cisco Systems, Inc. All rights reserved. Simple VLSM Example We could assign the remaining subnets to the WANs, but this would waste 28 host addresses per subnet….and, there would be no subnets left for future growth. 1 st Octet2 nd Octet3 rd Octet 4 th OctetSubnet Address 172164 0172.16.4.0/24 101011000001000000000100 000 00172.16.4.0/27 101011000001000000000100 00100000172.16.4.32/27 101011000001000000000100 01000000172.16.4.64/27 101011000001000000000100 01100000172.16.4.96/27 101011000001000000000100 10000000172.16.4.128/27 101011000001000000000100 10100000172.16.4.160/27 101011000001000000000100 11000000172.16.4.192/27 101011000001000000000100 11100000172.16.4.224/27

16 © 2003 Cisco Systems, Inc. All rights reserved. Simple VLSM Example A better solution is to further subnet one of the remaining /27 subnets. Since WAN links only need two host addresses, we only need to leave 2 bits for hosts. 1 st Octet2 nd Octet3 rd Octet 4 th OctetSubnet Address 172164 0172.16.4.0/24 101011000001000000000100 000 00172.16.4.0/27 101011000001000000000100 00100000172.16.4.32/27 101011000001000000000100 01000000172.16.4.64/27 101011000001000000000100 01100000172.16.4.96/27 101011000001000000000100 10000000172.16.4.128/27 101011000001000000000100 10100000172.16.4.160/27 101011000001000000000100 11000000172.16.4.192/27 101011000001000000000100 11100000172.16.4.224/27 Further subnet this subnet

17 © 2003 Cisco Systems, Inc. All rights reserved. Simple VLSM Example 1 st Octet2 nd Octet3 rd Octet 4 th OctetSubnet Address 101011000001000000000100 000 00172.16.4.0/27 101011000001000000000100 000 00172.16.4.0/30 101011000001000000000100 00000100172.16.4.4/30 101011000001000000000100 00001000172.16.4.8/30 101011000001000000000100 00001100172.16.4.12/30 101011000001000000000100 00010000172.16.4.16/30 101011000001000000000100 00010100172.16.4.20/30 101011000001000000000100 00011000172.16.4.24/30 101011000001000000000100 00011100172.16.4.28/30 Borrowing 3 bits of the 5 available in subnet 172.16.4.0 allows us to create 8 new subnets for WAN links.

18 © 2003 Cisco Systems, Inc. All rights reserved. Simple VLSM Example After assigning the WAN subnets, there are five WAN subnets and two LAN subnets still available for future growth. 1 st Octet2 nd Octet3 rd Octet 4 th OctetSubnet Address 172164 0172.16.4.0/24 101011000001000000000100 000 00172.16.4.0/27 101011000001000000000100 000 00172.16.4.0/30 101011000001000000000100 00000100172.16.4.4/30 101011000001000000000100 00001000172.16.4.8/30 101011000001000000000100 00001100172.16.4.12/30 101011000001000000000100 00010000172.16.4.16/30 101011000001000000000100 00010100172.16.4.20/30 101011000001000000000100 00011000172.16.4.24/30 101011000001000000000100 00011100172.16.4.28/30 101011000001000000000100 00100000172.16.4.32/27 101011000001000000000100 01000000172.16.4.64/27 101011000001000000000100 01100000172.16.4.96/27 101011000001000000000100 10000000172.16.4.128/27 101011000001000000000100 10100000172.16.4.160/27 101011000001000000000100 11000000172.16.4.192/27 101011000001000000000100 11100000172.16.4.224/27

19 © 2003 Cisco Systems, Inc. All rights reserved. Final Addressing Scheme

20 © 2003 Cisco Systems, Inc. All rights reserved. VLSM for Dummies Work from host or network requirements. Determine how many bits to borrow or leave in the host field. Write the network address in binary. Draw a line at the current subnet boundary. (Between the network and host bits.) Draw a second line at the “new” boundary. (Determined by how many additional bits will be borrowed.) Count up in binary “between the lines”.

21 © 2003 Cisco Systems, Inc. All rights reserved. VLSM Activity Given subnet 140.16.32.0/20, create 8 subnets. Follow these steps: 1.Write the address in binary. 2.Draw a line between bits 20 & 21 (current boundary). 3.Draw a second line between bits 23 & 24 (since you will be borrowing 3 bits). 4.Count up in binary between the lines. 5.Convert to decimal to determine the new subnets.

22 © 2003 Cisco Systems, Inc. All rights reserved. VLSM Example 140160 0 1 0 0 0 0 00 0 0 0 Write the address in binary: Draw a line at the current boundary 140160 0 1 0 0 0 0 00 0 0 0 140160 0 1 0 0 0 0 00 0 0 0 Draw a second line at the new boundary

23 © 2003 Cisco Systems, Inc. All rights reserved. VLSM Example Count up in binary “between the lines” 140160 0 1 0 0 0 0 00 0 0 0 140160 0 1 0 0 0 0 0 140160 0 1 0 0 1 0 00 0 0 0 140160 0 1 0 0 1 1 00 0 0 0 140160 0 1 0 1 0 0 00 0 0 0 140160 0 1 0 1 0 1 00 0 0 0 140160 0 1 0 1 1 0 00 0 0 0 140160 0 1 0 1 1 1 00 0 0 0

24 © 2003 Cisco Systems, Inc. All rights reserved. VLSM Example Convert to decimal to determine new subnets 140160 0 1 0 0 0 0 00 0 0 0 140.16.32.0/23 140160 0 1 0 0 0 0 0 140.16.34.0/23 140160 0 1 0 0 1 0 00 0 0 0 140.16.36.0/23 140160 0 1 0 0 1 1 00 0 0 0 140.16.38.0/23 140160 0 1 0 1 0 0 00 0 0 0 140.16.40.0/23 140160 0 1 0 1 0 1 00 0 0 0 140.16.42.0/23 140160 0 1 0 1 1 0 00 0 0 0 140.16.44.0/23 140160 0 1 0 1 1 1 00 0 0 0 140.16.46.0/23

25 Route Summarization 25 © 2003 Cisco Systems, Inc. All rights reserved. Presentation_ID

26 © 2003 Cisco Systems, Inc. All rights reserved. Route Summarization Overview The use of Classless InterDomain Routing (CIDR) and VLSM not only prevents address waste, but also promotes route aggregation, or summarization. Without route summarization, Internet backbone routing would likely have collapsed sometime before 1997. A complex hierarchy of variable-sized networks and subnetworks is summarized at various points, using a prefix address, until the entire network is advertised as a single aggregate route. Route summarization, or supernetting, is only possible if the routers of a network run a classless routing protocol, such as OSPF or EIGRP.

27 © 2003 Cisco Systems, Inc. All rights reserved. Route Summarization Rules 1.A router must know in detail the subnet numbers attached to it. 2.A router does not need to tell other routers about each individual subnet if the router can send one aggregate route for a set of routers. 3.A router using aggregate routes would have fewer entries in its routing table.

28 © 2003 Cisco Systems, Inc. All rights reserved. Calculating a Summary Route Write networks in binary. Summarize to the common bit boundary.

29 © 2003 Cisco Systems, Inc. All rights reserved. Summary Route

30 © 2003 Cisco Systems, Inc. All rights reserved. Route Summarization Each router summarizes the routes it knows about and sends a summary route to the upstream router. This process is repeated at each boundary.

31 RIP Version 2 31 © 2003 Cisco Systems, Inc. All rights reserved. Presentation_ID

32 © 2003 Cisco Systems, Inc. All rights reserved. RIP Version 1 Basics You should already be familiar with RIPv1: Distance-vector Interior Gateway Protocol; Open source; defined in RFC 1058RFC 1058 Classful Does not pass subnet mask information Either uses the default class’s subnet mask or the subnet mask configured on an interface that belongs to the same network. Metric is Hops Limited to 15; 16 hops is defined as infinite Broadcasts entire routing table Sent to 255.255.255.255 every 30 seconds Supported by almost all IP routers Works best in small, homogeneous networks

33 © 2003 Cisco Systems, Inc. All rights reserved. RIP v1 Allowed Protocol Expansion Notice the “Unused” fields in RIPv1 These fields were used to expand the capabilities of RIP Version 2 uses the three fields shown in red to add the following features to RIP updates: External Route Tags Subnet Mask Next Hop Address 08162431 CommandVersionUnused (set to zero) Address FamilyUnused (set to zero) IPv4 Address Unused (set to zero) Metric

34 © 2003 Cisco Systems, Inc. All rights reserved. RIP v2 Header and Data External Route Tags can be configured on routes from other routing protocols that are being redistributed into RIP. This allows for easy identification of where the route came from. The Subnet Mask is now advertised with the route which gives RIPv2 its VLSM capability. The Next Hop Address is where the receiving router should send packets when routing to the advertised network (may not always be the advertising router!). 08162431 CommandVersionUnused (set to zero) Address FamilyExternal Route Tag IPv4 Address Subnet Mask Next Hop Address Metric

35 © 2003 Cisco Systems, Inc. All rights reserved. RIPv2 Features RIPv2 shares the following with RIPv1: Distance vector protocol that uses hop count as metric and is limited to 15. Uses hold down timers to declare routes down. Uses split horizon to avoid routing loops. RIPv2 adds the following: Multicasts updates to 224.0.0.9. Can accept tagged routes. (External Route Tag field) Passes subnet mask information in the update. Can advertise a different router on the same subnet as the next hop router. (Next Hop Address field) Can use simple and encrypted authentication.

36 © 2003 Cisco Systems, Inc. All rights reserved. Configuring RIPv1 The router rip command specifies RIP as the routing protocol. Use the network command to specify which interfaces will participate in exchanging updates. If you enter subnets the IOS will convert it to the classful boundary.

37 © 2003 Cisco Systems, Inc. All rights reserved. Configuring RIPv2 Configuring RIPv2 could not be easier. Simply enter the command version 2 in routing configuration mode. show ip protocols does not change except to note the use of version 2

38 © 2003 Cisco Systems, Inc. All rights reserved. Verify RIP Operation: show ip protocols Timers: update; hold down; flushed RIP version (1 or 2) Lists participating interfaces Maximum equal-cost paths 4 by default; can be set from 1 to 6 with the maximum-paths command. Networks this router is routing Routing information sources: IP addresses of directly connected RIP neighbors Administrative distance (120 for RIP) Seconds since the last update received from neighbor

39 © 2003 Cisco Systems, Inc. All rights reserved. Verify RIP Operation: show ip route RIP version 1 routing table will show all the subnets. RIPv1 uses the subnet mask configured on local interfaces to determine the subnet mask for all remote subnets that belong to the same classful address. This is why you must use the same subnet mask throughout your Autonomous System.

40 RIPv2 & VLSM Example 40 © 2003 Cisco Systems, Inc. All rights reserved. Presentation_ID

41 © 2003 Cisco Systems, Inc. All rights reserved. A Classful Routing Scheme 192.168.1.0/27  not used 192.168.1.32/27  assigned 192.168.1.64/27  assigned 192.168.1.96/27  assigned 192.168.1.128/27  assigned 192.168.1.160/27  assigned 192.168.1.192/27  assigned 192.168.1.224/27  not used By the old rules of subnetting, we have no room for growth in the 192.168.1.0 address space.

42 © 2003 Cisco Systems, Inc. All rights reserved. Go Classless with VLSM! Our WAN links are only using 2 addresses, wasting a total of 84 host addresses. We will use subnet zero (192.168.1.0/27) to create WAN subnets. Our LAN subnets will be reassigned to keep our address space contiguous. This will leave a large block of addresses providing flexibility for future expansion.

43 © 2003 Cisco Systems, Inc. All rights reserved. Subnetting For the WANs We only need 2 hosts per WAN link. Use VLSM to subnet the 192.168.1.0/27 subnet: Leave 2 bits in the host portion of 192.168.1.0/27 and borrow the rest. 3 more bits are borrowed, providing 2 3 or 8 WAN subnets with 2 host addresses each. We will only use the first three subnets, leaving the rest for future expansion. The new WAN subnets created from 192.168.1.0/27: 192.168.1.0/30  assigned 192.168.1.4/30  assigned 192.168.1.8/30  assigned 192.168.1.12/30 192.168.1.16/30 192.168.1.20/30 192.168.1.24/30 192.168.1.28/30

44 © 2003 Cisco Systems, Inc. All rights reserved. Reassigning the LANs We need three subnets for our LANs. To ensure contiguous addressing, we will reassign the LANs in this order: 192.168.1.32/27  RTA’s LAN 192.168.1.64/27  RTB’s LAN 192.168.1.96/27  RTC’s LAN This will leave a block of address space (192.168.1.128 to 192.168.1.255) available for future expansion.

45 © 2003 Cisco Systems, Inc. All rights reserved. VLSM Scheme 192.168.1.0/24 192.168.1.128/25 192.168.1.0/25 192.168.1.0/27 192.168.1.32/27 192.168.1.64/27 192.168.1.96/27 192.168.1.0/30 192.168.1.4/30 192.168.1.8/30 192.168.1.12/30 192.168.1.16/30 192.168.1.20/30 192.168.1.24/30 192.168.1.28/30

46 © 2003 Cisco Systems, Inc. All rights reserved. Visual of Our New VLSM Scheme Each block represents a subnet address space with the network address in the upper, left-hand corner and the broadcast address in the lower, right-hand corner. 0 A  B WAN 3 8 C  A WAN 11 16 19 24 27 128 Half of the Address Space Still Available for Future LAN Expansion 255 4 B  C WAN 7 12 15 20 23 28 31 32 RTA’s LAN 63 64 RTB’s LAN 95 96 RTC’s LAN 127 5 WAN subnets available for Future Expansion

47 © 2003 Cisco Systems, Inc. All rights reserved. Default Routing with RIP There are three methods to enable default routing with RIP and use one of the following commands: redistribute static default-information originate ip default-network network_address All three methods require a default static route be configured on the gateway router (RTA in our example). We will use the ip default-network command.

48 © 2003 Cisco Systems, Inc. All rights reserved. Default Static Route Syntax Configuring a default static route uses the above command syntax. Called a “quad-zero” route, this command will send all packets without a specific route in the routing table to either... a next hop IP address belonging to another router or... out the specified interface Router(config)#ip route 0.0.0.0 0.0.0.0 {next_hop_ip|out_int}

49 © 2003 Cisco Systems, Inc. All rights reserved. Configuring the Default Static Route RTA will send all packets destined for unknown routes to the ISP router. We used the next hop IP address for the ISP. Instead, we could have specified E1 as the outbound interface.

50 © 2003 Cisco Systems, Inc. All rights reserved. Configure ip default-network command The ip default- network command tells RTA what network should be advertised as the default route. Since all default routed packets will be sent out onto the 201.11.10.4 subnet, we configure the classful network address 201.11.10.0.

51 © 2003 Cisco Systems, Inc. All rights reserved. Finishing the Default Configuration Our final step is to advertise the 201.11.10.0 network in our RIP routing process.

52 © 2003 Cisco Systems, Inc. All rights reserved. Verifying the Default Configuration Verify the configuration by looking at the routing table on all three routers.

53


Download ppt "1 © 2003 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Classless Routing."

Similar presentations


Ads by Google