<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 08/13/2014 07:31 PM, Garrett
Gauthier wrote:<br>
</div>
<blockquote
cite="mid:BLU405-EAS42858A092401939CC81CA2AF5EB0@phx.gbl"
type="cite">
<meta name="generator" content="Windows Mail 17.5.9600.20573">
<style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst,
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle,
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style>
<div data-externalstyle="false" dir="ltr" style="font-family:
'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI',
'Microsoft JhengHei UI', 'Malgun Gothic',
'sans-serif';font-size:12pt;">
<div><br>
</div>
<div data-signatureblock="true">
<div>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).</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div> </div>
<div> I used Cacti but any tool has the same issue as the
interface name is randomly generated each time the container
starts.</div>
<div><br>
</div>
<div>Any help would be appreciated.</div>
<br>
</div>
</div>
</blockquote>
<br>
It works for me:<br>
<br>
lxc.network.veth.pair = veth_da-ipa-0<br>
<br>
<br>
veth_da-ipa-0 Link encap:Ethernet HWaddr fe:b4:38:ea:b4:bd <br>
inet6 addr: fe80::fcb4:38ff:feea:b4bd/64 Scope:Link<br>
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1<br>
RX packets:454968 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:539471 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:1000 <br>
RX bytes:31878374 (31.8 MB) TX bytes:39564227 (39.5 MB)<br>
<br>
<br>
<br>
<br>
<br>
tamas<br>
</body>
</html>