systemctl status NetworkManager.service
If running then output should look like:
NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2016-09-19 20:04:34 BST; 2s ago
Main PID: 14727 (NetworkManager)
CGroup: /system.slice/NetworkManager.service
└─14727 /usr/sbin/NetworkManager --no-daemon
3. If 1. is true, than stop NetworkManager.service, otherwise jump to [4. Disable permanently NetworkManager.service] (#4-disable-permanently-networkmanagerservice).
systemctl stop NetworkManager.service
Check if it's really stopped:
systemctl status NetworkManager.service
Output should look like:
NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2016-09-19 20:21:22 BST; 9s ago
Process: 14727 ExecStart=/usr/sbin/NetworkManager --no-daemon (code=exited, status=0/SUCCESS)
Main PID: 14727 (code=exited, status=0/SUCCESS)
systemctl disable NetworkManager.service
ipconfig /all
Output (example):
Ethernet adapter VMware Network Adapter VMnet8:
IPv4 Address. . . . . . . . . . . : 192.168.179.X(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
It's importatnt to know the VMnet8 IP Adress because we will configure our ethernet static IP Address to be on same subnet.
-
Identify your ethernet device ip -d link
-
Example configuration:
TYPE=Ethernet BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=no IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no NAME=eno16777736 UUID=xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxxxxx DEVICE=eno16777736 ONBOOT=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes PREFIX=24 IPADDR=192.168.179.XXX NETMASK=255.255.255.0 ZONE=public
Use:
XXX - replace with number < 254
NETWORKING=yes
GATEWAY=192.168.179.X
Use:
X - replace with number
nameserver 192.168.179.X
Use:
X - replace with same number as in [7. Configure network file /etc/sysconfig/network] (#7-configure-network-file-etcsysconfignetwork)
systemctl restart network.service
Check status:
systemctl restart network.service
Output:
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: active (exited) since Tue 2016-09-20 08:10:02 BST; 52min ago
Docs: man:systemd-sysv-generator(8)
Process: 5050 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
Process: 5235 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)
Sep 20 08:10:00 osboxes systemd[1]: Starting LSB: Bring up/down n....
Sep 20 08:10:00 osboxes network[5235]: Bringing up loopback interf...
Sep 20 08:10:02 osboxes network[5235]: Bringing up interface eno16...
Sep 20 08:10:02 osboxes systemd[1]: Started LSB: Bring up/down ne....
You should see Bringing up interface eno16.. as that will bind your ethernet device with ip address.
Tip: use journalctl -f in other terminal to see network.service log messages during restart
Configure /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
And again [9. Restart systemd network.service] (#9-restart-systemd-networkservice)
Now you should be able to connect from windows with putty, address 192.168.179.XXX, see [6. Configure ifcfg file e.g /etc/sysconfig/network-scripts/ifcfg-eno16777736] (#6-configure-ifcfg-file-eg-etcsysconfignetwork-scriptsifcfg-eno16777736)
To configure DNS:
sudo vi /etc/resolvconf/resolv.conf.d/tail
add
nameserver 192.168.179.X
restart resolvconf with:
sudo resolvconf -u
TODO:
- Complete Ubuntu 12.04 (windows/vmware player/upstart):
- Add link to related resources
- Add somewhere notice about VM Network Settings configuration (NAT, Bridged .etc)
- Configuring Centos to disable Network Manager and use just network service [ https://www.centos.org/forums/viewtopic.php?t=53972 ]