Solved bge0 DHCP doesn't work

Hello

I got an issue, I don't know why my bge0 won't work with DHCP mode
Code:
ifconfig bge0
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
	ether 00:14:22:bf:1f:9f
	inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (10baseT/UTP <full-duplex>)
	status: active

Code:
netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
0.0.0.0/8          link#1             U           0        0   bge0 =>
default            192.168.0.1        UGS         0      764  wlan0
127.0.0.1          link#3             UH          0        0    lo0
192.168.0.0/24     link#4             U           0       77  wlan0
192.168.0.102      link#4             UHS         0        0    lo0

Code:
less /etc/rc.conf | grep defaultroute
defaultrouter="192.168.0.1"

Only wlan0 works fine.

TP-LINK ND 743:
Code:
ID	Client Name	MAC Address	Assigned IP	Lease Time
1	d610	00-13-CE-5F-34-CC	192.168.0.102	01:56:41

Code:
kaldown@d610:~ % sudo less /var/db/dhclient.leases.wlan0
lease {
  interface "wlan0";
  fixed-address 192.168.0.102;
  option subnet-mask 255.255.255.0;
  option routers 192.168.0.1;
  option domain-name-servers 192.168.0.1;
  option dhcp-lease-time 7200;
  option dhcp-message-type 5;
  option dhcp-server-identifier 192.168.0.1;
  renew 4 2014/4/10 22:52:48;
  rebind 4 2014/4/10 23:37:48;
  expire 4 2014/4/10 23:52:48;
}
but
Code:
sudo less /var/db/dhclient.leases.bge0 
lease {
  interface "bge0";
  fixed-address 192.168.0.103;
  option subnet-mask 255.255.255.0;
  option routers 192.168.0.1;
  option domain-name-servers 192.168.0.1;
  option dhcp-lease-time 7200;
  option dhcp-message-type 5;
  option dhcp-server-identifier 192.168.0.1;
  renew 1 2014/4/7 15:57:01;
  rebind 1 2014/4/7 16:42:01;
  expire 1 2014/4/7 16:57:01;
}
Code:
sudo service netif restart
sudo service route restart
Isn't help much =(

May be I missed something in theory, or just don't understand ...
Help please.
With best.
 
What version of FreeBSD? Does /var/log/messages have anything about bge0? If you see watchdog timeout, there is a tunable in bge(4) that can be set only in /boot/loader.conf:
Code:
hw.bge.allow_asf=0
 
wblock@ said:
What version of FreeBSD? Does /var/log/messages have anything about bge0? If you see watchdog timeout, there is a tunable in bge(4) that can be set only in /boot/loader.conf:
Code:
hw.bge.allow_asf=0
Code:
% sudo service netif restart

% less /var/log/messages | grep bge0
Apr 11 17:14:50 d610 kernel: bge0: link state changed to DOWN
Apr 11 17:15:04 d610 kernel: bge0: link state changed to UP
Apr 11 17:15:04 d610 devd: Executing '/etc/rc.d/dhclient quietstart bge0'

% ifconfig bge0
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
	ether 00:14:22:bf:1f:9f
	inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (10baseT/UTP <full-duplex>)
	status: active

% uname -a
FreeBSD d610.kaldown.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
 
This should show a little more: dhclient -d bge0. You need to kill the running dhclient(8) beforehand, pkill dhclient.

It would also be helpful if you can "see" what's going on: tcpdump -ni bge0. Leave that running on another screen or console.
 
SirDice said:
This should show a little more: dhclient -d bge0. You need to kill the running dhclient(8) beforehand, pkill dhclient.

It would also be helpful if you can "see" what's going on: tcpdump -ni bge0. Leave that running on another screen or console.
Already tried to stop/start dhclient, even with mv /var/db/dhclient.leases.bge0 ./dhclient.leases.bge0.BAK
Code:
% sudo dhclient -d bge0
DHCPDISCOVER on bge0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on bge0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on bge0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on bge0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on bge0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on bge0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on bge0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

% sudo tcpdump -ni bge0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on bge0, link-type EN10MB (Ethernet), capture size 65535 bytes
capability mode sandbox enabled
17:53:15.069250 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:14:22:bf:1f:9f, length 300
17:53:20.071095 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:14:22:bf:1f:9f, length 300
17:53:28.072161 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:14:22:bf:1f:9f, length 300
17:53:42.074096 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:14:22:bf:1f:9f, length 300
17:53:54.044093 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:14:22:bf:1f:9f, length 300
17:54:06.045447 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:14:22:bf:1f:9f, length 300
Interesting that wlan0 works just fine with connecting the same router. But router didn't see my bge0 interface in DHCP client list, but status:active
Code:
% ifconfig bge0
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
	ether 00:14:22:bf:1f:9f
	inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (10baseT/UTP <full-duplex>)
	status: active
 
The issue seems to be with your router, it's not responding to the DHCP request.
 
