kitbsdlists at HotPOP.com
Sun Dec 7 19:52:02 PST 2003
On Sun, 7 Dec 2003 19:56:14 +0300
"Marwan Sultan" <Admin at kifco.net> wrote:
> Hello Everybody,
> Im on FreeBSD 4.8-R fresh installation.
> and this is the configuration i will use on my LAN
> Internet ->connected-> DSL Router -> FreeBSD box -> HUB -> LAN
> DSL Router has an IP 192.168.0.1 and the real IP too.
> FreeBSD box has 2 NIC's
> My question is:
> Where and How to sign 2 IPs for 2 NICs?
> which IP the NIC connected to DSL should sign?
> Which IP the NIC connected to HUB should sign?
> Which of these IPs will be as gateway IP the clients will sign?
The DSL connection is probally going to be DHCP so just set the nic connected to
it for DHCP. Then for the lan select what ever private address you want.
You will have to experiment a bit to figure out which is which.
> I have read the instructions of freebsd.org,
> and it says the gateway will be the BSD machine 192.168.0.1
> BUT this IP in my LAN is signed to the router automatilcaly.
You can assign the gateway machine any private address you want. BTW if you have
a gateway why are you setting up a second?
> Can someone explain? advise? This machine will be only for this use.
It basically works like this...
LAN -> gateway -> natd -> dsl uplink device -> WAN
Any thing on to a address not included in the subnet mask is going to leave
throught the gateway. The usual subnet mask is 255.255.255.0 so thus there are
256 possabilities of address in the alloted space. Now lets say out gateway is
192.168.0.1 any thing not belonging to 192.168.0.1/24 is going to leave thought
the gateway. On it's way out that packet is going to be monkeyed, by natd, with
so it will know where to send the returned info. This is done so that it will
know which machine on the LAN it should be sent too.
More information about the freebsd-questions