# understanding dhcpd.conf



## sossego (Oct 22, 2009)

I'm lost when it comes to the dhcpd.conf file because of the comments and examples.

The machine needs to act as a router.


```
ddns-update-style interim;
include "/etc/bind/rndc.key";

zone dyn.floppy-peoples.org. {
primary 127.0.0.1;
key "rndc-key";
}

ddns-domainname "dyn.floppy-peoples.org";
option domain-name "static.floppy-peoples.org dyn.floppy-peoples.org";
option domain-name-servers 172.30.200.254;
option routers 172.30.200.254;
option broadcast-address 172.30.255.255;
option ntp-servers 172.30.200.254;

default-lease-time 86400;
max-lease-time 86400;

authoritative;

log-facility local7;

subnet 172.30.0.0 netmask 255.255.0.0 {

range 172.30.201.10 172.30.201.200;

# DNS zones to update
zone 201.30.172.in-addr.arpa. {
primary 172.30.200.254;
key "rndc-key";
}

zone dyn.floppy-peoples.org. {
primary 172.30.200.254;
key "rndc-key";
}
}
host floppy-peoples
        {
                hardware ethernet 00:15:f2:7a:dc:83;
                fixed-address 192.168.1.7;
        }
subnet 192.168.1.0 netmask 255.255.255.0
{
        range 192.168.1.100 192.168.1.200;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.1.255;
        option domain-name-servers 123.123.123.10, 123.123.123.20;
        option routers 192.168.1.1;

        

        
}
```

I know that I have something wrong here but not sure what.
Is it the different addresses?
The subnet declarations?
The routers?


----------



## Christopher (Oct 22, 2009)

What is the network topology for this server?  It looks like its being configured to service DHCP requests from two separate networks, is that true?

How does it currently not work?


----------



## sossego (Oct 22, 2009)

What do I do here? Eliminate value 17x.x.x.x?
This machine here has dc0 has connected to WAN, and rl0 as available.

Please forgive my ignorance when it comes to networking.


----------



## robbak (Oct 22, 2009)

You tell us what you are trying to do. Then we may be able to answer intelligently.
What interfaces to you have? What networks? Where (and what) is your DNS server? What ranges are you offering on what interfaces to what networks? In short, what do you want? 
What is the file you have listed not do? What error messages are you getting? Why do you believe that you have a problem? (No don't just tell us it doesn't work - there are endless ways something might "not work").
What is wrong?


----------



## sossego (Oct 22, 2009)

I'm using the same dhcpd.conf file for both the linux and freebsd installments on this box.

http://forums.debian.net/viewtopic.php?f=3&t=46109 here is the problem listed before.

AS usual, I've managed to hose some of my FreeBSD install by trying to upgrade dependent ports.


----------



## sossego (Oct 22, 2009)

I've cleaned out and made anew file.
Here it is:

```
ddns-update-style none;

option domain-name-servers 145.253.2.75, 193.174.32.18;

default-lease-time 86400;
max-lease-time 604800;

authoritative;

host floppy-peoples {
  hardware ethernet 00:15:f2:7a:dc:83;
  
  server-name "floppy-peoples.org";
}
subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.200 192.168.1.229;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.1.255;
        option routers 192.168.1.1;
}
subnet 192.168.1.0 netmask 255.255.255.0 {
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;

        option domain-name              "floppy-peoples.org";
        option domain-name-servers       192.168.1.1;

        option time-offset              -18000;     # Eastern Standard Time

	range 192.168.1.200 192.168.1.229;
}
```
I'm asking because I don't know.

is this correct yet?

I'm going to edit this and try another.


----------



## sossego (Oct 22, 2009)