SirDice said:
The issue seems to be with your router, it's not responding to the DHCP request.
If I create any guest under vbox, and make network bridge to wlan0 - there will appears new DHCP client row in router DHCP client list...
P.S. links are green, under my interface, and router port too.
Seems to be very strange behavior.

Ok. I lied, this not true - seems to be router really don't want to sent me DHCP_ANSWER.
Digging on that way.
Thanks for advice.
 
FWIW:

The machine I am running FreeBSD 10.0x64 on has the same network card(bge0) and it is also using DHCP and all networking is working fine.
 
Hi, I'm just resetting all configure from router, and still the same issue, now I know that probably my NIC is under degradation, because I have test all 4 LAN ports from router on 2 different desktops and 1 server with ESXi... working like a charm.
To be clear, sometimes my router catch connection on ethernet and store on DHCP lists, but
Code:
kaldown@d610:~ % ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: icmp_seq=10 ttl=64 time=0.531 ms
64 bytes from 192.168.0.1: icmp_seq=13 ttl=64 time=0.529 ms
64 bytes from 192.168.0.1: icmp_seq=23 ttl=64 time=0.528 ms
64 bytes from 192.168.0.1: icmp_seq=35 ttl=64 time=0.514 ms
as you can see there is a lot of missed packets, after "working" for a while, connection lost and there again 0.0.0.0
Also tried with different patch cordes with different standards, for example: there is no link at all with EIA\TIA 568B 26 AWG (complected with TP-LINK 743 ND)
Going to buy addition usb-ethernet device soon.
Now I would like to open another thread with wlan0 problem
 
Re: [SOLVED] bge0 DHCP doesn't work

That will do nothing different. The way to test this is to manually set link speed and duplex for bge0 with ifconfig(8):
ifconfig bge0 media 100baseTX mediaopt full-duplex
 
wblock@ said:
That will do nothing different. The way to test this is to manually set link speed and duplex for bge0 with ifconfig(8):
ifconfig bge0 media 100baseTX mediaopt full-duplex
Thats very funny:
That is in the firs laboratory room - dhclient works perfect
Code:
% sudo less /var/db/dhclient.leases.bge0
lease {
  interface "bge0";
  fixed-address 192.168.1.5;
  option subnet-mask 255.255.255.0;
  option routers 192.168.1.254;
  option domain-name-servers 10.53.21.32,10.53.21.1,8.8.8.8;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option dhcp-server-identifier 192.168.1.254;
  option dhcp-renewal-time 43200;
  option dhcp-rebinding-time 75600;
  renew 1 2014/4/14 23:01:31;
  rebind 2 2014/4/15 08:01:31;
  expire 2 2014/4/15 11:01:31;
}

Code:
% ifconfig bge0
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
	ether 00:14:22:bf:1f:9f
	inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255 
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active

This is in the second laboratory room - at start works like at home (doesn't work)
Until I % ifconfig bge0 media 100baseTX mediaopt full-duplex and % sudo dhclient -b bge0, after a short period, there were good answer from dhcp-server:
Code:
% sudo less /var/db/dhclient.leases.bge0
lease {
  interface "bge0";
  fixed-address 10.51.1.6;
  option subnet-mask 255.255.252.0;
  option routers 10.51.0.1;
  option domain-name-servers 10.0.0.10;
  option domain-name "utmn.ru";
  option dhcp-lease-time 259200;
  option dhcp-message-type 5;
  option dhcp-server-identifier 10.51.0.1;
  option dhcp-renewal-time 129600;
  option dhcp-rebinding-time 226800;
  renew 2 2014/4/15 23:35:44;
  rebind 4 2014/4/17 02:35:44;
  expire 4 2014/4/17 11:35:44;
}
But! But my home router, still won't answer on dhcp-requests, even with @wblock@ advice :(
Every other PC's works fine, but my laptop. Now I know that bge0 works, but not with router.
 
Last edited by a moderator:
wblock@ said:
Maybe that router is set to use DHCP only for wireless connections.
Straight connection by patch cord works for T110 Dell Server with ESXi, and Desktop with Windows XP.
In addition I have iPad 2 and Andriod phone, which Wi-Fi mode works well also. Also router very fresh - not even 1 month of using.
 
To be clear:
I bought a router for using a PPPoE connection which ISP gave to me. Because I can not just plug an ethernet cable from the ISP right into my laptop, it should be the router above. Don't know why it is happening to me. I also have a Planet 54Mbps Wireless Access Point with 4 LAN ports which I use as a switch. This scenario "ISP cable -> Planet AP -> laptop" with /etc/ppp/ppp.conf. Anything else wouldn't work. Also notice, that a simple bridge connection works the same way with a different ISP. Also notice, that in both laboratory rooms in the university, all PCs connect to patch panels (if it can make a difference).
 
Last edited by a moderator:
Back
Top