198

Calculating the Netmask Length (also called a prefix): Convert the dotted-decimal representation of the netmask to binary. Then, count the number of contiguous 1 bits, starting at the most significant bit in the first octet (i.e. the left-hand-side of the binary number). 255.255.248.0 in binary: 11111111 11111111 11111000 00000000 ...


167

The IPv4 Address Shortage According to Vint Cerf (the father of IP), the IPv4 32-bit address size of was chosen arbitrarily. IP was a government/academic collaborative experiment, and the current public Internet was never envisioned. The IP paradigm was that each connected device would have a unique IP address (all packets sent between IP devices would be ...


82

Two things are getting confused here: classful addressing vs CIDR Masquerading / NAT Going from classful addressing to Classless Inter Domain Routing (CIDR) was an improvement that made the address distribution to ISPs and organisations more efficient, thereby also increasing the lifetime of IPv4. In classful addressing an organisation would get one of ...


40

The statement: The IP address 0.0.0.0 [...] means ‘‘this network’’ or ‘‘this host.’’ is misleading. It is not a "or" but "This host on this network." From RFC1122: { 0, 0 } This host on this network. MUST NOT be sent, except as a source address as part of an initialization procedure by which the ...


35

Ron Maupin's answer gives a brilliant overview of the IPv4 shortage, but I'd like to address this part of your question: Why can't a city (for example) have just one IP address and all homes in this city would just be on a private network of that city. Then this one city would be able to assign addresses from range 0.0.0.1 to 255.255.255.254. On the face ...


33

Most likely if they're a big university they are their own ISP, using BGP to connect their network to the internet via a number of upstream networks. Nothing stops them from using IP addresses they should not be using, and it would work in their local network. However, it won't work on the Internet. Their upstream networks providing them connectivity should ...


31

Connecting an interface to a network makes it a part of that network. Therefore, the IP address is a property of the connection, not the host. Likewise, a host can have many network connections and accordingly, IP addresses. Different interfaces often have different functions, so it's important to distinguish between them (e.g. internal console, public ...


22

:: is the unspecified address (0:0:0:0:0:0:0:0), and it is only used in packets as the source address of a host that does not yet have an address and is trying to get an address assigned. What you see in the output means that a process is binding to port 8100 for all destination addresses in the host. ::1 is the loopback address (0:0:0:0:0:0:0:1), and ...


21

Actually, every interface in a device has its own ARP table. A host could have several ARP tables (one for each interface it has). ARP tables are not shared between hosts, or even among interfaces in the same host, but a host may hear ARP traffic on the network and update the ARP table of the interface where the ARP traffic is heard.


20

The answer above hits the nail on the head perfectly. However, when I first started out, it took me a few different examples from a couple of sources for it to really hit home. Therefore, if you're interested in other examples, I wrote a few blog posts on the subject - http://www.oznetnerd.com/category/subnetting/ Admins, if this post is considered spam, ...


20

Does anycast addressing, in itself, add any additional latency to network connections? No. one using unicast and the other using anycast Anycast is unicast. It is just that the same network is in two different places, and the routing protocol chooses the closest network to which it send traffic destined for that network. It seems like having to ...


19

I do not want to take anything away from Mike Pennington's excellent answer, which I have relentlessly promoted, but I keep seeing questions that are not directly addressed by his answer, and I have created something that was originally based on Mike's answer, but I have more information to address questions that have popped up over time. Unfortunately, it ...


19

Back when the RFC for private addressing was proposed, classful addressing was still common. The reasons for the three address ranges are found in RFC 1918, Address Allocation for Private Internets: If a suitable subnetting scheme can be designed and is supported by the equipment concerned, it is advisable to use the 24-bit block (class A network) of ...


19

Some simple guidelines that work most of the time: Dividing your /29 The standard size of your allocation from RIPE NCC is a /32 A /32 is a well-accepted prefix size in the global routing table You can get a /29 just by asking for it Conclusion: Get a /29 and start using the a /32, save the other /32s for when you deploy to other countries, continents etc. ...


18

I never seen 169.254/16 working in IPv4. A PC automatically acquires a 169.254.x.x/16 address if it does not receive an IP address from a DHCP server. If you disable the DHCP server on your home or lab network and issue the "ipconfig/release" and "ipconfig/renew" commands, your PC will receive a 169.254.x.x address. As per this article: The purpose of ...


18

The 100.64.0.0/10 address block is not private address space; it is shared address space. This is spelled out in RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space (I highlighted the relevant verbiage): Introduction IPv4 address space is nearly exhausted. However, ISPs must continue to support IPv4 growth until IPv6 is fully deployed. To that ...


18

A subnet (network) is really just a collection of contiguous addresses within a binary mask. It is simply a logical way to divide address block. If you run out of addresses in a network (subnet), then you are simply out of addresses in that network. Adding any more hosts would require reclaiming unused addresses, expanding the network (may not be possible), ...


18

As long as you are translating your "15.0.0.0" address space to something unique on the Internet that doesn't overlap, things will "work fine". However, you won't be able to communicate (easily) to any users who own "the real" 15.0.0.0/8. At the moment some of that space seems to be owned by HP: $ whois 15.0.0.1 [Querying whois....


17

Because 224.0.0.0/24 is the range assigned by IANA for local multicast - Local Network Control Block. Addresses in this range are non-routable, they can only exist on a link, and cannot be forwarded by a router. These protocols only require multicast to operate within a single link, often to provide dynamic neighbour discovery and flooding of protocol ...


17

You may notice that two least-significant bits of the most-significant byte of a 48-bit MAC address are usually set to 0 (as in all your examples). There are two flags in the most-significant byte of the OUI (Organizationally Unique Identifier, which are the most-significant 24-bits) part of the MAC address: The least-significant bit is the I/G (Individual/...


16

Continued from the previous answer... Part 2 of 2 Selecting an IPv4 Network Gateway (Router) Address A gateway is a host on the network that knows how to forward packets to other networks, and it can be assigned any usable network host address. Some people just randomly assign gateway addresses to any usable network host address, some people always assign ...


16

It would not be enough. Suppose I have a computer with three interfaces: eth0 (wired Ethernet), wlan0 (wifi), and vboxnet0 (virtualbox). One of the interfaces is connected to an internal network, one is connected to the internet, and the last one is connected to a network of virtual computers. Let's say I have just one address, 10.1.2.3, and wish to send a ...


15

The IP address and MAC address serve different (but crucial) purposes: The MAC address gets a frame from one NIC to the next. The IP address gets a packet from one Computer to the Server So given the following: Source Computer <---> RouterA <---> RouterB <---> Destination Server What directs the packet from the "Source" to ...


15

The basic process is quite simple. I'll only cover that and omit scenarios where several DHCP servers exist, error conditions crop up or discovery has to cross network boundaries. A new client on a network sends a DHCPDISCOVER via udp from address 0.0.0.0 to 255.255.255.255:67 (broadcast, port 67). If there is at least one DHCP servers listining in the ...


15

The Internet Protocol (IP) was designed to provide end-to-end connectivity. The 32 bits of an IPv4 address only allow for about 4.3 billion unique addresses. Then you must subtract a bunch of addresses for things like multicast, and there is a lot of math showing that you can never use the full capacity of a subnet, so there are a lot of wasted addresses. ...


15

Actually, the ping gets sent to a layer-2 address if they are on the same LAN. Assuming ethernet, the sending host may have a MAC address in its ARP cache, and the pings gets sent to the host with that MAC address (end of story). If the host needs to send an ARP request to resolve the layer-3 IP address to a layer-2 MAC address, this is where it gets tricky....


15

There is a historical reason for this, as @ronmaupin alludes to. In small networks, you don't need a layer 3 protocol. All the devices are directly addressable, so layer 2 addresses work fine. As networks got bigger and became interconnected, there was a need to know how to get from one network to another. That is the function of routing, which is done ...


15

Right now, every home has its own IP address. Why can't a city (for example) have just one IP address and all homes in this city would just be on a private network of that city? Exactly this is already done by many internet service providers since the end of the 1990s. In the 1990s there were different reasons (not the IPv4 shortage) for doing this. ...


14

Yes, there's a problem. Your default gateway needs to be in the same subnet as your device. By setting the subnet mask to 255.255.255.255, you've told the computer that nothing else is in its subnet. A more appropriate way to do things would be to set your device IP to 10.0.0.2, your gateway to 10.0.0.1, and your subnet mask to 255.255.255.252.


14

The RIRs assign addressing to the ISPs. An ISP not following the rules will quickly find itself ostracized and cut off from the rest of the Internet. IANA owns the addressing and assigns each of the five RIRs blocks of addresses, and the RIRs assign blocks of addresses from those to businesses that can prove they need them and are willing to pay for them. ...


Only top voted, non community-wiki answers of a minimum length are eligible