[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DNS problems with DHCP
Let me show you what I do on my firewall to serve 4 different os's:
dhcpd.conf:
shared-network LOCAL-NET {
option domain-name "pyrowall.com";
option domain-name-servers 192.168.0.1;
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
range 192.168.0.100 192.168.0.250;
}
}
dhcpd.interfaces:
fxp0
resolv.conf:
search pyrowall.com pyrowall.net pyrowall.org peereboom.us
nameserver 192.168.0.1
lookup file bind
ifconfig -a:
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::2a0:c9ff:fec7:63f8%fxp0 prefixlen 64 scopeid 0x1
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
media: Ethernet autoselect (10baseT)
status: active
inet 65.186.235.221 netmask 0xfffffffc broadcast 65.186.235.223
inet6 fe80::2a0:c9ff:fe84:487f%fxp1 prefixlen 64 scopeid 0x2
fxp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet 10.0.0.1 netmask 0xff000000 broadcast 10.255.255.255
inet6 fe80::290:27ff:fe45:f8ad%fxp2 prefixlen 64 scopeid 0x3
fxp0: Internal interface
fxp1: External interface
fxp2: DMZ
On another oBSD box I run dhcp and this is what it looks like:
/etc/hostname.xl0
dhcp NONE NONE NONE
/etc/resolv.conf
search pyrowall.com
nameserver 192.168.0.1
lookup file bind
My firewall is also the DNS server for all my domains. It is a forwarder for
unknown addresses and it also does reverse (duh) lookups.
Make sure your search entry in resolv.conf is correct.
Hope this helps,
/marco
----- Original Message -----
From: "Bristow Paul-BPB007" <Paul.C.Bristow@motorola.com>
To: <misc@openbsd.org>
Sent: Thursday, June 13, 2002 05:15
Subject: DNS problems with DHCP
> Hi all,
> I've been playing around with OpenBSD version 3.1 for a week or two now on
my Sparc 5 and have got stuck and don't seem to be able to sort things out
even after reading the man pages. If the following is all a little obvious
please excuse my ignorance.
>
> My machine is using dhcp to acquire an ip for its (currently) only
ethernet connection. This works correctly and I can see the current ip
number if I do an "ifconfig le0". Indeed, I can run a web browser, ftp,
telnet just fine. However if I do a "ping <some valid name>" it comes back
saying it doesn't know anything about <some valid name>. Also I get regular
error messages coming up on the console because it can't resolve the fully
qualified domain name. It appears that dhclient is correctly setting my
resolv.conf and I'm a little confused as to what else to try. Below are the
resolv.conf, dhclient.conf, and dmesg.
>
> In case it means anything to anyone, I'm using a Terreyon (I think that's
how it's spelt) cable modem to connect to NTL in the UK. You can probably
ignore all the floppy errors at the end of dmesg, they didn't appear until
after I'd put a disk in.
> Thanks,
> Paul Bristow
>
> ++++++++resolv.conf++++++++
> search nowhere
> nameserver 194.168.4.100
> nameserver 194.168.8.100
> lookup file bind
> +++++++++++++++++++++++++++
>
> ++++++++dhclient.conf++++++
> # $OpenBSD: dhclient.conf,v 1.1 1998/09/08 20:26:41 marc Exp $
> #
> # DHCP Client Configuration
> #
> # See dhclient.conf(5) for possible contents of this file.
> # When empty default values are used:
> #
> # Example:
> #
> # send dhcp-lease-time 3600;
> # send host-name "myhost";
> # supersede host-name "myhost";
> # supersede domain-name "my.domain";
> # request subnet-mask, broadcast-address, time-offset, routers,
> # domain-name, domain-name-servers, host-name, lpr-servers, ntp-servers;
> # require subnet-mask, domain-name-servers, routers;
> # media "link0 link1", "link0 link1", "link0 link1", "-link0 link1";
> initial-interval 1;
>
> send host-name "paul.c.bristow";
>
> request subnet-mask, broadcast-address, routers,
> domain-name, domain-name-servers, host-name;
>
> require subnet-mask, domain-name-servers;
>
> supersede host-name "fubar";
> supersede domain-name "nowhere";
> +++++++++++++++++++++++++++++++++
>
> +++++++++dmesg+++++++++++++++++++
> OpenBSD 3.1 (GENERIC) #27: Wed Apr 17 13:52:53 MDT 2002
> deraadt@sparc.openbsd.org:/usr/src/sys/arch/sparc/compile/GENERIC
> real mem = 66719744
> avail mem = 58847232
> using 200 buffers containing 3334144 bytes of memory
> bootpath:
/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@3,0
> mainbus0 (root): SUNW,SPARCstation-5
> cpu0 at mainbus0: MB86907 @ 170 MHz, on-chip FPU
> cpu0: 16K instruction (32 b/l), 16K data (32 b/l), 512K external (32 b/l)
DVMA coherent cache enabled
> obio0 at mainbus0
> clock0 at obio0 addr 0x71200000: mk48t08 (eeprom)
> timer0 at obio0 addr 0x71d00000 delay constant 82
> zs0 at obio0 addr 0x71100000 pri 12, softpri 6
> zs1 at obio0 addr 0x71000000 pri 12, softpri 6
> slavioconfig at obio0 addr 0x71800000 not configured
> auxreg0 at obio0 addr 0x71900000
> power0 at obio0 addr 0x71910000
> fdc0 at obio0 addr 0x71400000 pri 11, softpri 4: chip 82077
> fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
> iommu0 at mainbus0 addr 0x10000000: version 0x5/0x0, page-size 4096, range
64MB
> sbus0 at iommu0: clock = 21.250 MHz
> dma0 at sbus0 slot 5 offset 0x8400000: rev 2
> esp0 at dma0 offset 0x8800000 pri 4: ESP200, 40MHz, SCSI ID 7
> scsibus0 at esp0: 8 targets
> sd0 at scsibus0 targ 3 lun 0: <IBM, DCAS32160SUN2.1G, S65A> SCSI2 0/direct
fixed
> sd0: 2063MB, 8188 cyl, 3 head, 172 sec, 512 bytes/sec, 4226725 sec total
> cd0 at scsibus0 targ 6 lun 0: <TOSHIBA, XM5701TASUN12XCD, 2395> SCSI2
5/cdrom removable
> bpp0 at sbus0 slot 5 offset 0xc800000: DMA2
> ledma0 at sbus0 slot 5 offset 0x8400010: rev 2
> le0 at ledma0 offset 0x8c00000 pri 6: address 08:00:20:94:67:32
> le0: 16 receive buffers, 4 transmit buffers
> audiocs0 at sbus0 slot 4 offset 0xc000000 pri 9, softpri 4
> audio0 at audiocs0
> power-management at sbus0 slot 4 offset 0xa000000 not configured
> cgsix0 at sbus0 slot 3 offset 0x0: SUNW,501-2325, 1152 x 900, rev 11
(console)
> cgsix0: attached to /dev/fb
> root on sd0a
> kbd: type = 4, layout = 0x21
> rootdev=0x700 rrootdev=0x1100 rawdev=0x1102
> zs1b: fifo overrun
> fd5c: hard error reading fsbn 0 (st0 70<abnrml,seek_cmplt,equ_chck> st1 0
st2 0 cyl 0 head 207 sec 7)
> fd0: disk label read error
> fd5c: hard error reading fsbn 0 (st0 70<abnrml,seek_cmplt,equ_chck> st1 0
st2 0 cyl 0 head 207 sec 7)
> fd5c: hard error reading fsbn 0 (st0 70<abnrml,seek_cmplt,equ_chck> st1 0
st2 0 cyl 0 head 207 sec 7)
> fd0: disk label read error
> fd0: no disk label
> fd0: no disk label
> fd0: no disk label
> fd0: no disk label
> fd5c: hard error reading fsbn 0 (st0 70<abnrml,seek_cmplt,equ_chck> st1 0
st2 0 cyl 0 head 207 sec 7)
> fd0: disk label read error
> +++++++++++++++++++++++++++++++++++