The pfSense Store

Author Topic: [How-To] Using VMXNET2/3 NICs in pfSense 2.0  (Read 30420 times)

0 Members and 1 Guest are viewing this topic.

Offline casper4242

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #15 on: May 04, 2012, 10:06:56 am »
I just found out: the vmxnet3 driver _does_ support jumbo frames, vlan tagging etc... however due to the
somewhat odd naming "vmx3f0" etc the pfsense interface name parser fails (it tries to seperate the driver
from the unit on the first number, which fails here). When these regex are fixed, the interfaces can be
used as vlan parents, and from what I could test quickly, they do work this way.

Here's an ifconfig of such a vmnet3 interface:
vmx3f0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO>
        ether 00:50:56:8d:06:39
        inet 192.168.166.1 netmask 0xffffff00 broadcast 192.168.166.255
        inet6 fe80::250:56ff:fe8d:639%vmx3f0 prefixlen 64 scopeid 0x1
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        media: Ethernet 10Gbase-T
        status: active

Here's one as a VLAN sub-interface (just used with tcpdump so far):
vmx3f2_vlan1101: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=303<RXCSUM,TXCSUM,TSO4,TSO6>
        ether 00:50:56:8d:06:3b
        inet6 fe80::250:56ff:fe8d:639%vmx3f2_vlan1101 prefixlen 64 scopeid 0xa
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        media: Ethernet 10Gbase-T
        status: active
        vlan: 1101 parent interface: vmx3f2

And this is all on ESXi4 with ESXi5-vmware-tools installed. Looking good so far :)

Cheers,
Markus

Offline hoostine

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #16 on: May 21, 2012, 03:42:40 pm »
http://redmine.pfsense.org/issues/2010

there's a link to patches that seem to solve the issue for me.

note: i only modified globals.inc and interfaces.inc, they're located in /etc/inc, in case anyone is lazy like me.  ;D

Offline iFloris

  • Full Member
  • ***
  • Posts: 168
  • one layer of information removed
    • View Profile
    • Small personal site
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #17 on: May 21, 2012, 03:52:49 pm »
Thanks for finding that patch for us hoostine, will give this a shot sometime next week.
Seeing that this patch is six months old makes me wonder if this code is already in 2.1 dev somewhere.
one layer of information
removed

Offline Comexans

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0 (pfSense 2.0.1 Note)
« Reply #18 on: October 08, 2012, 05:01:13 am »
I've just updated from 2.0 Release to 2.0.1 Release and found the vendor supplied VMware Tools failed to start on boot after the upgrade.
But fortunately its a quick and easy fix.

On the console open the shell ( press 8 )
Then type:
Code: [Select]
vmware-config-tools.plWhen vmware-config-tools.pl is done running type:
Code: [Select]
exitTo leave the shell again.

VMware Tools status for the pfSense VM in your vSphere Client should now be "Running".
As an extra check, try reboot the VM to verify that VMware Tools is running when pfSense is back up.

Hi,

I started a fresh install from the pfSense 2.0.1 amd64 liveCD on an ESX 5.1 host
The VM was initially configured with 2 E1000 NICs the second NIC is connected to a 802.1Q trunk vswitch (VLAN ID 4095).
I have been able to set the first NIC as the WAN interface (no VLAN) and the 5 VLANs on the second NIC as LAN and OPT1 to OPT4 interfaces.
The routing and firewalls seems to work correctly.

After reading this posts, I decided to benefit of vmxnet3 NICs as they are supposed to improve network throughput. I wanted also to be able to manage te VM with VMTools.

So I have installed the "native" VM Tools, by following this thread and also  this tutorial :
http://www.howtoforge.com/how-to-install-vmware-tools-on-pfsense-freebsd
but I had to specify othe locations for PACKAGESITE variable (in order to dowload perl5 and compat6x-amd64 packages):
Code: [Select]
setenv PACKAGESITE "ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/Latest/"I had also to patch 2 following files according to http://redmine.pfsense.org/issues/2010 (to support VLAN tagging on vmxnet3):
  • /etc/inc/interfaces.inc
  • /etc/inc/globals.inc

I switched the 2 existing NICs to VMXNET 3, and resetup the interfaces and VLANs. It works !
But I still get an issue : vSphere Client reports that the VMTools are not installed (and not running) and I can't start it using vmware-config-tools.pl script :
Code: [Select]
vmware-config-tools.pl
Initializing...


