Discussion:
Newbie DHCP Question.
(too old to reply)
Larry Lindstrom
2005-04-15 06:18:35 UTC
Permalink
Hi Folks:

I'm a newbie with FreeBSD, or any BSD. And my
system admin skills are limited.

I have this old 233 MHz 32 Meg PC that I want
to use as a router/firewall/NAT gateway to my
cable modem, Comcast if that makes any difference.
It now has two Intel 82559 Pro/100 Ethernet NICs.

The install seems to go fine, at one point I'm
asked if this will be a gateway, and I respond
"yes".

I configure the first NIC "fxp0" and for a
domain name I enter a domain name registered
to me, let's call it "my-domain-name.com". I'm
not sure if this is correct, as there are DNS
servers pointing to a hosting service that has
nothing to do with my account on Comcast, where
this computer will serve as the gateway.

As the install concludes I'm asked if I want
to configure any other devices, so I plug the
second NIC into the cable modem and start to
configure. Early I'm asked if I want to use
DHCP for this device and I say yes. After a
pause for about a minute the "Network
Configuration" screen comes up. I'd expect
to see an IP address and other entries
supplied by the DHCP server, but the IPv4
address is the same as the first NIC's
and other entries are blank.

I replace "my-domain-name.com" with
"comcast.net", still no joy.

Here is the output from ifconfig -a for the
two NICs fxp0 is the LAN NIC and fxp1 is the
interface for the cable modem:

fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet 192.168.0.50 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::2d0:b7ff:febd:6127%fxp0 prefixlen 64 scopeid 0x1
ether 00:AA:BB:CC:DD:EE
media: Ethernet autoselect (100baseTX)
status: active
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet6 fe80::2d0:b7ff:fe85:bba1%fxp1 prefixlen 64 scopeid 0x2
ether 00:11:22:33:44:55
media: Ethernet autoselect (none)
status: no carrier

This is the output from netstat -r:

Routing tables

Internet:
Destination Gateway Flags Refs Use Netif Expire
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.0 link#1 UC 0 0 fxp0
192.168.0.50 00:d0:b7:bd:61:27 UHLW 0 32 lo0

Internet6:
Destination Gateway Flags Netif Expire
::/96 ::1 UGRS lo0
::1 ::1 UH lo0
::ffff:0.0.0.0/96 ::1 UGRS lo0
fe80::/10 ::1 UGRS lo0
fe80::%fxp0/64 link#1 UC fxp0
fe80::2d0:b7ff:febd:6127%fxp0 00:AA:BB:CC:DD:EE UHL lo0
fe80::%fxp1/64 link#2 UC fxp1
fe80::2d0:b7ff:fe85:bba1%fxp1 00:11:22:33:44:55 UHL lo0
fe80::%lo0/64 fe80::1%lo0 U lo0
fe80::1%lo0 link#4 UHL lo0
ff01::/32 ::1 U lo0
ff02::/16 ::1 UGRS lo0
ff02::%fxp0/32 link#1 UC fxp0
ff02::%fxp1/32 link#2 UC fxp1
ff02::%lo0/32 ::1 UC lo0

One thing, I believe during one of the attempted installs
resulted in an entry in rc.conf that looked like "fxp1="DHCP",
but I'm not sure. Anyway there is no line like that now.

/etc/dhclient.conf has a few comments, but nothing else.

Anyway, I'm just trying to get the DHCP client working so
I can run IPFilter on this machine.

Thanks
Larry
Larry Lindstrom
2005-04-16 17:39:17 UTC
Permalink
Post by Larry Lindstrom
I'm a newbie with FreeBSD, or any BSD. And my
system admin skills are limited.
I have this old 233 MHz 32 Meg PC that I want
to use as a router/firewall/NAT gateway to my
cable modem, Comcast if that makes any difference.
It now has two Intel 82559 Pro/100 Ethernet NICs.
Hi again:

Ok, I've cleared the old entry in /etc/rc.conf:

ifconfig_fxp1="inet 192.168.0.50 netmask 255.255.255.0"

and replaced it with:

ifconfig_fxp1="DHCP"

The NIC named fxp1 was plugged into Comcast's cable
modem and the system was rebooted. One of the many
messages displayed as the system came up was "Starting
dhclient", followed by a one minute and six second pause.

I've learned that 1 minute pauses when trying to
connect to the internet are almost always bad. When
the system finished coming up ifconfg -a displays:

fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet 192.168.0.50 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::2d0:b7ff:febd:6127%fxp0 prefixlen 64 scopeid 0x1
ether 00:11:22:33:44:55
media: Ethernet autoselect (100baseTX)
status: active
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet6 fe80::2d0:b7ff:fe85:bba1%fxp1 prefixlen 64 scopeid 0x2
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
ether 00:aa:bb:cc:dd:ee
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4

Posts in Google archives convince me that the DHCP
server should set the ip address for fxp1 to a non-zero
value.

It looks like no connection is made with the DHCP
server.

bpf seems to be running:

ps -ef | grep bpf
533 p0 R+ 0:00.02 grep bpf

dhclient is also running.

I hope someone will tell me what I'm doing wrong.

Thanks
Larry
Larry Lindstrom
2005-04-19 12:22:53 UTC
Permalink
Getting FreeBSD's DHCP client to work is a background
task, and last night I noticed that dhclient only ran for
about 10 seconds. When I looked at ifconfig -a, the
NIC seems to have been assigned an IP address and a
mask.

I'm not sure why, but the DHCP interface seemed to be
working.

My bsd install had suffered a power cut, so I decided
to do a rebuild, and now DHCP seems to be working.

I'm posting this through the same cable modem I'm
trying to get BSD to talk to.

Here is the output from dhclient:

bsd_gateway# dhclient -v fxp1

Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

Listening on BPF/fxp1/00:aa:bb:cc:dd:ee
Sending on BPF/fxp1/00:aa:bb:cc:dd:ee
Sending on Socket/fallback
DHCPDISCOVER on fxp1 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on fxp1 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on fxp1 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on fxp1 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on fxp1 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on fxp1 to 255.255.255.255 port 67 interval 12
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
bsd_gateway#

Windows seems to talk to the cable modem with no
particular problem.

I want a PC based gateway. There are some tasks
I'd like it to run. Is BSD a good choice for this
task?

Suggestions?

Thanks
Larry
Larry Lindstrom
2005-04-20 00:14:27 UTC
Permalink
Post by Larry Lindstrom
My bsd install had suffered a power cut, so I decided
to do a rebuild, and now DHCP seems to be working.
Oops, I mean DHCP is broken again. I never did get it
working after the re-build.

Posting a 5:30 AM after working all night is dangerous.

I've been wondering about BSD for a while. This
experience has been educational.

Thanks
Larry

Loading...