If your host Linux system is configured with more than one physical network adapter (Wired or Wireless) one can enable up to 4 network ethernet adapters with VMware Player. A NST Virtual Machine running under VMware Player host control can utilize each of the 4 network interfaces by running a different network/security application on each one of them.
The following sections cover the details on how to configure additional physical network adapters to be used with a NST Virtual Machine under a Linux-based VMware Player host.
The preconfigured Linux "vmx
"
VMware Player configuration file:
"nst-vm-linux2.11.0.vmx
" has 4 network ethernet
interfaces already defined. Network interface:
"eth0
" will start in a
"connected" state while network interfaces:
"eth1
", "eth2
" and
"eth3
" will be started in the
disconnected state. Network interface:
"eth3
" also has its
"present" state set to
"false". This allows for audio and sound
usage with NST. If audio is not required, one can enable the
"present" state to
"true" for this interface. The connection
type (connectionType) for each defined
network ethernet interface is set to:
"custom".
The following shows the predefined ethernet interface
settings within the Linux "vmx
"
VMware Player configuration file:
"nst-vm-linux2.11.0.vmx
":
Figure 13.5. Predefined Ethernet Interface Settings (Linux - vmx)
ethernet0.present = "TRUE" ethernet0.virtualDev = "vmxnet" ethernet0.startConnected = "TRUE" ethernet0.connectionType = "custom" ethernet0.vnet = "/dev/vmnet0" ethernet1.present = "TRUE" ethernet1.virtualDev = "vmxnet" ethernet1.startConnected = "FALSE" ethernet1.connectionType = "custom" ethernet1.vnet = "/dev/vmnet2" ethernet2.present = "TRUE" ethernet2.virtualDev = "vmxnet" ethernet2.startConnected = "FALSE" ethernet2.connectionType = "custom" ethernet2.vnet = "/dev/vmnet3" ethernet3.present = "FALSE" ethernet3.virtualDev = "vmxnet" ethernet3.startConnected = "FALSE" ethernet3.connectionType = "custom" ethernet3.vnet = "/dev/vmnet4"
Each defined network adapter will assume a globally unique "MAC" address when the NST Virtual Machine is first booted up. This allows for multiple NST Virtual Machine instances to exist on the same physical network subnet without duplicate "ARP" entries being discovered.
The following shows an example of the globally unique
"MAC" addresses and the
"UUID" generated after the first time the
NST Virtual Machine is started. This is typically generated at
the end of the Linux "vmx
"
VMware Player configuration file:
"nst-vm-linux2.11.0.vmx
"
Figure 13.6. Generated Globally Unique MAC and UUID Values (Linux - vmx)
ethernet0.addressType = "generated" ethernet1.addressType = "generated" ethernet2.addressType = "generated" uuid.location = "56 4d 21 a4 b2 4c cc ed-2d 17 2d 69 cf d4 fa 6d" uuid.bios = "56 4d 21 a4 b2 4c cc ed-2d 17 2d 69 cf d4 fa 6d" ethernet0.generatedAddress = "00:0c:29:d4:fa:6d" ethernet0.generatedAddressOffset = "0" ethernet1.generatedAddress = "00:0c:29:d4:fa:77" ethernet1.generatedAddressOffset = "10" ethernet2.generatedAddress = "00:0c:29:d4:fa:81" ethernet2.generatedAddressOffset = "20"
A mapping for each physical network adapter to a
VMware Player virtual network adapter needs to occur. The
preconfigured Linux "vmx
"
VMware Player configuration file:
"nst-vm-linux2.11.0.vmx
" has already defined the
following logical ethernet to virtual network adapter
mapping:
"eth0
" <=> "/dev/vmnet0
"
"eth1
" <=> "/dev/vmnet2
"
"eth2
" <=> "/dev/vmnet3
"
"eth3
" <=> "/dev/vmnet4
"
Use the "/usr/bin/vmware-config.pl" Linux VMware Player "VMware Configurator" script to perform the logical to virtual network adapter mapping. The results of running this script will be to start up a "bridge mapping" process for each network interface that needs to be mapped. Each mapping will be associated with a "Bridged" connection type. After all said and done the physical to logical (done by the Linux Kernel loadable network modules) to virtual network adapter (done by the "/usr/bin/vmware-config.pl" script) mapping will be completed.
Lets use a Linux VMware Player host system configured with 2 physical network ethernet adapters (in this case 2 gigabit ethernet adapters "eth0" and "eth1" adapter) to demostrate a physical to virtual network adapter mapping example:
First lets show what network interfaces are available using the "/sbin/ifconfig -a" command:
[root@striker ~]#
/sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:07:E9:0E:2B:7B inet addr:10.222.222.14 Bcast:10.222.222.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe0e:2b7b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1075542 errors:0 dropped:0 overruns:0 frame:0 TX packets:910768 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:739987052 (705.7 MiB) TX bytes:413469820 (394.3 MiB) Base address:0xdcc0 Memory:ff6e0000-ff700000 eth1 Link encap:Ethernet HWaddr 00:08:74:4F:EA:35 inet6 addr: fe80::208:74ff:fe4f:ea35/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1816456 errors:0 dropped:0 overruns:0 frame:0 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:10 RX bytes:119424833 (113.8 MiB) TX bytes:984 (984.0 b) Base address:0xdc80 Memory:ff6c0000-ff6e0000 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:16436 Metric:1 RX packets:3956 errors:0 dropped:0 overruns:0 frame:0 TX packets:3956 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2504748 (2.3 MiB) TX bytes:2504748 (2.3 MiB) sit0 Link encap:IPv6-in-IPv4 NOARP MTU:1480 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)
Next we will run the VMware Player "VMware Configurator" script: "/usr/bin/vmware-config.pl" to perform the mapping: (***Note: Only the network mapping output section is shown.)
[root@striker ~]#
/usr/bin/vmware-config.pl
... You have already setup networking. Would you like to skip networking setup and keep your old settings as they are? (yes/no) [no] Do you want networking for your virtual machines? (yes/no/help) [yes] Would you prefer to modify your existing networking configuration using the wizard or the editor? (wizard/editor/help) [wizard] The following bridged networks have been defined: . vmnet0 is bridged to eth0 Do you wish to configure another bridged network? (yes/no) [no] yes Configuring a bridged network for vmnet2. The following bridged networks have been defined: . vmnet0 is bridged to eth0 . vmnet2 is bridged to eth1 All your ethernet interfaces are already bridged. Do you want to be able to use NAT networking in your virtual machines? (yes/no) [yes] no Do you want to be able to use host-only networking in your virtual machines? [no] Extracting the sources of the vmnet module. Building the vmnet module. Building for VMware Player 1.0.x or VMware Workstation 5.5.x. Using 2.6.x kernel build system. make: Entering directory `/tmp/vmware-config0/vmnet-only' make -C /lib/modules/2.6.16-1.2108_FC4smp/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: Entering directory `/usr/src/kernels/2.6.16-1.2108_FC4-smp-i686' CC [M] /tmp/vmware-config0/vmnet-only/driver.o CC [M] /tmp/vmware-config0/vmnet-only/hub.o CC [M] /tmp/vmware-config0/vmnet-only/userif.o CC [M] /tmp/vmware-config0/vmnet-only/netif.o CC [M] /tmp/vmware-config0/vmnet-only/bridge.o CC [M] /tmp/vmware-config0/vmnet-only/procfs.o CC [M] /tmp/vmware-config0/vmnet-only/smac_compat.o CC [M] /tmp/vmware-config0/vmnet-only/smac_linux.x386.o LD [M] /tmp/vmware-config0/vmnet-only/vmnet.o Building modules, stage 2. MODPOST CC /tmp/vmware-config0/vmnet-only/vmnet.mod.o LD [M] /tmp/vmware-config0/vmnet-only/vmnet.ko make[1]: Leaving directory `/usr/src/kernels/2.6.16-1.2108_FC4-smp-i686' cp -f vmnet.ko ./../vmnet.o make: Leaving directory `/tmp/vmware-config0/vmnet-only' The module loads perfectly in the running kernel. Starting VMware services: Virtual machine monitor [ OK ] Virtual ethernet [ OK ] Bridged networking on /dev/vmnet0 [ OK ] Bridged networking on /dev/vmnet2 [ OK ] The configuration of VMware Player 1.0.1 build-19317 for Linux for this running kernel completed successfully. You can now run VMware Player by invoking the following command: "/usr/bin/vmplayer". ...
At this point the mapping should be completed using the "Bridged" connection type. One can perform a check by searching for running VMware Player "vmnet-bridge" processes:
[root@striker ~]#
/bin/ps -ef|grep "vmnet-bridge"
root 25526 1 0 07:33 pts/3 00:00:00 /usr/bin/vmnet-bridge -d /var/run/vmnet-bridge-0.pid /dev/vmnet0 eth0 root 25530 1 0 07:33 pts/3 00:00:00 /usr/bin/vmnet-bridge -d /var/run/vmnet-bridge-2.pid /dev/vmnet2 eth1
Finally, after the NST Virtual Machine is started you will need to enable the additional network adapter you have just added for this guest virtual machine. It will most likely be in a disconnected state. Use the VMware Player menu bar to enable the virtual ethernet device by changing its state to: connected.