Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Mar 2024 09:43:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 277904] DHCP and static ip not correctly configured
Message-ID:  <bug-277904-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277904

            Bug ID: 277904
           Summary: DHCP and static ip not correctly configured
           Product: Base System
           Version: 14.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: conf
          Assignee: bugs@FreeBSD.org
          Reporter: crb@ChrisBowman.com

I have the following line in my /etc/rc.conf:

ifconfig_bge0=3D"DHCP"
ifconfig_bge0_alias0=3D"99.104.201.113/29"
ifconfig_bge0_ipv6=3D"inet6 accept_rtadv"

If I reboot with this, upon restart ifconfig reports the following:

bge0: flags=3D1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metr=
ic 0
mtu 1500
=20=20=20=20=20=20=20
options=3Dc019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN=
_HWTSO,LINKSTATE>
        ether c4:2c:03:0b:9d:f6
        inet 192.168.1.48 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::c62c:3ff:fe0b:9df6%bge0 prefixlen 64 scopeid 0x1
        inet6 2600:1700:5430:10b1:c62c:3ff:fe0b:9df6 prefixlen 64 autoconf
pltime 604800 vltime 2592000
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=3D23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=3D1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 1=
6384
        options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        groups: lo
        nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>

Note that only the DHCP address is present not the static IP of
99.104.201.113/31
If I immediately run "service netif restart;ifconfig" as root I get the
following output:

# service netif restart ; ifconfig
Stopping dhclient.
Stopping Network: lo0 bge0.
lo0: flags=3D8048<LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        groups: lo
        nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>
bge0: flags=3D8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
=20=20=20=20=20=20=20
options=3Dc019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN=
_HWTSO,LINKSTATE>
        ether c4:2c:03:0b:9d:f6
        media: Ethernet autoselect
        nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>
/etc/rc.d/netif: WARNING: $ifconfig_bge0_alias0 needs leading "inet" keyword
for an IPv4 address.
Starting Network: lo0 bge0.
lo0: flags=3D1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 1=
6384
        options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        groups: lo
        nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>
bge0: flags=3D1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metr=
ic 0
mtu 1500
=20=20=20=20=20=20=20
options=3Dc019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN=
_HWTSO,LINKSTATE>
        ether c4:2c:03:0b:9d:f6
        inet 192.168.1.48 netmask 0xffffff00 broadcast 192.168.1.255
        inet 99.104.201.113 netmask 0xfffffff8 broadcast 99.104.201.119
        inet6 fe80::c62c:3ff:fe0b:9df6%bge0 prefixlen 64 scopeid 0x1
        inet6 2600:1700:5430:10b1:c62c:3ff:fe0b:9df6 prefixlen 64 autoconf
pltime 604800 vltime 2592000
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=3D23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
bge0: flags=3D1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metr=
ic 0
mtu 1500
=20=20=20=20=20=20=20
options=3Dc019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN=
_HWTSO,LINKSTATE>
        ether c4:2c:03:0b:9d:f6
        inet 192.168.1.48 netmask 0xffffff00 broadcast 192.168.1.255
        inet 99.104.201.113 netmask 0xfffffff8 broadcast 99.104.201.119
        inet6 fe80::c62c:3ff:fe0b:9df6%bge0 prefixlen 64 scopeid 0x1
        inet6 2600:1700:5430:10b1:c62c:3ff:fe0b:9df6 prefixlen 64 autoconf
pltime 604800 vltime 2592000
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=3D23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=3D1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 1=
6384
        options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        groups: lo
        nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>


Note the final ifconfig lists both the DHCP address and the Static IP.
Fro this I conclude that the configuration in /etc/rc.conf is correct but f=
or
some reason doesn't work correctly at start up.  I'm still trying to read
startup script to understand why.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277904-227>