View previous topic :: View next topic |
Author |
Message |
chris_harvey n00b
Joined: 12 Mar 2010 Posts: 42 Location: Ottawa, Canada
|
Posted: Wed Mar 28, 2018 3:11 am Post subject: physical NIC keeps getting DHCP address: not wanted. |
|
|
When my PC boots (OpenRC) I see the following output from ipconfig
Code: |
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.
Code: |
# 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:
Code: | config_enp0s31f6=null |
My /etc/rc.conf:
Code: | rc_hotplug="!net.*" |
Code: | # CONFIG_IP_PNP is not set |
dhcpcd -U enp0s31f6
Code: | 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. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
chris_harvey n00b
Joined: 12 Mar 2010 Posts: 42 Location: Ottawa, Canada
|
Posted: Wed Mar 28, 2018 11:37 am Post subject: |
|
|
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
Code: |
interface enp0s31f6
nodhcp
|
|
That worked. Thanks!
I'm curious, why isn't config_enp0s31f6=null enough? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Wed Mar 28, 2018 4:06 pm Post subject: |
|
|
Your output shows two interfaces with the same MAC address. This looks wrong. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Wed Mar 28, 2018 6:49 pm Post subject: |
|
|
chris_harvey,
Code: | config_enp0s31f6=null |
I use ="null" do the quotes matter? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|