Debian 9.5 LXC NIC

Discussion in 'Proxmox VE: Networking and Firewall' started by Jevin gala, Dec 5, 2018.

  1. Jevin gala

    Jevin gala New Member

    Joined:
    Dec 5, 2018
    Messages:
    5
    Likes Received:
    0
    Hi,

    Network status is showing this error :

    Dec 05 07:33:00 test ifup[360]: ifup: failed to bring up eth0
    Dec 05 07:33:00 test systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
    Dec 05 07:33:00 test systemd[1]: Failed to start Raise network interfaces.


    And interface name is shown as eth0@if42 in LXC vps
     
  2. t.lamprecht

    t.lamprecht Proxmox Staff Member
    Staff Member

    Joined:
    Jul 28, 2015
    Messages:
    909
    Likes Received:
    89
    What's your config?
    Code:
    pct config CTID
    And CT internal network settings, e.g.,
    Code:
    cat /etc/network/interfaces
    ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Jevin gala

    Jevin gala New Member

    Joined:
    Dec 5, 2018
    Messages:
    5
    Likes Received:
    0
    root@proxmox:~# pct config 1016
    arch: amd64
    cores: 2
    cpulimit: 0
    cpuunits: 1204
    hostname: test
    memory: 1204
    net0: name=eth0,bridge=vmbr1,hwaddr=00:16:3e:7c:66:bb,type=veth
    onboot: 1
    ostype: debian
    rootfs: local:1016/vm-1016-dgyswiss0wukg4zr-agr301gieduz4oqp.raw,size=5G
    swap: 0
    --------------------------------------------------------------------------------------------------------------

    root@test-create-dnd:~# cat /etc/network/interfaces
    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 10.0.0.8
    netmask 255.255.255.0

    gateway 10.0.0.1
     
  4. t.lamprecht

    t.lamprecht Proxmox Staff Member
    Staff Member

    Joined:
    Jul 28, 2015
    Messages:
    909
    Likes Received:
    89
    Hmm, OK, if you manually add the address in the CT, like:

    Code:
    ip addr add 10.0.0.8/24 dev eth0
    ip link set eth0 up
    ping 10.0.0.1
    
    If this works then some more infos about the failed ifup with jorunalctl would be nice, else you may want to check vmbr1 from the host.
    Do other CTs work?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Jevin gala

    Jevin gala New Member

    Joined:
    Dec 5, 2018
    Messages:
    5
    Likes Received:
    0
    Hi,

    I added manually route and it pings to gateway but not to others.
    This is only happening with Debian 9.5 .

    # ifup eth0
    RTNETLINK answers: File exists
    ifup: failed to bring up eth0

    And journalctl -xe shows :

    Dec 05 14:06:06 test-create-dnd systemd[1]: Failed to start Raise network interfaces.
     
  6. t.lamprecht

    t.lamprecht Proxmox Staff Member
    Staff Member

    Joined:
    Jul 28, 2015
    Messages:
    909
    Likes Received:
    89
    and you tried an ifdown / ifup cycle (just to be sure)?
    and
    Code:
    journalctl --since -1hour
    doesn't shows anything else related to this?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Jevin gala

    Jevin gala New Member

    Joined:
    Dec 5, 2018
    Messages:
    5
    Likes Received:
    0
    It shows this :

    root@test-create-dnd:~# ifdown eth0
    ifdown: interface eth0 not configured
    root@test-create-dnd:~# ifup eth0
    RTNETLINK answers: File exists
    ifup: failed to bring up eth0
     
  8. Stoiko Ivanov

    Stoiko Ivanov Proxmox Staff Member
    Staff Member

    Joined:
    May 2, 2018
    Messages:
    386
    Likes Received:
    32
    seems like there is still some manual configuration (via `ip addr add`) in place - please post the output of
    `ip a`
    `ip r`
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Jevin gala

    Jevin gala New Member

    Joined:
    Dec 5, 2018
    Messages:
    5
    Likes Received:
    0
    ip r is empty

    root@test-create-dnd:~# ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    7: eth0@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:00:00:6a:39:28 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.0.0.8/32 brd 10.0.0.8 scope global eth0
    valid_lft forever preferred_lft forever
    inet6 fe80::ff:fe6a:3928/64 scope link
    valid_lft forever preferred_lft forever
     
  10. Stoiko Ivanov

    Stoiko Ivanov Proxmox Staff Member
    Staff Member

    Joined:
    May 2, 2018
    Messages:
    386
    Likes Received:
    32
    * you need to remove the 10.0.0.8/32, if you want the ifup/ifdown to succeed
    * it could be easier to stop the container and start it again
    * if you want to do it manually:
    Code:
    ip a d 10.0.0.8/32  dev eth0
    ifdown -v eth0
    ifup -v eth0
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice