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

18 thoughts on “Ubuntu VM Network Configuration

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

  2. My wife and i ended up being really peaceful when John managed
    to deal with his analysis through the ideas he obtained out of the web site.
    It is now and again perplexing to simply find yourself
    giving freely guidelines that people could have been selling.
    We consider we have got the blog owner to appreciate for that.
    Those explanations you’ve made, the easy web site menu, the friendships your site assist to promote
    – it is most incredible, and it’s helping our son in addition to the family reckon that this concept is fun, which is certainly really
    mandatory. Thanks for all!

  3. Having read this I believed it was very enlightening.
    I appreciate you taking the time and effort to put this content together.
    I once again find myself personally spending a significant amount of time both reading and leaving comments.

    But so what, it was still worthwhile!

  4. I’m very pleased to uncover this page. I want to to thank you for your time for this fantastic read!!
    I definitely liked every little bit of it and i also have you bookmarked to see new information in your web site.

  5. Good web site you’ve got here.. It’s difficult to find high-quality writing like yours these days.
    I seriously appreciate people like you! Take care!!

Leave a Reply

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