cc/td/doc/cisintwk
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Subnetting an IP Address Space

Subnetting an IP Address Space

This appendix provides a partial listing of a Class B area intended to be divided into approximately 500 Open Shortest Path First (OSPF) areas. For the purposes of this example, the network is assumed to be a Class B network with the address 150.100.0.0.


Note Although a 500-area OSPF internetwork is unrealistic, using an address space like this can help to illustrate the general methodology employed to subnet an OSPF address space.

Only the address space for two of 512 areas is shown in Table A-1. These areas are defined with the base address 150.100.2.0. Illustrating the entire address space for 150.100.0.0 would require hundreds of additional pages of addressing information. Each area would require the equivalent number of entries for each of the example areas illustrated here.

Table A-1 illustrates the assignment of 255 IP addresses that have been split between two OSPF areas. Table A-1 also illustrates the boundaries of the subnets and of the two OSPF areas shown (area 8 and area 17).

For the purposes of this discussion, consider a network that requires point-to-point serial links in each area to be assigned a subnet mask that allows two hosts per subnet. All other subnets are to be allowed 14 hosts per subnet. The use of bit-wise subnetting and variable-length subnet masks (VLSMs) permit you to customize your address space by facilitating the division of address spaces into smaller groupings than is allowed when subnetting along octet boundaries. The address layout shown in Table A-1 illustrates a structured approach to assigning addresses that uses VLSM. Table A-1 presents two subnet masks: 255.255.255.240 and of 255.255.255.252. The first mask creates subnet address spaces that are four bits wide; the second mask creates subnet address spaces that are two bits wide.

Because of the careful assignment of addresses, each area can be summarized with a single area router configuration command (used to define address range). The first set of addresses starting with 150.100.2.0xxxxxxx (last octet represented here in binary) can be summarized into the backbone with the following command:

area 8 range 150.100.2.0 255.255.255.128

This command assigns all addresses from 150.100.2.0 to 150.100.2.127 to area 8. Similarly, the addresses from 150.100.2.128 to 150.100.2.255 for the second area can be summarized as follows:

area 17 range 150.100.2.128 255.255.255.128

This command assigns all addresses from 150.100.2.128 to 150.100.2.255 to area 17.

Allocation of subnets allows you to decide where to draw the line between the subnet and host (using a subnet mask) within each area. Note that in this example there are only seven bits remaining to use because of the creation of the artificial area mask. The nine bits to the left of the area mask are actually part of the subnet portion of the address. By keeping these nine bits the same for all addresses in a given area, route summarization is easily achieved at area border routers, as illustrated by the scheme used in Table A-1.

Table A-1 lists individual subnets, valid IP addresses, subnet identifiers, and broadcast addresses. This method of assigning addresses for the VLSM portion of the address space guarantees that there is no address overlap. If the requirement had been different, any number of the larger subnets might be chosen and divided into smaller ranges with fewer hosts, or combined into several ranges to create subnets with more hosts.

The design approach used in this appendix allows the area mask boundary and subnet masks to be assigned to any point in the address space, which provides significant design flexibility. A change in the specification of the area mask boundary or subnet masks may be required if a network outgrows its initial address space design. In Table A-1, the area mask boundary is to the right of the most significant bit of the last octet of the address, as shown by Figure A-1.


Figure A-1: Breakdown of the addresses assigned by the example.


With a subnet mask of 255.255.255.240, the a and b bits together represent the subnet portion of the address, whereas the c and d bits together provide four-bit host identifiers. When a subnet mask of 255.255.255.252 (a typical subnet mask for point-to-point serial lines), the a, b, and c bits together represent the subnet portion of the address, and the d bits provide two-bit host identifiers. As mentioned earlier, the purpose of the area mask is to keep all of the a bits constant in a given OSPF area (independent of the subnet mask) so that route summarization is easy to apply.

The following steps outline the process used to allocate addresses:


Step 1   Determine the number of areas required for your OSPF network. A value of 500 is used for this example.

Step 2   Create an artificial area mask boundary in your address space. This example uses nine bits of subnet addressing space to identify the areas uniquely. Because 29= 512, nine bits of subnet meet our requirement of 500 areas.

