Reseaux: bridge-utils & uml-utilities & interfaces [Resolu]

hello.

petite explication:
j’ai une interface eth1 en dhcp:
je voudrai obtenir 2 interface supplémentaire . je parviens a en obtenir 1 mai pas la deuxième.
je me suis inspirer du tutoriel ici:
doc.ubuntu-fr.org/virtualbox_reseau
Fichier : /etc/network/interfaces

GNU nano 2.0.2                                     Fichier : /etc/network/interfaces                                                                                

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
#auto lo
#iface lo inet loopback
#new ok

auto eth1
iface eth1 inet manual

auto tap0
iface tap0 inet manual
tunctl_user tnt

auto bridge0
iface bridge0 inet dhcp
post-up chmod ugo+rw /dev/net/tun
bridge-ports eth1 tap0
bridge-ageing 7200
bridge-fd 2

#new

auto tap1
iface tap1 inet manual
tunctl_user tnt

auto bridge1
iface bridge1 inet dhcp
post-up chmod ugo+rw /dev/net/tun
bridge-ports eth1 tap1
bridge-ageing 7200
bridge-fd 2

après un /etc/init.d/networking restart

/etc/init.d/networking restart
Reconfiguring network interfaces...There is already a pid file /var/run/dhclient.bridge0.pid with pid 12899
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/bridge0/00:0a:e4:5e:21:8f
Sending on   LPF/bridge0/00:0a:e4:5e:21:8f
Sending on   Socket/fallback
DHCPRELEASE on bridge0 to 192.168.1.254 port 67
There is already a pid file /var/run/dhclient.bridge1.pid with pid 13632
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/bridge1/b6:cb:18:d0:21:2b
Sending on   LPF/bridge1/b6:cb:18:d0:21:2b
Sending on   Socket/fallback
device eth1 is not a slave of bridge1
Set 'tap0' persistent and owned by uid 1000

Waiting for bridge0 to get ready (MAXWAIT is 6 seconds).
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/bridge0/00:0a:e4:5e:21:8f
Sending on   LPF/bridge0/00:0a:e4:5e:21:8f
Sending on   Socket/fallback
DHCPDISCOVER on bridge0 to 255.255.255.255 port 67 interval 3
DHCPOFFER from 192.168.1.254
DHCPREQUEST on bridge0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.254
bound to 192.168.1.65 -- renewal in 40983 seconds.
Set 'tap1' persistent and owned by uid 1000
device eth1 is already a member of a bridge; can't enslave it to bridge bridge1.

Waiting for bridge1 to get ready (MAXWAIT is 6 seconds).
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/bridge1/b6:cb:18:d0:21:2b
Sending on   LPF/bridge1/b6:cb:18:d0:21:2b
Sending on   Socket/fallback
DHCPDISCOVER on bridge1 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on bridge1 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on bridge1 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on bridge1 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on bridge1 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on bridge1 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on bridge1 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.
ifconfig
bridge0   Lien encap:Ethernet  HWaddr 00:0A:E4:5E:21:8F  
          inet adr:192.168.1.65  Bcast:192.168.1.255  Masque:255.255.255.0
          adr inet6: fe80::20a:e4ff:fe5e:218f/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:128 errors:0 dropped:0 overruns:0 frame:0
          TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0 
          RX bytes:8012 (7.8 KiB)  TX bytes:18112 (17.6 KiB)

bridge1   Lien encap:Ethernet  HWaddr B6:CB:18:D0:21:2B  
          adr inet6: fe80::b4cb:18ff:fed0:212b/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0 
          RX bytes:0 (0.0 b)  TX bytes:8676 (8.4 KiB)

eth1      Lien encap:Ethernet  HWaddr 00:0A:E4:5E:21:8F  
          adr inet6: fe80::20a:e4ff:fe5e:218f/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2492 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2090 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          RX bytes:214420 (209.3 KiB)  TX bytes:318929 (311.4 KiB)
          Interruption:201 Adresse de base:0x1800 

tap0      Lien encap:Ethernet  HWaddr 2E:23:A3:A7:AE:34  
          adr inet6: fe80::2c23:a3ff:fea7:ae34/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:842 overruns:0 carrier:0
          collisions:0 lg file transmission:500 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

tap1      Lien encap:Ethernet  HWaddr B6:CB:18:D0:21:2B  
          adr inet6: fe80::b4cb:18ff:fed0:212b/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:99 overruns:0 carrier:0
          collisions:0 lg file transmission:500 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

On voi bien que bridge0 a reçus une ip et que bridge1 n’en a pas.

Meme en activant

auto lo
iface lo inet loopback

sa ne change rien
Merci d’avance parce que la je seche, surtout que la configuration réseaux c’est pas ma tasse de thé. :smt100 :smt100

Comment ça “obtenir 2 interfaces supplémentaires” ?

Tu essaies de lier eth1 à deux ponts, or une interface ne peut faire partie que d’un seul pont. eth1 est liée au premier pont activé, bridge0, du coup la tentative de liaison à bridge1 échoue :

Comme bridge0 est relié au réseau ethernet physique par eth1, il peut communiquer avec le serveur DHCP et obtenir un bail. bridge1 n’est lié qu’à tap1, et il semble qu’aucun serveur DHCP soit à l’écoute à l’autre bout du lien ethernet virtuel de tap1, du coup bridge1 n’obtient pas de bail.

Si tu cherches à relier tap0 et tap1 à eth1, il suffit de faire en sorte que les trois interfaces fassent partie d’un seul et même pont au lieu de créer deux ponts.

Accessoirement et indépendamment de tout ceci, c’est généralement une mauvaise idée de ne pas activer l’interface de loopback lo.

[quote=“PascalHambourg”]Comment ça “obtenir 2 interfaces supplémentaires” ?

Tu essaies de lier eth1 à deux ponts, or une interface ne peut faire partie que d’un seul pont. eth1 est liée au premier pont activé, bridge0, du coup la tentative de liaison à bridge1 échoue :
[/quote]

je suppose que oui :confused:

C’est ce que je veux faire mai comment ?

c’est corriger :slightly_smiling:

Pour lier des interfaces dans un pont, il suffit de les lister dans l’option bridge-ports du pont considéré, par exemple bridge0 :

Et tu supprimes tout ce qui concerne bridge1.

Salut,

http://forum.ubuntu-fr.org/viewtopic.php?id=148609

IOP,
j’en profite pour rappeler l’IP Aliasing :

[code]# The primary network interface alias 0
auto eth0:0
iface eth0:0 inet static
address 192.168.1.51
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

The primary network interface alias 1

auto eth0:1
iface eth0:1 inet static
address 192.168.1.45
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1 [/code]

panthere: je ne sais pas ce que tu veux faire, mais je pense que ce qui t’interresse doit être ce que propose RedX42.

En fait, le bridge va faire qu’à l’autre bout de ton tap qui est connecté par exemple à une machine virtuelle qemu, la machine virtuelle va pouvoir demander sa propre adresse dhcp, comme si elle utilisait ton eth1. En fait, ton bridge va partager l’interface physique eth1 entre le bridge de ta machine réelle, et la carte virtuelle de ta machine virtuelle branchée sur le tap.

Pour ce qui est de l’ip aliasing, c’est juste que ça ajoute des adresses sur eth1, et c’est tout.

Les 2 vont bien merci a tous :smt023

résolu ne prend pas de ‘t’, simple à retenir, merci.
si tu ne t’en souviens plus, tu pourras toujours regarder comment les autres l’écrivent :wink:

c’est noter :slightly_smiling: :smt006