# Changing network interface type



## Grzegorz Wiktorowski (Jun 4, 2021)

The machine runs under VMware and has the network adapter defined as E1000. FreeBSD shows interface as em0.

I ponder to change the device to VMXNET3 (as recommended for VMware). Is it a simple task consisting of:
  - shuting down the machine
  - changing adapter type from E1000 to VMXNET3 in VMware control panel
  - starting the machine

and additionally replacing `ifconfig_em0=` with `ifconfig_vmx0=` in /etc/rc.conf

or something more complex and sophisticated to perform?


----------



## covacat (Jun 4, 2021)

if you have firewall rules it might be used there 
various packages may use interface name


----------



## Grzegorz Wiktorowski (Jun 4, 2021)

covacat said:


> if you have firewall rules it might be used there
> various packages may use interface name


Right. I'm aware of this.


----------



## im (Jun 4, 2021)

You can try to change interface name by adding the line like this to the /etc/rc.conf

```
ifconfig_fxp0_name="net0"      # Change interface name from fxp0 to net0.
```
But I have never checked it before.


----------



## SirDice (Jun 4, 2021)

Little known fact, you can use `ifconfig_DEFAULT="...."`. Then it'll automatically pick the first ethernet adapter it finds, which works out great if there's only one. Things might get a little messy if there's more than one interface though.

Not sure if this would work but it's worth trying what im mentioned and combining that with `ifconfig_DEFAULT`:

```
ifconfig_DEFAULT_name="eth0"
```


----------

