why do we use ip classless in default routes?

lon21lon21 Member Posts: 201
I don't understand the following example.

172.30.0.0/16 is variably subnetted, 2 subnets, 2 masks
D 172.30.32.0/20 [90/4879540] via 10.1.1.2
D 172.30.32.0/24 [90/25789217] via 10.1.1.1
S* 0.0.0.0/0 [1/0] via 10.1.1.3


Packets destined for 172.30.32.1 will be forwarded via 10.1.1.1, as the longest prefix wins.
Packets for 172.30.33.1 will be forwarded via 10.1.1.2
Packets for 10.1.1.5 will be sent to the default route via 10.1.1.3
Packets for 172.30.64.1 will be dropped, not sent to the default route

I was told that the packet 64.1 would be dropped why would this be the case when 64.1 would be a valid host on the /20 network.

Thanks.

Comments

  • Forsaken_GAForsaken_GA Member Posts: 4,024
    lon21 wrote: »

    I was told that the packet 64.1 would be dropped why would this be the case when 64.1 would be a valid host on the /20 network.

    No it's not.

    172.30.32.0/20 = 172.30.32.0 through 172.30.47.255 the /20 would have to be a /18 in order to encompass 64.1
  • spd3432spd3432 Member Posts: 224
    lon21 wrote: »
    I don't understand the following example.

    172.30.0.0/16 is variably subnetted, 2 subnets, 2 masks
    D 172.30.32.0/20 [90/4879540] via 10.1.1.2
    D 172.30.32.0/24 [90/25789217] via 10.1.1.1
    S* 0.0.0.0/0 [1/0] via 10.1.1.3


    Packets destined for 172.30.32.1 will be forwarded via 10.1.1.1, as the longest prefix wins.
    Packets for 172.30.33.1 will be forwarded via 10.1.1.2
    Packets for 10.1.1.5 will be sent to the default route via 10.1.1.3
    Packets for 172.30.64.1 will be dropped, not sent to the default route

    I was told that the packet 64.1 would be dropped why would this be the case when 64.1 would be a valid host on the /20 network.

    Thanks.

    How do you figure 64.1 is a valid host on the /20 network? /20 is a subnet mask of 255.255.240.0 giving you a depth of 16 (256 - 240).

    Your network is 172.30.32.x /20
    The next network will be 172.30.48.x /20 (32 + 16 = 48 ). The only way you could have both 172.30.32.x and 172.30.64.1 on the same network is either a /16 or a /17 subnet mask.
    ----CCNP goal----
    Route [ ] Studying
    Switch [ ] Next
    Tshoot [ ] Eventually
  • spd3432spd3432 Member Posts: 224
    No it's not.

    172.30.32.0/20 = 172.30.32.0 through 172.30.47.255 the /20 would have to be a /18 in order to encompass 64.1

    /20 would be 255.255.192.0 giving a range of 172.30.0.0 to 172.30.63.255
    ----CCNP goal----
    Route [ ] Studying
    Switch [ ] Next
    Tshoot [ ] Eventually
  • lon21lon21 Member Posts: 201
    spd3432 wrote: »
    How do you figure 64.1 is a valid host on the /20 network? /20 is a subnet mask of 255.255.240.0 giving you a depth of 16 (256 - 240).

    Your network is 172.30.32.x /20
    The next network will be 172.30.48.x /20 (32 + 16 = 48 ). The only way you could have both 172.30.32.x and 172.30.64.1 on the same network is either a /16 or a /17 subnet mask.

    I just understood it, I was thinking of 64.0 - 79.255 being on the same network as 32.0 - 47.255. But yes they are on different networks.
    Thanks

    When using ip classless how would this make any different? I don't understand why we would use Ip classless in default routing. I know that ip classless looks at the ip address and not the classfull address.
  • ZartanasaurusZartanasaurus Member Posts: 2,008 ■■■■■■■■■□
    lon21 wrote: »
    I just understood it, I was thinking of 64.0 - 79.255 being on the same network as 32.0 - 47.255. But yes they are on different networks.
    Thanks

    When using ip classless how would this make any different? I don't understand why we would use Ip classless in default routing. I know that ip classless looks at the ip address and not the classfull address.

    no ip classless: the router assumes it knows all of the valid subnets of a classful network. So 172.16.0.0/16 is subnetted and has routes to 172.16.1.0/24, 172.16.2.0/24 and 172.16.3.0/24. If it gets a packet destined for 172.16.4.0/24, it drops it since that route doesn't explicitly show up under the 172.16.0.0 entry.

    ip classless: Allows the router to use the default route when a specific match isn't found.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    spd3432 wrote: »
    /20 would be 255.255.192.0 giving a range of 172.30.0.0 to 172.30.63.255

    You need to practice on CIDR mask to dotted decimal mask conversions a bit more.

    /20 = borrowing 4 bits

    128 + 64 + 32 + 16 = 240

    /18 = borrowing 2 bits

    128+64 = 192
  • spd3432spd3432 Member Posts: 224
    You need to practice on CIDR mask to dotted decimal mask conversions a bit more.

    /20 = borrowing 4 bits

    128 + 64 + 32 + 16 = 240

    /18 = borrowing 2 bits

    128+64 = 192

    You are correct sir. I saw your initial post after I had posted my first response. I did have my calculations correct in my first one (showing network depth of 16). However, your first response is incorrect since the /18 (.192) results in 172.30.32.x and 172.30.64.1 (the IP he was trying to get to) being on different networks.
    ----CCNP goal----
    Route [ ] Studying
    Switch [ ] Next
    Tshoot [ ] Eventually
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    spd3432 wrote: »
    You are correct sir. I saw your initial post after I had posted my first response. I did have my calculations correct in my first one (showing network depth of 16). However, your first response is incorrect since the /18 (.192) results in 172.30.32.x and 172.30.64.1 (the IP he was trying to get to) being on different networks.

    Yup, I'm wrong. I wasn't paying attention to the placement of the first subnet within the allocation, was just doing math on ranges alone.

    For those who aren't quite clear on WHY I'm wrong, 172.16.32.0/18 isn't actually 172.16.32.0/18. It's a part of 172.16.0.0/18, which covers 172.16.0.0 through 172.16.63.255

    So it would actually need to be 172.16.0.0/17 to include both subnets under one address.
Sign In or Register to comment.