Routing 4 network cards

Roland Wells freebsd at thebeatbox.org
Fri Feb 6 22:26:16 PST 2004


> "Sjaak Nabuurs" <sjaaknabuurs at citytower.com> writes:
>
> > Wireless USERS
> Wireless USERS
> >
> >                        W   W   W   W   W   W           W
> W   W   W   W   W
> >                       |-| |-| |-| |-| |-| |-|         |-|
> |-| |-| |-| |-| |-|
> >                       |-| |-| |-| |-| |-| |-|         |-|
> |-| |-| |-| |-| |-|
> >                          192.168.3.2-254
> 192.168.4.2-254
> >                                    ~                         ~
> >                                    ~                         ~
> >                                    ~                         ~
> >                                    ~                         ~
> >                                    ~                         ~
> >                                    W 192.168.3.1
>  W 192.168.4.1
> >                                  |---------|              |--------|
> > 8Mbit      |------|   WIRELESS   |         |              |        |
> > INTERNET ==|  A   |W~~~~~~~~~~~~W|FreeBSD1
> |W~~~~~~~~~~~~W|FreeBSD2|
> >            |------|  192.168.0.1 |         |192.168.2.1   |        |
> >               |192.168.0.138     |---------|   192.168.2.2|--------|
> >               |                       |                      |
> >               |                       |192.168.1.1
>  |192.168.5.1
> >               |                       |                      |
> >               |                       |                      |
> >  192.168.0.150|                       |                      |
> >            |------|               |------|               |------|
> >            |HOME  |               |HOME 1|               |HOME 2|
> >            |------|               |------|               |------|
> >
> > A = Router Acatel DSL
> >
> >  W = Antene
> > |-|
> > |-| = Wireless User (20 Wireless users)
> >
> >
> > I hoop the drawing is readable !
>
> Superb.  And it's a *big* help in this situation.
>
> > The Facts :
> > OS FreeBSD 5.2 (is it stable for this problem or better to use 4.x)
>
> Try it and see.  If 5.2 installs and seems to run nicely on *your*
> particular hardware, it's probably good for your purposes.
>
> > With 4 nic's inside
> >
> > RL0 =  192.168.0.1
> > RL1 =  192.168.1.1
> > RL2 =  192.168.2.1
> > RL4 =  192.168.3.1
> >
> >
> > I like to connect RL1/2/3 to RL0 (internet)
> >
> > HOME1 and HOME2 are the system administrators and need to
> manage the whole network include the users
> > Everybody need access to the internet
> >
> > I like to have a start how to setup FreeBSD 1
> >
> > I like to use dummynet(compiled and works very nice) to
> manage traffic let's say
> > 192.168.3.1/26   100Kb/s
> > 192.168.3.64/26  200Kb/s
> > 192.168.3.128/26 300Kb/s
> > 192.168.3.192/26 400Kb/s
> > Count every user with ipfw count
> >
> > ---------------------------
> > #!/usr/local/bin/bash
> > for ((a=2; a<=254; a++))
> > do
> > IPCOUNT = "10"$a"0 add count tcp from 192.168.3.$a to any"
> > ipfw $IPCOUNT
> > done
> > ----------------------------
>
> Okay...
>
> > And now the question about FreeBSD 1 (forget FreeBSD2).
> > Give me a good hint how to set this up with ipfw and NAT
> > I googled many but ther's not that much about information
> about 3 or more nic with freeBSD.
>
> In this case, all of the interfaces on "FreeBSD1" are handled the same
> way as the "inside" interface in the typical example where the FreeBSD
> box is the router to the outside world.
>
> > I think I have to use NAT, but can i use it in combination
> with ipfw to dummynet out/ingoing traffic over the nic RL1/2/3
>
> No, in this case NAT has to be done by the Internet router, machine
> "A".  FreeBSD1 doesn't need to worry about it.
>
> > And how can i "HOME1" go accross the whole network RL0/2/3
>
> You need to give "FreeBSD1" routes for the networks off the other
> routers.  For example "route add -net 192.168.5.1/24 192.168.2.2" to
> access "HOME 2".
>
> > Sorry for my English and I hope I give anough explanation
> about my plan.
>
> I hope you got enough explanation in return...
>
> --
> Lowell Gilbert, embedded/networking software engineer, Boston area:
> 		resume/CV at http://be-well.ilk.org:8088/~lowell/resume/
> 		username/password "public"

Lowell, Sjaak and everyone ;}...
I guess this is more a question (that could be a possible solution);

Could you just Bridge all the seperate physical networks, and leave
firewalling and NAT to be done by the router, or lets say, on another
FreeBSD box connected to the dsl modem?


Roland Wells




More information about the freebsd-questions mailing list