qemu-discuss
[Top][All Lists]
Advanced

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

[Qemu-discuss] Qemu guest network tap interface


From: Charles Chou
Subject: [Qemu-discuss] Qemu guest network tap interface
Date: Thu, 17 May 2012 11:18:18 -1000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1

Hi,
I configured the network my QEMU host machine running on CentOS6.2 as bridge successfully:

address@hidden bmd]# ifconfig
br0       Link encap:Ethernet  HWaddr 00:15:17:40:96:74
inet addr:192.168.102.80 Bcast:192.168.102.255 Mask:255.255.255.0
          inet6 addr: fe80::215:17ff:fe40:9674/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20055 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27638 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2762743 (2.6 MiB)  TX bytes:31627372 (30.1 MiB)

eth0      Link encap:Ethernet  HWaddr 00:15:17:40:96:74
          inet6 addr: fe80::215:17ff:fe40:9674/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20496 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28010 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3202272 (3.0 MiB)  TX bytes:31662921 (30.1 MiB)
          Interrupt:18 Memory:b8820000-b8840000

eth1      Link encap:Ethernet  HWaddr 00:15:17:40:96:75
inet addr:192.168.103.1 Bcast:192.168.103.255 Mask:255.255.255.0
          inet6 addr: fe80::215:17ff:fe40:9675/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1
          RX packets:260507 errors:0 dropped:0 overruns:0 frame:0
          TX packets:260334 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1062934092 (1013.6 MiB)  TX bytes:18960090 (18.0 MiB)
          Interrupt:19 Memory:b8800000-b8820000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:152 errors:0 dropped:0 overruns:0 frame:0
          TX packets:152 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4138 (4.0 KiB)  TX bytes:4138 (4.0 KiB)

tap0      Link encap:Ethernet  HWaddr 52:C8:86:88:76:AC
          inet6 addr: fe80::50c8:86ff:fe88:76ac/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:192 errors:0 dropped:0 overruns:0 frame:0
          TX packets:569 errors:0 dropped:1265 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:23702 (23.1 KiB)  TX bytes:123386 (120.4 KiB)

tap1      Link encap:Ethernet  HWaddr 4A:42:46:83:D6:C2
          inet6 addr: fe80::4842:46ff:fe83:d6c2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:80 errors:0 dropped:0 overruns:0 frame:0
          TX packets:129 errors:0 dropped:1546 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:12045 (11.7 KiB)  TX bytes:22563 (22.0 KiB)

I can now create a VM which will get its IP address via dhcp through the tap interface, tap0:

However when I bring up the 2nd VM using tap1 I found that the IP address of the VM is the same as the 1st VM. When doing an ifconfig I can see that the 2 eth0 interfaces have the same HWaddr which explains why the IP addresses are the same as they both use the same HWaddr to get the IP address from dhcp.

I also noticed that the HWaddr of VM's eth0 is not the same as the HWaddr of the tap interface.

Question: how do I force the VM to use the HWaddr of the tap interface?


Thanks in advance for your help!

Regards,
Charles Chou




reply via email to

[Prev in Thread] Current Thread [Next in Thread]