# dhcp server out only one interface?

## frozenQueue

I've got a Gentoo box with to NICs. I have one getting its address via DHCP, and the second is statically set:

```
# cat /etc/conf.d/net

config_eth0=( "dhcp" )

config_eth1=( "172.25.0.1 netmask 255.255.0.0" )
```

I installed "net-misc/dhcp-3.1.2_p1", with the intent of providing dhcp service, but only out of the second interface. Question: Is it safe to specify (in /etc/dhcp/dhcpd.conf) the configuration information for only one subnet, and assume it will serve dhcp out the correct interface? Having dhcp services going out eth0 would definitely get me in trouble.

The example file indicates I should specify the config for the other interface, but leave it blank:

```
# No service will be given on this subnet, but declaring it helps the 

# DHCP server to understand the network topology.

subnet 10.152.187.0 netmask 255.255.255.0 {

}
```

I'm not sure what to put there, though, because eth0 is dhcp, not static.

Thx.

----------

## no-use

Have a look in /etc/conf.d/dhcpd

```

# Configure which interface or interfaces to for dhcpd to listen on.

# List all interfaces space separated. If this is not specified then

# we listen on all interfaces.

# DHCPD_IFACE=""

```

----------

