- abandoning the classful approach (a mask can be shorter than the shortest mask allowed by the classful approach),
- enforces allocation of addresses as per necessity — the term "a network of class XX" replaced by the term "CIDR address block," for which only mask length matters,
- technology used with VLSM (variable length subnet masking),
- technology, according to which Internet Service Providers (ISP) allocate addresses.
- allows for shorter routing tables — row aggregation,
Problem:
- A company has a single IP network address (public).
- A company has several buildings, each with a LAN network.
- How to design the networks within the company?
- How to allocate addresses?
- How to separate networks?
Given a network IP address:
- the network part has of length s bits (mask is /s)
- the computer part is of length k bits (k = 32-s)
Division of a network into p (equal-sized) subnets, subnetwork address derivation:
- "borrow" from the computer part of the address as many bits, as are needed to count p networks: ⌈log₂(p)⌉
- use the "borrowed" bits to assign numbers to subnetworks
- extend the network mask by ⌈log₂(p)⌉
We get ⌈log₂(p)⌉ subnetworks, where each subnetwork has a (correct) IP address:
- each subnet has its own network and broadcast addresss
- each network can have 2^(k - ⌈log₂(p)⌉) - 2 computers in it
- each network mask is longer than the mask of the original network (s + ⌈log₂(p)⌉)
Vocabulary: subnetwork = subnet.
Divide 150.10.0.0/16 into 4 subnets.
- 00 -- first subnet
- 01 -- second subnet
- 10 -- third subnet
- 11 -- fourth subnet
10010110 10010110 00000000 00000000
150.150.0.0
network address
10010110 10010110 00000000 00000001
150.150.0.1
first computer address
10010110 10010110 00000000 00000010
150.150.0.2
second computer address
...
...
10010110 10010110 00111111 11111110
150.150.63.254
last computer address
10010110 10010110 00111111 11111111
150.150.63.255
broadcast address
- computer address range: 150.150.0.1-150.150.63.254
- no of computers in first subnet: 2^14 - 2
Subnet no.
Subnet address
Subnet mask
Subnet mask
Computer address range
Broadcast address
00
150.10.0.0
255.255.192.0
/18
150.10.0.1--150.10.63.254
150.10.63.255
01
150.10.64.0
255.255.192.0
/18
150.10.64.1--150.10.127.254
150.10.127.255
10
150.10.128.0
255.255.192.0
/18
150.10.128.1--150.10.191.254
150.10.191.255
11
150.10.192.0
255.255.192.0
/18
150.10.192.1--150.10.255.254
150.10.255.255
Problem:
- a company has several buildings containing differing numbers of computers
Variable Length Subnet Masking (VLSM):
- dividing a network into subnets that are described by different masks (with different address ranges)
- modus operandi:
- division into equal-sized network
- division of one of the subnets into smaller subnets
Divide the network 150.10.0.0/16 into:
- 3 subnets containing 15 000 computers each, and
- 4 additional subnets containing 4000 computers
Subnet no.
Subnet address
Subnet mask
Subnet mask
Computer address range
Broadcast address
00
150.10.0.0
255.255.192.0
/18
150.10.0.1--150.10.63.254
150.10.63.255
01
150.10.64.0
255.255.192.0
/18
150.10.64.1--150.10.127.254
150.10.127.255
10
150.10.128.0
255.255.192.0
/18
150.10.128.1--150.10.191.254
150.10.191.255
11
150.10.192.0
255.255.192.0
/18
150.10.192.1--150.10.255.254
150.10.255.255
Subnet no.
Subnet address
Subnet mask
Subnet mask
Computer address range
Broadcast address
00
150.10.64.0
255.255.240.0
/20
150.10.64.1--150.10.79.254
150.10.79.255
01
150.10.80.0
255.255.240.0
/20
150.10.80.1--150.10.95.254
150.10.95.255
10
150.10.96.0
255.255.240.0
/20
150.10.96.1--150.10.111.254
150.10.111.255
11
150.10.112.0
255.255.240.0
/20
150.10.112.1--150.10.127.254
150.10.127.255
- All subnets:
- 150.10.0.0/18
- 150.10.128.0/18
- 150.10.192.0/18
- 150.10.64.0/20
- 150.10.80.0/20
- 150.10.96.0/20
- 150.10.112.0/20
- Routers located outside the network only maintain one row in their routing table: the row contains only 150.10.0.0/16
- Routes to subnets have to be remembered within all routers within the network 150.10.0.0/16
Given a network 100.0.0.0/8 that contains routers R1 and R2 that find routes based on a dynamic routing protocol (eg. RIP)
Routing table at R2:
destination
mask
gateway
200.1.0.0
/24
R1
200.1.1.0
/24
R1
200.1.2.0
/24
R1
...
...
...
200.1.15.0
/24
R1
200.1.16.0
/24
R3
200.1.17.0
/24
R3
200.1.18.0
/24
R3
...
...
...
200.1.31.0
/24
R3
Example -- finding the supernet address for router R2:
200.1.0.0/24
11001000.00000001.0000-0000.00000000
200.1.1.0/24
11001000.00000001.0000-0001.00000000
200.1.2.0/24
11001000.00000001.0000-0010.00000000
200.1.3.0/24
11001000.00000001.0000-0011.00000000
200.1.15.0/24
11001000.00000001.0000-1111.00000000
200.1.0.0/24
11001000.00000001.0001-0000.00000000
200.1.1.0/24
11001000.00000001.0001-0001.00000000
200.1.2.0/24
11001000.00000001.0001-0010.00000000
200.1.3.0/24
11001000.00000001.0001-0011.00000000
200.1.15.0/24
11001000.00000001.0001-1111.00000000
New routing table for router R2:
destination
mask
gateway
200.1.0.0
/20
R1
200.1.16.0
/20
R3
Advantage: smaller routing table (faster lookup)
Often addresses cannot be aggregated to a single supernet address.
Example: finding a CIDR address for the following network addresses:
- 200.1.48.0/24
- 200.1.49.0/24
- ...
- 200.1.79.0/24
200.1.48.0/24
11001000.00000001.0-0110000.00000000
200.1.49.0/24
11001000.00000001.0-0110001.00000000
...
...
200.1.63.0/24
11001000.00000001.0-0111111.00000000
200.1.64.0/24
11001000.00000001.0-1000000.00000000
200.1.65.0/24
11001000.00000001.0-1000001.00000000
...
...
200.1.79.0/24
11001000.00000001.0-1001111.00000000
Aggregation to a single address 200.1.0.0/17 would include nonexistent network addresses, e.g.: 200.0.127.0/24. Instead, we aggregate into two supernets.
200.1.48.0/24
11001000.00000001.0011-0000.00000000
200.1.49.0/24
11001000.00000001.0011-0001.00000000
...
...
200.1.63.0/24
11001000.00000001.0011-1111.00000000
Supernet: 200.1.48.0/20
200.1.64.0/24
11001000.00000001.0100-0000.00000000
200.1.65.0/24
11001000.00000001.0100-0001.00000000
...
...
200.1.79.0/24
11001000.00000001.0100-1111.00000000
Supernet: 200.1.64.0/20
- 202.1.0.0/24, 202.1.1.0/24, ..., 202.1.63.0/24
- 202.1.24.0/24, 202.1.25.0/24, ..., 202.1.39.0/24
Service provider R1 (named the same as router R1 for verisimilitude) has a CIDR address of 200.200.50.0/23. A part of the addresses within R1's available space is kept for R1's private use: this part must be sized sufficiently to allocate addresses to 100 devices. The remainder of R1's address space is given away to subcontrators: R2 and R4. R2 uses a part of the address space it was given to allocate 50 devices, and subcontracts the remainder to service provider R3. R3 uses the remainder of the space to create two separate networks, each containing 30 devices. R4 uses the address space it was given to create two networks containig 120 and 70 devices respectively.
Propose an address scheme for all of the resulting subnets.
Space | Forward |
---|---|
Right, Down, Page Down | Next slide |
Left, Up, Page Up | Previous slide |
P | Open presenter console |
H | Toggle this help |