Presentation is loading. Please wait.

Presentation is loading. Please wait.

VLSM and RIPv2 Warren Toomey GCIT. Introduction Switches deliver frames to stations. Routers deliver packets to networks. Only the final router has to.

Similar presentations


Presentation on theme: "VLSM and RIPv2 Warren Toomey GCIT. Introduction Switches deliver frames to stations. Routers deliver packets to networks. Only the final router has to."— 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: NetworkMaskCostNext Router 121.245.0.0/162366.4.1.2 192.167.23.0/241118.34.5.6

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 Clas s Network Field Host Field # Networks # HostsFirst Octet A8 bits24 bits12616 million0 to 126 B16 bits 16,38465,534128 to 191 C24 bits8 bits2 million254192 to 223

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. 2 8 = 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 PrefixNetmaskStep FactorPrefixMaskStep Factor /8 (A)255.0.0.01 in 1st octet/24 (C)255.255.255.01 in 3rd octet /9255.128.0.0128 in 2nd octet/25255.255.255.128128 in 4th octet /10255.192.0.064 in 2nd octet/26255.255.255.19264 in 4th octet /11255.224.0.032 in 2nd octet/27255.255.255.22432 in 4th octet /12255.240.0.016 in 2nd octet/28255.255.255.24016 in 4th octet /13255.248.0.08 in 2nd octet/29255.255.255.2488 in 4th octet /14255.252.0.04 in 2nd octet/30255.255.255.2524 in 4th octet /15255.254.0.02 in 2nd octet /16 (B)255.255.0.01 in 2nd octet /17255.255.128.0128 in 3rd octet /18255.255.192.064 in 3rd octet /19255.255.224.032 in 3rd octet /20255.255.240.016 in 3rd octet /21255.255.248.08 in 3rd octet /22255.255.252.04 in 3rd octet /23255.255.254.02 in 3rd octet

14 Netmasks, Network Sizes, Step Factors The number of addresses on any network is always 2 host bits, and the number of usable host addresses on any network is always 2 host 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: 1.Work out the required size for each network. Leave room for the identity & broadcast address. 2.Allocate networks from the biggest down to the smallest. 3.After each allocation, leftover addresses. Use from the biggest remaining down to smallest for future allocations. 4.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 SubnetMaskRange 193.85.72.0 /2572.0 to 72.127 (126 usable IPs) 193.85.72.128 /2772.128 to 72.159 (30 usable IPs) 193.85.72.160 /2772.160 to 72.191 (30 usable IPs) 192.85.72.192 /2872.192 to 72.207 (14 usable IPs) 193.85.72.248 /3072.248 to 72.251 (2 usable IPs) 193.85.72.252 /3072.252 to 72.255 (2 usable IPs)

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


Download ppt "VLSM and RIPv2 Warren Toomey GCIT. Introduction Switches deliver frames to stations. Routers deliver packets to networks. Only the final router has to."

Similar presentations


Ads by Google