Step 3   Determine the number of subnets required in each area and the maximum number of hosts required per subnet. This allows you to determine the placement of the subnet mask(s). In Table A-1, the requirement is for seven subnets with 14 hosts each and four subnets with two hosts each.


Table A-1:
Partial Example of Subnet Address Assignment Using VLSM


IP Address (Decimal)
Subnet Portion of Last Octet (Binary) Host Portion of Last Octet (Binary)

Subnet Number



Subnet Mask



Notes

150.100.2.0

0000

0000

150.100.2.0

255.255.255.240

Subnet identifier; area boundary; area 8 starts

150.100.2.1

0000

0001

150.100.2.0

255.255.255.240

150.100.2.2

0000

0010

150.100.2.0

255.255.255.240

150.100.2.3

0000

0011

150.100.2.0

255.255.255.240

150.100.2.4

0000

0100

150.100.2.0

255.255.255.240

150.100.2.5

0000

0101

150.100.2.0

255.255.255.240

150.100.2.6

0000

0110

150.100.2.0

255.255.255.240

150.100.2.7

0000

0111

150.100.2.0

255.255.255.240

150.100.2.8

0000

1000

150.100.2.0

255.255.255.240

150.100.2.9

0000

1001

150.100.2.0

255.255.255.240

150.100.2.10

0000

1010

150.100.2.0

255.255.255.240

150.100.2.11

0000

1011

150.100.2.0

255.255.255.240

150.100.2.12

0000

1100

150.100.2.0

255.255.255.240

150.100.2.13

0000

1101

150.100.2.0

255.255.255.240

150.100.2.14

0000

1110

150.100.2.0

255.255.255.240

150.100.2.15

0000

1111

150.100.2.0

255.255.255.240

Subnet broadcast

150.100.2.16

0001

0000

150.100.2.16

255.255.255.240

Subnet identifier

150.100.2.17

0001

0001

150.100.2.16

255.255.255.240

150.100.2.18

0001

0010

150.100.2.16

255.255.255.240

150.100.2.19

0001

0011

150.100.2.16

255.255.255.240

150.100.2.20

0001

0100

150.100.2.16

255.255.255.240

150.100.2.21

0001

0101

150.100.2.16

255.255.255.240

150.100.2.22

0001

0110

150.100.2.16

255.255.255.240

150.100.2.23

0001

0111

150.100.2.16

255.255.255.240

150.100.2.24

0001

1000

150.100.2.16

255.255.255.240

150.100.2.25

0001

1001

150.100.2.16

255.255.255.240

150.100.2.26

0001

1010

150.100.2.16

255.255.255.240

150.100.2.27

0001

1011

150.100.2.16

255.255.255.240

150.100.2.28

0001

1100

150.100.2.16

255.255.255.240

150.100.2.29

0001

1101

150.100.2.16

255.255.255.240

150.100.2.30

0001

1110

150.100.2.16

255.255.255.240

150.100.2.31

0001

1111

150.100.2.16

255.255.255.240

Subnet broadcast

150.100.2.32

0010

0000

150.100.2.32

255.255.255.240

Subnet identifier

150.100.2.33

0010

0001

150.100.2.32

255.255.255.240

150.100.2.34

0010

0010

150.100.2.32

255.255.255.240

150.100.2.35

0010

0011

150.100.2.32

255.255.255.240

150.100.2.36

0010

0100

150.100.2.32

255.255.255.240

150.100.2.37

0010

0101

150.100.2.32

255.255.255.240

150.100.2.38

0010

0110

150.100.2.32

255.255.255.240

150.100.2.39

0010

0111

150.100.2.32

255.255.255.240

150.100.2.40

0010

1000

150.100.2.32

255.255.255.240

150.100.2.41

0010

1001

150.100.2.32

255.255.255.240

150.100.2.42

0010

1010

150.100.2.32

255.255.255.240

150.100.2.43

0010

1011

150.100.2.32

255.255.255.240

150.100.2.44

0010

1100

150.100.2.32

255.255.255.240

150.100.2.45

0010

1101

150.100.2.32

255.255.255.240

150.100.2.46

0010

1110

150.100.2.32

255.255.255.240

150.100.2.47

0010

1111