```
ddns-update-style none;

option domain-name-servers 145.253.2.75, 193.174.32.18;

default-lease-time 86400;
max-lease-time 604800;

authoritative;

host floppy-peoples {
  hardware ethernet 00:15:f2:7a:dc:83;
  
  server-name "floppy-peoples.org";

subnet 192.168.1.0 netmask 255.255.255.0 {
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;

        option domain-name              "floppy-peoples.org";
        option domain-name-servers       192.168.1.1;

        option time-offset              -18000;     # Eastern Standard Time

	range 192.168.1.200 192.168.1.229;
}
```



```
floppy-peoples:/etc/dhcp3# /etc/init.d/dhcp3-server restart
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 15: subnet declarations not allowed here.
subnet
^
/etc/dhcp3/dhcpd.conf line 25: unexpected end of file
}
^
Configuration file errors encountered -- exiting
floppy-peoples:/etc/dhcp3#
```

I know that using Linux and FreeBSD together or interchangeably  doesn't always go good with either group; but, I've learned that certain scripts and files can be shared. This configuration is one of them.

The sample dns servers do not match the ones that I currently have. It's 127.0.0.1 .
I'm making a guess at everything.


----------



## sossego (Oct 22, 2009)

```
ddns-update-style none;

option domain-name-servers 127.0.0.1, 127.0.1.1;

default-lease-time 86400;
max-lease-time 604800;

authoritative;

host floppy-peoples {
  hardware ethernet 00:15:f2:7a:dc:83;
  
  server-name "floppy-peoples.org";

subnet 192.168.1.0 netmask 255.255.255.0 {
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;

        option domain-name              "floppy-peoples.org";
        option domain-name-servers       192.168.1.1;

        option time-offset              -18000;     # Eastern Standard Time

	range 192.168.1.200 192.168.1.229;
} }
```




```
floppy-peoples:/etc/dhcp3# /etc/init.d/dhcp3-server restart
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 15: subnet declarations not allowed here.
subnet
^
Configuration file errors encountered -- exiting
```

I'm not seeing right now where I do and don't need to declare something.


----------



## sossego (Oct 22, 2009)

syslog relevant information


```
Oct 22 02:24:51 floppy-peoples dhcpd: Wrote 0 deleted host decls to leases file.
Oct 22 02:24:51 floppy-peoples dhcpd: Wrote 0 new dynamic host decls to leases file.
Oct 22 02:24:51 floppy-peoples dhcpd: Wrote 0 leases to leases file.
Oct 22 02:24:51 floppy-peoples dhcpd: 
Oct 22 02:24:51 floppy-peoples dhcpd: No subnet declaration for eth0 (0.0.0.0).
Oct 22 02:24:51 floppy-peoples dhcpd: ** Ignoring requests on eth0.  If this is not what
Oct 22 02:24:51 floppy-peoples dhcpd:    you want, please write a subnet declaration
Oct 22 02:24:51 floppy-peoples dhcpd:    in your dhcpd.conf file for the network segment
Oct 22 02:24:51 floppy-peoples dhcpd:    to which interface eth0 is attached. **
Oct 22 02:24:51 floppy-peoples dhcpd: 
Oct 22 02:24:51 floppy-peoples dhcpd: 
Oct 22 02:24:51 floppy-peoples dhcpd: Not configured to listen on any interfaces!
```

dhcp3-server restart


```
floppy-peoples:/etc/dhcp3# /etc/init.d/dhcp3-server restart
Stopping DHCP server: dhcpd3 failed!
Starting DHCP server: dhcpd3check syslog for diagnostics. failed!
 failed!
floppy-peoples:/etc/dhcp3
```

present dhcpd.conf file


```
ddns-update-style none;

option domain-name-servers 127.0.0.1, 127.0.1.1;

default-lease-time 86400;
max-lease-time 604800;

authoritative;


  
  
 host floppy-peoples {
        hardware ethernet 00:15:f2:7a:dc:83;
        server-name "floppy-peoples.org";}

 
subnet  192.168.1.0 netmask 255.255.255.0 {
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;

        option domain-name              "floppy-peoples.org";
        option domain-name-servers       192.168.1.1;
        

        option time-offset              -18000;     # Eastern Standard Time

	range 192.168.1.200 192.168.1.229;
 }
```


