# FreeBSD network interface names



## bsd_newbie (Mar 1, 2009)

I noticed network interface names in freebsd are dependent on which interface/driver we are talking. In linux all ethernet intefaces are named from eth0, eth1 .... 

Does it matter, how does it affect application programming ?

thanks.


----------



## DutchDaemon (Mar 1, 2009)

Applications do'n get to talk to network interfaces by name, unless that's what they're programmed for (like tcpdump, but then the user chooses the interface name).


----------



## ecazamir (Mar 10, 2009)

If you really like a naming scheme like eth0/eth1/wan0/wan1/lan0/etc, or if you must use a specific name, you can rename the network interfaces. Here's a sample code to add into /etc/rc.conf:

```
ifconfig_em0_name="wan0"	# Provider 1
ifconfig_em1_name="wan1"	# Provider 2
ifconfig_xl0_name="wan2"	# Testing
ifconfig_em2_name="lan0"	# LAN
ifconfig_wan0="1.2.1.2/24"
ifconfig_wan1="1.2.2.2/24"
ifconfig_wan2="1.2.3.2/24"
```


----------

