Ubuntu 16.04 Interface Autoconfig

/root

Lt. Commander
Registriert
Okt. 2007
Beiträge
1.285
Hi,

Mir steht ein OpenVZ Server zur Verfügung bei dem man sich auch selber das Image aussuchen kann.
Leider scheint das Ubuntu 16.04 Default Template irgendwie Buggy zu sein => die Interface Config wird nicht nach dem Boot automatisch gesetzt

Ich muss jedesmal nach dem Boot den Networking Daemon restarten und das loopback interface enablen.


Code:
root@high5:/# ifconfig
root@high5:/# ping www.google.at
ping: unknown host www.google.at
root@high5:/#
root@high5:/# /etc/init.d/networking restart
 * Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces
 * Reconfiguring network interfaces...
                                                                         [ OK ]
root@high5:/#
root@high5:/# ifconfig
venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:127.0.0.2  P-t-P:127.0.0.2  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: XXXXXXXXXXXXXXXX Scope:Global
          inet6 addr: XXXXXXXXXXXXXXXX Scope:Global
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:20 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:714 (714.0 B)  TX bytes:401 (401.0 B)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:84.XXX.XXX.XXX  P-t-P:84.XXX.XXX.XXX  Bcast:84.XXX.XXX.XXX  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

root@high5:/# ifconfig lo up
root@high5:/# ifconfig
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)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:127.0.0.2  P-t-P:127.0.0.2  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: XXXXXXXXXXXXXXXX Scope:Global
          inet6 addr: XXXXXXXXXXXXXXXX Scope:Global
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:20 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:714 (714.0 B)  TX bytes:401 (401.0 B)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:84.XXX.XXX.XXX  P-t-P:84.XXX.XXX.XXX  Bcast:84.XXX.XXX.XXX  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

root@high5:/# ping www.google.at
PING www.google.at (216.58.214.35) 56(84) bytes of data.
64 bytes from fra15s09-in-f3.1e100.net (216.58.214.35): icmp_seq=1 ttl=53 time=0.843 ms


Das interfaces File ist aber eigentlich gesetzt:
Code:
# This configuration file is auto-generated.
#
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and
# /etc/network/interfaces.tail instead, their contents will be
# inserted at the beginning and at the end of this file, respectively.
#
# NOTE: it is NOT guaranteed that the contents of /etc/network/interfaces.tail
# will be at the very end of this file.
#

# Auto generated lo interface
auto lo
iface lo inet loopback

# Auto generated venet0 interface
auto venet0
iface venet0 inet manual
        up ifconfig venet0 up
        up ifconfig venet0 127.0.0.2
        up route add default dev venet0
        down route del default dev venet0
        down ifconfig venet0 down


iface venet0 inet6 manual
        up ifconfig venet0 add XXXXXXXXXXXXX
        down ifconfig venet0 del XXXXXXXXXXXXX
        up ifconfig venet0 add XXXXXXXXXXXXX
        down ifconfig venet0 del XXXXXXXXXXXXX
        up route -A inet6 add default dev venet0
        down route -A inet6 del default dev venet0

auto venet0:0
iface venet0:0 inet static
        address 84.XXX.XXX.XXX
        netmask 255.255.255.255

Wisst ihr wo das Problem liegt warum das nicht automatisch beim Start passiert?

LG
Ergänzung ()

hat niemand eine Idee? :(
 
Ubuntu 16.04 nimmt kein initd mehr, probier doch evtl. mal den Service mit Systemd zu starten:

sudo systemctl enable networking

Und

sudo systemctl start networking

Danach kannst du den status mit

sudo systemctl status networking abrufen
 
irgendwas stimmt da scheinbar nicht:

Code:
root@high5:~# systemctl enable networking
Synchronizing state of networking.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable networking
insserv: warning: current start runlevel(s) (S) of script `networking` overrides LSB defaults (2 3 4 5).
insserv: warning: current start runlevel(s) (S) of script `networking` overrides LSB defaults (2 3 4 5).
update-rc.d: error: no runlevel symlinks to modify, aborting!

root@high5:~# systemctl start networking
Failed to connect to bus: No such file or directory

root@high5:~# systemctl status networking
Failed to connect to bus: No such file or directory
 
Zurück
Oben