Ubuntu VM Network Configuration

At the moment, my Ubuntu VM is already created with default configuration. Next, I will have to make some changes and connect the Ubuntu VM to the following networks:

Network Connected Device Device Port Info IP
vmnet3 vMX – Ubuntu Server eth0 OoB MNG Net 192.168.83.10
vmnet4 vMX – Ubuntu Server eth1 Intelink with VLANs 172.16.109.10
vmnet5 vMX – Ubuntu Server eth2 Intelink with VLANs 192.168.50.10

Software

  • Ubuntu 14.04.1 LTS
  • VMWare Fusion 10.0.1 Pro

Procedure

1. Create the needed networks into VMWare Fusion using Network GUI.

2. From Fusion application, click Ubuntu VM, go to Virtual Machine > Settings… and add the created networks.

3. Login to Ubuntu VM from Fusion console.

silvia@vMX-ubuntu:~$ sudo -i
[sudo] password for silvia:

4. Check the network setting.

root@vMX-ubuntu:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:9e:bb:5b  
          inet6 addr: fe80::20c:29ff:fe9e:bb5b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:185 errors:0 dropped:0 overruns:0 frame:0
          TX packets:111 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:18483 (18.4 KB)  TX bytes:14165 (14.1 KB)
eth1      Link encap:Ethernet  HWaddr 00:0c:29:9e:bb:65  
          inet6 addr: fe80::20c:29ff:fe9e:bb65/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)
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:48 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3596 (3.5 KB)  TX bytes:3596 (3.5 KB)
virbr0    Link encap:Ethernet  HWaddr 52:54:00:07:ea:ed  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  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)

4. Change default configuration for eth0 by deleting DHCP setting and adding the static setting. Note: eth0 is connected to vmnet3.

 root@vMX-ubuntu:~# cat /etc/network/interfaces
 # 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

# The primary network interface
 auto eth0
 iface eth0 inet dhcp static
 address 192.168.83.10
 netmask 255.255.255.0
 network 192.168.83.0
 broadcast 192.168.83.255
 gateway 192.168.83.1

# The secondary networks interface
 auto eth1
 iface eth1 inet manual

5. Restart Ubuntu VM. It didn’t work for me to restart the interface or networking process.

6. When the Ubuntu VM is UP again, check the interface

silvia@vMX-ubuntu:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0c:29:9e:bb:5b
inet addr:192.168.83.10 Bcast:192.168.83.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe9e:bb5b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:201 errors:0 dropped:0 overruns:0 frame:0
TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19908 (19.9 KB) TX bytes:16815 (16.8 KB)

7. Configure eth1 and eth2 network interfaces connected to vmnet4 and vmnet5.

silvia@vMX-ubuntu:~$ cat /etc/network/interfaces
# 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

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.83.10
netmask 255.255.255.0
network 192.168.83.0
broadcast 192.168.83.255
gateway 192.168.83.1



# The secondary networks interface
auto eth1
iface eth1 inet static
address 172.16.109.10
netmask 255.255.255.0
network 172.16.109.0
broadcast 172.16.109.255
gateway 172.16.109.1

# The secondary networks interface
auto eth2
iface eth2 inet static
address 192.168.50.10
netmask 255.255.255.0
network 192.168.50.0
broadcast 192.168.50.255
gateway 192.168.50.1

8. Restart the VM and check again the network configuration.

silvia@vMX-ubuntu:~$ ifconfig | grep -A 1 eth
eth0 Link encap:Ethernet HWaddr 00:0c:29:9e:bb:5b 
inet addr:192.168.83.10 Bcast:192.168.83.255 Mask:255.255.255.0
--
eth1 Link encap:Ethernet HWaddr 00:0c:29:9e:bb:65 
inet addr:172.16.109.10 Bcast:172.16.109.255 Mask:255.255.255.0
--
eth2 Link encap:Ethernet HWaddr 00:0c:29:9e:bb:6f 
inet addr:192.168.50.10 Bcast:192.168.50.255 Mask:255.255.255.0

One thought on “Ubuntu VM Network Configuration

  1. Pingback: S4: vMX Initial Configuration – Silvique Tech Notes

Leave a Reply

Your email address will not be published. Required fields are marked *