Dotted Decimal Notation

MCSA/MCSE 70-291: Reviewing TCP/IP Basics

Deborah Littlejohn Shinder , ... Laura Hunter , in MCSA/MCSE (Exam 70-291) Study Guide, 2003

Understanding IP Addressing

IP addresses are 32-bit addresses expressed in dotted decimal notation of four octets, w.x.y.z.

IP addresses contain the network address space followed by the host address space.

Originally, IP addresses were assigned four classes: A, B, C, and D. Class E is considered experimental and is not supported in Windows Server 2003.

The growth of networking required a new solution. CIDR was implemented as a classless addressing schema.

Dotted decimal notation can be converted to its binary equivalent by using weighted binary bits notated with 2 n where n is the number of bits.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B978193183692050007X

IPv4 and IPv6 Addressing

Walter Goralski , in The Illustrated Network, 2009

THE IPv4 ADDRESS

The IPv4 address is a network layer concept and has nothing to do with the addresses that the data link layer uses, often called the hardware address on LANs. IPv4 addresses must be mapped to LAN hardware addresses and WAN serial link addresses. However, there is no real relationship between LAN media access control (MAC) or WAN serial link addresses in the frame header and the IPv4 addresses used in the packet header, with the special exception of multicast addresses.

The original IPv4 addressing scheme established in RFC 791 is known as classful addressing. The 32 bits of the IPv4 address fall into one of several classes based on the value of the initial bits in the IPv4 address. The major classes used for addresses were A, B, and C. Class D was (and is) used for IPv4 multicast traffic, and Class E was "reserved" for experimental purposes. Each class differs in the number of IPv4 address bits assigned to the network and the host portion of the IP address. This scheme is shown in Figure 4.2.

FIGURE 4.2. Classful IPv4 addressing, showing the number of addresses possible and percentage of the total address space for each class. Class D is still the valid IPv4 address range used for multicasting.

