Bug 137390

Summary: Adding static routes to 2nd ip address fails
Product: [Fedora] Fedora Reporter: Steve <steven_nash>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-30 00:48:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Static route config script for 2nd address none

Description Steve 2004-10-28 00:15:06 UTC
Description of problem:
Adding static routing to a 2nd ip address on eth0 fails.  The routes 
are not added when eth0:1 is activated in the network applet

Version-Release number of selected component (if applicable):


How reproducible:

Create 2nd ip (192.168.220.30 nm 255.255.255.248) address on 2nd 
interface and take following steps.

Steps to Reproduce:
1. Edit eth0:1 and add static route such as net 10.128.0.0 nm 
255.255.0.0 gw 192.168.220.29
2. Start eth0:1
3. run 'route -n' in terminal
  
Actual results:
Interface is up without static route

Expected results:
Interface should be up with static route.

Additional info:

Comment 1 Bill Nottingham 2004-10-28 18:37:05 UTC
Can you attach your static route config files?

Comment 2 Steve 2004-10-29 23:35:05 UTC
Created attachment 105968 [details]
Static route config script for 2nd address

doing an "ifup eth0:1" reports:
Cannot find device "eth0:1"

Comment 3 Bill Nottingham 2004-10-30 00:48:56 UTC
Static routes don't work for alias interfaces, actually.

You'll have to add the route to the main device.

Comment 4 Steve 2004-10-30 11:57:08 UTC
route add -net 10.0.0.1 netmask 255.255.0.0 gw 192.168.220.30 dev 
eth0:1

The above works from a terminal when when eth0:1 is up!

Comment 5 Bill Nottingham 2004-10-31 04:38:13 UTC
/sbin/route is deprecated; the ip command is used.