172

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 ...


154

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 ...


37

Besides the original RFC 1918 space (which is now updated to RFC6890), there are several other blocks such as 192.0.2.0 that are not announced publicly. Furthermore, it's possible that someone has valid IPv4 space that just isn't announced in the public internet. The simplest thing to do is telnet route-views.oregon-ix.net, login as rviews and look for ...


36

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 host learns ...


32

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 ...


32

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 ...


26

MAC addresses and IP addresses operate on different layers of the internet protocol suite. MAC addresses are used to identify machines within the same broadcast network on layer 2, while IP addresses are used on layer 3 to identify machines throughout different networks. Even if your computer has an IP address, it still needs a MAC address to find other ...


25

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 ...


24

RFC 1918 defines private IP address ranges. Have a look here. From that document: Private Address Space The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets: 10.0.0.0 - 10.255.255.255 (10/8 prefix) 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) 192.168.0.0 ...


20

When you understand that IP-to-IP communication is really just a series of MAC-to-MAC communication taking place at each router hop, then you'll see why both are necessary. The IP header of a packet leaving your workstation destined to an IP in a different subnet will maintain the source IP and destination IP, forgetting about NAT for the moment. [Later, ...


20

:: 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 ...


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

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), ...


19

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.


18

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. ...


17

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, ...


17

IPv4: It will "flap". On the sending host (another host or the gateway/router) there will be an ARP entry for the IP pointing to the MAC address of one of the hosts. Packets will go to one of the hosts, wherever the ARP entry currently points. This will effectively disrupt connectivity for both hosts. IPv6: The neighbor discovery protocol will do a ...


17

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.arin.net] [whois.arin.net] ...


16

without going into OSI model, TCP layer, etc.: Back in time, networks were created: some computers would communicate with each other to share something. TO do that, they need to know who was talking and who was being talked to. So, instead of giving each computer a name, we gave them an ID. This ID is called MAC address, is should uniquely identity each ...


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

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 ...


15

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/...


14

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 ...


14

There isn't anything physically stopping you from designing network which has just IP address for L2 and L3. Then 'ethernet switch' would learn SIP address of incoming packets and flood or forward towards DIP address. However this network would only ever support IP, when next-generation of IPvX comes, it would not work, as the 'ethernet switch' couldn't ...


14

No. That said, let's see a simplified example: 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 ...


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. ...


13

Team Cymru provides a bogon reference for both IPv4 and IPv6 that you can use to filter out unassigned/reserved/private IP addresses - it's offered both as a simple list for well-known prefixes and also in a much larger list that includes space that is as-yet unassigned by RIRs. They also run a BGP bogon server that you can request a free peering to - ...


13

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 ...


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