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

Re: Problem on MAC address



On Fri, 19 Sep 2008, Stephen Liu wrote:

> Hi folks,
>
>
> Debian Etch (both Host and Guest)
> Xen
>
>
> On cloning disk.img I suppose it also copies the MAC address of the
> original image to the new image resulting in "ping hostname" unable to
> find the new hostname.
>
>
> Following is my test;
>
> # dd if=/vserver/domains/xen5.satimis.com/disk.img
> of=/vserver/domains/xen6.satimis.com/disk.img bs=4k
>
> # dd if=/vserver/domains/xen5.satimis.com/swap.img
> of=/vserver/domains/xen6.satimis.com/swap.img bs=4k
>
>
> # xm list --long xen5.satimis.com
> (domain
>     (domid 3)
>     (on_crash restart)
>     (uuid e1074e82-9bbc-8fcd-2e74-e6ab66a3017d)
>             (uuid 18904eab-6d22-da74-79f0-c86198a01e4a)
>             (script vif-bridge)
>             (ip 192.168.0.115)
>             (mac 00:16:3e:32:ab:e7)
>             (type netfront)
>             (backend 0)
>         )
>     )
> # xm list --long xen6.satimis.com
> (domain
>     (domid 2)
>     (on_crash restart)
>     (uuid 07a8b42b-acfd-ec79-ce19-83f843564db1)
>             (uuid bbc3e77d-e001-90f2-73f6-1d2a042c6e2b)
>             (script vif-bridge)
>             (ip 192.168.0.116)
>             (mac 00:16:3e:0a:c0:fb)
>             (type netfront)
>             (backend 0)
>
> MAC Address
>
> xen5.satimis.com :-
> (mac 00:16:3e:32:ab:e7)
>
>
> xen6.satimis.com
> (mac 00:16:3e:0a:c0:fb)
>
>
> # nano /etc/network/interfaces
> making following change
>
> iface eth0 inet static
>  address 192.168.0.116 = mac 00:16:3e:0a:c0:fb
>  gateway 192.168.0.1
>  netmask 255.255.255.0
>
>
> Remark:-
>
> Also tried;
>  address 192.168.0.116 = MAC of mac 00:16:3e:0a:c0:fb
>  address 192.168.0.116 = 00:16:3e:0a:c0:fb
>  address 192.168.0.116 = MAC of 00:16:3e:0a:c0:fb
>
>
> None of them worked.
>
>
> # /etc/init.d/networking restart
> Reconfiguring network interfaces...=: Host name lookup failure
> ifconfig: `--help' gives usage information.
> Failed to bring up eth0.
> done.
>
>
> # ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:16:3E:0A:C0:FB
>           inet addr:192.168.0.116  Bcast:192.168.0.255
> Mask:255.255.255.0
>           inet6 addr: fe80::216:3eff:fe0a:c0fb/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:37 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:3154 (3.0 KiB)  TX bytes:3138 (3.0 KiB)
>
> 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:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
>
>
> Please advise how to fix the problem.  TIA
>
>
> B.R.
> Stephen L

To change or set the mac address in /etc/network/interfaces the syntax is:

hwaddress ether 00:16:3e:0a:c0:fb

But, you really shouldn't have to do this in xen, xen should take care of
that for you and present the mac address to your vm.

Jeff




Reply to: