iproute2

Kevin Scoffield kevin at wyport.com
Wed Dec 8 20:45:22 UTC 2004


In your ifcfg-eth0 file you can add a new device like
DEVICE=eth0:1
IPADDR=192.168.0.1

Or you can use Webmin to add it thru there as an alias
I personally like webmin for adding and modifying configs. Mainly cause I
don’t know what I am doing with most of them.

> I would like to use a network card with 2 IP addresses assigned like:
> ip addr add 10.0.2.1 dev eth0
> ip addr add 192.168.2.1 dev eth0
> How do I do it with the fedora network scripts in /etc/sysconfig/net*? 
> Or should I use a custom init script?

> Zizi

>I guess you want to use iproute2 instead of creating an alias device. On
>1 host I have a /27 net and so I added some code to /sbin/ifup:

>    if [ ${DEVICE} = "eth0" ]; then
>         for i in `seq 195 222`; do
>            ip addr add xxx.yyy.zzz.$i/27 brd xxx.yyy.zzz.www dev eth0
>label eth0
>         done
>    fi

>(FC1, script line 362ff.)

>For you no loop is needed:

>    if [ ${DEVICE} = "eth0" ]; then
>	ip addr add 192.168.2.1 dev eth0
>    fi

>Not the best way to change system scripts which may be overridden next
>update of initscripts rpm i.e. But actually there is no mechanism to use
>iproute2 style in existing configuration files.

>Alexander


-- 
Alexander Dalloz | Enger, Germany | new address - new key: 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora GNU/Linux Core 2 (Tettnang) on Athlon kernel 2.6.9-1.6_FC2smp 
Serendipity 21:34:56 up 2 days, 20:57, load average: 0.53, 0.50, 0.56 

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 12/5/2004
 
    

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 12/5/2004
 





More information about the users mailing list