[CentOS] Setting up eth0 with address 0.0.0.0

Amos Shapira

amos.shapira at gmail.com
Tue Nov 11 05:11:48 UTC 2008


Hello,

I'm following instructions in
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.LVS-DR.html#route_on_non_ip_interface
to allow my xen guest real hosts to serve virtual IP's behind LVS
without having to allocate real public IP addresses for each such xen
guest.

I have eth1 connected via a "back-end" switch to the eth1/xenbr1 of
the xen host and the other physical servers, this is the interface
that is used by LVS to switch packets over to the real servers.

I managed to manually do:

# ip route add to <default-router> dev eth0
# ip route add via <default-router>

and before that, in order to allow outgoing packets to be sent via eth0, I did:
# ifconfig eth0 0.0.0.0 up

and it works great, but when I try to configure this permanently via
ifcfg-eth0 it says:

Bringing up interface eth0:  connect: Invalid argument
[  OK  ]

Things seem to work OK - the server can serve over the Virtual IP,
eth0 doesn't have an IP associated with it etc. But I'm worried about
this message.

Some relevant config files:
ifcfg-eth0:

To setup the routes, I followed
http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s1-networkscripts-static-routes.html
and http://www.mail-archive.com/centos@centos.org/msg15253.html and
put the following in /etc/sysconfig/network-scripts/route-eth0:
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
IPADDR=0.0.0.0
NETMASK=0.0.0.0

route-eth0:
to <router-address> dev eth0
via <router-address>

output of "ifconfig eth0":
eth0      Link encap:Ethernet  HWaddr 00:16:3E:19:E6:97
          inet6 addr: fe80::216:3eff:fe19:e697/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2012 errors:0 dropped:0 overruns:0 frame:0
          TX packets:250 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:174268 (170.1 KiB)  TX bytes:47731 (46.6 KiB)

So - did I do this correctly and what should I do to fix the error message?

Thanks,

--Amos



More information about the CentOS mailing list