Solved No DHCPOFFERS received when trying to retrieve an IP via DHCP

stx

New Member

Reaction score: 1
Messages: 2

Hi there,

Background
I want to try out FreeBSD on my desktop computer, however I'm already struggling to establish a connection to the internet.
I want to connect my computer with an ethernet cable to my router.
During the network installation process I could choose an ethernet connection (alc0).
Only one was offered and the name seemed to point to the correct network card so I chose it.
When I tried to retrieve an IP-address my machine got no DHCP offers.
Other machines in my network never face problems to connect to the router using DHCP, also most Linux distributions I ran on my PC were able to connect via DHCP.

What I've tried so far
- I increased the timeout in /etc/dhclient.conf to 180
- Used bsdconfig to try setting up the network connection via DHCP again
- multiple restarts
- /etc/rc.conf
Code:
ifconfig_alc0="SYNCDHCP"
Question
How can I receive an IP dress via DHCP?
Can I somehow point the dhcpclient to the IP of my router that assigns the IP addresses?
"DHCPDiscover on alc0 to 255.255.255.255 ..." points not to its IP (if that is related).

Here are some photos so you can see what happens during startup.
alc0_init.jpg
no_dhcpoffers.jpg
state.jpg

Kind regards and thank you in advance for your help.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 6,926
Messages: 28,850

How can I receive an IP dress via DHCP?
dhclient(8)
Can I somehow point the dhcpclient to the IP of my router that assigns the IP addresses?
No, DHCP Discovery is done with broadcasts. This is how the protocol works. How would it know how to reach the IP address of the router if the host itself doesn't have an IP address?

"DHCPDiscover on alc0 to 255.255.255.255 ..." points not to its IP (if that is related).
It's supposed to that, that's how DHCP works. A DHCP server listens for these broadcasts and will send back an offer. But in your case the DHCP server doesn't appear to respond at all. So either your DHCP server isn't working or your broadcasts aren't reaching the DHCP server (different subnet, firewall, etc).
 
OP
OP
S

stx

New Member

Reaction score: 1
Messages: 2

Thanks Phishfry,

the solution in the link worked like a charm.
Code:
# As workaround, you can try to add to /etc/dhclient.conf:

interface "em0" {
  supersede interface-mtu 0;
}
I'll mark this as solved.
 
Top