Options

ip classless question.

ReardenRearden Member Posts: 222
In studying about ip classless, I found this guide on the Cisco site: http://www.cisco.com/univercd/cc/td/doc/product/software/ios113ed/113ed_cr/np1_c/1cipadr.htm#xtocid212805

In the diagram, a packet destined for the address 128.20.4.1 are sent out the interface for 128.20.0.0/16 when ip classless is enabled. My question is that if the next router has any idea what to do with this packet, wouldn't it already be in the routing table? Or does this only apply for directly connected networks when a routing protocol is not configured.
More systems have been wiped out by admins than any cracker could do in a lifetime.

Comments

  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    If you mean the router you can't see...ie in the cloud? Then who know's, for this example I guess you can assume no routing protocol is being used & the example even mentions no default route is configured. So by enabling ip classless on the router it will look for the best supernet route (i wont explain supernetting but it's easy as pie). REMEMBER IF THIS IS NOT TURNED ON IT WILL JUST DISCARD PACKETS IT DOES NOT RECOGNIZE THE SUBNET FOR. - if no default route is configured.

    Start reading up on auto-summarization and supernetting also if you havent already. Two really important topics and heavily tied in with this.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    tech-airmantech-airman Member Posts: 953
    Rearden wrote:
    In studying about ip classless, I found this guide on the Cisco site: http://www.cisco.com/univercd/cc/td/doc/product/software/ios113ed/113ed_cr/np1_c/1cipadr.htm#xtocid212805

    In the diagram, a packet destined for the address 128.20.4.1 are sent out the interface for 128.20.0.0/16 when ip classless is enabled. My question is that if the next router has any idea what to do with this packet, wouldn't it already be in the routing table? Or does this only apply for directly connected networks when a routing protocol is not configured.

    Rearden,

    Let's first analyze the destination IP address of 128.20.4.1 . As we know, it is the first octet that determines the class of IP address through the first four bits. So let's figure out the class of this IP address...
    128. decimal = 10000000. binary
    

    Since the first two bits are "10" this is a Class B address. Since this is a Class B address, the default mask is 255.255.0.0 . So applying the default mask to the IP address, we can find the network address for the IP address.
    IP: 128.020.004.001
    DM: 255.255.000.000
    --------------------------
    NA: 128.020.000.000
    

    So now we know for the IP address 128.20.4.1 the network address is 128.20.0.0 . So now that we know the network address, let's look that network address up in the routing table.
    128.0.0.0
    128.20.0.0 - summary
    128.20.1.0
    128.20.2.0
    128.20.3.0
    

    Is the network address of 128.20.0.0 the same as 128.0.0.0? No. The network address 128.20.0.0 is not specific enough to make a routing decision with so the destination IP address is compared with the directly connected subnets.
    Is 128.20.4.1 on the 128.20.1.0 subnet? No.
    Is 128.20.4.1 on the 128.20.2.0 subnet? No.
    Is 128.20.4.1 on the 128.20.3.0 subnet? No.
    

    Since the answer is "no" for all three subnets, the packet is "routed" to the "bit bucket." "Routing to bit bucket" is a euphemistic way of saying the packet is dropped. Since the packet is dropped by the router, the packet never gets a chance to be routed by the routers in the 128.0.0.0 network cloud.

    Now, "ip classless" would solve the problem of "the packet never gets a chance to be routed by the routers in the 128.0.0.0 network cloud" because instead of dropping the packet it would forward the packet into the cloud in the hopes that "someone else might know."

    So to directly answer your questions:
    1. Q: My question is that if the next router has any idea what to do with this packet, wouldn't it already be in the routing table?
      [list=1:6855cf869e]
    2. A: If the router in the figure is using static routing, then it wouldn't receive any route information to update it's routing table.
    [*]Q: Or does this only apply for directly connected networks when a routing protocol is not configured.
    1. A: In order for a router to move packets from interface to interface, some sort of routing protocol must be configured, even static routing will do. Then it's up to the routing process to decide which interface to forward the packet. The decision is made based on the routing table which relates sub/network addresses to interfaces. If an exact match of the IP packet's destination IP address' sub/network isn't found in that router's routing table, then the packet is dropped.
    [/list:o:6855cf869e]

    I hope this helps.
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    Good answer tech-airman, people like you should be training (excuse me if you already are).
    Now, "ip classless" would solve the problem of "the packet never gets a chance to be routed by the routers in the 128.0.0.0 network cloud" because instead of dropping the packet it would forward the packet into the cloud in the hopes that "someone else might know."

    It's important to emphazize that it will only forward based on the best supernet route if the ip classless command is configured, there could be several cloud's. Nothing wrong with your example but it could be confusing.

    Cheers,
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
Sign In or Register to comment.