Recall that in TCP/IP, two types of entities exist on a network: hosts and routers. All networks must have hosts, while not all networks require routers. The physical topology of the network determines if you need routers. The following network topology and routing concepts are important when deciding whether to add another network to your existing network environment.
For complete details and tasks for router configuration on IPv4 and IPv6 networks, see Chapter 2, Configuring a System as a Router in Configuring an Oracle Solaris 11.3 System as a Router or a Load Balancer.
All nodes on an IP network maintain routing information in routing tables. These tables contain information about how to reach systems that are attached to both local and remote networks. The routing tables are generated from local configuration information and from routing protocol messages that is exchanged with neighboring systems.
When a system initially sends a packet, it looks up the packet's destination address in its routing table to determine if the destination is on the local network. If yes, the packet goes directly to the host with that IP address. If not, the packet goes to a router on the local network.
When a router receives a packet, the router checks its routing table to determine if the destination address is for a system on one of its attached networks or if the message must be forwarded through another router. It then sends the message to the next system in the path to the destination.
This process is repeated on each router that receives the message until the message reaches the destination system.
The following figure shows a network topology with three networks that are connected by two routers.
Figure 4 A Network Topology With Three Interconnected Networks
Router R1 connects networks 192.0.2.0/27 and 192.0.2.32/27. Router R2 connects networks 192.0.2.32/27 and 192.0.2.64/27.
If Host A on network 192.0.2.0/27 sends a message to Host B on network 192.0.2.32/27, the following events occur:
Host A examines its routing tables for the path to 192.0.2.70/27. The local network address range does not cover this address, but there is a previously learned default route through router R1 that covers the address. Therefore, Host A sends the packet to Router R1.
Router R1 examines its routing tables. No local network's address range covers the destination address, but there is a known route to network 192.0.2.64/27 through Router R2 that covers the address, Router R1 sends the packet to Router R2.
Router R2 is connected directly to network 192.0.2.64/27. The routing table lookup reveals that 192.0.2.70/27 is on the attached network. Router R2 sends the packet directly to Host B.