Other Routes

In the previous section, we talked about network routes and the possible uses for them. We also briefly mentioned specifying a route to a specific network. You can actually specify a route to a specific IP address. The uses for this are a little bit more obscure than a network route, but are nonetheless helpful.

We once had a customer that actually used a public IP address for one of their internal intranet machines. This machine was not actually accessible from the Internet, but the customer still chose to give it a real, routable address. We were designing a firewall/router for the company, and once it was configured and working in production, the customer found that users could not access the intranet server that was located on another site. After much scratching of the head, we realized that they had a public routable address that to all intents and purposes should have been (according to the router) on the Internet. They absolutely refused to change the address, and after much protesting, we had to add a host route to this machine that was located on another site. This stopped the router from sending the requests to a random machine on the Internet with the same IP address as their intranet server.

Configuring a firewall/router is covered in Chapter 24.

the use of private IP addresses is very useful. It means you control your local infrastructure without burdening a random server with requests that were not meant for it.

A host route specifies a static route to a single IP address and is useful for these one-off situations. If, on the other hand, you have a network that is not attached to your default gateway, or that is serviced by a specific router on your network — for example, a wide area network (WAN) router — you can use a network route to specify that a dedicated router should be contacted for that specific network.

Adding a host route is quite simple, and in certain situations is very useful. Consider the following example:

bible:~ # route add -host gw

You may note that adding a host route is very similar to adding the default route, apart from the fact you need to specify the host you are creating an entry for (-host

network route, use the -net parameter.

Note the hyphen in the -net and -host parameters. This is very important and should not be confused with the absence of the hyphen in the gw (gateway) route you have also worked with.

Setting up your routing is a very important part of your work with the network. Just as the Internet would never work without the proper routing, your network needs to have the correct routing in place to function properly. The tool to help you do this is route.

This is why

This is why

To specify a

Was this article helpful?

0 0

Post a comment