150.100.2.32

255.255.255.240

Subnet broadcast

150.100.2.48

0011

0000

150.100.2.48

255.255.255.240

Subnet identifier

150.100.2.49

0011

0001

150.100.2.48

255.255.255.240

150.100.2.50

0011

0010

150.100.2.48

255.255.255.240

150.100.2.51

0011

0011

150.100.2.48

255.255.255.240

150.100.2.52

0011

0100

150.100.2.48

255.255.255.240

150.100.2.53

0011

0101

150.100.2.48

255.255.255.240

150.100.2.54

0011

0110

150.100.2.48

255.255.255.240

150.100.2.55

0011

0111

150.100.2.48

255.255.255.240

150.100.2.56

0011

1000

150.100.2.48

255.255.255.240

150.100.2.57

0011

1001

150.100.2.48

255.255.255.240

150.100.2.58

0011

1010

150.100.2.48

255.255.255.240

150.100.2.59

0011

1011

150.100.2.48

255.255.255.240

150.100.2.60

0011

1100

150.100.2.48

255.255.255.240

150.100.2.61

0011

1101

150.100.2.48

255.255.255.240

150.100.2.62

0011

1110

150.100.2.48

255.255.255.240

150.100.2.63

0011

1111

150.100.2.48

255.255.255.240

Subnet broadcast

150.100.2.64

010000

00

150.100.2.64

255.255.255.252

Subnet identifier

150.100.2.65

010000

01

150.100.2.64

255.255.255.252

150.100.2.66

010000

10

150.100.2.64

255.255.255.252

150.100.2.67

010000

11

150.100.2.64

255.255.255.252

Subnet broadcast

150.100.2.68

010001

00

150.100.2.68

255.255.255.252

Subnet identifier

150.100.2.69

010001

01

150.100.2.68

255.255.255.252

150.100.2.70

010001

10

150.100.2.68

255.255.255.252

150.100.2.71

010001

11

150.100.2.68

255.255.255.252

Subnet broadcast

150.100.2.72

010010

00

150.100.2.72

255.255.255.252

Subnet identifier

150.100.2.73

010010

01

150.100.2.72

255.255.255.252

150.100.2.74

010010

10

150.100.2.72

255.255.255.252

150.100.2.75

010010

11

150.100.2.72

255.255.255.252

Subnet broadcast

150.100.2.76

010011

00

150.100.2.76

255.255.255.252

Subnet identifier

150.100.2.77

010011

01

150.100.2.76

255.255.255.252

150.100.2.78

010011

10

150.100.2.76

255.255.255.252

150.100.2.79

010011

11

150.100.2.76

255.255.255.252

Subnet broadcast

150.100.2.80

0101

0000

150.100.2.80

255.255.255.240

Subnet identifier

150.100.2.81

0101

0001

150.100.2.80

255.255.255.240

150.100.2.82

0101

0010

150.100.2.80

255.255.255.240

150.100.2.83

0101

0011

150.100.2.80

255.255.255.240

150.100.2.84

0101

0100

150.100.2.80

255.255.255.240

150.100.2.85

0101

0101

150.100.2.80

255.255.255.240

150.100.2.86

0101

0110

150.100.2.80

255.255.255.240

150.100.2.87

0101

0111

150.100.2.80

255.255.255.240

150.100.2.88

0101

1000

150.100.2.80

255.255.255.240

150.100.2.89

0101

1001

150.100.2.80

255.255.255.240

150.100.2.90

0101

1010

150.100.2.80

255.255.255.240

150.100.2.91

0101

1011

150.100.2.80

255.255.255.240

150.100.2.92

0101

1100

150.100.2.80

255.255.255.240

150.100.2.93

0101

1101

150.100.2.80

255.255.255.240

150.100.2.94

0101

1110

150.100.2.80

255.255.255.240

150.100.2.95

0101

1111

150.100.2.80

255.255.255.240

Subnet broadcast

150.100.2.96

0110

0000

150.100.2.96

255.255.255.240

Subnet identifier

150.100.2.97

0110

0001

150.100.2.96

255.255.255.240

150.100.2.98

0110

0010

150.100.2.96

255.255.255.240

150.100.2.99

0110

0011

