# physical NIC keeps getting DHCP address: not wanted.

## chris_harvey

When my PC boots (OpenRC) I see the following output from ipconfig

```

enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.3.6  netmask 255.255.255.0  broadcast 192.168.3.255 <----------------

        ether 40:8d:5c:47:37:2b  txqueuelen 1000  (Ethernet)

        RX packets 185  bytes 104967 (102.5 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 202  bytes 73071 (71.3 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 16  memory 0xef100000-ef120000  

kvm-bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.3.6  netmask 255.255.255.0  broadcast 192.168.3.255  <-------------------

        ether 40:8d:5c:47:37:2b  txqueuelen 1000  (Ethernet)

        RX packets 184  bytes 101585 (99.2 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 170  bytes 66768 (65.2 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 18  bytes 1480 (1.4 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 18  bytes 1480 (1.4 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ovs-system: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 169.254.114.6  netmask 255.255.0.0  broadcast 169.254.255.255

        ether 6e:61:31:6e:02:a3  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 32  bytes 6094 (5.9 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255

        ether 52:54:00:4b:7f:e8  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

```

Notice the duplicate IPV4 addresses.

kvm-bridge is an openvswitch bridge. I'm not doing anything magical with OpenVSwitch, just the most basic setup.

```

# ovs-vsctl show

6c40b323-8d75-4d5b-84e5-b2e9c9f3512f

    Bridge kvm-bridge

        Port "enp0s31f6"

            Interface "enp0s31f6"

        Port kvm-bridge

            Interface kvm-bridge

                type: internal

```

My /etc/conf.d/net:

```
config_enp0s31f6=null
```

My /etc/rc.conf:

```
rc_hotplug="!net.*"
```

```
# CONFIG_IP_PNP is not set
```

dhcpcd -U enp0s31f6

```
broadcast_address=192.168.3.255

dhcp_lease_time=7200

dhcp_message_type=5

dhcp_server_identifier=192.168.3.1

domain_name=local

domain_name_servers=192.168.3.1

host_name=Tool

ip_address=192.168.3.6

network_number=192.168.3.0

routers=192.168.3.1

subnet_cidr=24

subnet_mask=255.255.255.0

dhcp6_dump: enp0s31f6: No such file or directory
```

I've tried dhcpcd -k enp0s31f6, but I keep getting 192.168.3.6 on boot. I want an IPv4LL adddress.

I have to manually run "ifconfig enp0s31f6 0" on each boot to get a connection.

----------

## UberLord

If you want to disable DHCP and only use IPv4LL for a specifc interface, put this at the end of /etc/dhcpcd.conf

```

interface enp0s31f6

    nodhcp

```

----------

## chris_harvey

 *UberLord wrote:*   

> If you want to disable DHCP and only use IPv4LL for a specifc interface, put this at the end of /etc/dhcpcd.conf
> 
> ```
> 
> interface enp0s31f6
> ...

 

That worked. Thanks!

I'm curious, why isn't config_enp0s31f6=null enough?

----------

## UberLord

I don't know, I'm out of touch with how netifrc works these days.

----------

## mike155

Your output shows two interfaces with the same MAC address. This looks wrong.

----------

## NeddySeagoon

chris_harvey,

```
config_enp0s31f6=null
```

I use ="null" do the quotes matter?

----------

