[wplug] Multiple Static IP's

Christopher DeMarco cmd at alephant.net
Wed Jun 15 18:05:42 EDT 2005


On Wed, Jun 15, 2005 at 05:55:55PM -0400, Ken wrote:

> The part I'm unsure of is how to configure ETH0 with more than I
> address. Or is it just as easy to use multiple cards as ETH0,
> ETH1,...

It's easy to do with a single card:

onion ~ # ip addr add 10.0.0.254/24 dev eth0
onion ~ #	ip addr add 10.0.0.253/24 dev eth0
onion ~ #	ip addr add 10.0.0.252/24 dev eth0

onion ~ # ip addr
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0f:1f:fa:d5:71 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.254/24 brd 10.0.0.255 scope global eth0
    inet 10.0.0.253/24 scope global secondary eth0
    inet 10.0.0.252/24 scope global secondary eth0


Of course, this presumes that you've got a fairly modern kernel
(~2.3?) and have the iproute2 userspace tools installed.
Unfortunately there's no man page for that package (a nice project for
any students out there seeking fame and glory!); you have to use "ip
help", "ip addr help", "ip link help" etc. to figure out how to use
the dang thing... </rant>

Your distro also very likely has a config file somewhere that controls
this - c.f. /etc/sysconfig/network-scripts in Red Hat,
/etc/conf.d/network in Gentoo, et. al.


-- 
Christopher DeMarco <cmd at alephant.net>
Alephant Systems (http://alephant.net)
PGP public key at http://pgp.alephant.net
+1 412 708 9660
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.wplug.org/pipermail/wplug/attachments/20050615/d3211ff1/attachment.bin


More information about the wplug mailing list