[gentoo-user] Re: Router 3rd and 4th net interface problem

2006-10-06 Thread David Talkington

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Grant wrote:

I think it would be smarter for me to buy a $15 switch from NewEgg 
instead of trying to configure my Gentoo router to use its extra NICs 
this way.  Is there any reason I wouldn't want to do that?


Academic exercises aside, the only reasons I can think of to use a 
general-purpose computing device for this purpose instead of a simple 
switch would be a) cost, or b) to do something that the switch can't do, 
such as firewall.  If you really just want a switch, and the money isn't 
a big deal, go with the switch.


That said ... strictly speaking, what you're asking for is a bridge, 
which may not be the easiest way to accomplish your ends, nor the most 
flexible configuration.  Maybe consider this easy approach:


- - create a separate network for each NIC (maybe 192.168.2.0 and
  192.168.1.0), and give each an appropriate IP address (maybe 2.1 and
  1.1 respectively).

- - enable IP forwarding, and NAT if appropriate for outbound traffic
  (sounds like you already know how to do that).

- - Make sure your DHCP server listens on each of those networks and has
  an address pool for each.  I run mine right on the gateway, and ensure
  that it doesn't listen to the public address.

That's basically it.  A big advantage of this is that if you want, now 
you can easily isolate one of those segments to create a DMZ for a web 
server or a playstation or something else fun.


Cheers -d

- --
David Talkington

PGP key: http://www.prairienet.org/~dtalk/004B8F8B.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFJsJ95FKhdwBLj4sRAsW7AKCgfMIGU/wuOSR2dWGfnBJuWiROEwCcDzhN
bQ75d9ixEQCCFemWRkAQcX4=
=GRZ8
-END PGP SIGNATURE-
--
gentoo-user@gentoo.org mailing list



[gentoo-user] Re: Router 3rd and 4th net interface problem

2006-09-28 Thread James
Grant emailgrant at gmail.com writes:


 I've added two ethernet cards and I'm trying to connect from another machine
 to one of the new cards (eth1 and eth2). 

Hello Grant,

If you look at /etc/conf.d/net.example, you'll get some ideas.

I have a machine with (4) interfaces and here is what I use
for /etc/conf.d/net  :


mac_eth0=00:50:DA:61:31:1C
mac_eth1=00:48:54:62:64:FD
mac_eth2=00:40:F4:D0:B1:96
mac_eth3=00:48:54:62:64:FC
iface_eth0=192.168.2.20 broadcast 192.168.3.255 netmask 255.255.255.0
iface_eth1=192.168.3.11 broadcast 192.168.3.255 netmask 255.255.255.0
iface_eth2=14.173.99.102 broadcast 14.173.99.103 netmask 255.255.255.252
iface_eth3=192.168.4.11 broadcast 192.168.4.255 netmask 255.255.255.0

I had troubles with the machine inconsistently assiging a given ip
address to a specific card. The 'mac' statements seem to nail this
down for me. The is for a single static IP address but there are
examples for dhcp in the /etc/conf.d/net.example file too.

Note, this experimental router is using the old syntax and is scheduled 
for lots of upgrades, so I post it here, as an example that seemed to
work for the problems I encountered a year ago. I'd be open to other
ideas. and comments.

hth  ymmv,
James

-- 
gentoo-user@gentoo.org mailing list