If you're thinking what the heck is the
routing table (like I was) just follow the link!
Add TCP/IP Route to your Routing Table
The Routing table tells where packets go whenever they exit your system. With most environments, packets which leave the system are forwarded onto your router (or your hub), which then go out to the internet.
Sometimes you can opt to have ad configure a testing network which can duplicate another environment. You may also configure a even more complex network topology which will require additional route usage. Adding routes onto the machine will be a good testing aid for a number of these situations.
Structure:
Code:
route ADD xxx.xxx.xxx.xxx MASK xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx
What will it to:
Route ADD "network" MASK "subnet mask" "gateway ip"
For example, if you're on the 192.168.1.0 network and then had a gateway on 192.168.1.12 which is configured for accessing the 10.10.10.0/24 network, a route add statement like below needs to be used.
Code:
route ADD 10.10.10.0 MASK 255.255.255.0 192.168.1.12
Now, the routing table must show that change. All traffic to the 10.10.10.x range will then be sent over to the gateway machine.
Add a route change using the -p flag (below) so that your route add change will stick across all reboots.
Code:
route -p ADD 10.10.10.0 MASK 255.255.255.0 192.168.1.12