1 / 27

VLSM and RIPv2

VLSM and RIPv2. Warren Toomey GCIT. Introduction. Switches deliver frames to stations. Routers deliver packets to networks. Only the final router has to deliver a packet to a station, as they are both on the same network.

xanto
Download Presentation

VLSM and RIPv2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VLSM and RIPv2 Warren Toomey GCIT

  2. Introduction • Switches deliver frames to stations. • Routers deliver packets to networks. Only the final router has to deliver a packet to a station, as they are both on the same network. • Routers operate at OSI Layer 3. In particular, IP routers use link-independent addresses. • An IP address identifies an interface which is connected to a network. This means that routers have at least 2 IP addresses. • This also means that every point-to-point WAN connection between routers is also a separate IP network.

  3. Introduction • Why do routers only route to networks? To keep their routing tables small, and to keep the process of routing fast. • At present, hundreds of millions of Internet stations connected to the Internet. But only hundreds of thousands of networks connected to the Internet. • Router tables look like the following:

  4. Networks and Subnets • Originally, 3 network sizes: Class A, B and C • Problems: not given out in a geographical basis • No ability to aggregate networks • Sizes are generally too big or too small • Each network is a broadcast domain: broadcast storms

  5. Subnets • Earliest solution: subnet a network into many equal-sized networks • Subnets kept hidden behind router, which aggregates all subnets into one network

  6. Subnets • Done by borrowing bits from the host field to create the subnet field. Smaller subnets = smaller broadcast domains • Problem: R1 to R2 link is a subnet: we only need 2 IP addresses but there are 254, so we waste 252 IP addresses

  7. Routing with Subnets • Early routing protocols (e.g. RIPv1) were classful but could deal with subnets as long as they were contiguous (not separated). • In previous diagram, R1 could advertise 131.66.0.0 /16 • Discontiguous subnets not possible. R3 gets same advertisement from R1 and R2. Which way is right? Both of them!

  8. Drawbacks of Subnets • All subnets are the same size. Many IP addresses are wasted • Cannot deal with discontiguous subnets, as any routing advertisement has to be classful (only /8, /16 or /24)

  9. CIDR: Classless Internet Domain Routing • Create new routing protocols, or update existing routing protocols, to send the subnet mask with every advertisement • Allows the receiving router to determine the size of the network, i.e. the range of host addresses on that network • Allows routers to aggregate routes and advertised summarized routes to their neighbours • e.g. two adjacent /24 subnets can be advertised as one /23 subnet

  10. CIDR: Classless Internet Domain Routing • RIP was updated to RIPv2 to support CIDR • New protocols such as EIGRP and OSPF support CIDR • IP address allocations no longer need to be contiguous or the same size, as they were with subnets

  11. Netmasks, Network Sizes, Step Factors • Netmask used to indicate the network part of the IP address (used to route packets) and the host part (used by last router for final delivery to station) • Traditionally, a 32-bit pattern with 1's for the network part and 0's for the host part, e.g. • 11111111 11111111 11111111 00000000 • Dotted decimal notation: 255.255.255.0 • Prefix notation: /24 (number of 1 bits) • We will use all three netmask formats

  12. Netmasks, Network Sizes, Step Factors • Netmask tells you the size of the network • e.g. /24 has 8 bits for hosts. 28 = 256 hosts • On each subnet, 2 IP addresses are reserved • Netmask also tells you the “step factor”: how far apart the subnets are apart • Once you have the base IP address of a network plus the mask, you can determine: • The network identity (same as base address) • The broadcast address (last IP address in range) • The set of usable IP addresses (all but 1st and last)

  13. Step Factors

  14. Netmasks, Network Sizes, Step Factors • The number of addresses on any network is always 2host bits, and the number of usable host addresses on any network is always 2host bits -2. • The network identity address (i.e the first address on the network) must be a multiple of the step factor. • What type of address is 148.76.21.0/20? • /20: step factor is 16 in the 3rd octet, but 21 is not a multiple of 16. Therefore it must be a usable IP address in this subnet • Identity address: host bits all 0's, multiple of step factor. 148.76.16.0 • Broadcast address: host bits all 1's, also the address below the next network. • Step factor is 16 in 3rd octet, so next network is 148.76.32.0 • So broadcast address on the 148.76.16.0 network is 148.76.31.255

  15. VLSM: Allocating Addresses • Variable Length Subnet Masks: process of dividing an IP allocation into subnets of different sizes, with different masks • Requires CIDR routing to advertise the different sizes. • Several ways of doing VLSM. Here are my rules: • Work out the required size for each network. Leave room for the identity & broadcast address. • Allocate networks from the biggest down to the smallest. • After each allocation, leftover addresses. Use from the biggest remaining down to smallest for future allocations. • Keep networks of the same size adjacent in the numbering. Keep networks connected to the same router adjacent in the numbering, too.

  16. VLSM: Other Rules of Thumb • If you split a /N range into two, you end up with two /N+1 ranges. • Split into 4, get /N+2 ranges. Split into 8, get /N+3 ranges etc. • Remember to watch the step factor as you are subdividing and allocating addresses! • Remember that links between 2 routers are also networks. Allocate a size /30 subnet to each one. • Place point-to-point router address allocations at the bottom of the original address range.

  17. VLSM: An Example • We are given 193.85.72.0/24 to VLSM subdivide • Four LAN subnets. Two router-to-router (/30) subnets • LAN 1: 20 hosts. Closet power of 2 is 32. Use /27 • LAN 2: 12 hosts. Closest power of 2 is 16. Use /28 • LAN 3: 25 hosts. Same as LAN 1: /27 • LAN 4: 87 hosts. Closest power of 2 is 128. Use /25

  18. VLSM: An Example • Start with 193.85.72.0, allocate the /25 (step of 128) • Next is 193.85.72.128, allocate one /27 (step of 32) • Next is 193.85.72.160, allocate next /27 (step of 32) • Next is 192.85.72.192, allocate the /28 (step of 16) • We have allocated IP ranges for the LANs • We are up to 192.85.72.208. From here to 255 not yet used

  19. VLSM: An Example • We are up to 193.85.72.208, with only the two /30 router to router links left to allocate • We have 256-208= 48 IPs left, but only need to allocate two /30 subnets (4 each), so we still have lots of IPs left • Start at the bottom and allocate two /30s (step of 4) • 193.85.72.248 /30 • 193.85.72.252 /30

  20. VLSM: An Example

  21. Route Aggregation • A set of routes can be aggregated or summarised when there is a single route with a smaller mask prefix which covers the set of routes exactly • This lessens the RAM requirements for every router, and also allows them to find the correct route for each packet more quickly • Special conditions to make this occur. It's not easy to develop a design to do this

  22. Example Route Summarisation • Say we want to advertise a summarised route of 180.1.1.0 /25 • This is the range 180.1.1.0 to 180.1.1.127 (step factor of 128) • We can break this into two /26 subnets (size 64 each) • 0 to 63 for one of them, 64 to 127 for the other • Let's subdivide the second one into two /27 subnets (size 32 each) • 64 to 95 for the first, 96 to 127 for the second • We now have one /26 and two /27s which exactly cover the original route of /25. • So, if we had these routes: • 180.1.1.0/26, 180.1.1.64/27 and 180.1.1.96/27 • We could summarise them as a single route: 180.1.1.0 /25

  23. RIP Version 2: CIDR Support • The first version of RIP does not support VLSM or CIDR • On Cisco routers, run show ip protocols to see what version of RIP your router uses to send advertisements • To switch to RIP version 2:

  24. RIP Version 2: Summarisation • RIPv2 still summarises network on classful boundaries by default • To stop this from happening: no auto-summary

  25. RIP Version 2: Static Routes • RIPv2 can advertise existing static routes too • Use the redistrubute static command

  26. RIP Version 2: Debugging • RIP v2 debugging enabled: you can see the advertisements with the masks for each route

  27. RIP Version 2: Common Issues • Not running RIP v2. Not enough network commands in config

More Related