From owner-freebsd-questions@FreeBSD.ORG Mon Aug 30 20:39:33 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3026B10657C2 for ; Mon, 30 Aug 2010 20:39:33 +0000 (UTC) (envelope-from nlandys@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id DA94C8FC21 for ; Mon, 30 Aug 2010 20:39:32 +0000 (UTC) Received: by qyk8 with SMTP id 8so3526577qyk.13 for ; Mon, 30 Aug 2010 13:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=v/H0iZH+DMiK+DiDsRMVgXsWW2EsibYBl5i4668KCi4=; b=RFNSudRHBE4EsvonmalTep5ZzllpWKEokAplXHNylqUmqHBxiUV1XR4QeriDrsMb4K Hrh8oaHrSv3/bEr47cx3bIWpvW7mTJkXLqrt7AiVE9tCLKrTIGaA20gp9US9IHkeoBNq DJTxUaQDhqBiCOVHZXtvgecLmZePVvBa0ozLw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ZFvINjpQjjb6Mxj+nhQmhhCzT5C+Lr9kiuCbJW+VThGsRTan+Vv/qVxUDDvKa8+3Ru LFkdfog5uc3i1dwrZeFR5o0buAZRikg7xa4EPipxCnqUxMeMDYtL+JnUdsdtCyJa7pPS maZ4MC95e3+o6A+PH2Cw4RwQOxdAPdAKYfVNc= MIME-Version: 1.0 Received: by 10.224.105.146 with SMTP id t18mr3219148qao.363.1283199325476; Mon, 30 Aug 2010 13:15:25 -0700 (PDT) Received: by 10.229.28.207 with HTTP; Mon, 30 Aug 2010 13:15:25 -0700 (PDT) Date: Mon, 30 Aug 2010 13:15:25 -0700 Message-ID: From: Nerius Landys To: FreeBSD Mailing List Content-Type: text/plain; charset=ISO-8859-1 Subject: DHCP server and bridge, mixed w/ some static IP assignments X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 20:39:33 -0000 I'm trying to add some sort of DHCP server functionality to my router box running FreeBSD 7.1. First, let me explain the current network. This is how my rc.conf is currently configured, and everything is running smoothly: gateway_enable="YES" hostname="speedy.i" ifconfig_fxp2="DHCP" # Connecting to the outside internet via AT&T UVerse cloned_interfaces="bridge0" ifconfig_bridge0="addm re0 addm ath0 addm fxp0 addm fxp1 up" # Bridge consisting of four interfaces ifconfig_re0="up" # My gigabit wired interface ifconfig_ath0="ssid speedy.i mode 11g mediaopt hostap up" # Wireless interface ifconfig_fxp0="up" # 100 megabit wired ifconfig_fxp1="up" # 100 megabit wired ipv4_addrs_bridge0="192.168.0.254/24" ipnat_enable="YES" hostapd_enable="YES" So as you can see, I have an internal network with 192.168.0.0/24 IP addresses. Both the wired and wireless are in the same network, and this is the way I've decided that I want it. All the machines connected to this internal network are using static IP addresses, even the wireless laptops. Now, I'd like to add a DHCP server capability to the 192.168.0.0/24 network, but I'd like to allow some machines to still connect with static IP addresses (of their own choice, not controlled by the router via MAC address lookups for example). So, I'm reading this: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-dhcp.html under the server section. And I have a few questions. First, I look in /usr/ports/net/ and I find both isc-dhcp31-server and isc-dhcp41-server. The manual says to use the 31 version. Q1: Which do you recommend? I know that the manual is oftentimes out of date. I'm on FreeBSD 7.1. Next, would it be possible to, for example, DHCP-lease out IP addresses above 192.169.0.127, but leave IP addresses below that as statically assigned? For example my plan for dhcpd.conf: option domain-name "i"; option domain-name-servers 192.168.0.254; option subnet-mask 255.255.255.0; default-lease-time 3600; max-lease-time 86400; ddns-update-style none; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.128 192.168.0.253; option routers 192.168.0.254; } And in my rc.conf I plan to add: dhcpd_enable="YES" dhcpd_ifaces="bridge0" Q2: Now is it legal to assign a bridge to a dhcpd interface? That would be nice, because then both wired and wireless machines could connect via DHCP. If it's not possible to do this, can I at least assign the ath0 (my wireless interface) to the dhcpd interface, even though ath0 is part of a bridge? Q3: I have some machines connected via static IP addresses, e.g. 192.168.0.9 and 192.168.0.10. I would like to keep it this way, and let the clients themselves control which IP addresses they want to use. Am I allowed to mix DHCP leases with static assignments on the same network like this? I'm afraid to get locked out of my router, because right now it's only accessible over the network. If I get locked out I'll have to hook up either the serial console via null modem cable or a monitor/keyboard, which could be a pain.