Making sure services for VMware Tools are stopped.

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done
   Guest memory manager:                                               done


The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[no]

No X install found.

Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                                   done
   Guest memory manager:                                               done
   Guest operating system daemon:                                     failed
Unable to start services for VMware Tools

Execution aborted.

Is anybody can help me to make this running ?
« Last Edit: October 08, 2012, 05:08:10 am by Comexans »

Offline jacob81286

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #19 on: October 12, 2012, 07:13:46 am »
To fix your Error "guest operating system daemon:  failed" while installing the vmware tools for esxi 5.1 issue the following commands

Code: [Select]
ln -s /usr/local/lib/compat/libm.so.4 /usr/local/lib
ln -s /usr/local/lib/compat/libc.so.6 /usr/local/lib
ln -s /usr/local/lib/compat/libthr.so.2 /usr/local/lib
ln -s /usr/local/lib/compat/libkvm.so.3 /usr/local/lib

Offline asterix

  • Sr. Member
  • ****
  • Posts: 596
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #20 on: October 31, 2012, 10:43:46 am »
Hi,
I am trying to get my VM working on VMXNET3 but pfSense won't detect the NICs. VMXNET2 NICs are identified and I can use them but I want to switch to VMXNET3.

I am running a AMD64 2.0.1 pfSense version on a VM with 8GB RAM.


The guide in this thread works but for VMXNET2 only. Are there an special 64-bit drivers for VMXNET3?

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2889
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #21 on: October 31, 2012, 01:52:16 pm »
so you installed the native tools from vmware?  This would have the drivers - Mine sees the nics, but I am running 32bit of pfsense.

vmx3f0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO>
        ether 00:0c:29:1e:18:90
        media: Ethernet 10Gbase-T
        status: active
vmx3f1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO>
        ether 00:0c:29:1e:18:9a
        media: Ethernet 10Gbase-T

I just don't currently have them enabled because I don't see any point to using them and had issues with vpn outbound from client inbound when they were being used.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline casper4242

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #22 on: October 31, 2012, 02:00:16 pm »
You'll have to patch some wrong assumptions in pfsense code about how interfaces are named.
Unfortunately, vmxnet3 creates somewhat odd named interface names with a number in them, and
the 2.0.1 code assumes that as soon as an interface name contains a number, that's the start of the
interface number, as in "re3" being the 3rd unit of the "re" driver. Check this whole thread,
the required fixes are already described here.

This is fixed in 2.1.

About the issue of the missing libraries: instead of symlinking, you can also put the following statement
into /usr/local/etc/rc.d/vmware-tools.sh at the beginning (but of course after the #!/bin/sh line):

/sbin/ldconfig -m /usr/local/lib/compat

Cheers,
Markus

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2889
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #23 on: October 31, 2012, 02:17:50 pm »
yeah I am running 2.1.. so explains why I don't have any issues with them.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline asterix

  • Sr. Member
  • ****
  • Posts: 596
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #24 on: October 31, 2012, 08:22:19 pm »
ok I had missed the amd64 part.
New problem now. I see the new vmxnet3 NICs and I assign them the IP addresses just like the earlier NICs. Even the WAN gets the internet IP. But I cannot access or even ping the pfSense IP address after that. They become totally unresponsive. Don't see this issue with vmxnet2

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2889
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #25 on: November 01, 2012, 08:13:24 am »
And is the nic using vmx3 connected in your esxi settings?

- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline asterix

  • Sr. Member
  • ****
  • Posts: 596
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #26 on: November 01, 2012, 04:11:12 pm »
Not sure what you mean by connected in esxi settings.

Just like changing to vmxnet2 I shut down the vm, edit settings, remove old NICs and add new vmxnet3. Reboot the vm, assign IP address to the interfaces. Thats it.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 2889
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #27 on: November 01, 2012, 04:20:37 pm »
In your settings for your nic - there is a connected checkbox, and connect on power on checkbox.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Have I helped you, want to say thanks?  Donate to pfsense the cost of a beer http://pfsense.org/donate.html

Offline asterix

  • Sr. Member
  • ****
  • Posts: 596
    • View Profile
Re: [How-To] Using VMXNET2/3 NICs in pfSense 2.0
« Reply #28 on: November 01, 2012, 05:05:18 pm »
Of course all NICs are connected. How would I see the NICs during boot if they weren't connected.
« Last Edit: November 01, 2012, 07:34:11 pm by asterix »