From owner-freebsd-questions Wed Feb 12 13:19:28 2003 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 1326737B401 for ; Wed, 12 Feb 2003 13:19:26 -0800 (PST) Received: from zinebar.hermans.ca (h24-65-98-95.ed.shawcable.net [24.65.98.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E9A743F3F for ; Wed, 12 Feb 2003 13:19:20 -0800 (PST) (envelope-from freebsd@hermans.ca) Received: from localhost (localhost [127.0.0.1]) by zinebar.hermans.ca (Postfix) with ESMTP id 7F33454AF; Wed, 12 Feb 2003 14:19:07 -0700 (MST) Received: from jhermansxp (zinebar.inside [192.168.30.1]) by zinebar.hermans.ca (Postfix) with SMTP id B28A054AC; Wed, 12 Feb 2003 14:19:03 -0700 (MST) Message-ID: <017301c2d2dc$3a6ee760$3d07000a@jhermansxp> From: "Jamie Hermans" To: , "C.Steiner" References: <5.2.0.9.0.20030212003300.00a71e50@www.elch.ch> Subject: Re: how to get two IPs from DHCP for one NIC Date: Wed, 12 Feb 2003 14:18:02 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS snapshot-20020531 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "C.Steiner" To: Sent: Tuesday, February 11, 2003 5:13 PM Subject: how to get two IPs from DHCP for one NIC > After firing this thing up, > I ended up with only one IP bound to rl0, and in /var/db/dhclient.leases > there were two leases, one for the original interface, and one for the > secondary, but both of them with the same (functional) IP, and both of > them with the same host-name !! : > I've tried to adapt that dhclient-secondary script, but It wasn' > successfull. I think that maybe the ISP DHCP Server checks the MAC > address of my NIC, and so I get the same IP again, when dhclient > requests the second IP. > > Has anybody a clue how to solve this ?? This has worked for me ... your mileage may vary. /etc/dhclient-secondary.sh ----- #!/bin/sh if [ -x /usr/bin/logger ]; then LOGGER="/usr/bin/logger -s -p user.notice -t dhclient" else LOGGER=echo fi exit_status=$1 ifconfig $interface inet alias $new_ip_address \ netmask 255.255.255.255 > /dev/null 2>&1 $LOGGER "New (secondary) IP Address ($interface): $new_ip_address" exit $exit_status ----- /etc/dhclient.conf ----- interface "fxp0" { send dhcp-client-identifier "zinebar"; supersede domain-name "hermans.ca inside wireless"; supersede domain-name-servers 0.0.0.0; } pseudo "secondary" "fxp0" { send dhcp-client-identifier "zinebar2"; script "/etc/dhclient-secondary"; } ----- -- Jamie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message