Note that with Class A, B, and C, we are referring to the size of the blocks being allocated as well as the region from which they were allocated by IANA. However, Classes D and E refer to the whole respective region. Multicast addresses, when they were assigned for applications, for example, were assigned one at a time like (for instance) port numbers. (We'll talk about port numbers in a later chapter.) In the rest of this chapter, references to Classes A, B, and C are concerned with address space sizes and not locations.

The 4 billion (actually 4,294,967,296) possible IPv4 addresses are split up into five classes. The five classes are not equal in size, and Class A covers a full half of the whole IPv4 address space. Class E addresses are "experimental" and some of them have been used for that purpose, but they are seldom seen today.

In practice, only the Class D addresses are still used on the Internet in a classful manner. Class D addresses are the IPv4 multicast addresses (224.0.0.0 to 239.255.255.255), and we'll talk about those as needed. We will nonetheless talk about classful IPv4 addressing in this book, especially later on in this chapter when subnetting is considered and when mentioning the routing protocol RIPv1. However, the significance of classful IPv4 addressing is strictly historical. Classful addressing comes up occasionally, and at least some introduction is necessary.

This chapter, and this book, emphasizes classless IP addresses, the current way of interpreting the 32-bit IPv4 address space. This scheme assumes that no classes exist and is how routers on the Internet interpret IPv4 addresses. In classless addressing, the IPv4 network mask or prefix determines the boundary between the network and host portion of the IP address instead of the initial IP address bits. On a host, it is still often called a network mask, because hosts don't care about classful or classless, but it is called a prefix on a router.

Hosts really don't deal with the differences between classful and classless IP addresses. Routers, on the other hand, must. Because this book deals with networks as a whole, including routers, some understanding of both classful and classless IPv4 addressing is beneficial.

Dotted Decimal

IPv4 addresses are most often written in dotted decimal notation. In this format, each 8-bit byte in the 32-bit IPv4 address is converted from binary or hexadecimal to a decimal number between 0 (0000 0000 or 0x00) and 255 (1111 1111 or 0xFF). The numbers are then written as four decimal numbers with dots between them: W.X.Y.Z.

For example, 1010 1100 0001 0000 1100 1000 0000 0010 (0xAC 10 C8 02) becomes 172.16.200.2. And 1011 1111 1111 1111 0000 1110 0010 1100 (0xBF FF 0E 2C) becomes 191.255.14.44, and so on.

Hosts on the same network (essentially a LAN) must have the prefix (network portion) of their IP addresses (IPv4 or IPv6) be the same. This is how routers route packets between networks that form the Internet: by the network portion of the IP address. The whole IP address specifies the host on the network, and the network portion identifies the LAN. The boundary between network and host IP address bits is move-able for either classful or classless IP addresses. An IP address can be expressed in dotted decimal, binary, octal, or hexadecimal. While all are correct and mean the same thing, it's most common to use dotted decimal notation for IPv4 and hexadecimal (hex) for IPv6. (In fact, some RFCs, such as those for HTTP [covered in Chapter 22], require dotted decimal for IPv4 addresses.)

The basic concepts of classful IPv4 addressing are shown in Figure 4.3 for the three most common classes—A, B, and C. The figure shows the Internet name assigned to the IPv4 address, the default network mask and prefix length for each of the three common classes, and the IPv4 address in dotted decimal.

FIGURE 4.3. The classful IPv4 address for classes A, B, and C. Note how the boundary between network identifier and host identifier moves to the right, allowing more networks and fewer hosts in each class.

Note that when no network mask is given, the class of the address is determined by the value of the initial bits of the address, as already described. The network mask can move this boundary, but in practice only to the right in classful addressing.

Classless IPv4 addressing, on the other hand, as used on routers, does not derive a default subnet mask or prefix length. The prefix length for classless IPv4 addressing must be given (by the netmask) to properly place the boundary between NetID and HostID portions of the IPv4 address.

IP addresses, both IPv4 and IPv6, can be public or private. Public network address spaces are assigned by a central authority and should be unique. Private network addresses are very useful, but are not guaranteed to be unique. Therefore, the use of private network address spaces has to be carefully managed, because routers on the Internet would not work properly if a LAN showed up in two places at the same time. Nevertheless, the use of private address spaces in IP is popular for perceived security reasons. The security aspects are often overemphasized: The expansion of the locally available address space is the key reason for private address use. (If you have one IP address and three hosts, you have a problem without private addressing.) But private address spaces must be translated to public addresses whenever a packet makes it way onto the global public Internet.

Moreover, private IP addresses are not routable outside a local network, so a router is not allowed to advertise a route to a private address space onto the public Internet. Note that private addresses are just as routable as public ones within your own network (as on the Illustrated Network), or by mutual consent with another party. They are not generally routable on the global public Internet due to their lack of uniqueness and usual practices.

Almost all networks today rely on private network addresses to prevent public IPv4 address exhaustion, so these addresses are not just to test networks and labs any longer. Customer-edge routers often translate between a large pool of private (internal) and a smaller pool of public (external) addresses and insulate the local LAN from the outside world. We'll talk more about private IPv4 address in the next section of this chapter.

When obtaining a public IP address, a user or organization receives an address space that should be globally unique on the Internet. (Sadly, you often find yourself "blackholed" to nowhere for some ISP to route your packets because someone else used your address space internally for some private network without permission!) This first piece is the network portion (prefix) of an IP address space, such as 191.255.0.0. This example uses a so-called "Martian" IPv4 address, which is a valid IP address, but not used on the Internet. Technically, the address space beginning with 191.255 is reserved, but could be assigned in the future. The 0.0 ending means an IP network is referenced, and not a host (in this case, but hosts sometimes have IPv4 addresses that end with 0). Some TCP/IP protocol stacks struggle with IPv4 addresses ending in 0 or 255, so it is best to avoid them. The host portion of the IPv4 address is assigned locally, usually by the LAN network administrator. For example, a host could be assigned IPv4 address 191.255.14.44.

The examples in this chapter use the manual, static IP address assignment method. When this method is used with public IP addresses, the organization still either obtains the IP network address range on its own, or uses the range of IP addresses assigned to the organization by its ISP. The Dynamic Host Configuration Protocol (DHCP) makes it possible to assign IP addresses to devices in a dynamic fashion. DHCP is the method many organizations use either for security reasons (to make it harder to find device IP addresses) or to assign a unique IP address to a device only when it actually needs to access the Internet. There are many more uses for dynamic IP address allocations on the Internet, and much more to discuss, and DHCP will be explored in a later chapter.

When the topic is routers, IP addresses are often written in the <netid, hostid/prefix> form to determine the netid/hostid boundary. To completely identify a particular host on a particular network, the whole address is needed. When all 32 bits of the IPv4 address are given, and the prefix is not, this is called a host address on a router. In classless routing, there is no fixed separation point between the network and host portion of the IP address: It is completely determined by the prefix, which must be known. In dotted decimal notation, the full range of possible IP addresses can run from 0.0.0.0 to 255.255.255.255. Prefixes can run from /0 (a special, but useful, case) to /31. Until recently, the /31 prefix was often useless to routers, as we will see in a later chapter, and the /32 prefix is the same as the host address.

Private IPv4 Addresses

RFC 1918 established private address spaces for Classes A, B, and C to be used on private IP networks, and these are still respected in classless IP addressing. Books such as this one, where it is not desirable to use public IP addresses for examples, use RFC 1918 addresses throughout, much like using "555" telephone numbers in movies and on TV. The private IP address ranges follow:

Class A: 10.0.0.0 through 10.255.255.255 (10.0.0.0/8, or just 10/8)

Class B: 172.16.0.0 through 172.31.255.255 (172.16.0.0/12, or just 172.16/12)

Class C: 192.168.0.0 through 192.168.255.255 (192.168.0.0/16, or just 192.168/16)

There are three very important points that should always be kept in mind regarding private addresses. First, these addresses should never be announced by a routing protocol on a local router to the public Internet. However, these addresses are frequently assigned and used when they are isolated or translated. We'll look at network address translation (NAT) in a later chapter. In summary,

Private IP addresses are not routable outside the local network (they cannot be advertised to the public Internet).

They are widely used on almost all networks today (even our small home network with DSL uses private IP addresses).

Private addresses are usually translated with NAT at an edge router to map the private addresses used on a LAN to the public address space used by the ISP.

Understanding IPv4 Addresses

IP addresses and their prefixes are read in a certain way and have special meanings depending on how they are written and used. For example, the classful IPv4 address 192.168.19.48 is read as "host 48 on IP network 192.168.19.0." In a classless environment, as on a router, the prefix length, in this case /24, must be known. Routers often drop trailing zeros, 192.168.19.0/24 is the same as 192.168.19/24. All IP network addresses must have the bits in the host address field set to 0 and this address cannot be assigned to any host. (Typically, nothing on a host prevents this address assignment. It just won't work properly.) Note that while the table is describing a particular /24 address in the examples, it's not the address itself but its location in the field specified by the mask that is critical.

Table 4.1 lists some specific forms of IPv4 addresses, what they look like, and whether they can be used as a source or destination address or have some other special use.

Table 4.1. Special Forms of IPv4 Addresses, Showing How Some Are Limited in Application to Source or Destination

Special Address NetID HostID Example Use
Network itself Non-0 All zeros (0s) 192.168.14.0 Used by routers: on a host, means "some host," but it is not used.
Directed broadcast Non-0 All ones (1s) 192.168.14.255 Destination only: used by routers to send to all host on this network.
Limited broadcast All 1s All 1s 225.255.255.255 Destination only: direct broadcast when NetID is not known.
This host on this network All 0s All 0s 0.0.0.0 Source only: used when host does not know its IPv4 address.
Specific host on this network All 0s Non-0 0.0.0.46 Destination only: defined, but not used
Loopback 127 Any 127.0.0.0 Destination only: packet is not sent out onto network.

IPv4 addresses in example formats such as 0.0.0.46 and 192.168.14.0 are never actually seen as packet header addresses. Loopback addresses are used on hosts and routers for testing and aren't even numbered on the interface. All systems "know" that packets sent to the loopback addresses (any IPv4 address starting with 127) are not sent out the network interface.

When these forms are not used in their defined roles (e.g., when something like 172.16.255.255 is used as a packet source address instead of a destination), the result is usually an error.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780123745415500109

MCSA/MCSE 70-291: Variable Length Subnet Masking and Client Configuration

Deborah Littlejohn Shinder , ... Laura Hunter , in MCSA/MCSE (Exam 70-291) Study Guide, 2003

Review of Classful Subnet Masking

As you learned in Chapter 1 , IP addresses use dotted decimal notation to represent four binary octets (groups of eight bits each), which can be expressed as w.x.γ.z. Classful addressing works like this:

Class A networks use the first (w) octet for the network address or ID and the remaining octets for host IDs.

Class B networks use the first and second octets (w.x) to express the network address and the third and fourth octets for host addresses.

Class C networks use the first three octets (w.x.γ) to denote the network address and the last octet for host addresses.

To subnet a network, first you have to determine how many subnets you need for future use and how many hosts per subnet is optimal for your specific needs. Once you've determined this, you can devise a subnetting scheme that provides for a set number of fixed subnets with a set number of hosts. Let's look at one example, just as a refresher.

As you recall, the default subnet mask is the same for all undivided subnets in each class. The default Class A subnet mask is 255.0.0.0 and the default subnet mask for a Class C network is 255.255.255.0. Using a Class B network ID of 142.18.0.0, the default subnet mask is 255.255.0.0. If you want to divide this network into eight segments, you will need three bits from the host address space. First, determine how many subnets you need and determine how many bits you need to extend the network address space. You know that 23  =   8, so you can take the three highest order bits from the next octet (γ) to extend the network address space. This yields up to eight subnets because there are eight possible combinations of the three bits, as shown in Table 2.1.

Table 2.1. Binary Combinations Using Three Bits

Combination Binary Representation
1 000
2 001
3 010
4 011
5 100
6 101
7 110
8 111

This configuration can be represented as 142.18.0.0/19. Each subnet can have the same maximum number of hosts. This can be calculated by using the formula 2 n – 2, where n is the number of bits available for host addresses. In this case, you have an assigned Class B network ID, which, by definition uses 16 bits. You should have taken three bits from the host address space, leaving 13   bits (32 – 19   =   13) for host addresses. Thus, you have a maximum of (213– 2), or 8190 host addresses per subnet.

You must also define the eight subnet address ranges. To do this, use the bit combinations devised previously and convert those into dotted decimal format, as shown in Table 2.2. The three bits taken from the host address space are shown in bold.

Table 2.2. Dotted Decimal Values for Third Octet

Combinations for Third Octet Binary Representation Third Octet Dotted Decimal
1 00000000 0
2 00100000 32
3 01000000 64
4 01100000 96
5 10000000 128
6 10100000 160
7 11000000 192
8 11100000 224

You now have the starting address for each of eight subnets. Each subnet begins with the first address (derived from the third octet values in Table 2.2) and ends one address before the next beginning address. The beginning and ending address ranges are shown in Table 2.3. As you can see, the third octet value is the beginning address range and the ending address range is one less than the next beginning address.

Table 2.3. Subnet Address Ranges

Combinations for Third Octet Binary Representation Third Octet Dotted Decimal Beginning Address Ending Address
1 00000000 0 142.18.0.0 142.18.31.254
2 00100000 32 142.18.32.0 142.18.63.254
3 01000000 64 142.18.64.0 142.18.95.254
4 01100000 96 142.18.96.0 142.18.127.254
5 10000000 128 142.18.128.0 142.18.159.254
6 10100000 160 142.18.160.0 142.18.191.254
7 11000000 192 142.18.192.0 142.18.223.254
8 11100000 224 142.18.224.0 142.18.239.254

Based on this configuration, you can also determine the subnet mask needed to differentiate the network address from the host address on the subnets. Since you are using a total of 19 bits for your network ID, you must use a subnet mask that sets the left-most 19 bits to 1. This is represented as 11111111.11111111.11100000.00000000 and can be shown in dotted decimal format as 255.255.224.0.

Bitwise ANDing is used to compare a specific IP address with the subnet mask to find the network ID. Using the same example, you can randomly select an IP address from within the ranges specified in Table 2.3 and use bitwise ANDing to find the underlying network ID.

IP address 142.18.33.66 10001110.00010010.0010001.01000010
Subnet mask 255.255.224.0 11111111.11111111.1110000.00000000
Result 142.18.32.0 10001110.00010010.0010000.00000000

You can see by comparing the result to Table 2.3 that the IP address 142.18.33.66 falls within the range 142.18.32.0 to 142.18.63.254 and the network ID corresponds to the beginning address of that range.

Subnetting takes assigned network addresses and subdivides them for more efficient networking configurations. Each subnet is of equal size. In the previous example, you saw that taking three bits from the host address space resulted in eight subnets each, with up to 8190 host IP addresses per subnet. You could instead have subdivided it to yield up to 16 subnets with a possible 4,094 host addresses per subnet.

Exercise 2.01

Subnetting Review

In this exercise, we're going to walk through a subnetting scenario to reinforce what you've learned about classful subnetting. Using the network address 134.40.0.0 and the default subnet mask, you will create subnets that will allow for no more than 2,150 hosts per subnet. You'll determine the number of subnets, address ranges, the subnet mask, and the number of network bits used.

1.

134.40.0.0 is a Class B network using 16 network bits by default. This can support up to 65,534 hosts before subnetting. You know that 134.40.0.0 is a Class B subnet because the first octet falls between 128 and 191. As you recall, Class B networks must have the two left-most bits of the first (w) octet set to 10. This means that it must be higher than 128. In addition, you know that Class C networks have the first octet with the three left-most bits set to 110. This means that the Class B range ends at (128   +   64) – 1, or 191. Therefore, you know that you are working with a Class B network.

2.

Now that you've determined that you have a Class B network, you can determine the default subnet mask. For a Class B network, the default subnet mask is 255.255.0.0.

3.

The total number of hosts is determined by the default configuration. By definition, a Class B network uses 16 bits for the network address space, therefore it has 16 bits left for host addressing. Using our formula, you can calculate 2^ 16 (or 216), which equals 65,536. Host IDs of all 0   s or all 1   s are prohibited, so you have 65,534 possible addresses for use on this network.

4.

Next, you need to determine how to subnet this Class B network so that you end up with no more than 2,150 hosts per subnet. You can determine that in one of two ways. The longhand method starts with the right-most bit of the fourth octet (z) and proceeds to the left. Each bit position is double the previous one. Therefore, you can continue counting bits to the left until the value approaches 2,150. For instance, the values (beginning on the right and moving to the left) are 1, 2, 4, 8, 16, 32, 64, 128, 256, 1024, 2048, 4096, 8192, and so forth. If you count the number of bits, you will see that you need 11 host address bits. Using 12 bits would give you 4,096 addresses, exceeding the maximum stipulated. Remember, too, that 2,048 (2^ 11) results in 2,046 useable host IP addresses since host addresses cannot be all 0   s or all 1   s.

5.

A second method you can use to calculate this is by looking at the total number of host addresses (65,536) and using logic to help you estimate the number of bits you'll need. You already know that each bit you borrow from the host addresses reduces the number of hosts per subnet by half. If you start with 16 bits for host addresses and take 1 bit, the number of host addresses available goes down to 32,768. Take a second bit and it drops to 16,384. Take a third bit and the number of host addresses are reduced to 8,192. The fourth bit taken results in 4,096 addresses and the fifth bit taken yields 2,048 addresses. This meets the requirement of no more than 2,150 hosts per subnet. Thus, you have taken five bits away from the host space, resulting in (16 – 5)   =   11 host address bits.

6.

If you use 11 bits for the host address space, you know you have 21 bits (32 – 11) for the network address space. To determine how many networks you will have, each with a maximum of 2,048 host addresses, you need to calculate the value of the additional network bits. This is an important distinction. Remember, by default you're already using 16 bits (octets w and x) for the network ID. Although there are 21 bits available for network addresses, you are extending the network address space by five bits, which you've borrowed from the host address space. Thus, the calculation is 2^ 5 (or 25) rather than 2^ 21. Calculating 2^ 5 results in 32, so you can create 32 subnets that each have no more than 2,150 host addresses. This meets the requirements. To be more precise, however, you can create 32 total subnets each with a maximum of 2,046 host addresses available on each subnet.

7.

You can check your math by multiplying 32 (number of subnets) x 2,048 (remember that you have 2,048 addresses, of which 2,046 can be used), which equals 65,536. If you came out with more addresses than you started with, you would know that you'd made an error in your calculations or logic.

8.

The default subnet mask of 255.255.0.0 will no longer work, because you have extended the network address space. You'll recall that the subnet mask is used to identify which bits of the 32-bit IP address represent the network ID. You've extended the network address by five bits, so you need to create a new subnet mask that reflects this change. To do this, you can calculate the value of the bits or, if necessary, write it out in binary notation and then calculate the dotted decimal value. Let's look at both methods.

9.

Taking the left-most bits of the third octet (y) from the host address space results in the following bits being set to 1: 128, 64, 32, 16, 8. Adding those together equals 248. Thus, the third octet of the subnet mask is 248, resulting in a new subnet mask for your subnetted Class B network of 255.255.248.0.

10.

You can also figure this out by setting the appropriate bits and then converting to decimal. The original network bits are shown in bold and the extended bits (borrowed from the host address space) are underlined.11111111.11111111.11111000.00000000   =   255.255.248.0

11.

Now you have determined the correct number of subnets, maximum host addresses per subnet, and the new subnet mask. The last required task is to determine the address ranges for your new subnets. The network can be notated as 134.40.0.0/21 and the addresses will increment based on the lowest value of the borrowed bits. As you saw, the bit values are 128, 64, 32, 16, and 8. Therefore, each subnet will increment by eight. You can write this out in binary notation to help visualize the process. The right-most network bit is shown underlined. Begin by incrementing this bit from 0 to 1.

134.40.0.0 = 10000110.00100010.0000 0 ¯ 000.00000000 134.40.8.0 = 10000110.00100010.0000 1 ¯ 000.00000000 134.40.16.0 = 10000110.00100010.0001 0 ¯ 000.00000000 134.40.32.0 = 10000110.00100010.0001 1 ¯ 000.00000000 134.40.240.0 = 10000110.00100010.1111 0 ¯ 000.00000000 134.40.248.0 = 10000110.00100010.1111 1 ¯ 000.00000000

The use of three dots (ellipses, shown as …) indicates information that is omitted. It's clear that the sequence continues but each individual value is not delineated. This saves space and can be used when the pattern is clearly established.

Test Day Tip

When working on subnetting questions, always remember to start your address ranges with the default address. It's easy to get so involved with incrementing the ranges by 4, 8, 16, or whatever the bit value is that you forget to start with the base address.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9781931836920500081

Addressing and Subnetting Basics

In IP Addressing & Subnetting INC IPV6, 2000

Components of a Mask

The mask is a 32-bit binary number that is expressed in dotted decimal notation. By default, the mask contains two fields, the network field and the host field. These correspond to the network number and the locally administered part of the network address. When you subnet, you are adjusting the way you view the IP address. If you are working with a class B network and are using the standard mask, there is no subnetting. For example, in the address and mask in the following example the network is indicated by the first two 255 entries and the host field is indicated by the ending 0.0.

153.88.4.240 255.255.0.0

The network number is 153.88 and the host number is 4.240. In other words, the first 16 bits are the network number and the remaining 16 bits are the host number.

When we subnet a network, we increase the hierarchy from network and host to network, subnet and host. If we were to subnet the 153.88.0.0 network with a subnet mask of 255.255.255.0, we will be adding an additional piece of information. Our view changes in that we will be adding a subnet field. As with the previous example, 153.88 is still the network number. With a mask of 255.255.255.0, the third octet is used to tell us where the subnet number is located. The subnet number is .4 and, finally, the host number is 240.

The locally administered portion of the network address can be subdivided into subnetworks by using the mask to tell us the location of the subnet field. We allocate a certain number of bits to the subnet field and the remainder is then the new host field. In the following example, we took the 16-bit host field that comes with a class B address and broke it down into an 8-bit subnet field and an 8-bit host field.

255.255.255.0 for a class B network

Network Network Subnet Host
255 255 255 0
11111111 11111111 11111111 00000000

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9781928994015500048

Networking and Network Routing: An Introduction

Deep Medhi , Karthik Ramasamy , in Network Routing (Second Edition), 2018

1.4 IPv6 Addressing

m

Knowing IPv4 helps to understand IPv6 addressing. An IPv6 address is 128 bits long. Unlike the dotted decimal notation for IPv4, an IPv6 address is written in the hexadecimal form; see Section B.1 for a review of the hexadecimal notation. Each 16 binary bit group is separated by ":", where 16 bits are further divided into four 4-bit sub-groups in the hexadecimal form. For example,

2001:0DB8:0000:130F:0000:0000:087C:4321

is an IPv6 address. As you can see, there are 8 groups separated by ":". Thus, each of 2, 0, 0, and 1 in the first group ("2001") is in the hexadecimal form. When converted to binary, 2001 in the hexadecimal form becomes 0010 0000 0000 0001. There are two compact ways to write an IPv6 address. In the first one, a 16-bit block of all zeros is simply replaced by a zero, as in

2001:0DB8:0:130F:0:0:087C:4321

while in the second case, such multiple consecutive zeros are replaced using double-colon "::" format, as in

2001:0DB8:0:130F::087C:4321.

Note that the double colon appears just once in an address. IPv6 was never defined using classful addressing. Rather, IPv6 uses CIDR that was introduced for IPv4 in the 1990s. The representation is the same as in IPv4 that uses the slash-notation "/" such as

2001:0DB8:0012::/48

that can be compacted further by dropping leading zeros to obtain 2001:DB8:12::/48.

There are three types of addresses in IPv6: unicast, multicast, and anycast. There are, however, no longer broadcast addresses. Examples of reserve IPv6 address blocks are shown in Table 1.2. As of this routing, the global routing table has over 35,000 IPv6 entries; this is expected to grow fast.

Table 1.2. Examples of reserved IPv6 address blocks.

Address Block Current Use
::/96 Identifies compatibility with the previously used IPv4 protocol.
::/128 Unspecified address (used for addressing within a software)
::1/128 Holst loopback address
2001:DB8::/32 Documentation prefix for use in examples and illustrations
FEC0::/10 Site-local prefix
FC00::/7 Unique local address (ULA)
FF00::/8 IPv6 multicast addresses
FE80::/10 Link-local prefix

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128007372000028

Understanding Networks and Networked Video

Anthony C. Caputo , in Digital Video Surveillance and Security (Second Edition), 2014

IP Address Format

The 32-bit IP address is grouped in four 8-bit octets, separated by dots and represented in dotted-decimal notation. Each bit in the octet has a binary weight (128, 64, 32, 16, 8, 4, 2, 1) with a minimum value of zero and a maximum value for an octet of 255. Figure 4.9 illustrates the basic format of an IP address.

FIGURE 4.9. Anatomy of an IP address.

Also referred as a dot address, the IP address includes four octets of 8 bits presented as three or fewer decimal digits separated by periods. For example:

192.168.100.100

or, in 32-bit binary language:

11000000.10101000.1100100.1100100

The network identifier and host identifier within the IP address designate its place within that network. Both examples above are the same IP address: 192.168 is the network identifier and 100.100 is the host identifier. If you split the network into subnet groups, the network identifier stays the same, but the subnet is identified by the first 100 octet (or 1100100) and the last digits, or second 100, recognize the device. Both the subnet and the device numbers thus become the host identifiers.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780124200425000046

The Communication View

Richard John Anthony , in Systems Programming, 2016

3.6.3.2 IPv4 Addresses

IPv4 addresses are 32 bits long (4 bytes). An IPv4 address is written in the format of 4 decimal numbers each separated by a single dot, hence called dotted decimal notation. This is generically represented as d.d.d.d where each d represents a decimal number in the range 0-255. An example is 193.65.72.27.

IPv4 addresses are hierarchical in the sense that they contain a network component that is used by routing protocols to deliver packets to the appropriate subnet (as discussed above) and a host part that is used to deliver a packet to a specific computer within the subnet. IPv4 addresses are divided into classes A, B, and C based on the way the 32 bits are split across the network and host parts of the address. Class D is reserved for multicast addressing, used, for example, within some routing protocols so that the routers can communicate among themselves. The division into classes is illustrated in Figure 3.27.

Figure 3.27. IPv4 address classes.

Figure 3.27 shows the three main address classes used in IPv4 and the multicast address class D. The address class can be determined by inspecting the first few bits of the highest-order byte; the critical bits for this purpose are shown in the figure; for example, if the address begins with "10," then it is class B.

A subnet mask is a bit pattern that is used to separate the network part of an address from the host part. It is particularly important that routers can determine which part of an address is the network part; this is determined by the part of the subnet mask that is set to binary "1s" (where 255 decimal is the pattern "11111111" in binary). The default subnet masks for address classes A, B, and C are shown in the right-hand side of Figure 3.27.

Some computers have multiple network adapters (each with their own IP address) and can receive packets on any of them. The developers of distributed applications are usually not interested in which physical interface is used to receive a particular packet. However, in such cases where there are multiple adapters and thus the computer has multiple IP addresses, problems can arise if the socket address structure is set up to contain the specific IP address of one of the adapters. The special IP address INADDR_ANY can be used when binding a socket, indicating to the TCP or UDP that the socket can receive any of the IP addresses the computer has. Note that if a socket bound with INADDR_ANY is used for sending, the actual address used (the source address in the packet sent) will be the computer's default IP address, which is the lowest numbered of the addresses it has.

If a message is to be sent to a destination process, which is on the same computer (it is said to be "local"), the special loopback address 127.0.0.1 can be used. This causes the outgoing message to be turned around (looped back) by the network adapter and thus is not actually transmitted externally on the network. The most common usage of the loopback address is for testing and diagnostics.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128007297000030

Addressing and Routing Architecture

James D. McCabe , in Network Analysis, Architecture, and Design (3), 2007

6.9 Exercises

1.

Represent each address below in binary format. What is the class of each address?

a.

192.12.102.0

b.

10.20.30.100

c.

130.5.77.15

2.

For each of the following address/prefix length pairs, give its natural mask (in dotted-decimal notation), its subnet/supernet mask (also in dotted-decimal notation), and the range of networks or subnets permitted by the mask. Also describe any problems and limitations with the address/mask pairs, if any.

a.

129.99.0.0/16

b.

136.178.0.0/22

c.

198.9.9.0/28

d.

192.92.240.0/20

e.

192.92.243/20

3.

Subnet 136.178.0.0 into 16 subnets. Show the binary and dotted-decimal forms of each subnet, as well as the subnet mask.

Refer to Figure 6.29 for Exercises 4 through 7.

Figure 6.29. Diagram for Exercises 4 through 7

4.

Where are the functional areas for this network design?

5.

Where are the potential logical and physical boundaries for this network design?

6.

Given the network address 129.99.0.0/16, develop a variable-length addressing scheme that best fits the design, with the following numbers of users:

AS Number Location Department Users
1 Chicago Campus Building 1 Legal 120
Accounting 370
Chicago Campus Building 2 HQ 1580
Engineering 200
2 Toronto Sales 75
Boston Sales 110
3 Philadelphia Operations1 2150
Operations2 975
Sales 575
7.

You are using BGP-4 in the WAN between AS1, AS2, and AS3. Describe in plain text or as BGP-4 policy statements how you would:

a.

Permit AS3 to communicate with AS1 but not allow AS2 to communicate with AS1

b.

Allow both AS2 and AS3 Internet access through AS1 only between 6 p.m. and 6 a.m. EST each night

Refer to RFC 1771 for specifics on the BGP-4 specification.

8.

Consider the following. You are an ISP and have a group of addresses (CIDR blocks) to allocate to your customers. You have allocated addresses to a number of customers from a CIDR block of 198.9.128.0/18 (equivalent to the block of Class C addresses 198.9.128.0 through 198.9.191.0). Now one of your clients wants to stop using your ISP service and move to another ISP, while keeping the /24 that you had allocated to it (198.9.145.0/24). You are in a dilemma, as you cannot take back this address (the client's lawyers are better than yours!), yet advertising a CIDR block that contains that address seems to break the rules of CIDR routing.

a.

Show how routing based on the longest (most specific) match allows you to continue advertising this CIDR block.

b.

Show what happens to the ex-customer's traffic if there is a bug in the Internet and its route gets dropped.

9.

Many network designs are requiring redundant access to the Internet, with the backup connection either in a hot-standby mode or with load balancing between the two connections. Using BGP-4, outline a strategy for providing a backup Internet connection for the following cases:

a.

The backup Internet connection is in a hot-standby mode and can be made operational with a change in the routing configuration

b.

The backup Internet connection is fully operational, and there is load-balancing between the primary and backup connections

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780123704801500074

Transmission Control Protocol/Internet Protocol (TCP/IP)

Ray Hunt , in Encyclopedia of Information Systems, 2003

III.B Dotted Decimal Notation and Address Classes

The 32-bit number is represented for convenience as four decimal numbers corresponding to the decimal value of the four bytes that make up the 32-bit IP address. The decimal numbers are separated by periods (.). This shorthand notation for IP addresses is called dotted decimal notation. The following shows an IP address in its binary form and in dotted decimal notation:

IP Address = 10000100 10110101 00010011 00001100 IP Address = 132.181.19.12

Given an IP address in the dotted decimal notation form, it is important to determine the address class to which it belongs. This can be determined by the number of bits assigned to the hostid field which limits the number of hosts that can be on the network. A second reason for knowing the address class is to determine how to divide a network into smaller networks, called subnets appropriate for structural groups in an organization.

The most significant bits of an IP address determine the IP address class. From the table below it can be seen that if the most significant bit of the IP address is a 0 and it is therefore a Class A address. If the first two most significant bits of the IP address are 10, the IP address is a Class B address and if the first three most significant bits of the IP address are 110, then the IP address is a Class C address.

Consider an IP address of 137.65.4.1. If it is converted to its binary representation, the following 32-bit pattern is obtained:

1001001 01000001 00000100 00000001

The most significant two bits of this bit pattern are 10 thus 137.65.4.1 is a Class B address. This, however, is a slow way to determine the IP address class because it involves converting the IP address to a bit pattern. A simpler way works as follows.

Consider a Class B address—the two most significant bits are 10. The minimum value of the first 8 bits occurs when the remaining 6 bits are 0; the maximum value occurs when the remaining 6 bits are 1. The minimum value of the first 8 bits of a Class B address is therefore 10000000 and the maximum value is 10111111. These minimum and maximum values correspond to a decimal value of 128 and 191. This means that if the first decimal number of an IP address in the dotted decimal notation is a number between 128 and 191 (inclusive), the IP address is a Class B address. In the preceding example of an IP address of 137.65.4.1, the number 137 is between 128 and 191, and is therefore a Class B address.

Using the same reasoning, the minimum and maximum for the first decimal number of a Class A and Class C address in its dotted decimal notation form can be determined as follows:

Minimum value of first decimal for Class A = 00000000 = 0

Maximum value of first decimal for Class A = 01111111 = 127

Minimum value of first decimal for Class C = 11000000 = 192

Maximum value of first decimal for Class C = 11011111 = 223

The table below shows the range of values for the first decimal number of an IP address in the dotted decimal notation. This table can be used to determine the IP address class by checking the first decimal number of an IP address.

IP address class Most significant bits Minimum Maximum
Class A 0 0 126 (notice that 127 is missing)
Class B 110 28 191
Class C 110 192 223
Class D 1110 224 239

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B0122272404001878

IPv4 and IPv6 Addressing

Walter Goralski , in The Illustrated Network (Second Edition), 2017

IPv6 Address Types and Notation

There are no broadcast addresses at all in IPv6, even directed broadcasts (these were favorites of IPv4 hackers). In IPv6, multicast addresses serve the same purpose as broadcasts do in IPv4. The difference between IPv6 anycast and multicast is that packets sent to an anycast IPv6 address are delivered to one of several interfaces, while packets sent to a multicast IPv6 address are delivered to all of many interfaces.

There is no such thing as dotted decimal notation for IPv6. All IPv6 addresses are expressed in hexadecimal. They could be expressed in binary as well, but 128 0  s and 1   s are tedious to write down. IPv6 addresses are written in 8 groups of 16 bits each, or 8 groups of 4 hexadecimal numbers, separated by colons. Some examples of IPv6 addresses follow (you may see the hex "letters" in upper-case or lower-case):

FEDC:BA98:7654:3210:FEDC:BA98:7654:3210

1080:0000:0000:0000:0008:0800:200   C:417   A

Because this is still a lot to write or type, there are several ways to abbreviate IPv6 addresses. For example, any group can leave out leading 0   s, and all-0 groups can be expressed as just a single 0. A long string of leading 0   s can simply be replaced by a double colon (::). In fact, as long as there is no ambiguity, groups of 0   s anywhere in the IPv6 address can be expressed as ::. The double colon can only be used once in an IPv6 address.

Even with these conventions, the first IPv6 address given earlier cannot be compressed at all. The second address can be expressed as

1080::8:800:200   C:417   A

This is better than writing out all 128 bits, even as hexadecimal. Because only one set of double colons can ever be used inside an IPv6 address,

1080:0000:0000:9865:0000:0000:0000:4321

could be written as

1080:0:0:9865::4321

or

1080::9865:0:0:0:4321

but never as

1080::9865::4321

(How big are the missing groups of 0   s to the left or right of 9865?)

A special case in IPv6 is made for using IPv4 addresses as IPv6 addresses. For example, the IPv4 address 10.0.0.1 could be written in IPv6 as

0:0:0:0:0:0:A00:1

or even

::A00:1

IPv4 addresses in IPv6 can still be written in dotted decimal as

::10.0.0.1

The double colon at the start is the sign that this is an IPv6 address even though it looks just like an IPv4 address. Many routers and other devices allow this convention.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128110270000059