![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| permanently change KDE DPI | raidzero | Slackware | 1 | 09-03-2008 11:27 AM |
| Static Route | Arun.Kakarla | UNIX for Dummies Questions & Answers | 2 | 07-17-2008 09:07 AM |
| dhcpd.conf - static route | prvnrk | Linux | 3 | 08-14-2007 10:23 AM |
| Static route for hpux 11.22 | catwomen | HP-UX | 2 | 10-10-2006 09:55 AM |
| static route ? | chaandana | IP Networking | 3 | 07-05-2005 03:05 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
permanently add static route
I have a machine with an interface that has two different addresses on CentOS 5
eth0: 10.20.21.77 eth0:1 141.218.1.221 If I issue this command I get the result I'm looking for. /sbin/route add -net 141.218.1.0 netmask 255.255.255.0 gw 10.20.21.77 ip route show dev eth0 141.218.1.0/24 via 10.20.21.77 scope link 141.218.1.0/24 proto kernel scope link src 141.218.1.221 10.20.21.0/24 proto kernel scope link src 10.20.21.221 169.254.0.0/16 scope link default via 10.20.21.1 Now I reboot the machine and the route goes away, I've tried creating a file in /etc/sysconfig/network-scripts/route-eth0 that contains 141.218.1.0/24 via 10.20.21.77 Also tried: 141.218.1.0/24 via 10.20.21.77 dev eth0 On a reboot it looks like this... ip route show dev eth0 141.218.1.0/24 proto kernel scope link src 141.218.1.221 10.20.21.0/24 proto kernel scope link src 10.20.21.77 169.254.0.0/16 scope link default via 10.20.21.1 Running ifup-routes by hand results with: ./ifup-routes eth0 RTNETLINK answers: File exists Thanks for any help. Last edited by beaker457; 04-16-2009 at 11:52 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|