I've worked with other flavors of unix and a bit of linux, but never Ubuntu. I didn't think it would be too hard to set a static IP for a virtualbox ubuntu server (17.10).
The machine seems to grab an IP from dhcp, but I can't figure out why or how to change it. It can see my other machines and get to the internet. I'm using a bridged adapter on my virtual ubuntu guest. For the guest I've got the following:
Code: Select all
dluser@dlbox:~$ ifconfig -a
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.24 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::a00:27ff:fe7f:c7f8 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:7f:c7:f8 txqueuelen 1000 (Ethernet)
RX packets 905 bytes 235940 (235.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 535 bytes 70731 (70.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 196 bytes 13898 (13.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 196 bytes 13898 (13.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Code: Select all
dluser@dlbox:~$ sudo lshw -class network
[sudo] password for dluser:
*-network
description: Ethernet interface
product: 82540EM Gigabit Ethernet Controller
vendor: Intel Corporation
physical id: 3
bus info: pci@0000:00:03.0
logical name: enp0s3
version: 02
serial: 08:00:27:7f:c7:f8
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 66MHz
capabilities: pm pcix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full ip=192.168.0.24 latency=64 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:19 memory:f0000000-f001ffff ioport:d010(size=8)
Code: Select all
dluser@dlbox:~$ cat /etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# Generated by debian-installer.
# This file describes the network interfaces available on your system
# # and how to activate them. For more information, see interfaces(5).
#
# # The loopback network interface
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet static
address 192.168.0.23
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
And just to show this, these commands don't exist. I see them in many posts.
Code: Select all
dluser@dlbox:~$ sudo ifup enp0s3
sudo: ifup: command not found
dluser@dlbox:~$ sudo ifdown enp0s3
sudo: ifdown: command not found
Thanks for any help.