First, is this file setup properly?


----------



## sossego (Oct 24, 2009)

I need to be able to bridge the connection between rl0 as the server input for the client computer and dc0 as the client for the ISP. I've hosed the Linux installation and had to redo it because the connection would disable itself.

 Do I need a VPN but then again, how do I route traffic through?

I've made it to the initial dhcpd.conf file and starting the service. 
DNS setup is giving me trouble. Am I to use my computer as the name server or the ISP name server as such?


----------



## sossego (Oct 24, 2009)

I'm giving the fu.ck up on this.
I asked for help.
I searched.
I posted my configuration file.

eth1/dc0 to isp or router

connection here between the two is what I need


eth0/rl0 to client


No one can tell me what the best solution is.
One person told me that I have two subnets declared.

Server was setup. I asked How do I ping the client from the server on eth0/rl0 and not eth1/dc0. No one could tell me. 

I sent the file to the ISC, it came back as code, it was rejected.


I posted my work to show that I was attempting to make an effort.


When I ask for help, it is for a certain part of the process.

I use two systems alternating.

Certain config scripts will work on both of them.


I'm repeating my fu.cking self.



For the fu.cking love of god.

Foda tudo, foda tudo.


----------



## robbak (Oct 24, 2009)

As soon as you posted the error you are getting, so we finally could work out what you might have wanted, the error was clear. unfortunately, as you had posted repeatedly without telling us anything, most of us had tuned out.

in the first ones, you had forgotten to put a } at the end of a host{} declaration.

```
host floppy-peoples {
  hardware ethernet 00:15:f2:7a:dc:83;
  
  server-name "floppy-peoples.org";
} <<-- this was missing.

subnet 192.168.1.0 netmask 255.255.255.0 {
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;
```

When you did the last one, your interface was not yet configured. You need to set the ip address and net mask on the server's interfaces first.

Always reply with the information that people request. Only then can we help you. Wait patiently until we reply - we will, when we get around to it in our otherwise busy lives. And, of course, never post something like your last post. Never forget that you are relying on the good nature of volunteers. Their lives will be more important than your questions.

To anyone else: This is a great example of how not to ask a question. If you want to know how, google "How to ask questions the smart way". It's essential reading for any new user.


----------



## sossego (Oct 25, 2009)

Like this?



```
ddns-update-style none;

option domain-name-servers 127.0.0.1, 127.0.1.1;

default-lease-time 86400;
max-lease-time 604800;

authoritative;


  
  
 host pocket-peoples  {
        hardware ethernet 00:15:f2:7a:dc:83;
        server-name "pocket-peoples";
}

 
subnet  192.168.1.0 netmask 255.255.255.0 {
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;

        option domain-name             "pocket-peoples";
        option domain-name-servers       192.168.1.1;
        

        option time-offset              -18000;      

	range 192.168.1.200 192.168.1.229;
 }
```




			
				robbak said:
			
		

> When you did the last one, your interface was not yet configured. You need to set the ip address and net mask on the server's interfaces first.



How do I do that?


----------



## robbak (Oct 25, 2009)

sossego said:
			
		

> Like this?


 Nothing obvious, but I don't know. What happens when you try it?


> How do I do that?



To configure your interface while running, use the ifconfig command. To get it set up at boot time, use the "ifconfig__interface_" entry in rc.conf.

This is all standard stuff, and covered commpletely in the handbook


----------



## chamba (Oct 26, 2009)

Hi Sossego, please, be patient please and don't post bad words. i really didn't understand what you really want to do. Do you want to give you clients network access to the internet? Is it that? Please clear us a bit so we can come up with a solution.


----------



## SirDice (Oct 26, 2009)

sossego said:
			
		

