1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Classful networking question

Discussion in 'Networking' started by foler59, Apr 1, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. foler59

    foler59 Thread Starter

    Joined:
    Jan 8, 2008
    Messages:
    45
    I know that classes aren't used now, but I have a question about the whole concept. Why would it be needed for classes that define a network and a host part to be created? The whole IP address could define a certain host (though not randomly). For example take the ip address 145.90.218.5 . In order to track that host down, you would be searching from the first octet down to the last, ruling out 255 octet numbers each time. For example it could be said that that particular host belongs to the network 145.90.218, which is part of the network 145.90 which is part of the 145 network. Networks could be defined according to geographical locations. For example networks 1 to 10 belong to the US, 11 to 21 are located in Europe and so on. That way there is no waste of the IP address range. Why is there a need to have fixed network or host parts of the IP address? Using the above method you could be tracking down a host by detecting an ever decreasing (in size) network that the host belongs to. And there was no network or host part used or classes.
     
  2. skinnywhiteboy

    skinnywhiteboy

    Joined:
    Jan 26, 2001
    Messages:
    2,070
    "Why would it be needed for classes that define a network and a host part to be created? The whole IP address could define a certain host (though not randomly). For example take the ip address 145.90.218.5 . In order to track that host down, you would be searching from the first octet down to the last, ruling out 255 octet numbers each time"


    Not necessarily. The number of hosts would depend on the Subnet Mask. Especially in larger corporate networks that are designed a little bit more intricate than what you may be used to, it is important to know what network you're on, and how many hosts your network supports.

    Sorry but that is the best answer I could come up with because I'm not really sure what you're trying to accomplish here.
     
  3. Courtneyc

    Courtneyc

    Joined:
    Dec 6, 2003
    Messages:
    1,936
    Because (if I understand you correctly) that's not what the subnet mask is for. Your computer makes a choice between 2 routes. It knows how based on the subnet mask.

    When your computer gets an IP address and a subnet mask (it needs both), it compares the subnet mask to the IP address (in binary, it does ANDing). That tells the computer what network it is on.

    Now, for every packet it addresses, it does the same comparison using its own subnet mask. If the network addresses match, the computer can now do an ARP (a broadcast) for the MAC and can then address the packet directly. If the networks don't match, the computer ARPs for the default gateway, and puts that in the addressed packet (but doesn't change the IP address). Every router that gets that packet does exactly the same thing.

    This way, your computer only has to make a choice between two decisions: do I address this packet directly (it's on my network), or do I send it to the gateway (it is not on my network). You don't need to know where the IP address is. Very little work to do on your end. Routers don't have a lot of work either. They talk to each other to learn routes, but they also have default gateways.

    This system takes into account if an address changes, and (even better) nobody has to do any searching.

    Courtney
     
  4. foler59

    foler59 Thread Starter

    Joined:
    Jan 8, 2008
    Messages:
    45
    Yeah, but when classful networking was used, there were no subnet masks.

    For example at that time when a company needed a bunch of IP addresses, it would probably be assigned one (out of 16,382) class B network (with 65534 host addresses). Therefore class B networks were quickly used up. What I'm asking is why did it work that way and not the following way:
    OK, how many addresses does your company need?
    Say, 10,000.
    OK, so, you're going to have addresses 1.1.1.1 to 1.1.40.94.

    That way everybody gets just the number of IP addresses they need and there is no waste.
     
  5. foler59

    foler59 Thread Starter

    Joined:
    Jan 8, 2008
    Messages:
    45
    Why can't the addresses be given sequencially starting from, say, 1.1.1.1 all the way up to 255.255.255.255? What prohibits this from happening?
     
  6. Wanderer2

    Wanderer2

    Joined:
    Jan 28, 2008
    Messages:
    1,428
    Sorry orestis34 but you need to go back to the study material.

    Subnet masks have always been used in class and classless networks. Question you need to answer for yourself is what purpose does a subnet mask serve?

    "Why can't the addresses be given sequencially starting from, say, 1.1.1.1 all the way up to 255.255.255.255? What prohibits this from happening? "

    Is 255.255.255.255 an ip address?
    What does IANA do? This addresses why can't you assign sequencially.
    http://www.iana.org/

    Might want to start your review here:
    http://en.wikipedia.org/wiki/IP_address
     
  7. t1n0m3n

    t1n0m3n

    Joined:
    Sep 4, 2004
    Messages:
    38
    Subnet masks are what allow networks to be in different places.
    Consider the network 10.10.10.0/24 10.10.10 are the network octets and .0 is the host octet. The /24 is the number of bits in the mask (3*8=24=255.255.255.0)
    If the host .5 tries to ping 10.10.10.200, the host knows that the host it is trying to ping is on the same subnet and therefore it sends an arp and gets the mac address and then forwards the packet.
    If the host .5 tries to ping 10.10.11.200 however, it knows that the host is not on the same subnet and simply forwards the packet to it's default router instead.

    If the host had an incorrect mask of /8 (1*8=8=255.0.0.0) when it tries to ping 10.10.11.200, it would arp for the address, no one would reply and you would get request timed out.
     
  8. t1n0m3n

    t1n0m3n

    Joined:
    Sep 4, 2004
    Messages:
    38
    Recommended and related study (I.E. Google search terms):
    Broadcast Domains
    CIDR
    ARP
    Ethernet
    IP Subnetting
    Classful Routing
     
  9. t1n0m3n

    t1n0m3n

    Joined:
    Sep 4, 2004
    Messages:
    38
    Also.. On the classful subnets subject...
    All CIDR really did was change how we thought about subnets.
    10.10.10.0/24 in CIDR is a 24 bit network.
    10.10.10.0/24 in a classful network is considered a subnetted class A network.
    192.168.0.0/24 in CIDR is a 24 bit network.
    192.168.0.0/16 in a classful network is considered a supernetted class C network.
    192.168.0.0/24 in a classful network is not considered to be a valid network (it is subnet zero.)

    Sure, it did cool things like let the 192.168.0.0/24 network be considered a valid network (instead of an invalid subnet zero), but overall, it really is a terminology change more than anything.

    Now days, the only time you might have to consider classful routing is if you run into any legacy classful routing protocols (like RIPv1.)
     
  10. foler59

    foler59 Thread Starter

    Joined:
    Jan 8, 2008
    Messages:
    45
    So the reason why there has to be a particular part of the IP address to identify a particular network that this "host" belongs, is the way those 2 hosts communicate when they are in the same or in different networks (whether or not the host is going to send an ARP request of forward the packet to another router when the 2 hosts are on a different network)?
     
  11. foler59

    foler59 Thread Starter

    Joined:
    Jan 8, 2008
    Messages:
    45
    So the difference between CIDR and subnet masking is that CIDR employs subnetting on a more general level, and as such there is no need for subnets in particular networks (since subnetting is applied from the beggining) ?

    Why are routers considered subnet borders, and no other device is considered so?
     
  12. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/699215

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice