Netgate m1n1wall

Author Topic: What NIC am I actually using  (Read 7230 times)

0 Members and 1 Guest are viewing this topic.

Offline EddieA

  • Full Member
  • ***
  • Posts: 151
  • Karma: +0/-0
    • View Profile
What NIC am I actually using
« on: December 22, 2009, 03:42:40 am »
I downloaded the VMWare Appliance version of pfSense, converted it, because I'm running Esxi, and it all seems to work fine.

I then added the Open-VM-Tools package, which installed OK.

But, after rebooting, how do tell which NIC I am actually using.  Is it still the E1000, or now the VMXNET, because the setting in Esxi is "flexible".  Under Linux, which I'm more used to, a quick lspci will show the current controller, but that don't work in BSD.

Cheers.

Offline WetWilly

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: What NIC am I actually using
« Reply #1 on: December 23, 2009, 03:49:50 pm »
Well, you have 2 options.

Easiest way is checking the configuration of the vmguest network adapter.

You can also identify it by the interface name.

If you are using E1000 it will be called emX.

Flexible type does not use the E1000 driver, so it will be something else.

I am really interested in which one gives better performance so please post your results.

I am using 1 Intel Pro 1000 GT pci, and one Intel Gigabit CT pci-e both as E1000 type and they dont seem not bottleneck my gigabit lan  so far.

Offline EddieA

  • Full Member
  • ***
  • Posts: 151
  • Karma: +0/-0
    • View Profile
Re: What NIC am I actually using
« Reply #2 on: December 23, 2009, 05:02:43 pm »
Easiest way is checking the configuration of the vmguest network adapter.

The vmx file has this for virtualDev:  vlance  Which is interesting, because ESXi reports it as "flexible".  For a BSD VM, the only choices are E1000, Flexible, or VMXNET 2.  Creating a new VM, and selecting "Flexible", there is no virtualDev specified for the adapter.

You can also identify it by the interface name.

If you are using E1000 it will be called emX.

Flexible type does not use the E1000 driver, so it will be something else.

It's le0/1, and devinfo reports it as an AMD Lance

However, I found this in a VMWare KB article:

Quote
Flexible The Flexible network adapter identifies itself as a Vlance adapter when a virtual machine boots, but initializes itself and functions as either a Vlance or a VMXNET adapter, depending on which driver initializes it. With VMware Tools installed, the VMXNET driver changes the Vlance adapter to the higher performance VMXNET adapter.

Maybe I'll experiment with a clone of my pfSense machine, and either update the virtualDev to "Flexible", or remove it again, to see if that's a valid option, now I have the VMWare Tools package installed.

I am really interested in which one gives better performance so please post your results.

Once I see what options I can set, I'll try the various SpeedTest web sites, to see if they see any difference.

But, one interesting think I did notice, in my backup Configuration file, was this, in BOTH my interfaces:

Code: [Select]
<bandwidth>100</bandwidth>
<bandwidthtype>Mb</bandwidthtype>

How can I see what speed BSD thinks the interfaces are operating at.

Cheers.

Offline WetWilly

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: What NIC am I actually using
« Reply #3 on: December 23, 2009, 05:19:24 pm »
Easiest way is to configure the vmguest network adapter with vsphere, u can't edit current adapters so you need to remove and add new with different type set.

You can get the mediastate of your interfaces from a shell with:

ifconfig | grep media

What kind of NIC's do you use?

Offline EddieA

  • Full Member
  • ***
  • Posts: 151
  • Karma: +0/-0
    • View Profile
Re: What NIC am I actually using
« Reply #4 on: December 23, 2009, 07:10:15 pm »
Easiest way is to configure the vmguest network adapter with vsphere, u can't edit current adapters so you need to remove and add new with different type set.

I'll try both methods.  Setting them as "Flexible" doesn't actual set a virtualDev, so I'm guessing it got set the first time they were used, which was before I had VMWare Tools installed.  It would be interesting to see what they get set to, now that they are installed.

You can get the mediastate of your interfaces from a shell with:

ifconfig | grep media

media: Ethernet autoselect

What kind of NIC's do you use?

2 OnBoard nVidia 1000/100/10.  Tyan Thunder K8WE.  The vSphere client reports the one connected to my cable modem as 100, the other as 1000.

Cheers.

Offline EddieA

  • Full Member
  • ***
  • Posts: 151
  • Karma: +0/-0
    • View Profile
Re: What NIC am I actually using
« Reply #5 on: January 02, 2010, 01:42:19 am »
I am really interested in which one gives better performance so please post your results.
OK, so I ran my first set of performance tests.

Firstly, I left my ESXi NICs as "flexible", and ran some download/upload tests from 2 different SpeedTest web sites.  Then, I rebooted pfSence, with the NICs set as E1000, and re-ran the same mix of tests, from the same web sites.

The numbers were almost identical, with the E1000, possibly, a tad faster, although it could have been in the realm of statistical differences.  However, the RRD graphs showed something different.



The far left spike, is the "flexible" adapter.  The next spike, at 12:00, is the E1000.

The block, on the right, was when I was running some "real life" scenarios, downloading a bunch of stuff via the NewsGroups.

Interestingly, once I switched to E1000, I got this from ifconfig:

Code: [Select]
media: Ethernet autoselect (1000baseTX <full-duplex>)
But, dumping the configuration XML, it still has:

Code: [Select]
<bandwidth>100</bandwidth>
<bandwidthtype>Mb</bandwidthtype>

My next test, when I get chance, is to switch back the "flexible", and run my NewsGroup download again, to see what rate I can achieve with that.  I'll post, once I've had chance to try.

Cheers.

Offline andrewsi

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: What NIC am I actually using
« Reply #6 on: February 25, 2010, 12:50:10 pm »
I think the issue here is that the VMtools are being loaded as a package very late in the boot cycle (at the very end of the logs, you'll notice) long after PFsense has decided what adapters it's using.  Loading the VMTools is what permits the "flexible" adapter to switch from Lance to VMXNET, which likely would be a lot more efficient.

PFSense needs some way to be able to load VMTools EARLY in the boot cycle so that the adapter configuration/assignment wizard can successfully use those ports.  I wish it would...

The other thing VMTools is giving you is the VMware memory driver, which allows the hypervisor to use "ballooning" to force the OS to page out unused stuff so that it can give the memory to other running VMs if things start getting tight.

Offline EddieA

  • Full Member
  • ***
  • Posts: 151
  • Karma: +0/-0
    • View Profile
Re: What NIC am I actually using
« Reply #7 on: February 25, 2010, 03:41:39 pm »
I'm not sure how modules are picked up in FreeBSD, as I'm more of a Linux person.  But on Linux, the VM services are also loaded very late in the boot process.  But, the NIC drivers are picked up correctly, because they are stored in the regular location, that Linux looks for all it's modules.  I would have imagined that FreeBSD works a similar way.

Cheers.

Offline Patrick_

  • Full Member
  • ***
  • Posts: 167
  • Karma: +0/-0
    • View Profile
    • LiquidObject
Re: What NIC am I actually using
« Reply #8 on: May 21, 2010, 07:09:03 am »
For something else to try; I've been using the VMXNet2(Enhanced) nic without any issues, you just need to manually call up the vmxnet_load="YES" under /boot/loader.conf after vmware tools are installed.
--------------------------------------------------------------------------------------
pfSense Documentation Wiki
pfctl reference
Personal Blog