[lxc-users] New Network interface

Ashish Bunkar ashish.bunkar at oracle.com
Tue Dec 16 14:25:37 UTC 2014


Hi,
Can you please put your requirement more clear?
If you are looking for an additional network interface in the container 
first you will have create corresponding mapping in container's config file.
Below readings should help you :
https://docs.oracle.com/cd/E37670_01/E37355/html/ol_config_os_containers.html
http://www.boxtricks.com/multiple-network-interfaces-lxc-container/

Thanks & Regards
Ashish Bunkar
Contact No.- +91-7259183696

On 12/16/2014 06:00 PM, Thouraya TH wrote:
> Hello,
>
> Please, i have a question about Network Interfaces in LXC container:
> In my container,i have by default these interfaces:
>
> ubuntu at u5:~$ ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:16:3e:b7:de:91
>           inet addr:10.0.3.138  Bcast:10.0.3.255 Mask:255.255.255.0
>           inet6 addr: fe80::216:3eff:feb7:de91/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:56 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:7230 (7.2 KB)  TX bytes:3500 (3.5 KB)
>
> 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: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)
>
> i'd like to add this new interface:
>
> auto eth1
>
> iface eth1 inet static
> address 192.168.1.3
> netmask 255.255.255.0
> network 192.168.1.1
> broadcast 192.168.1.255
>
> *So,i have modified this file: /etc/network/interfaces*
>
> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).
>
> # The loopback network interface
> auto lo
> iface lo inet loopback
>
> auto eth0
> iface eth0 inet dhcp
>
> auto eth1
>
> iface eth1 inet static
> address 192.168.1.3
> netmask 255.255.255.0
> network 192.168.1.1
> broadcast 192.168.1.255
>
> i have done reboot but it didn't work ! when i use ifconfig, i cant' 
> find the new interface:
> ubuntu at u5:/etc/network$ ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:16:3e:b7:de:91
>           inet addr:10.0.3.138  Bcast:10.0.3.255 Mask:255.255.255.0
>           inet6 addr: fe80::216:3eff:feb7:de91/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:57 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:7337 (7.3 KB)  TX bytes:3500 (3.5 KB)
>
> 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: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)
>
> Have you an idea please ?
>
>
> Thanks a lot.
> Best regards.
>
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20141216/8de1e0c9/attachment.html>


More information about the lxc-users mailing list