150.100.2.96

255.255.255.240

150.100.2.100

0110

0100

150.100.2.96

255.255.255.240

150.100.2.101

0110

0101

150.100.2.96

255.255.255.240

150.100.2.102

0110

0110

150.100.2.96

255.255.255.240

150.100.2.103

0110

0111

150.100.2.96

255.255.255.240

150.100.2.104

0110

1000

150.100.2.96

255.255.255.240

150.100.2.105

0110

1001

150.100.2.96

255.255.255.240

150.100.2.106

0110

1010

150.100.2.96

255.255.255.240

150.100.2.107

0110

1011

150.100.2.96

255.255.255.240

150.100.2.108

0110

1100

150.100.2.96

255.255.255.240

150.100.2.109

0110

1101

150.100.2.96

255.255.255.240

150.100.2.110

0110

1110

150.100.2.96

255.255.255.240

150.100.2.111

0110

1111

150.100.2.96

255.255.255.240

Subnet broadcast

150.100.2.112

0111

0000

150.100.2.112

255.255.255.240

Subnet identifier

150.100.2.113

0111

0001

150.100.2.112

255.255.255.240

150.100.2.114

0111

0010

150.100.2.112

255.255.255.240

150.100.2.115

0111

0011

150.100.2.112

255.255.255.240

150.100.2.116

0111

0100

150.100.2.112

255.255.255.240

150.100.2.117

0111

0101

150.100.2.112

255.255.255.240

150.100.2.118

0111

0110

150.100.2.112

255.255.255.240

150.100.2.119

0111

0111

150.100.2.112

255.255.255.240

150.100.2.120

0111

1000

150.100.2.112

255.255.255.240

150.100.2.121

0111

1001

150.100.2.112

255.255.255.240

150.100.2.122

0111

1010

150.100.2.112

255.255.255.240

150.100.2.123

0111

1011

150.100.2.112

255.255.255.240

150.100.2.124

0111

1100

150.100.2.112

255.255.255.240

150.100.2.125

0111

1101

150.100.2.112

255.255.255.240

150.100.2.126

0111

1110

150.100.2.112

255.255.255.240

150.100.2.127

0111

1111

150.100.2.112

255.255.255.240

Subnet broad-
cast; area bound-
ary; area 8 ends

150.100.2.128

1000

0000

150.100.2.128

255.255.255.240

Subnet identifier; area boundary; area 17 starts

150.100.2.129

1000

0001

150.100.2.128

255.255.255.240

150.100.2.130

1000

0010

150.100.2.128

255.255.255.240

150.100.2.131

1000

0011

150.100.2.128

255.255.255.240

150.100.2.132

1000

0100

150.100.2.128

255.255.255.240

150.100.2.133

1000

0101

150.100.2.128

255.255.255.240

150.100.2.134

1000

0110

150.100.2.128

255.255.255.240

150.100.2.135

1000

0111

150.100.2.128

255.255.255.240

150.100.2.136

1000

1000

150.100.2.128

255.255.255.240

150.100.2.137

1000

1001

150.100.2.128

255.255.255.240

150.100.2.138

1000

1010

150.100.2.128

255.255.255.240

150.100.2.139

1000

1011

150.100.2.128

255.255.255.240

150.100.2.140

1000

1100

150.100.2.128

255.255.255.240

150.100.2.141

1000

1101

150.100.2.128

255.255.255.240

150.100.2.142

1000

1110

150.100.2.128

255.255.255.240

150.100.2.143

1000

1111

150.100.2.128

255.255.255.240

Subnet broadcast

150.100.2.144

1001

0000

150.100.2.144

255.255.255.240

Subnet identifier

150.100.2.145

1001

0001

150.100.2.144

255.255.255.240

150.100.2.146

1001

0010

150.100.2.144

255.255.255.240

150.100.2.147

1001

0011

150.100.2.144

255.255.255.240

150.100.2.148

1001

0100

150.100.2.144

255.255.255.240

150.100.2.149

1001

0101

150.100.2.144

255.255.255.240

150.100.2.150

1001

0110

150.100.2.144

255.255.255.240

150.100.2.151

1001

0111

150.100.2.144

255.255.255.240

150.100.2.152

