OpenVZ Forum


Home » General » Support » MAC address
MAC address [message #52292] Tue, 12 January 2016 15:31 Go to next message
smrtalex is currently offline  smrtalex
Messages: 1
Registered: January 2016
Junior Member
I need one of my containers to have a MAC address. I am working on Container 540

Here is the Hardware Node:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:25:90:DA:23:3A  
          inet addr:1.2.3.4  Bcast:1.2.3.5  Mask:255.255.255.224
          inet6 addr: de51::225:90ff:feda:233a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9614782075 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15521684333 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1186575679975 (1.0 TiB)  TX bytes:19615054910384 (17.8 TiB)
          Memory:f7200000-f727ffff 

eth1      Link encap:Ethernet  HWaddr 00:25:90:DA:23:3B  
          inet addr:10.100.0.64  Bcast:10.100.255.255  Mask:255.255.0.0
          inet6 addr: de51::225:90ff:feda:233b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:246376844 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7563 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:16834002624 (15.6 GiB)  TX bytes:514438 (502.3 KiB)
          Memory:f7100000-f717ffff 

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:65536  Metric:1
          RX packets:37321608 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37321608 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:25045964193 (23.3 GiB)  TX bytes:25045964193 (23.3 GiB)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet6 addr: de51::1/128 Scope:Link
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:15517477539 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9571416771 errors:0 dropped:14649 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:19396804805226 (17.6 TiB)  TX bytes:1027541525169 (956.9 GiB)

veth540.0 Link encap:Ethernet  HWaddr 00:18:51:F0:C6:F7  
          inet6 addr: de51::218:51ff:fef0:c6f7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:5 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:216 (216.0 b)  TX bytes:72 (72.0 b)

Here it the container information:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:18:51:F0:C6:F7  
          inet6 addr: fe80::218:51ff:fef0:c6f7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:72 (72.0 b)  TX bytes:216 (216.0 b)

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:65536  Metric:1
          RX packets:347 errors:0 dropped:0 overruns:0 frame:0
          TX packets:347 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:41640 (40.6 KiB)  TX bytes:41640 (40.6 KiB)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:107255 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77395 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:111956431 (106.7 MiB)  TX bytes:17908418 (17.0 MiB)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:7.8.9.10  P-t-P:7.8.9.10   Bcast:7.8.9.10   Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

venet0:1  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:7.8.9.11   P-t-P:7.8.9.11  Bcast:7.8.9.11  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

venet0:2  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:7.8.9.12  P-t-P:7.8.9.12  Bcast:7.8.9.12  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

venet0:3  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:7.8.9.13  P-t-P:7.8.9.13  Bcast:7.8.9.13  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

venet0:4  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:7.8.9.14  P-t-P:7.8.9.14  Bcast:7.8.9.14  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1


However, when the encoded script runs, it is only seeing the venet MAC address.

How can I get the venet to show a MAC address?


Re: MAC address [message #52293 is a reply to message #52292] Wed, 13 January 2016 09:17 Go to previous message
curx
Messages: 739
Registered: February 2006
Location: N├╝rnberg, Germany
Senior Member

a venet device has no arp support and so no mac address.
you can configure your eth0 manually - it seems it's you veth for this container but it has same mac on hardware node and in the container?

please post the veth settings:

# grep NETIF /etc/vz/conf/540.conf

the mac on hostnode and ct should be different
Previous Topic: CentOS 5: upgrade vzctl from 3.3 to 4.9.4
Next Topic: Tracing systemd boot errors
Goto Forum:
  


Current Time: Mon Jan 30 01:36:02 GMT 2023

Total time taken to generate the page: 0.00781 seconds