|
Routing Basics
Once you create an internetwork by connecting your WANs and LANs to a router, you’ll need
to configure logical network addresses, such as IP addresses, to all hosts on the internetwork
so that they can communicate across that internetwork. Then, when a router receives an
incoming packet from a host, the router identifies the destination network address of each
packet (by reading the IP destination address in the header) in order to select the best path(s)
to the destination network address.
The term
routing
is used for taking a packet from one device and sending it through the network
to another device on a different network. Routers don’t really care about hosts—they only care
about networks and the best path to each network. The logical network address of the destination
host is used to get packets to a network through a routed network, and then the hardware address
of the host is used to deliver the packet from a router to the correct destination host.
If your network has no routers, then it should be apparent that you are not routing. Routers
route traffic to all the networks in your internetwork. To be able to route packets, a router
must know, at a minimum, the following:
- Destination address
- Neighbor routers from which it can learn about remote networks
- Possible routes to all remote networks
- The best route to each remote network
- How to maintain and verify routing information
The router learns about remote networks from neighbor routers or from an administrator.
The router then builds a routing table (a map of the internetwork) that describes how to find
the remote networks. If a network is directly connected, then the router already knows how
to get to it.
If a network isn’t directly connected to the router, the router must use one of two ways to
learn how to get to the remote network: static routing, meaning that someone must hand-type
all network locations into the routing table, or something called dynamic routing.
In
dynamic routing
, a protocol on one router communicates with the same protocol running
on neighbor routers. The routers then update each other about all the networks they know about
and place this information into the routing table. If a change occurs in the network, the dynamic
routing protocols automatically inform all routers about the event. If
static routing
is used, the
administrator is responsible for updating all changes by hand into all routers. Typically, in a
large network, a combination of both dynamic and static routing is used.
|