From owner-freebsd-questions@FreeBSD.ORG Mon Sep 5 21:46:50 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0499A16A41F for ; Mon, 5 Sep 2005 21:46:50 +0000 (GMT) (envelope-from ihsan@dogan.ch) Received: from mail.blastwave.org (mail.blastwave.org [147.87.98.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EE6643D46 for ; Mon, 5 Sep 2005 21:46:49 +0000 (GMT) (envelope-from ihsan@dogan.ch) Received: from localhost (localhost [127.0.0.1]) by mail.blastwave.org (Postfix) with ESMTP id 01D02F89A for ; Mon, 5 Sep 2005 23:46:48 +0200 (MEST) Received: from mail.blastwave.org ([127.0.0.1]) by localhost (enterprise [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22486-06-3 for ; Mon, 5 Sep 2005 23:46:43 +0200 (MEST) Received: from defiant.dogan.ch (defiant.dogan.ch [213.144.141.146]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.blastwave.org (Postfix) with ESMTP id 09090F896 for ; Mon, 5 Sep 2005 23:46:42 +0200 (MEST) Received: by defiant.dogan.ch (Postfix, from userid 1000) id 0759F17B0E; Mon, 5 Sep 2005 23:46:41 +0200 (CEST) Date: Mon, 5 Sep 2005 23:46:41 +0200 From: Ihsan Dogan To: FreeBSD Questions Message-ID: <20050905214641.GA28018@dogan.ch> Mail-Followup-To: FreeBSD Questions Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Operating-System: NetBSD/i386 1.6.2 X-Uptime: 11:30PM up 30 days, 2:31, 7 users, load averages: 1.80, 1.61, 1.59 X-Binford: 6100 (more power) X-Editor: Vim-603 http://www.vim.org X-Virus-Scanned: amavisd-new at blastwave.org Subject: dhcrelay is setting the relay ip address wrong 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, 05 Sep 2005 21:46:50 -0000 Hello, I'm running a small router/firewall on a FreeBSD 5.4 system. This machine should also act as a DHCP gateway. For the dhcp relay, I'm using ISC's dhcrelay (from Ports isc-dhcp3-relay-3.0.3). The Interfaca and network configuration: hme0: flags=8843 mtu 1500 options=b inet 213.144.141.145 netmask 0xfffffff8 broadcast 213.144.141.151 inet6 fe80::a00:20ff:feb4:42cc%hme0 prefixlen 64 scopeid 0x1 inet6 2001:470:1f01:569::1 prefixlen 112 ether 08:00:20:b4:42:cc media: Ethernet autoselect (100baseTX ) status: active hme1: flags=8843 mtu 1500 options=b inet 192.168.23.1 netmask 0xffffff00 broadcast 192.168.23.255 inet6 fe80::a00:20ff:feb4:42cd%hme1 prefixlen 64 scopeid 0x2 ether 08:00:20:b4:42:cd media: Ethernet autoselect (100baseTX ) status: active hme2: flags=8843 mtu 1500 options=b inet 192.168.42.1 netmask 0xffffff00 broadcast 192.168.42.255 inet6 fe80::a00:20ff:feb4:42ce%hme2 prefixlen 64 scopeid 0x3 ether 08:00:20:b4:42:ce media: Ethernet autoselect (100baseTX ) status: active The DHCP server is on the subnet of hme0; the DHCP clients are on hme1 on hme2. netstat -rnf inet: Destination Gateway Flags Refs Use Netif Expire default 213.144.128.205 UGS 0 250630 tun0 127.0.0.1 127.0.0.1 UH 0 71 lo0 192.168.23 link#2 UC 0 0 hme1 192.168.23.2 00:c0:49:5a:1d:ca UHLW 0 2 hme1 823 192.168.42 link#3 UC 0 0 hme2 213.144.128.205 213.144.146.12 UH 1 0 tun0 213.144.141.144 ff:ff:ff:ff:ff:ff UHLWb 0 3 hme0 => 213.144.141.144/29 link#1 UC 0 0 hme0 213.144.141.146 00:08:c7:3a:df:a9 UHLW 0 104123 hme0 233 213.144.141.147 00:07:e9:14:1a:a1 UHLW 0 38011 hme0 322 213.144.141.151 ff:ff:ff:ff:ff:ff UHLWb 0 1 hme0 The dhcrelay is started with the following options: /usr/local/sbin/dhcrelay -i hme1 -i hme2 -d -a 213.144.141.146 The dhcrelay receives the request and passes them to the DHCP server, but the forwarded package contains the "relay agent ip address" of 192.168.23.1 and not 213.144.141.145 how it should be. In that case, the DHCP server is sending the reply to 192.168.23.1 and not to 213.144.141.145. Did I something wrong? A bug? Ihsan -- ihsan@dogan.ch http://ihsan.dogan.ch/