So, you are studying for a networking certification. Maybe CCNA or CCNP, maybe F5 or Juniper. You need multiple interfaces to run GNS3/Dynamips (A graphical network simulator & Cisco IOS emulator) or your favorite networking tool. Alas, the default configuration of VMWare Fusion just has the basic VMnet1 and VMnet8.
1 2 3 4 5 6 |
vmnet1: flags=8863 mtu 1500 ether 00:50:56:c0:00:01 inet 192.168.187.1 netmask 0xffffff00 broadcast 192.168.187.255 vmnet8: flags=8863 mtu 1500 ether 00:50:56:c0:00:08 inet 172.16.221.1 netmask 0xffffff00 broadcast 172.16.221.255 |
Well… that sucks. What can we do about it? Let’s add some!
You have plenty of available vmnet[2-7] to add more host-only networks to for working with GNS3.
VMWare Fusion 4 makes this SO simple. No more dealing with obnoxious boot.sh and custom setups, complex files. You just edit 1 file, and restart VMware Fusion 4. (Meaning quit and reopen the app)
Open a Terminal window (Applications > Utilities > Terminal) Goto the VMware Fusion preferences directory, and edit the networking file.
1 2 3 |
Jaretts-Laptop:VMware Fusion jkulm$ cd Jaretts-Laptop:~ jkulm$ sudo cd /Library/Preferences/VMware\ Fusion/ Jaretts-Laptop:VMware Fusion jkulm$ sudo vi networking |
You will see this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
VERSION=1,0 answer VNET_1_DHCP yes answer VNET_1_DHCP_CFG_HASH 3E2B2C21A32270A88A8BE22F554F6A7B5AF075B1 answer VNET_1_HOSTONLY_NETMASK 255.255.255.0 answer VNET_1_HOSTONLY_SUBNET 192.168.187.0 answer VNET_1_VIRTUAL_ADAPTER yes answer VNET_1_VIRTUAL_ADAPTER_ADDR 192.168.187.1 answer VNET_8_DHCP yes answer VNET_8_DHCP_CFG_HASH F440BCD7384AD8BF817FD40414F346E7935F1285 answer VNET_8_HOSTONLY_NETMASK 255.255.255.0 answer VNET_8_HOSTONLY_SUBNET 172.16.221.0 answer VNET_8_NAT yes answer VNET_8_VIRTUAL_ADAPTER yes answer VNET_8_VIRTUAL_ADAPTER_ADDR 172.16.221.1 |
Paste in the following text in BETWEEN the VMNET_1 and VMNET_8 settings. You can change the IPs to suit your needs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
answer VNET_2_DHCP no answer VNET_2_HOSTONLY_NETMASK 255.255.255.0 answer VNET_2_HOSTONLY_SUBNET 172.28.2.0 answer VNET_2_VIRTUAL_ADAPTER yes answer VNET_2_VIRTUAL_ADAPTER_ADDR 172.28.2.1 answer VNET_3_DHCP no answer VNET_3_HOSTONLY_NETMASK 255.255.255.0 answer VNET_3_HOSTONLY_SUBNET 172.28.3.0 answer VNET_3_VIRTUAL_ADAPTER yes answer VNET_3_VIRTUAL_ADAPTER_ADDR 172.28.3.1 answer VNET_4_DHCP no answer VNET_4_HOSTONLY_NETMASK 255.255.255.0 answer VNET_4_HOSTONLY_SUBNET 172.28.4.0 answer VNET_4_VIRTUAL_ADAPTER yes answer VNET_4_VIRTUAL_ADAPTER_ADDR 172.28.4.1 answer VNET_5_DHCP no answer VNET_5_HOSTONLY_NETMASK 255.255.0.0 answer VNET_5_HOSTONLY_SUBNET 172.29.5.0 answer VNET_5_VIRTUAL_ADAPTER yes answer VNET_5_VIRTUAL_ADAPTER_ADDR 172.29.5.1 answer VNET_6_DHCP no answer VNET_6_HOSTONLY_NETMASK 255.255.0.0 answer VNET_6_HOSTONLY_SUBNET 10.166.0.0 answer VNET_6_VIRTUAL_ADAPTER yes answer VNET_6_VIRTUAL_ADAPTER_ADDR 10.166.166.1 answer VNET_7_DHCP no answer VNET_7_HOSTONLY_NETMASK 255.255.0.0 answer VNET_7_HOSTONLY_SUBNET 10.177.0.0 answer VNET_7_VIRTUAL_ADAPTER yes answer VNET_7_VIRTUAL_ADAPTER_ADDR 10.177.177.1 |
Save your file, and restart VMware Fusion 4. That is! You are done!
If you ifconfig you will see all your new interfaces.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
Jaretts-Laptop:~ jkulm$ ifconfig ...other crap removed... vmnet1: flags=8863 mtu 1500 ether 00:50:56:c0:00:01 inet 192.168.187.1 netmask 0xffffff00 broadcast 192.168.187.255 vmnet2: flags=8863 mtu 1500 ether 00:50:56:c0:00:02 inet 172.28.2.1 netmask 0xffffff00 broadcast 172.28.2.255 vmnet3: flags=8863 mtu 1500 ether 00:50:56:c0:00:03 inet 172.28.3.1 netmask 0xffffff00 broadcast 172.28.3.255 vmnet4: flags=8863 mtu 1500 ether 00:50:56:c0:00:04 inet 172.28.4.1 netmask 0xffffff00 broadcast 172.28.4.255 vmnet5: flags=8863 mtu 1500 ether 00:50:56:c0:00:05 inet 172.29.5.1 netmask 0xffff0000 broadcast 172.29.255.255 vmnet6: flags=8863 mtu 1500 ether 00:50:56:c0:00:06 inet 10.166.166.1 netmask 0xffff0000 broadcast 10.166.255.255 vmnet7: flags=8863 mtu 1500 ether 00:50:56:c0:00:07 inet 10.177.177.1 netmask 0xffff0000 broadcast 10.177.255.255 vmnet8: flags=8863 mtu 1500 ether 00:50:56:c0:00:08 inet 172.16.221.1 netmask 0xffffff00 broadcast 172.16.221.255 |
To use it.. you would simply update your vmx file of your vm to specify which network to link to:
1 2 3 |
ethernet0.present = "TRUE" ethernet0.connectionType = "custom" ethernet0.vnet = "vmnet5" |
It’s just that easy!
[asa]1587202247[/asa]