1001

1000

150.100.2.144

255.255.255.240

150.100.2.153

1001

1001

150.100.2.144

255.255.255.240

150.100.2.154

1001

1010

150.100.2.144

255.255.255.240

150.100.2.155

1001

1011

150.100.2.144

255.255.255.240

150.100.2.156

1001

1100

150.100.2.144

255.255.255.240

150.100.2.157

1001

1101

150.100.2.144

255.255.255.240

150.100.2.158

1001

1110

150.100.2.144

255.255.255.240

150.100.2.159

1001

1111

150.100.2.144

255.255.255.240

Subnet broadcast

150.100.2.160

1010

0000

150.100.2.160

255.255.255.240

Subnet identifier

150.100.2.161

1010

0001

150.100.2.160

255.255.255.240

150.100.2.162

1010

0010

150.100.2.160

255.255.255.240

150.100.2.163

1010

0011

150.100.2.160

255.255.255.240

150.100.2.164

1010

0100

150.100.2.160

255.255.255.240

150.100.2.165

1010

0101

150.100.2.160

255.255.255.240

150.100.2.166

1010

0110

150.100.2.160

255.255.255.240

150.100.2.167

1010

0111

150.100.2.160

255.255.255.240

150.100.2.168

1010

1000

150.100.2.160

255.255.255.240

150.100.2.169

1010

1001

150.100.2.160

255.255.255.240

150.100.2.170

1010

1010

150.100.2.160

255.255.255.240

150.100.2.171

1010

1011

150.100.2.160

255.255.255.240

150.100.2.172

1010

1100

150.100.2.160

255.255.255.240

150.100.2.173

1010

1101

150.100.2.160

255.255.255.240

150.100.2.174

1010

1110

150.100.2.160

255.255.255.240

150.100.2.175

1010

1111

150.100.2.160

255.255.255.240

Subnet broadcast

150.100.2.176

101100

00

150.100.2.176

255.255.255.252

Subnet identifier

150.100.2.177

101100

01

150.100.2.176

255.255.255.252

150.100.2.178

101100

10

150.100.2.176

255.255.255.252

150.100.2.179

101100

11

150.100.2.176

255.255.255.252

Subnet broadcast

150.100.2.180

101101

00

150.100.2.180

255.255.255.252

Subnet identifier

150.100.2.181

101101

01

150.100.2.180

255.255.255.252

150.100.2.182

101101

10

150.100.2.180

255.255.255.252

150.100.2.183

101101

11

150.100.2.180

255.255.255.252

Subnet broadcast

150.100.2.184

101110

00

150.100.2.184

255.255.255.252

Subnet identifier

150.100.2.185

101110

01

150.100.2.184

255.255.255.252

150.100.2.186

101110

10

150.100.2.184

255.255.255.252

150.100.2.187

101110

11

150.100.2.184

255.255.255.252

Subnet broadcast

150.100.2.188

101111

00

150.100.2.188

255.255.255.252

Subnet identifier

150.100.2.189

101111

01

150.100.2.188

255.255.255.252

150.100.2.190

101111

10

150.100.2.188

255.255.255.252

150.100.2.191

101111

11

150.100.2.188

255.255.255.252

Subnet broadcast

150.100.2.192

1100

0000

150.100.2.192

255.255.255.240

Subnet identifier

150.100.2.193

1100

0001

150.100.2.192

255.255.255.240

150.100.2.194

1100

0010

150.100.2.192

255.255.255.240

150.100.2.195

1100

0011

150.100.2.192

255.255.255.240

150.100.2.196

1100

0100

150.100.2.192

255.255.255.240

150.100.2.197

1100

0101

150.100.2.192

255.255.255.240

150.100.2.198

1100

0110

150.100.2.192

255.255.255.240

150.100.2.199

1100

0111

150.100.2.192

255.255.255.240

150.100.2.200

1100

1000

150.100.2.192

255.255.255.240

150.100.2.201

1100

1001

150.100.2.192

255.255.255.240

150.100.2.202

1100

1010

150.100.2.192

255.255.255.240

150.100.2.203

1100

1011

150.100.2.192

255.255.255.240

150.100.2.204

1100

1100

150.100.2.192