> ```
> option domain-name-servers 127.0.0.1, 127.0.1.1;
> ```


You do realize that this isn't going to work? Now all your clients will have those addresses for DNS servers. It's quite unlikely your clients are running a DNS service themselves.

Here's my working example, it uses DDNS which runs on the same machine as dhcpd:

```
option domain-name "dicelan.home.";
option domain-name-servers 192.168.1.1;

default-lease-time 600;
max-lease-time 7200;
authoritative;
ddns-update-style interim;
log-facility local7;
ignore client-updates;
#ddns-ttl 600;

do-forward-updates true;

key DHCP {
        algorithm HMAC-MD5;
        secret "<uuencoded key>";
}

zone dicelan.home. {
        primary 127.0.0.1;
        key DHCP;
}

zone 1.168.192.in-addr.arpa. {
        primary 127.0.0.1;
        key DHCP;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.20 192.168.1.100;
        option routers 192.168.1.1;
}
```

Related /etc/rc.conf entries:

```
dhcpd_enable="YES"
dhcpd_flags="-q"                            # command option(s)
dhcpd_conf="/usr/local/etc/dhcpd.conf"      # configuration file
dhcpd_ifaces="rl1"                             # ethernet interface(s)
dhcpd_withumask="022"                       # file creation mask
```


----------



## sossego (Oct 28, 2009)

If you are wondering why I am switching between dhcp and dnsmasq, it's because I am an amateur when it comes to networking.

Here's the current ifconfig setup:

```
pocket-peoples# ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:15:f2:7a:dc:83
        inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
        media: Ethernet autoselect (none)
        status: no carrier
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:11:d8:85:04:0b
        ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        lladdr 0.11.d8.0.0.85.4.b.a.2.ff.fe.0.0.0.0
dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:04:5a:4f:ab:db
        inet 98.192.215.118 netmask 0xfffffc00 broadcast 255.255.255.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
pocket-peoples#
```

The dnsmasq.conf has the following options enabled: 

```
interface=rl0
listen-address=192.168.0.1
dhcp-range=192.168.0.50,192.168.0.150,12h
dhcp-option=option:router,1.2.3.4
```

The good thing about the dnsmasq is that my isp connection isn't fried.
The bad thing is that I don't know what I am doing. It's all guess work.


Anything wrong with ifconfig for rl0?
Anything wrong with the dnsmasq.conf options?


Edit: Client reply has DHCP discover running on 255.255.255.255 with both virtual interface of vboxnet0 and real interface of eth0. Five requests from eth0 and six requests from vboxnet0 with no replies.

I used the -p options for dnsmasq of 67 and 68 for alternate values. The test was ran with no return value. I also had the dhcp client listen with -p 53 as a value. The result was the same: no carrier and no lease.


----------



## sossego (Oct 29, 2009)

"Why do you keep switching back and forth, sossego?"
Because I am trying different things until I can get the server running.


New dhcpd.conf 

```
option domain-name-servers 192.168.1.1;

default-lease-time 86400;
max-lease-time 604800;

authoritative;


  
  
 host pocket-peoples  {
        hardware ethernet 00:15:f2:7a:dc:83;
        server-name "pocket-peoples";
}

 
subnet  192.168.1.0 netmask 255.255.255.0 {
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;

        option domain-name             "pocket-peoples";
        option domain-name-servers       192.168.1.1;
        

        option time-offset              -18000;      

	range 192.168.1.0 192.168.1.20;
 }
```


```
pocket-peoples:/home/sossego# ifconfig eth0  192.168.1.1 netmask 255.255.255.0 up
pocket-peoples:/home/sossego# /etc/init.d/dhcp3-server restart
Stopping DHCP server: dhcpd3.
Starting DHCP server: dhcpd3.
pocket-peoples:/home/sossego#
```



I kept getting error with the dns update line, so I removed it.


I went back just now and added the ddns line.
I'm wondering, will there be a need for masking or packet forwarding?

