Well I had network manager by Network-Manager. For some reason I have to put the same configuration in /etc/network/interfcaes
. Here's result of ifconfig
before changes
enp0s17 Link encap:Ethernet HWaddr 08:00:27:d4:30:fe
inet addr:10.1.178.177 Bcast:10.1.178.255 Mask:255.255.255.0
inet6 addr: fe80::b077:68e:9963:1b54/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7053 errors:0 dropped:0 overruns:0 frame:0
TX packets:3514 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8356545 (8.3 MB) TX bytes:299049 (299.0 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:251 errors:0 dropped:0 overruns:0 frame:0
TX packets:251 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:25485 (25.4 KB) TX bytes:25485 (25.4 KB)
With the same configuration as reference I created a new file /etc/network/interfaces
as
auto lo
iface lo inet loopback
auto enp0s1
iface enp0s1 inet static
address 10.1.178.179
netmask 255.255.255.0
getway 10.1.178.1
I made a small change in the interface-name. In place of enp0s17
I tried using enp0s1
and enp0s17:1
(virtual interface is where I am heading).
But, I am not able to take this configuration up. I have done,
First, I did systemctl stop network-manager && systemctl restart networking
.
networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since Wed 2016-10-05 18:17:56 IST; 20min ago
Docs: man:interfaces(5)
Process: 15599 ExecStop=/sbin/ifdown -a --read-environment (code=exited, status=0/SUCCESS)
Process: 16189 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 16183 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] &&
Main PID: 16189 (code =exited, status=1/FAILURE)
Oct 05 18:17:56 souvik-VirtualBox systemd[1]: Starting Raise network interfaces...
Oct 05 18:17:56 souvik-VirtualBox ifup[16189]: Cannot find device "enp0s1"
Oct 05 18:17:56 souvik-VirtualBox ifup[16189]: Failed to bring up enp0s1.
Oct 05 18:17:56 souvik-VirtualBox systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Oct 05 18:17:56 souvik-VirtualBox systemd[1]: Failed to start Raise network interfaces.
Oct 05 18:17:56 souvik-VirtualBox systemd[1]: networking.service: Unit entered failed state.
Oct 05 18:17:56 souvik-VirtualBox systemd[1]: networking.service: Failed with result 'exit-code'.
Furthermore I tried ifdown enp0s17 --force
successfully, verified as
$ cat /run/network/ifstate
lo=lo
followed ifup enp0s1 --verbose --force
, which results
Configuring interface enp0s1=enp0s1 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
/bin/ip addr add 10.1.178.177/255.255.255.0 broadcast 10.1.178.255 dev enp0s1 label enp0s1
Cannot find device "enp0s1"
Failed to bring up enp0s1.
Any help would be appreciated.
UPDATE
After reading through this andThis, my problem scope has reduced.
How can resent the network-interface-name assigned by udev
like from enp0s17
to enp0s1
or so ?
And, how can I go ahead adding virtual-network-interfaces aka network-alias, because they will be requiring new names as enps01:1
or enp0s1:2
and likewise ?
Additionally I am missing rule files under /etc/udev/rules.d
and am not able to regenerate it as well. Somewhat similar to this post.
FURTHERMORE
A network-alias can be added in GUI using Network Manager like this. How can this be done in CLI, becuase in Server is not supposed to have GUI.
Best Answer