[lxc-users] Networking: virtual interface name
Tamas Papp
tompos at martos.bme.hu
Wed Aug 13 18:18:04 UTC 2014
On 08/13/2014 07:31 PM, Garrett Gauthier wrote:
>
> To keep accounting for network traffic for each container, I need to
> know the virtual interface name. The problem is that each time my
> container starts I get a new interface created on the host, something
> like vethCSR894, it is never the same. I have tried by using
> lxc.network.veth.pair but that parameter is ignored and a new interace
> pair is cerated each time VETH##### (Host) ↔ ETH0 (Container).
>
> So bottom line I want to create a virtual interface that is connected
> to my bridge and force the container to use that interface each time.
>
> I used Cacti but any tool has the same issue as the interface name is
> randomly generated each time the container starts.
>
> Any help would be appreciated.
>
It works for me:
lxc.network.veth.pair = veth_da-ipa-0
veth_da-ipa-0 Link encap:Ethernet HWaddr fe:b4:38:ea:b4:bd
inet6 addr: fe80::fcb4:38ff:feea:b4bd/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:454968 errors:0 dropped:0 overruns:0 frame:0
TX packets:539471 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:31878374 (31.8 MB) TX bytes:39564227 (39.5 MB)
tamas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140813/6ddf3877/attachment.html>
More information about the lxc-users
mailing list