The client still isn't receiving any leases.
Eth0 has a static address.


```
pocket-peoples:/etc/dhcp3# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:15:f2:7a:dc:83
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:21 Base address:0xc000

eth1      Link encap:Ethernet  HWaddr 00:04:5a:4f:ab:db
          inet addr:98.192.215.118  Bcast:255.255.255.255  Mask:255.255.252.0
          UP BROADCAST RUNNING MULTICAST  MTU:576  Metric:1
          RX packets:265317 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68301 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:45916892 (43.7 MiB)  TX bytes:10594986 (10.1 MiB)
          Interrupt:17 Base address:0xd800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:108 errors:0 dropped:0 overruns:0 frame:0
          TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6612 (6.4 KiB)  TX bytes:6612 (6.4 KiB)

pocket-peoples:/etc/dhcp3#
```
 Something missing? Wondering now if there is a value to ifconfig I didn't use.


----------



## SirDice (Oct 29, 2009)

sossego said:
			
		

> I'm wondering, will there be a need for masking or packet forwarding?


It's called NAT and if you want those machine to talk to the outside world, yes. It's not done with dhcpd though. You will need to use one of the three firewalls that come with fbsd.

IMO the simplest to use is PF, here's a simple /etc/pf.conf:


```
int_if="rl1"
ext_if="rl0"

nat on $ext_if from $int_if:network to any -> ($ext_if)

pass all
```


----------



## SirDice (Oct 29, 2009)

sossego said:
			
		

> I also had the dhcp client listen with -p 53 as a value. The result was the same: no carrier and no lease.


Don't use any other ports then the standard ones. Port 53 is for DNS. "No carrier" means there's no cable or the cable is broken.


----------



## sossego (Oct 29, 2009)

```
pocket-peoples:/var/log# /etc/init.d/dhcp3-server restart
Stopping DHCP server: dhcpd3 failed!
Starting DHCP server: dhcpd3check syslog for diagnostics. failed!
 failed!
pocket-peoples:/var/log# cat syslog | grep dhcp3
Oct 29 03:35:45 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 1: semicolon expected.
Oct 29 03:35:45 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 5: semicolon expected.
Oct 29 03:35:45 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 1: semicolon expected.
Oct 29 03:35:45 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 5: semicolon expected.
Oct 29 03:37:33 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 1: semicolon expected.
Oct 29 03:37:33 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 1: semicolon expected.
Oct 29 03:40:41 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 2: semicolon expected.
Oct 29 03:40:41 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 4: expecting a parameter or declaration
Oct 29 03:40:41 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 2: semicolon expected.
Oct 29 03:40:41 pocket-peoples dhcpd: /etc/dhcp3/dhcpd.conf line 4: expecting a parameter or declaration
pocket-peoples:/var/log#
```

This is the dhcpd.conf being tested on the linux partition. If the error occurs here, it's going to repeat on the UFS2 slice. I edited to allow a space between the last variable and the semicolon for each line which was listed in syslog.


I just tested both cables and they work. The NIC from the client worked previously with the coaxial router.
I have a feeling that my life would be easier if I had the Absolute FreeBSD book with me.



Is there anyway to test the NIC to see if it can ping a client?


----------



## SirDice (Oct 29, 2009)

Just something I noticed. How did you install dhcpd? /etc/dhcp3 is *not* a standard fbsd location for ports.

Use the ports, specifically net/isc-dhcp30-server.


----------



## DutchDaemon (Oct 29, 2009)

Why are we troubleshooting a Linux installation anyway?


----------



## sossego (Oct 29, 2009)

I had mentioned from the beginning that the problem was for DHCPD.
Just like Xorg, and aRts, and DNS, It is a service independent from any operating system.
You are aware of this and so is anyone else who uses multiple operating systems.
What I have been asking help for is with the dhcp server setup independent of whatever it is installed on.
When the server configuration file is faulty, it will not work on anything.
You are not


			
				DutchDaemon said:
			
		

