[Puppy Tahr] Configuration réseau sous Qemu

[Puppy Tahr] Configuration réseau sous Qemu.
1) Installation des paquetages réseaux :

[~] ➔ sudo apt-get install uml-utilities
[~] ➔ sudo apt-get install bridge-utils

2) Vérification des interfaces :

[~] ➔ ifconfig
eth0      Link encap:Ethernet  HWaddr e0:cb:4e:c1:71:73
          inet adr:192.168.1.10  Bcast:192.168.1.255  Masque:255.255.255.0
          adr inet6: fe80::e2cb:4eff:fec1:7173/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Packets reçus:3235 erreurs:0 :0 overruns:0 frame:0
          TX packets:2630 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          Octets reçus:3165959 (3.1 MB) Octets transmis:405513 (405.5 KB)
lo        Link encap:Boucle locale
          inet adr:127.0.0.1  Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          Packets reçus:670 erreurs:0 :0 overruns:0 frame:0
          TX packets:670 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          Octets reçus:56635 (56.6 KB) Octets transmis:56635 (56.6 KB)

3) Activer util01 pour l’utilisation de tap0 :

[~] ➔ sudo tunctl -u util01 -t tap0
Set 'tap0' persistent and owned by uid 1000

4) Réconfigurer les interfaces :

[~] ➔ sudo ifconfig eth0 0.0.0.0 promisc up
[~] ➔ sudo ifconfig tap0 0.0.0.0 promisc up

5) Création du pont :

[~] ➔ sudo brctl addbr br0
[~] ➔ sudo brctl stp br0 off

6) Connexion des interfaces au pont :

[~] ➔ sudo brctl addif br0 eth0
[~] ➔ sudo brctl addif br0 tap0

7) Reconfigurer les interfaces :

[~] ➔ sudo ifconfig br0 192.168.1.10 netmask 255.255.255.0
[~] ➔ sudo route add default gw 192.168.1.1

8) Vérification :

[~] ➔ sudo brctl show
bridge name	bridge id		STP enabled	interfaces
br0		8000.e0cb4ec17173	no		eth0
							tap0

9) Vérification :

[~] ➔ ifconfig
br0       Link encap:Ethernet  HWaddr e0:cb:4e:c1:71:73
          inet adr:192.168.1.10  Bcast:192.168.1.255  Masque:255.255.255.0
          adr inet6: fe80::e2cb:4eff:fec1:7173/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Packets reçus:15583 erreurs:0 :0 overruns:0 frame:0
          TX packets:8391 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          Octets reçus:21220466 (21.2 MB) Octets transmis:698868 (698.8 KB)
eth0      Link encap:Ethernet  HWaddr e0:cb:4e:c1:71:73
          adr inet6: fe80::e2cb:4eff:fec1:7173/64 Scope:Lien
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          Packets reçus:28177 erreurs:0 :0 overruns:0 frame:0
          TX packets:16239 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          Octets reçus:37056303 (37.0 MB) Octets transmis:1554950 (1.5 MB)
lo        Link encap:Boucle locale
          inet adr:127.0.0.1  Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          Packets reçus:3378 erreurs:0 :0 overruns:0 frame:0
          TX packets:3378 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          Octets reçus:264517 (264.5 KB) Octets transmis:264517 (264.5 KB)
tap0      Link encap:Ethernet  HWaddr f6:70:8d:b1:a6:8a
          adr inet6: fe80::f470:8dff:feb1:a68a/64 Scope:Lien
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          Packets reçus:15 erreurs:0 :0 overruns:0 frame:0
          TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:500
          Octets reçus:1632 (1.6 KB) Octets transmis:8415 (8.4 KB)

10) Lancement de Qemu :

[~] ➔ cd QEMU
[~/QEMU] ➔
[~/QEMU] ➔ qemu-system-i386 -enable-kvm   -k fr -m 1024 -sdl -soundhw hda,ac97 -vga std -hda vhda.img -boot c -smp 2 -localtime -net nic -net tap,ifname=tap0,script=no

11) Lien :
http://www.chicoree.fr/w/Connecter_une_machine_virtuelle_UML_au_r%C3%A9seau_physique

One Response

Comments are closed, but trackbacks and pingbacks are open.