# Setting network interface to DHCP



## jemate18 (Jan 28, 2009)

Hello guys!

When I installed FreeBSD 7.1, I configured my network interface (sis0) with static IP address.

How do I change it to DHCP?

One more question, on my laptop it is sis0 on my desktop it is xl0

does the name of the network interface depend on the hardware? is not always like eth0 the way GNU/Linux does?


----------



## ctaranotte (Jan 28, 2009)

jemate18 said:
			
		

> Hello guys!
> 
> When I installed FreeBSD 7.1, I configured my network interface (sis0) with static IP address.
> 
> How do I change it to DHCP?



You have the choice:


> # dhclient sis0


or in rc.conf


> ifconfig_sis0 = "DHCP"





			
				jemate18 said:
			
		

> One more question, on my laptop it is sis0 on my desktop it is xl0
> 
> does the name of the network interface depend on the hardware? is not always like eth0 the way GNU/Linux does?



FreeBSD does not have such thing as eth or wifi. 

The name of you interface is either the driver name plus a number or something like van, bridge, gif or tun plus a number. 

Read the man pages for van, bridge, gif and tun.


----------



## danger@ (Jan 28, 2009)

put the following line to the /etc/rc.conf file:


```
ifconfig_sis0="DHCP"
```

As of the other question, yes. The name of the device depends on the device driver it uses. For xl NICs it's RealTek based chips and so on...


----------



## jemate18 (Jan 28, 2009)

Thank you guys.. I have tried it and it worked.. This thread is solved...


----------

