# Static wireless interface also getting dhcp ip

## haven

Hi All,

For some reason on one of my machines dhcpcd is being launched on system start and is giving a wireless interface (wlan1) a dynamic ip alongside the static one that I have configured. I'd like to find out why this is happening and prevent it from doing so. Any help/advice on why this is happening would be appreciated.

The relevant section from /etc/conf.d/net:

```
# Wireless client mode:

config_wlan1=( "192.168.100.2 netmask 255.255.255.0 broadcast 192.168.100.255" )

iwconfig_wlan1="mode managed"

scan_mode_wlan1="Ad-Hoc"

wpa_supplicant_wlan1="-Dwext"

modules_wlan1=( "wpa_supplicant" )

wpa_timeout_wlan1=60

associate_order_wlan1="forcepreferredonly"

prefered_aps_wlan1=( "<home>" )

```

A quick grep in /etc/init.d shows thats its most likely being pulled up by wpa_supplicant but I'm guessing here:

```
nostromo init.d # grep dhcpcd *

dhcpcd:command=/sbin/dhcpcd

dhcpcd:pidfile=/var/run/dhcpcd.pid

wpa_supplicant: before dns dhcpcd net

```

dhcpcd is not enabled in rc-update.

This is resulting in the interface having both the static ip (192.168.100.2) alongside a dynamic ip (192.168.100.39):

```
   wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1458 qdisc mq state UP qlen 1000

    link/ether 00:1f:1f:34:4a:c5 brd ff:ff:ff:ff:ff:ff

    inet 192.168.100.2/24 brd 192.168.100.255 scope global wlan1

    inet 192.168.100.39/24 brd 192.168.100.255 scope global secondary wlan1

    inet6 fe80::21f:1fff:fe34:4ac5/64 scope link 

    valid_lft forever preferred_lft forever

```

If it is being pulled in via wpa_supplicant then any advice on how to prevent this happening would be appreciated.

Thanks in advance for any assistance.

Regards

Haven

----------

## kimmie

I would try config_ESSID=( "!dhcp" ). You may need to change your ESSID from "<home>" to something more alphanumeric to do this, eg. HOME, then config_HOME=("!dhcp"). Or instead, if it's a laptop, you might want to move your static config into config_ESSID so that you can use dhcp elsewhere.

----------

