[lxc-users] New Network interface
Thouraya TH
thouraya87 at gmail.com
Tue Dec 16 12:30:29 UTC 2014
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20141216/81c3eaca/attachment.html>
More information about the lxc-users
mailing list