My server is:
SuperMicro SuperServer1018R-WC0RCPU:
https://www.supermicro.com/products/system/1u/1018/sys-1018r-wc0r.cfm
CPU: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz (2100.05-MHz K8-class CPU)The network interface is a PCIe card:
bxe0: <QLogic NetXtreme II BCM57840 4x10GbE (B1) BXE v:1.78.90I found that as following:
- With FreeBSD 11.1, bxe did not link up
- When trying to use PXE boot, then bxe linked up
- With Ubuntu 16.04, bxe linked up
So, I decided to modify /etc/rc.d/netwait script as follwoing:
- /etc/rc.conf
### Network link/usability verification options
netwait_enable="YES" # Enable rc.d/netwait (or NO)
#netwait_ip="" # Wait for ping response from any IP in this list.
netwait_timeout="60" # Total number of seconds to perform pings.
netwait_if="bxe0" # Wait for active link on each intf in this list.
netwait_if_timeout="30" # Total number of seconds to monitor link state.
###
#
# # Handle SIGINT (Ctrl-C); force abort of while() loop
# trap break SIGINT
# while [ ${count} -le ${netwait_if_timeout} ]; do
#
## ADDED
# /sbin/ifconfig ${wait_if} down 2>/dev/null
# /sbin/ifconfig ${wait_if} up 2>/dev/null
## ADDED
#
# if output=`/sbin/ifconfig ${wait_if} 2>/dev/null`; then
# if [ ${got_if} -eq 0 ]; then
#
### - /etc/rc.d/netwait
if [ -n "${netwait_if}" ]; then
any_error=0
for wait_if in ${netwait_if}; do
echo -n "Waiting for ${wait_if}"
link=""
got_if=0
count=1
# Handle SIGINT (Ctrl-C); force abort of while() loop
trap break SIGINT
while [ ${count} -le ${netwait_if_timeout} ]; do
#
# ADDED
/sbin/ifconfig ${wait_if} down 2>/dev/null
/sbin/ifconfig ${wait_if} up 2>/dev/null
# ADDED
#
if output=`/sbin/ifconfig ${wait_if} 2>/dev/null`; then
if [ ${got_if} -eq 0 ]; then
echo -n ", interface present"
got_if=1
fi
link=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'`
if [ -z "${link}" ]; then
echo ', got link.'
break
fi
fi
sleep 1
count=$((count+1))
done