> troubleshooting a Linux installation


, your helping me with the dhcpd.conf file.


I know that you may find it strange but, once again, a lot of settings and variables are similar between the two systems.


Please don't tell me that it is something new- for someone to use two systems to check and improve each other.

Second reason for using two operating systems: Until I learn the complete setup for HAL, DBUS, and policykit, I will need to switch between the two to mount media.

Third reason: I see nothing wrong with having another system as a backup.

Fourth Reason: My girlfriend, her family, and my family know very little about OS setup, design, and use. I am nowhere as near as good as the people here are.


----------



## DutchDaemon (Oct 29, 2009)

This is not about dhcpd anymore. This is about networking and services, areas where Linux and FreeBSD differ considerably. You're getting advice to read The Handbook, you're getting advice to use ifconfig, you're getting advice to use PF for NAT -- all sound FreeBSD advice, none of it applicable to Linux. You're confusing yourself and probably everybody else working like this, because seeing /etc/dhcp3 and eth0 in this context is distracting. That's all I'm saying. It's probably better to troubleshoot all of this on FreeBSD and then move a working config over to Linux, not the other way around.


----------



## sossego (Oct 29, 2009)

My apologies.


----------



## sossego (Oct 29, 2009)

I'm following Dutchdaaemon's advice.


/etc/rc.conf


```
# -- sysinstall generated deltas -- # Tue Oct 27 09:35:11 2009
# Created: Tue Oct 27 09:35:11 2009
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
gateway_enable="YES"
hostname="pocket-peoples.hsd1.md.comcast.net."
ifconfig_dc0="DHCP"
inetd_enable="NO"
moused_enable="YES"
named_enable="YES"
hald_enable="YES"
dbus_enable="YES"
# -- sysinstall generated deltas -- # Thu Oct 29 15:26:43 2009
accounting_enable="YES"

gateway_enable="YES"
natd_enable="YES"
natd_interface="rl0"

dhcpd_enable="YES"
dhcpd_flags="-q"
dhcpd_conf="/usr/local/etc/dhcpd.conf"
dhcpd_ifaces="rl0"
dhcpd_withumask="022"
```

/usr/local/etc/dhcpd.conf

```
option domain-name-servers 192.168.1.1;

default-lease-time 86400;
max-lease-time 604800;

authoritative;


  
  
 host pocket-peoples  {
        hardware ethernet 00:15:f2:7a:dc:83;
        server-name "pocket-peoples";
}

 
subnet  192.168.1.0 netmask 255.255.255.0 {
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;

        option domain-name             "pocket-peoples";
        option domain-name-servers       192.168.1.1;
        

        option time-offset              -18000;      

	range 192.168.1.0 192.168.1.20;
 }
```
Loader.conf has pf_enable="YES".


```
%su
Password:
pocket-peoples# ifconfig
rl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 00:15:f2:7a:dc:83
	media: Ethernet autoselect
	status: no carrier
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:11:d8:85:04:0b
	ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	lladdr 0.11.d8.0.0.85.4.b.a.2.ff.fe.0.0.0.0
dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 00:04:5a:4f:ab:db
	inet 98.192.215.118 netmask 0xfffffc00 broadcast 255.255.255.255
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000 
pocket-peoples# hostname
pocket-peoples.hsd1.md.comcast.net.
pocket-peoples# ifconfig rl0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
pocket-peoples# ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 00:15:f2:7a:dc:83
	inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
	media: Ethernet autoselect (none)
	status: no carrier
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:11:d8:85:04:0b
	ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	lladdr 0.11.d8.0.0.85.4.b.a.2.ff.fe.0.0.0.0
dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 00:04:5a:4f:ab:db
	inet 98.192.215.118 netmask 0xfffffc00 broadcast 255.255.255.255
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000 
pocket-peoples#
```


