C
C-2 TCP/IP Ethernet Communications User’s Manual - August, 1997 GFK-1084B
IP addresses are written as four decimal integers (0-255) separated by periods (called
“dotted-decimal”) where each integer gives the value of one byte of the IP address. For
example, the 32-bit IP address
00000011 00000000 00000000 00000001
is written as
3.0.0.1
One can distinguish the class of an IP address from the first integer in its dotted-decimal
IP address as follows.
Range of first integer Class
0 - 127 A
128 - 191 B
192 - 223 C
224 - 255 other
Gateways
Gateways (also known as routers) connect individual physical networks into a system of
networks. When a node needs to communicate with a node on another network, a
gateway transfers the data between the two networks.
The following figure shows gateway G connecting Network 1 with Network 2.
a45405
128.1.0.1
Network 1
128.2.0.1 128.2.0.2
128.2.0.3
Network 2
128.1.0.2
A

BC

G

Figure C-2. Connecting Two Networks with a Gateway

When host B with IP address 128.2.0.1 communicates with host C, it knows from C’s IP
address that C is on the same network. In an Ethernet environment, B can then resolve
C’s IP address to a MAC address (via ARP) and communicate with C directly.
When host B communicates with host A, it knows from A’s IP address that A is on
another network (the netids are different). In order to send data to A, B must have the IP
address of the gateway connecting the two networks. In this example, the gateway’s IP
address on Network 2 is 128.2.0.3.