Hot answers tagged

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


42

One of the things VLAN's do is take a physical switch and break them up into multiple smaller "virtual" switches. Meaning this Physical depiction of One switch and Two VLANs: Is identical in operation to this Logical depiction of the same topology: Even if the IP addresses in the 2nd image were in the same Subnet, you'll notice there is no "link" between ...


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


40

I believe the book wrongly assumes network classes are still in effect. So a) would be a "Class A" network, where 10.255.255.255 would be the broadcast address. Another hint: There is no explicit network size specified (/24, /27, ..) so it is implied you know about network classes. Classical example of outdated literature.


33

It's likely that the subnet masks are throwing you off. As long as you keep in mind that the below rules no longer apply, you should be fine. Ultimately classful addressing came down to the most significant (or "leading") bits in the address. Nothing more, nothing less. Class A: Most significant bits starts with 0 Class B: Most significant bits start with ...


29

The whole point of Virtual LAN, is to create separate Layer 2 LANs on a single physical device. It is like building an armored and sonic-proof wall in a room to create 2 rooms. The people in each half of the room can no longer communicate with the people in the other half of the former room. So you have two hosts on two distinct L2 networks without ...


27

A /31 network actually has two usable hosts for a point-to-point link. See the Standards Track RFC 3021, Using 31-Bit Prefixes on IPv4 Point-to-Point Links (published in December 2000): Abstract With ever-increasing pressure to conserve IP address space on the Internet, it makes sense to consider where relatively minor changes can be made to fielded ...


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


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

While the idea behind classful addressing is now obsolete as classless interdomain routing (CIDR) has been in use for decades(the original RFC1519 was published in 1993), your first answer is the historically correct one. The second set of networks you list are from RFC1918, and define private use address ranges. There is a single /8 network within the ...


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

The sending device uses the subnet mask to determine if the remote host is in it's local network or not. If the IP is within the subnet of the local machine, it uses ARP to determine the MAC address of the remote host. If it's outside, it queries it's local routing table to find the next hop of that IP, and sends out an ARP query to find the MAC address ...


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


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

IPv4 address space is in short supply, so some people decide to use IP space ( allocated, but not advertised) that doesn't belong to them. The consequences are pretty well described in the article you quote.


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

Connect the two DCs with a private connection. Then advertise the /24 at both Data Centers. When traffic arrives at one DC for the other, your internal devices route or switch the traffic as required via the private link. Second option depends on available connectivity options, you might be able to acquire a Layer2 (switched) link between both DCs and ...


13

Remember that everything is binary, so a power of 2. Addresses and masks have 32 bits. You are given 8 bits (2^8 = 256) to work with since your network is /24 (32 - 24 = 8). The required number of subnets is 6, not a power of 2, so you need to pick the next higher power of 2 (8). 8 is 2^3. The 24 bits you already have plus the 3 bits for the subnets is ...


12

If I am correct, a loopback IP address refers to the current host. No. Traffic sent to a loopback address loops back inside the host. You can send traffic to a loopback address as the destination address and then read it. This is useful in testing. What is the difference between 0.0.0.0 and a loopback IP address then? Addresses in the 0.0.0.0/8 network ...


11

They are functionally identical -- all-hosts subnet broadcast. In the early days, long long ago, the all-zero's address ("Network") was used for broadcast traffic. That was later changed to the all-one's address ("Broadcast"), and that's what we use today. [NOTE] This is not the same thing as "subnet-zero" (or the all-one subnet) which is the the top and ...


11

You can't use any addresses from 224.0.0.0 (except for multicast) through 255.255.255.254, and 255.255.255.255 is a Limited Broadcast address. Multicast addresses are 224.0.0.0/4. Masks are not used in multicast; you subscribe, individually, to multicast groups. Reserved addresses are 240.0.0.0/4. While named "Class E" in the old class routing ...


11

Your problem is that you are addressing in two separate networks: 216.21.5.0/31 and 216.21.5.2/31. The addresses you are using are in the same /30 network, but two separate /31 networks. You need to set one address as 216.21.5.0 and the other address as 216.21.5.1, or set one address as 216.21.5.2 and the other address as 216.21.5.3. The warning is because ...


11

By convention, each device on the LAN under IPv6 gets a /64 subnet, right? No. Each network is almost always a /64 network. Each host still gets one or more addresses on the network, but I don't know of any OS that will handle more than a few dozen addresses for an interface on a LAN. Why the need for such insanely long addresses? That is so that we ...


11

Devices in different subnets can communicate. That is the purpose of a router. Routers route packets between different networks. Even if devices in different networks are on the same layer-2 broadcast domain, you need a router to let the devices communicate at layer-3. That is because each host will compare the destination layer-3 address and its own layer-...


11

Any network addresses you use in your own company that are in use or assigned to a different company on the public Internet will be inaccessible to your users trying to reach those addresses on the public Internet, and you will not be able to advertise to the public Internet any addresses assigned to a different company. There are three ranges of private ...


11

What is the point of reserving two IP addresses in a subnet when one might suffice? [...] If it's theoretically possible, why is it avoided? We live with our history. The distinction between address of the network and broadcast address was not so crisp as it is now. Some software treats the all-0s as a broadcast, some allows it to be a host, some neither. ...


11

What is IP squat space Space that someone uses to number their networks even though it is either allocated to someone else or may be allocated to someone else in the future. "squat space" is generally not routed on the public internet by the squatter. Doing so would be considered a hijack which is a much more serious matter. Instead it is generally used ...


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