[CentOS] unable to add IP address to eth0:0 eth0:1 etc
Ray Leventhal
centos at swhi.net
Fri Sep 7 14:05:59 UTC 2007
<snip>
>> if you'd explain, I'd be grateful.
>>
>
> You will need to add the routes for the other subnet in your routing
> table as such.
>
> route add -net XX.XX.XX.0 netmask 255.255.255.0 eth0
>
> I believe there is a place to add static routes in one of the startup
> scripts (besides rc.local), but forget where it is, I think if you
> configure ifcfg-eth0:X sub-interfaces scripts ifup will create these
> routes.
>
> -Ross
>
>
>
Hi Ross et al,
I'm getting an error on adding the route. The machine's base IP is in
the xx.xx.16.x /24. The additional IPs are in another /24. Base is
physical, the others are virtual hosts.
The error on adding routes is:
route: netmask doesn't match route address
Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables
route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.
route {-h|--help} [<AF>] Detailed usage syntax for
specified AF.
route {-V|--version} Display version/author and
exit.
-v, --verbose be verbose
-n, --numeric don't resolve names
-e, --extend display other/more information
-F, --fib display Forwarding Information Base
(default)
-C, --cache display routing cache instead of FIB
<AF>=Use '-A <af>' or '--<af>'; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)
netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)
x25 (CCITT X.25)
I know i'm probably being thick here, and I do appreciate the
assistance. What am I missing?
Thanks again so very much,
~Ray
More information about the CentOS
mailing list