0

I have a network card with 4 Ethernet ports. I am trying to use 2 of them, 1 for the main system and one for a LXC container. When I look up tutorials on how to dedicate eth1 interface to the container, they all tell me to start by opening up my /etc/network/interfaces file but none exists. I only have 3 directories in there and none of the have an interfaces file. I can't find anything on the internet related to this.

user@server:/etc/network$ ls -a
.  ..  if-post-down.d  if-pre-up.d  if-up.d
user@server:/etc/network$ ls -aR
.:
.  ..  if-post-down.d  if-pre-up.d  if-up.d

./if-post-down.d:
.  ..  bridge

./if-pre-up.d:
.  ..  bridge  ethtool  mtuipv6

./if-up.d:
.  ..  ethtool  mtuipv6

Ubuntu version:

user@server:~/$ lsb_release -d
Description:    Ubuntu 19.04
user@server:~$ cat /etc/netplan/50-cloud-init.yaml 
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eno1:
            dhcp4: true
    version: 2
user@server:~$ sudo lshw -C network
[sudo] password for user:
  *-network:0
       description: Ethernet interface
       product: NetXtreme II BCM5709 Gigabit Ethernet
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: eno1
       version: 20
       serial: 00:26:b9:45:6e:8b
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.2.6 duplex=full firmware=7.8.16 bc 7.4.0 NCSI 2.0.13 ip=10.0.0.13 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:32 memory:d6000000-d7ffffff
  *-network:1 DISABLED
       description: Ethernet interface
       product: NetXtreme II BCM5709 Gigabit Ethernet
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0.1
       bus info: pci@0000:01:00.1
       logical name: eno2
       version: 20
       serial: 00:26:b9:45:6e:8d
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.2.6 duplex=half firmware=7.8.16 bc 7.4.0 NCSI 2.0.13 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:33 memory:d8000000-d9ffffff
  *-network:0 DISABLED
       description: Ethernet interface
       product: NetXtreme II BCM5709 Gigabit Ethernet
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eno3
       version: 20
       serial: 00:26:b9:45:6e:8f
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.2.6 duplex=half firmware=7.8.16 bc 7.4.0 NCSI 2.0.13 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:34 memory:da000000-dbffffff
  *-network:1 DISABLED
       description: Ethernet interface
       product: NetXtreme II BCM5709 Gigabit Ethernet
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0.1
       bus info: pci@0000:02:00.1
       logical name: eno4
       version: 20
       serial: 00:26:b9:45:6e:91
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.2.6 duplex=half firmware=7.8.16 bc 7.4.0 NCSI 2.0.13 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:35 memory:dc000000-ddffffff
  *-network:0
       description: Ethernet interface
       physical id: 1
       logical name: docker0
       serial: 02:42:63:a1:44:18
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.17.0.1 link=no multicast=yes
  *-network:1
       description: Ethernet interface
       physical id: 2
       logical name: br-135ff2e86e4b
       serial: 02:42:fa:bc:d2:a8
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.19.0.1 link=no multicast=yes
  *-network:2
       description: Ethernet interface
       physical id: 3
       logical name: br-ca014f092875
       serial: 02:42:e3:a1:3f:9e
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.18.0.1 link=no multicast=yes
  *-network:3
       description: Ethernet interface
       physical id: 4
       logical name: lxcbr0
       serial: 00:16:3e:00:00:00
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=10.0.1.1 link=no multicast=yes
Jake H.
  • 1
  • 3
  • Which Ubuntu version did you install? Please edit your question to show the result of: `lsb_release -d` Welcome to Ask Ubuntu. – chili555 Jun 19 '19 at 22:10
  • I know precisely nothing about LXC so I can't help much. I believe, however, that you should have an /etc/network/interfaces file containing nothing but loopback. I also believe that your networking setup should be in netplan. Finally, I doubt that your ethernet interface is eth1 in Ubuntu 19.04. Please check carefully. – chili555 Jun 19 '19 at 22:35
  • Is this a Desktop or Server installation? Edit your question and show me `cat /etc/netplan/*.yaml` and `sudo lshw -C network`. – heynnema Jun 19 '19 at 22:38
  • It is a server installation – Jake H. Jun 19 '19 at 22:40
  • If you show me the output that I requested, I can help you better. Please start comments to me with @heynnema or I may miss them. – heynnema Jun 20 '19 at 01:40
  • Sorry for the delay @heynnema I had an emergency yesterday and couldn't respond. Updated the question with those outputs. – Jake H. Jun 20 '19 at 22:58
  • Give me the link that you were following to setup a dedicated link to lxc. Does it require a static address? – heynnema Jun 21 '19 at 00:10
  • [Here is the link](https://blog.ubuntu.com/2015/11/10/converting-eth0-to-br0-and-getting-all-your-lxc-or-lxd-onto-your-lan) I wasn't worrying about that because I would change the settings on the router to always assign the same IP which I have done for all of my hard wired computers. – Jake H. Jun 21 '19 at 00:12
  • I guess that this one is a little over my head. Sorry. – heynnema Jun 21 '19 at 00:35
  • 1
    Does this answer your question? [Why did Ubuntu change the network configuration](https://askubuntu.com/questions/1005390/why-did-ubuntu-change-the-network-configuration) – hoatzin Aug 17 '22 at 15:11

0 Answers0