Previous Page | Next Page

  1. Agustin's Linux Manual
  2. Networks & Servers
  3. About the Author
  4. Table of Contents
  5. IP Addresses Networks and Subnets
  6. Network Classes
  7. IP Address in Decimal Notation
  8. Sub-netting
  9. Designing Subnets
  10. Allocating Subnets
  11. Defining Host Addresses
  12. Variable Length Subnet Mask
  13. Routing Protocols
  14. Classless Internet Domain Routing
  15. Servers - Chapter 9
  16. Apache Web Server
  17. Configuring Apache
  18. Uploading Web Pages
  19. Apache Overview
  20. MIMEMagic
  21. DNS Servers
  22. Welcome to Webmin
  23. Creating the Master Domain
  24. Adding the Reverse Zone
  25. Querying the DNS server
  26. Adding Virtual Domain to DNS Server
  27. Reverse Zone for Virtual Zone
  28. Binding IP Address for Virtual Domain
  29. Virtual Web Hosting
  30. DNS Security Options
  31. FTP Server
  32. Securing the FTP Server
  33. Email Server
  34. Postfix Configuration
  35. Dealing with Identical Users
  36. Configuring Email Clients
  37. Configuring Outlook
  38. Samba Server
  39. Configuring SAMBA Server
  40. The smb.conf File
  41. smb.conf Analysis
  42. Adding Users to Samba

Defining Host Addresses for each subnet

In practice the host field cannot contain 0s or 1s. The 0s hosts will represent the base network and the 1's hosts will represent the broadcast in the network. So let's go back to our formula, remember we have 5 bits left for our hosts; therefore 25-2 = 30. Note two hosts are subtracted because one host will be the base of the network and the other one will be the broadcast.

Refer to Table 8.5, and pick the subnet #3 to see how the individual and valid host would be in the network. Observe that the 5-bits that were left for the host will be now modified.

Subnet #3
11000000101010000000000101100000=192.168.1.96/27

Hosts
#111000000101010000000000101100001=192.168.1.97 /27
#211000000101010000000000101100010=192.168.1.98/27
#311000000101010000000000101100011=192.168.1.99 /27
#411000000101010000000000101100100=192.168.1.100/27
#511000000101010000000000101100101=192.168.1.101/27
#611000000101010000000000101100110=192.168.1.102/27
.
.
#1511000000101010000000000101101111=192.168.1.111/27
#1611000000101010000000000101110000=192.168.1.112/27
.
.
#2811000000101010000000000101111100=192.168.1.124/27
#2911000000101010000000000101111101=192.168.1.125/27
#3011000000101010000000000101111110=192.168.1.126/27
Table 8.8

The broadcast address for our subnet #3 would be:

11000000101010000000000101111111=192.168.1.127/27
Table 8.9

Observe that the broadcast address for Subnet #3 is exactly one less than the base address of Subnet #4 (192.168.1.128). The broadcast address will be always one before the next new base subnet.

Let's allocate Subnet #4 so you can see what I am talking about.
Now observe that our base address is subnet 4
Subnet #4
11000000101010000000000110000000=192.168.1.128/27

Hosts
#111000000101010000000000110000001=192.168.1.129 /27
#211000000101010000000000110000010=192.168.1.130/27
#311000000101010000000000110000011=192.168.1.131 /27
#411000000101010000000000110000100=192.168.1.132/27
#511000000101010000000000110000101=192.168.1.133/27
#611000000101010000000000110000110=192.168.1.134/27
.
.
#1511000000101010000000000110001111=192.168.1.143/27
#1611000000101010000000000110010000=192.168.1.144/27
#1711000000101010000000000110010001=192.168.1.145/27
.
.
#2811000000101010000000000110011100=192.168.1.156/27
#2911000000101010000000000110011101=192.168.1.157/27
#3011000000101010000000000110011110=192.168.1.158/27
Table 8.10

Now you see how easy it is to allocate a sub-netted network…
The broadcast address for our subnet #3 would be:

11000000101010000000000110000000=192.168.1.159/27
Table 8.11

Observe again the broadcast IP address is right before the next subnet, which is in this case (subnet #5).

You may have already found this interesting, even though I just mentioned two protocols RIP-1 and BGP-4. These protocols may be a disadvantage in a way. RIP for example is a flat network; it is limited to the network-prefix and only allows a single subnet mask within each network and it is because it does not provide subnet mask information in its routing table. Therefore for any new routes it encounters it just makes assumptions of the subnet mask.

So let's analyze how RIP makes its guesses. A router in its nature has several ports, connected at the same time to a port known as gateway (a door to go out). Each port has an IP address, assuming that port 1 has been assigned 192.168.1.1/24 and port 2 has been assigned 200.168.2.1/24 – Now, note that if the router sees a network 192.168.50.0 in one of the nodes, it automatically assumes it is a /24 mask because port 1 has a subnet 192.168.0.0 network.

Now note that if the router detects another network 128.68.0.0, this network will be treated as a /16 mask network because no further information was found.

On the other hand, more flexible protocols could offer advantages and ease of management of networks, therefore RFC 1009 was implemented.