```
pocket-peoples# uname -a
FreeBSD pocket-peoples.hsd1.md.comcast.net. 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 08:49:13 UTC 2009     root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
```


As I said before, the cables work and everything is here.
What am I doing wrong?


----------



## sossego (Oct 29, 2009)

```
pocket-peoples# ifconfig rl0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
pocket-peoples# ifconfig rl0 up
pocket-peoples# tcpdump -i rl0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on rl0, link-type EN10MB (Ethernet), capture size 96 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
pocket-peoples# tcpdump -i rl0 -vv
tcpdump: listening on rl0, link-type EN10MB (Ethernet), capture size 96 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
pocket-peoples#
```
It's up. Tcpdump shows nothing. I don't know if this means anything but I thought maybe I could test the NIC with this.


----------



## DutchDaemon (Oct 29, 2009)

As long as you have this

```
status: no carrier
```
nothing will show up on that interface, I'm afraid.


----------



## sossego (Oct 29, 2009)

How do I assign a carrier to the interface?
I saw something about assigning the values to rl0 in rc.conf, would this be the solution or is there something else?


----------



## ctaranotte (Oct 29, 2009)

sossego said:
			
		

> How do I assign a carrier to the interface?



To what rl0 is physically linked?

Are you really using IP over firewire (fwe0 and fwip0)? Or is this a legacy of one of your box previous lifes?


----------



## DutchDaemon (Oct 29, 2009)

A carrier is like a dial-tone on a telephone line. You can't assign it, it is there when the network interface is physically connected to another network interface or switch port. 'No carrier' signifies the absence of an 'ethernet signal', usually caused by a cable not being present or defective, or the cable not being connected to anything else talking ethernet over it (dead switch port, for example).


----------



## sossego (Oct 29, 2009)

I'm on a compaq sr1710nx, the amdtek card was added in later.
There's a firewire port on the front panel. I have nothing connected to the fwe0 and fwip0 interfaces.
The other machine is an HP pavilion 533w. I'm assuming that it's a rl0 standard. Like I said, the cable works when connecting dc0 to the cable modem. rl0 is connected to the rl0 on the hp box- client(HP) to "server"(Compaq)


----------



## DutchDaemon (Oct 29, 2009)

You'll need a cross-cable (usually black with a red plug) to connect network interfaces between computers. You're probably using a straight cable (usually grey with a transparent plug). You can also connect via a switch or a hub (with straight cables).


----------



## sossego (Oct 29, 2009)

Yes, that describes the cable types. So, until I can purchase the cable, I guess that this will have to wait.

I also added "ddns-update-style ad-hoc;" to dhcpd.conf.


Thanks a lot all of you, really, for walking me through this.


----------



## SirDice (Oct 30, 2009)

One note, you seem to have both natd and pf. Enable either one but not both.


----------



## sossego (Nov 11, 2009)

I disabled natd and added the pf values to rc.conf.
The service is not starting even though I initialize it.
Yes, thios is being done from FreeBSD.
is there a checklist I can go through to test that all of my cof files are right?


----------



## SirDice (Nov 11, 2009)

Try loading it by hand `# pfctl -f /etc/pf.conf`. See if it throws any errors.


----------



## sossego (Nov 12, 2009)

I'm having a slightly different error on the to-be-client nmachine.
I disabled dc0 here.
Enabled rl0 there.
It did not connect.
Now we have three linux distributions on it , and none connected. I used ifconfig <interface> up, and ifpu <interface> to no avail.
I was doing this to get it on the network directly.
Even though not directly associated, is there a proper way I should be doing ifup/down?

Give me a few moments to run the pf test and I'll post the results here.

Edit: I don't know what I am doing wrong, but, I am not able to connect now.
I'm going to reinstall FreeBSD and just wait until I either find a real card for routing or come across one that I can afford.
My problem is that I need a hard copy- a volume, a tome- to hold and look at.


----------