255.255.255.240

150.100.2.205

1100

1101

150.100.2.192

255.255.255.240

150.100.2.206

1100

1110

150.100.2.192

255.255.255.240

150.100.2.207

1100

1111

150.100.2.192

255.255.255.240

Subnet broadcast

150.100.2.208

1101

0000

150.100.2.208

255.255.255.240

Subnet identifier

150.100.2.209

1101

0001

150.100.2.208

255.255.255.240

150.100.2.210

1101

0010

150.100.2.208

255.255.255.240

150.100.2.211

1101

0011

150.100.2.208

255.255.255.240

150.100.2.212

1101

0100

150.100.2.208

255.255.255.240

150.100.2.213

1101

0101

150.100.2.208

255.255.255.240

150.100.2.214

1101

0110

150.100.2.208

255.255.255.240

150.100.2.215

1101

0111

150.100.2.208

255.255.255.240

150.100.2.216

1101

1000

150.100.2.208

255.255.255.240

150.100.2.217

1101

1001

150.100.2.208

255.255.255.240

150.100.2.218

1101

1010

150.100.2.208

255.255.255.240

150.100.2.219

1101

1011

150.100.2.208

255.255.255.240

150.100.2.220

1101

1100

150.100.2.208

255.255.255.240

150.100.2.221

1101

1101

150.100.2.208

255.255.255.240

150.100.2.222

1101

1110

150.100.2.208

255.255.255.240

150.100.2.223

1101

1111

150.100.2.208

255.255.255.240

Subnet broadcast

150.100.2.224

1110

0000

150.100.2.224

255.255.255.240

Subnet identifier

150.100.2.225

1110

0001

150.100.2.224

255.255.255.240

150.100.2.226

1110

0010

150.100.2.224

255.255.255.240

150.100.2.227

1110

0011

150.100.2.224

255.255.255.240

150.100.2.228

1110

0100

150.100.2.224

255.255.255.240

150.100.2.229

1110

0101

150.100.2.224

255.255.255.240

150.100.2.230

1110

0110

150.100.2.224

255.255.255.240

150.100.2.231

1110

0111

150.100.2.224

255.255.255.240

150.100.2.232

1110

1000

150.100.2.224

255.255.255.240

150.100.2.233

1110

1001

150.100.2.224

255.255.255.240

150.100.2.234

1110

1010

150.100.2.224

255.255.255.240

150.100.2.235

1110

1011

150.100.2.224

255.255.255.240

150.100.2.236

1110

1100

150.100.2.224

255.255.255.240

150.100.2.237

1110

1101

150.100.2.224

255.255.255.240

150.100.2.238

1110

1110

150.100.2.224

255.255.255.240

150.100.2.239

1110

1111

150.100.2.224

255.255.255.240

Subnet broadcast

150.100.2.240

1111

0000

150.100.2.240

255.255.255.240

Subnet identifier

150.100.2.241

1111

0001

150.100.2.240

255.255.255.240

150.100.2.242

1111

0010

150.100.2.240

255.255.255.240

150.100.2.243

1111

0011

150.100.2.240

255.255.255.240

150.100.2.244

1111

0100

150.100.2.240

255.255.255.240

150.100.2.245

1111

0101

150.100.2.240

255.255.255.240

150.100.2.246

1111

0110

150.100.2.240

255.255.255.240

150.100.2.247

1111

0111

150.100.2.240

255.255.255.240

150.100.2.248

1111

1000

150.100.2.240

255.255.255.240

150.100.2.249

1111

1001

150.100.2.240

255.255.255.240

150.100.2.250

1111

1010

150.100.2.240

255.255.255.240

150.100.2.251

1111

1011

150.100.2.240

255.255.255.240

150.100.2.252

1111

1100

150.100.2.240

255.255.255.240

150.100.2.253

1111

1101

150.100.2.240

255.255.255.240

150.100.2.254

1111

1110

150.100.2.240

255.255.255.240

150.100.2.255

1111

1111

150.100.2.240

255.255.255.240

Subnet broadcast; area boundary; area 17 ends


hometocprevnextglossaryfeedbacksearchhelp
Posted: Wed Apr 10 10:49:58 PDT 2002
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.