Date: Thu, 28 Nov 1996 09:30:52 -0100 From: Darius Moos <moos@degnet.baynet.de> To: Jeff Newton <jeff@datapark.com> Cc: FreeBSD-questions <questions@freebsd.org> Subject: Re: Ifconfig (setup a point to point link) Message-ID: <329D69DC.7DBB@degnet.baynet.de> References: <329CCD73.7381@datapark.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?329D69DC.7DBB>
