Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permanent Routes?????? 1

Status
Not open for further replies.

TobyT

Instructor
Mar 2, 2002
47
GB
We have a SCO Unix server that we require to add IP address gateways into the routing table permanently.

We know how to achive this temporarily using the ADD ROUTE command but whenever we have to reboot the server for one reason or another we have to re-enter the routes.

Can anyone help

Thanks

TobyT
 
hi ,

normally you will be on run level 2 so you can cd /etc/rc2.d
either create a file called S120route note capital S
the number 120 donates the order in which this file to run
1 being high priority and add in here the route command
add route etc.. save the file and give it 755 permissions

I think on SCO 5 , i. /etc/rc2.d there is already a file called S90iproute , have a look at this file and add your route in here , if not uyou can create a file as specified above.

HTH
 
Could you please ellaborate for me on this process of adding a route.

We have just had some systems supplied by Peugeot and they are on their ip scheme of 10.155.x.x and we have 197.0.x.x

Their router can ping our server and handles the traffic between the networks. However without adding a route to our sco unix 5 server their clients can't ping our network due to the blocks on their router. They won't allow us to add NIC's or second ip stacks to one of their clients to act as a gateway.

I have super limited knowledge of sco unix as we don't have to get involved to anything like this level. I now have no choice as the Peugeot engineer is not obliged to help and the help desk for our system want to send an engineer in five days.

Please could you explain in great detail and example commands to add a permanent route.

Thank you in advance.

Ezzer...
 
I have copied the rc2.log file from the server using SmartFTP and opened it using Notepad. If I was to edit this file with the aprporiate route add line and copy it back to the server would it work and would I need to reboot the server to make the changes effective???

Sorry for my complete ignorance!!

Ezzer...
 
Providing the line you add is the appropriate unix command to add the route, and providing you set the correct permissions on the boot file when you copy it back (should be the same as before you copied it), and providing you didn't change any other parts of the file, it should work fine.

You don't have relink the kernel or reboot for the changes to take effect, however you do need to realize that changing the boot file does not change the current OS session. What you need to do for the current session is manually run the route command. The boot file will automatically set the route next time you boot, so this is the last time it needs to be done manually.
 
Thank you for your response. I intend to reboot the server after copying the file accross anyway so I shouldn't have to do any manual stuff.

Regards

Ezzer...
 
Did you say rc2.log? Editing this file won't have any effect.

Personally I would recommend creating /etc/rc2.d/S99routes containing:

[tt]echo Configuring routes...
route add (whichever routes)[/tt]

Then chmod 755 /etc/rc2.d/S99routes. Annihilannic.
 
Thank you for your response but this is beyond my abilities unless you could give me step by step process...

Sorry...

Ezzer...
 
Do you know the route add syntax and the routes that are required?

Do you have command line telnet access to the server? Or physical access to the console? If so, log in as root and run the following commands:

[tt]cat > /etc/rc2.d/S99routes
echo Configuring routes...
route add (whichever routes)
^D (i.e. hit Control-D, then return)
chmod 755 /etc/rc2.d/S99routes
ls -l /etc/rc2.d/S99routes[/tt] Annihilannic.
 
Thank you for your response.

I have direct access to the server and can log in as root.

Sorry to be such a pain but could you please explain what each of the lines does. I would prefer to know exactly what I am doing.

Is the route add syntax same as in MS dos?

ie. route add 197.0.x.x mask 255.255.x.x 197.0.x.x

Regards

Ezzer...
 
It's similar, but different. :) For example:

[tt]route add -netmask 255.255.0.0 197.0.0.0 197.0.123.45[/tt]

Type man route when you're logged in to read about it. Annihilannic.
 
Annihilannic,

I have done the above this morning and I still can't ping between the networks from either side.

I added the line:
(theirs) (ours)
route add -netmask 255.255.255.0 10.155.x.x 197.0.x.x

I have had a look at the s99routes file and the line is there. Any ideas as to what might be happening??

Regards

Ezzer...


 
Duh, sorry, my typo, it should be S99routes. The "S" has to be capital.

You can rename the file using the following steps:

[tt]cd /etc/rc2.d
mv s99routes S99routes[/tt]

You can check that the route is in place using the command netstat -rn. Annihilannic.
 
Annihilannic,

Thanks again for your response. I have changed the file name as you suggested but still to no avail. However after looking at the routing table using your command netstat I understood a little better and used the route add command and managed to get the route added and the Peugeot systems now see our network. I used the command:

route add -net 10.155.x 197.0.x.x

this worked but I presume I would have to add the route after each restart of the server. Do you think that I should add the same command to the S99routes file instead of : route add -netmask 10.155.x.x 197.0.x.x ???

Once again thank you very much for your help.

Ezzer...
 
Yes, just follow the same steps as before (and I'll give you the correct filename this time!) and it will overwrite the file:

[tt]cat > /etc/rc2.d/S99routes
echo Configuring routes...
route add (whichever routes)
^D (i.e. hit Control-D, then return)
chmod 755 /etc/rc2.d/S99routes
ls -l /etc/rc2.d/S99routes[/tt]

Hmm... that's funny... those are capital S's... it's just the font that makes them look lowercase. Odd.
Annihilannic.
 
Annihilannic,

I do beleive we got there in the end. Thank you very much.

I feel like a Unix expert now :)))

Ezzer...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top