[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Deux ip sur eth0 ?



Dans un message du 08 oct à 15:47, Stephane Leclerc écrivait :
> > Tu peux créer autant d'interface de type eth0:x (x un nombre) que tu
> > veux.
> 
> Ce serait pas limité à 254 par carte des fois !

Je ne crois pas. En tout cas, pas sur un 2.4.x.

#!/bin/sh
for i in `seq 1 240`;do
	ifconfig eth0:$i 10.0.1.$i
done

for i in `seq 1 240`;do
	ifconfig eth0:`expr 240 + $i` 10.0.2.$i
done

Ce script m'a bien créé toutes les interfaces :

guillaum@oyster:~$ ifconfig | grep -c 'eth0:'
480
guillaum@oyster:~$

A+
-- 
Guillaume Morin <guillaume@morinfr.org>

                 People get the operating system they deserve.



Reply to: