Red Hat Bugzilla – Bug 137390
Adding static routes to 2nd ip address fails
Last modified: 2014-03-16 22:49:57 EDT
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):
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
Interface is up without static route
Interface should be up with static route.
Can you attach your static route config files?
Created attachment 105968 [details]
Static route config script for 2nd address
doing an "ifup eth0:1" reports:
Cannot find device "eth0:1"
Static routes don't work for alias interfaces, actually.
You'll have to add the route to the main device.
route add -net 10.0.0.1 netmask 255.255.0.0 gw 192.168.220.30 dev
The above works from a terminal when when eth0:1 is up!
/sbin/route is deprecated; the ip command is used.