STATIC
ROUTING
Background
A router or gateway is a hardware device that fowards packets from
one logical network to another. IP uses a routing table to determine
which networks that packets can be forwarded to and will only forward
them to networks that it has been configured to do so. When a packet
is to be sent, IP determines whether or not the IP address is local
or remote. If it is local, it forward the packet. If it is remote,
it consults the routing table to determine the path to the remote
host. If there is no entry in the routing table, then the default
gateway is used instead. The routing table is checked at the router
and the process repeats. A packet can be forwarded from router to
router. Each one of these steps is called a "hop". If a
route to the remote host is never found then an error message will
return. On NT, multiple gateways can be configured and if "Dead
Gateway Detection" is set to "on" then IP will attempt
to use the next default gateway.Would
You Like To Know More?
Routing can be either static or dynamic. Static routing involves manually
programming the routing table into the router. If you have a large
network, this can be a real hassle especially if your network constantly
changes and the tables have to keep getting updated. Let's look at
how this all works...
In
this example you can see that our router is actually a computer. If
one adds 2 network adapters to an NT server, it can be used as a router.
A computer that acts as a router in this way is said to be getting
it in both ends. Just kidding - it is called multihomed. The default
gateway of Host A in this example would be the local side of the router
which would be 134.62.8.1. Conversely, Host B's gateway would be 134.62.20.1.
And that is all I have to say about that.
ROUTE
COMMANDS
1) route add (IP_Address) mask (Subnet_Mask) (Gateway_address)
Add a route.
2)
route -p add (IP_Address) mask (Subnet_Mask) (Gateway_address)
Add a persistent route. This type of entry is stored in the registry
and are not affected by a power cycle.
3)
route delete (Subnet_Mask) (Gateway_address).
Delete a route.
4)
route change (Subnet_Mask) (Gateway_address.)
Change a route.
5)
route print
Shows the contents of the routing table.
6)
route -f
Erases all routes.
RIP
Background
This is a continuation of the routing discussion, but now we will
be focusing on dynamic routing which uses the Routing Information
Protocol(RIP). RIP measures the distance from source to destination
by counting the number of hops(routers or gateways) that the packets
must travel over. RIP sets a maximum of 15 hops and considers any
larger number of hops unreachable. RIP's real advantage is that if
there are multiple possible paths to a particular destination and
the appropriate entries exist in the routing table, it will choose
the shortest route. Like me, RIP is all about the path of least resistance.
RIP uses an update interval which broadcasts its routing table over
UDP port 520 after a specified period of time. Here is how it works...
OK...Router
1 and router 2 would broadcast their routing tables to each other
every x seconds depending on what the update interval is set to. Each
router would then add any new routes to its table. If a route already
exists then the router would see if the new route has less hops then
the one it currently has stored.
Would
You Like To Know More?
The Microsoft text claims that RIP is best used on smaller networks.
This is because larger networks can have a crap-load of entries in
their routing table. Due to the fact that RIP packets can be a maximum
of 512 bytes, larger tables would have to be sent as multiple packets
which can bog down the network.