# NIC interface names



## balanga (Apr 2, 2017)

How does FreeBSD assign NIC interface names?

I installed FreeBSD on a USB stick in a ThinkPad and the NIC interface was named em0. When I put that USB stick in a different system, networking does not work, presumably becaus em0 does not get assigned. The new system uses an RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller. How can I tell what the interface should be called?  

An additional problem is that the leftmost three character on the screen are cut off from the actual screen so I can't properly read the output of commands.

I might be able to sort out networking if I was able to start `bsdinstall` with just the networking configuration, but know how to do that.


----------



## Phishfry (Apr 2, 2017)

`pciconf -lv` will show the ethernet adapter used.
I have several different ethernet adapters on my USB Install and comment them in or out of my /etc/rc.conf depending on the machine.

Realtek uses the "re0" moniker.


----------



## balanga (Apr 2, 2017)

Thanks, I managed to figure it out using `bsdinstall netconfig`.


----------



## SirDice (Apr 3, 2017)

You can use ifconfig_DEFAULT in rc.conf. That will configure the first network card that's found. 


```
ifconfig_DEFAULT="DHCP"
```


----------

