Author Login
Post Reply
Ahmed Kamal wrote:
> Hi List,
> I'm fighting with a small problem. My eth1 NIC has IP 172.30.0.0/16,
> whenever the interface is started, an automatic route is added
> 172.30.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
> The thing is, this would generally be right for most people, but not for me.
> I need it to be
> 172.30.0.0 172.30.0.1 255.255.0.0 UG 0 0 0 eth1
> to pass from our router.
> I have added a file route-eth1 with the following
> 172.30.0.0/16 via 172.30.0.1 dev eth1
> But when restarting the interface, this gives error "RTNETLINK answers: File
> Exists", I think this error is because of the automatically added route.
>
> The question is how do I get rid of that automatically added route, and add
> mine! I need to do this the redhat way (i.e not rc.local). Any help is
> highly appreciated :)
> Regards
>
The first route says use eth1 for all local subnet traffic on
172.30.0.0/16 and use the default route for everything else.
So, adding a default route to point to 172.30.0.1 would take care of
that. You can do this by adding a GATEWAY=172.30.0.1 in your
/etc/sysconfig/network or in /etc/sysconfig/network-scripts/ifcfg-eth1
If you add it to /etc/sysconfig/network, it will make it the default
route for the system. If you add it to ifcfg-eth1, then whichever
interface gets processed last wins the default route.
Hugh
_______________________________________________
rhelv5-list mailing list
rhelv5-list@(protected)
https://www.redhat.com/mailman/listinfo/rhelv5-list