In article , Larry wrote: :Forgive me if this is a stupid question...
Not stupid at all, just something that'll become second nature with a bit of experience with the device.
:We are a small company and have a 1721 that is the gateway to :our provider for our Internet service. We are currently not :using any routing protocols and have 1 static route to our :provider. I now have the need to add a ethernet card in the :extra slot to route to another company temporarily. The company :is located in the same building so it should be easy but since :I'm saavy I need to make sure I'm doing things right.
:Currently the routing info looks like the following:
:iproute 0.0.0.0 0.0.0.0 65.65.xxx.xxx :Which is our ISP's router.
:Assuming the other parties end of the connection is 172.16.17.1, :and I configure the address of Eth0 to 172.16.17.2, is this as :simple as adding the line:
:iproute 172.16.17.0 0.0.0.255 172.16.17.2
It's even simpler than that: you don't have to add any ip route statement at all. As soon as you assign the IP address and mask to the interface, the router will automatically add in a route out the Eth0 interface for all of 172.16.17.*. The devices at the other end of the link will take care of the rest.
:Are routes processed in order like ACL's? Does the new route :need to be first to be processed correctly?
Routes are processed as "longest match" first. Any traffic to 172.16.17 will match 24 bits to the automatic "connected" route that the router will put in for you, whereas traffic to other locations will not match that same prefix and will match only the
0-bits long default route that you have.
The more specific a route entry, the higher it's precidence; the order of the routing statements in the configuration doesn't matter. [Not, that is, until you get into policy based routing.]
Note: the above, saying that you don't need to add a route at all, presumes that the other end is not using a router between you and them. If they -are- using a router in between, then a route statement would be needed... e.g.,
ip route 172.16.18.0 255.255.255.0 172.16.17.1
{I'm going to skip the paragraphs of explaining that...}