HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- routing table
Operating System - Linux
1827730
Members
2870
Online
109968
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2003 06:40 PM
01-12-2003 06:40 PM
routing table
I would like to set the routing table , what file should be modify ? Thx.
Andy
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2003 07:06 PM
01-12-2003 07:06 PM
Re: routing table
Depends whether you want to do it the simple way, or the distribution-specific-way (which isn't always so simple).
Simple Way: using rc.local:
add your 'route add -...' entries to /etc/rc.d/rc.local. They will get executed upon startup.
Dist-specific way:
As you've not mentioned what distribution you're using, I'll tell you the redhat way (other distributions do differ slightly).
Modify the file '/etc/sysconfig/static-routes'
Add entries in there to the format:
i.e.
eth0 net 192.168.27.0 netmask 255.255.255.0 gw 192.168.18.3
For RedHat, you can read /usr/share/doc/initscript-*/sysconfig.txt for more details.
For other distributions, I'm unsure how you'd do it, as I've only used modern versions of RedHat in the past 2-3 years.
Simple Way: using rc.local:
add your 'route add -...' entries to /etc/rc.d/rc.local. They will get executed upon startup.
Dist-specific way:
As you've not mentioned what distribution you're using, I'll tell you the redhat way (other distributions do differ slightly).
Modify the file '/etc/sysconfig/static-routes'
Add entries in there to the format:
i.e.
eth0 net 192.168.27.0 netmask 255.255.255.0 gw 192.168.18.3
For RedHat, you can read /usr/share/doc/initscript-*/sysconfig.txt for more details.
For other distributions, I'm unsure how you'd do it, as I've only used modern versions of RedHat in the past 2-3 years.
One long-haired git at your service...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 11:17 PM
02-28-2003 11:17 PM
Re: routing table
or you could make a shell script with your route commands make it run the shell script on startup.
That works on all distributions.
Most of the times the service scripts are in /etc/init.d or /etc/rc.d/init.d. You can take a look at the others also, but you only need a simple script which just runs a bunch of route commands for you.
Then ln -s /etc/init.d/yourscript /etc/rc3.d/S99yourscript
Change rc3.d to your default runlevel. You can get your default runlevel by boting up your system and running runlevel. That will print something like: N 2
That works on all distributions.
Most of the times the service scripts are in /etc/init.d or /etc/rc.d/init.d. You can take a look at the others also, but you only need a simple script which just runs a bunch of route commands for you.
Then ln -s /etc/init.d/yourscript /etc/rc3.d/S99yourscript
Change rc3.d to your default runlevel. You can get your default runlevel by boting up your system and running runlevel. That will print something like: N 2
PHP5 QA | magnus@php.net | If I tell you that I don't know, I either don't know or I am to lazy to answer.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP