From owner-freebsd-questions Thu Nov 28 00:39:18 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA14098 for questions-outgoing; Thu, 28 Nov 1996 00:39:18 -0800 (PST) Received: from cyclone.degnet.baynet.de (cyclone.degnet.baynet.de [194.95.214.129]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id AAA14093 for ; Thu, 28 Nov 1996 00:38:58 -0800 (PST) Received: from neuron (ppp2 [194.95.214.132]) by cyclone.degnet.baynet.de (8.6.12/8.6.9) with SMTP id KAA07899; Thu, 28 Nov 1996 10:38:22 +0100 Message-ID: <329D69DC.7DBB@degnet.baynet.de> Date: Thu, 28 Nov 1996 09:30:52 -0100 From: Darius Moos Reply-To: moos@degnet.baynet.de X-Mailer: Mozilla 3.0Gold (Win95; I) MIME-Version: 1.0 To: Jeff Newton CC: FreeBSD-questions Subject: Re: Ifconfig (setup a point to point link) References: <329CCD73.7381@datapark.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk You can not span a continous C-class over two different network- segments. That is what you are trying to do. Your options: 1. introducing a RFC-private net 2. subnetting 3. arping (Assuming the router is connected to the internet NIC1, NIC2 element of {ed0, ed1, ep0, de0, ...}) 1.: ifconfig NIC1 inet xxx.xxx.xxx.1 netmask 0xffffff00 ifconfig NIC2 inet 192.168.xxx.1 netmask 0xffffff00 Disadvantage: You have to use proxying or network-address-translation 2.: ifconfig NIC1 inet xxx.xxx.xxx.253 netmask 0xffffff80 ifconfig NIC2 inet xxx.xxx.xxx.1 netmask 0xffffff80 Disadvantage: Waste of IP-adr.es Variants: You can tune the netmask to your needs: netmask 0xffffff80 gives you 2 subnets with each having 126 usable IP-adr.es plus broadcast and network. netmask 0xfffffffc gives you 64 subnets with each having 2 usable IP-adr.es plus broadcast and network. Tune the netmask to your needs. 3.: (LIP element of {xxx.xxx.xxx.1, ..., xxx.xxx.xxx.251}; HWADRofNIC2 := ethernet-hardwareadr. of NIC2) ifconfig NIC1 inet xxx.xxx.xxx.253 netmask 0xfffffffc ifconfig NIC2 inet 192.168.xxx.1 netmask 0xffffff00 arp -s LIP HWADRofNIC2 You have to arp for every possible LIP. Disadvantage: hardware-dependent to the HWADRofNIC2 Darius Moos. Jeff Newton wrote: > > Hi all, > > After hours of banging my head against the wall trying to solve this > problem, I thought I'd ask the gurus out there for some assistance. > > I have a multi-homed freebsd box I'd like to use as a firewall/gateway. > Here's the way I want to set it up: > > router (XXX.XXX.XXX.254) > | > | > point to point link > | > | > NIC1 (XXX.XXX.XXX.1) > gateway > NIC2 (XXX.XXX.XXX.2) > | > | > LAN > > I've only got one C class and people have said you can't put the same > network on two interfaces...others say that a point to point link should > work (its easily done with Linux). > > I figure ifconfig spits up at me cause I don't have the syntax righ for > the point to point right. Can someone show me how to do this? Can this > be done by adding static routes in a particular order. > > Any advice would be much appreciated. > > -- > Jeff Newton > Systems Administrator > Tantalus Communications > Datapark Internet Services Inc.