C
GFK-1084B
C-3
Appendix C Advanced Information About IP and MAC Addresses
Note that the gateway has two IP addresses (128.1.0.2 and 128.2.0.3). The first must be
used by hosts on Network 1 and the second must be used by hosts on Network 2. To be
usable, a host’s gateway must be addressed using an IP address with a netid matching its
own.
Subnets
Subnet addressing is an extension of the IP address scheme that allows a site to use a
single netid for multiple networks. Routing outside the site continues as usual by
dividing the IP address into a netid and a hostid via the class. Inside a site the subnet
mask is used to re-divide the IP address into a custom netid portion and hostid portion.
Consider taking Network 2 (a Class B network) in the previous example and adding
another network. Selecting the following subnet mask would add two additional netid
bits allowing for four networks:
11111111 11111111 11000000 00000000 = 255.255.192.0
In effect, two bits of the Class B hostid have been used to extend the netid. Each unique
combination of bits in the part of the hostid where subnet mask bits are 1 specifies a
different network.
The new configuration would be:
a45406
128.1.0.1
A
Network 1
128.2.64.1
B
128.2.64.2
C
128.2.64.3
G
Network 2.1
128.2.128.1
D
128.2.128.2
E
128.2.128.3
G2
Network 2.2
128.1.0.2
Figure C-3. Network Configuration Using a Subnet Mask
A second network with Hosts D and E has been added. Gateway G2 connects Network
2.1 with Network 2.2. Hosts D and E will use Gateway G2 to communicate with hosts
not on Network 2.2. Hosts B and C will use Gateway G to communicate with hosts not
on Network 2.1. When B is communicating with D, G (the configured Gateway for B)
will route the data from B to D through G2.