Trouble configuring the NIC with sysinstall

It's been a while since I played with FreeBSD so I figured it was time to give it another shot. I downloaded the HUGE DVD ISO and booted my test Virtual Machine with it. Installed the base system and went to cofigure the network. I tried the DHCP option at first. It seems to have found the DHCP server ok but it wouldn't obtain an IP from after reboot. At that point I decided to go for the manual IP configuration in sysinstall. I set it and rebooted the system. When it was up, I realized that the network wasn't working so I ran "ifconfig" - it showed the correct IP address and the gateway for my de0 adapter but I couldn't ping anything on the same subnet. So I went back to sysinstall and tried configuring the NIC again, rebooted - same thing. If I bring the network adapter up manually with:
ifconfig de0 inet 192.168.1.x netmask 255.255.255.0 up
and add the default router via:
route add default 192.168.1.1
...it works fine. What am I doing wrong?

Thanks!

J.
 
You could try running dhclient (-d) de0 as root after a reboot to see how the DHCP transaction goes (if at all).
 
This is what I'm getting:
DHCPREQUEST on de0 to 255.255.255.255 port 67
DHCPREQUEST on de0 to 255.255.255.255 port 67
DHCPDISCOVER on de0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on de0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on de0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on de0 to 255.255.255.255 port 67 interval 13
No DHCPOFFERS received.

What to do next?

Thanks!

J.
 
That's always a tricky one, even around the 'net.

Try running the DHCP server in foreground mode (dhcpd -d) and the DHCP client too (dhclient -d). Run 'tcpdump -s 0 -pnli de0 portrange 67-68' on the client and 'tcpdump -s 0 -pnli <correct_nic> portrange 67-68' on the server.

Then start troubleshooting. Do they talk, do you see the same stuff on both ends, etc. Reinstall software if needed. Googling for "No DHCPOFFERS received" may give you some additional pointers. Unfortunately, there is no definitive answer, because the problems can be in several places, ranging from faulty cables to wireless woes.
 
Thanks. The issue with that is that the DHCP server is a Verizon FiOS/Actiontec router so I won't be able to do any debugging on it. Anyway, I ended up scrapping the the system and reinstalling from scratch. Now it obtains IP from the DHCP server at boot time but it still can't access any hosts on its own subnet. Isn't that strange?
If I do:
ifconfig de0 down
ifconfig de0 inet 192.168.1.x netmask 255.255.255.0 up
route add default 192.168.1.1
...it can get on the net just fine. I'm thinking there is something wrong with the de0 driver. dmesg says that it's a "Digital 21140A Fast Ethernet" - probably not a very popular card these days except for virtual PC.

Any ideas?

Thanks! :D
 
You seem to be saying two different things, so to make things clear:

When you get an IP from the DHCP router, can you surf the net, but not contact hosts in your LAN (hooked up to the same router acting as a switch?), or neither? And when you use a static IP, can you do both? Your DHCP router may have a setting that doesn't allow switch ports to interconnect when IPs are offered by DHCP (just surf the net independently), or something like that.
 
DutchDaemon said:
You seem to be saying two different things, so to make things clear:

When you get an IP from the DHCP router, can you surf the net, but not contact hosts in your LAN (hooked up to the same router acting as a switch?), or neither? And when you use a static IP, can you do both? Your DHCP router may have a setting that doesn't allow switch ports to interconnect when IPs are offered by DHCP (just surf the net independently), or something like that.

No, I can't get on the net at all when using DHCP or the manually assigned IP address via sysinstall. The only way I can get the network to work is if I use "ifconfig" to manually assign the IP address and bring de0 up. Sorry for the confusion.
 
Did the tcpdump command on the (dh)client side reveal any exchange of traffic with the dhcp server on ports 67-68? And something else: do you have bpf enabled in the kernel (so do you have /def/bpf* devices)? You need bpf for dhcp, though I suspect dhclient would have complained. Finally: another nic you can test with? Another device that should work with dhcp?
 
DutchDaemon said:
Did the tcpdump command on the (dh)client side reveal any exchange of traffic with the dhcp server on ports 67-68? And something else: do you have bpf enabled in the kernel (so do you have /def/bpf* devices)? You need bpf for dhcp, though I suspect dhclient would have complained. Finally: another nic you can test with? Another device that should work with dhcp?

I don't have any /dev/bpf* devices. "device bpf" is enabled in the kernel though. As I had mentioned this is a virtual machine (Microsoft flavor) so trying another NIC is not an option. I was able to get a static IP configuration to work after rearranging the entries in /etc/rc.conf so I'm giving up on DHCP. Thanks for the help!
 
Back
Top