On 2011-04-14,at 14:22:26, Amos Kong wrote: >发送日期:2011-04-14 14:22:26 >收件人:wuyu8242 >抄送:Lucas Meneghel Rodrigues; Amos Kong; autotest >主题:Re: [Autotest] About the mac addr and ip addr >> >2011/4/13 wuyu8242 <[email protected]>: >> hi Lucas, Amos, >> >> Disturbing you!There are some issues about network test. About the mac addr >> and ip addr, the result of ifconfig include eth0 and eth1, the eth0 has no >> ip address, the eth1 has a ip: 10.0.2.25, but the conf file of eth1 is not > >What's your qemu commandline ? '10.0.2.25 always be assigned when we >use userspace network(NAT mode). >qemu-kvm -net user .... my command line as following: [33m 92 04/15 05:48:34 INFO | kvm_vm:0987| Running qemu command: /usr/bin/qemu-kvm -name 'vm1' -monitor unix:'/tmp/monitor-humanmonitor1-20110411-062101-hWQJ',server,nowait -serial unix:'/tmp/serial-20110411-062101-hWQJ',server,nowait -drive file='/tmp/kvm_autotest_root/images/f11-64.qcow2',index=0,if=ide,cache=none -net nic,vlan=0,model=rtl8139,macaddr='9a:a3:23:b0:e0:d0',id='idsLxMpu' -net user,vlan=0 -m 512 -smp 2 -redir tcp:5000::22 -vnc :0
if the network is the NAT mode, why not connect other ip? and the 10.0.2.25 is fixed. >> in the folder of network-scripts. When i login to OS via vncvier and modify >> the eth0 conf file to which adding a static ip address, but after reboot >> system by autotest, the static ip did not work. So, I want to know how the >> mac and ip work? It seems that the mac and ip is random generated in code. >> >> the result of ifconfig as following: >> eth0 Link encap:Ethernet HWaddr 9a:a3:23:b0:89:97 >> inet6 addr: fe80::862b:2bff:fefb:6221/64 Scope:Link >> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >> RX packets:2202413 errors:0 dropped:0 overruns:0 frame:0 >> TX packets:3522229 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:1000 >> RX bytes:180142612 (171.7 MiB) TX bytes:4376131237 (4.0 GiB) >> Interrupt:90 Memory:d6000000-d6012800 >> >> eth1 Link encap:Ethernet HWaddr 9a:a3:23:b0:a9:09 >> inet addr:10.0.2.15 Bcast:10.0.2.155 Mask:255.255.255.0 >> inet6 addr: fe80::862b:2bff:fefb:6221/64 Scope:Link >> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >> RX packets:2104923 errors:0 dropped:0 overruns:0 frame:0 >> TX packets:1235646 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:0 >> RX bytes:127531796 (121.6 MiB) TX bytes:4236220874 (3.9 GiB) >> >> 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:815907534 errors:0 dropped:0 overruns:0 frame:0 >> TX packets:815907534 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:0 >> RX bytes:69361764582 (64.5 GiB) TX bytes:69361764582 (64.5 GiB) >> virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 >> inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 >> inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link >> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >> RX packets:0 errors:0 dropped:0 overruns:0 frame:0 >> TX packets:57 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:0 >> RX bytes:0 (0.0 b) TX bytes:10768 (10.5 KiB) >> >> As can be seen from the result of ifconfig, the eth1 is working. If I setup >> dhcp server in host, the issue can be resolved? >> >> BTW, after update the code by "git pull", the desktop of the virtual machine >> setup by autotest can not be started via vnc, and only start text system. >> >> Thanks! >> wuyu >> >> _______________________________________________ >> Autotest mailing list >> [email protected] >> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest >> >> > ------------------ wuyu8242 2011-04-15 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
