IP Routing and Distributing TCP/IP accross a LAN with FreeBSD

IP Routing and Distributing TCP/IP accross a LAN with FreeBSD

Post by Dan Sideriu » Sun, 17 Jan 1999 04:00:00



Could someone out there give me some simple instructions how to use
FreeBSD as a gateway/router to distribute a cable modem connection to
several PCs?
Here's what the network will probably look like:

|------------------|                      |-----------------|
| FreeBSD       |-----------------| Cable           |-----------Coax
connection
| Router           |                      | Modem        |
|------------------|                      |-----------------|
         |
|------------------|
| 8 or 16 port   |---------| PC #1|
| RJ-45 Hub     |
|------------------|---------|PC #2|
  |
  |
|PC #3|    etc,etc

I have read the FreeBSD tutorial on how to route a PPP dial-up, but this
network will only have 1 true IP address that originates at the Cable
Modem.  Specifically, I need instructions on how to make create fake IP
addresses for the PCs that will be connected to the router through the
hub

 
 
 

IP Routing and Distributing TCP/IP accross a LAN with FreeBSD

Post by Richard J. Dawe » Sun, 17 Jan 1999 04:00:00


Dan,
        There's two major issues here.  First, making a connection via
your cable modem, and second, setting up a gateway.  One of my buddies has
set up some such instructions for "Home Net"-ters  -- it was really quite
useful for me getting started with FreeBSD and a home setup like yours.  The
cable modem part, however, is mostly specific to the (Time-Warner) Road
Runner service as it has been implemented here in San Diego.  So, you'll
probably have to figure the cable-connection stuff out on your own, but the
rest should apply.  Whether such "figuring" is significant varies widely,

pretty easy.)  There's probably some unixers local to you who have scoped
this stuff out and thrown together a web page to share their experience.
Anyway, my friend's site, "The HomeNet Consortsium",  can be found at:
        http://dt040n61.san.rr.com/  .
Another site (local to me) that might help you get started with your cable
modem connection (esp. if you have Road Runner) is
        http://people.qualcomm.com/karn/rr/   ,
as maintained by Unix great Phil Karn.

Good Luck!

--Rich


> Could someone out there give me some simple instructions how to use
> FreeBSD as a gateway/router to distribute a cable modem connection to
> several PCs?
> Here's what the network will probably look like:

> |------------------|                      |-----------------|
> | FreeBSD       |-----------------| Cable           |-----------Coax
> connection
> | Router           |                      | Modem        |
> |------------------|                      |-----------------|
>          |
> |------------------|
> | 8 or 16 port   |---------| PC #1|
> | RJ-45 Hub     |
> |------------------|---------|PC #2|
>   |
>   |
> |PC #3|    etc,etc

> I have read the FreeBSD tutorial on how to route a PPP dial-up, but this
> network will only have 1 true IP address that originates at the Cable
> Modem.  Specifically, I need instructions on how to make create fake IP
> addresses for the PCs that will be connected to the router through the
> hub


 
 
 

IP Routing and Distributing TCP/IP accross a LAN with FreeBSD

Post by James » Mon, 18 Jan 1999 04:00:00



>Could someone out there give me some simple instructions how to use
>FreeBSD as a gateway/router to distribute a cable modem connection to
>several PCs?
>I have read the FreeBSD tutorial on how to route a PPP dial-up, but
>this network will only have 1 true IP address that originates at the
>Cable Modem.  Specifically, I need instructions on how to make create
>fake IP addresses for the PCs that will be connected to the router
>through the hub

The PPP tutorial stuff largely applies.  Did you buy "The Complete
FreeBSD"?  I highly recommend it.

The following is off the top of my head, so I probably left out some
steps.  I'd appreciate any corrections.

       .------------------------.
       |  FreeBSD               |
       |                        |
       |  home.isp.domain.com
       |                   NIC1 |--------------------| Cable Modem
       |        router
       |            NIC2        |
       `----------  -.-  -------'
                     |
                     |
                 .- -^- -.
                 | Hub   |------------| MyPC1
                 |       |------------| MyPC2
                 `-------'

(0) Assume that on home.isp.domain.com, NIC1 uses fxp0, and NIC2 uses
    vx0.  Furthermore, assume that you have things set up so that
    home.isp.domain.com itself is successfully connected to the network
    through the Cable Modem.

(1) Reconfigure router's kernel to enable IPFIREWALL and IPDIVERT at a
    minimum.

    options IPFIREWALL
    options IPFIREWALL_VERBOSE
    options "IPFIREWALL_VERBOSE_LIMIT=100"
    #options IPFIREWALL_DEFAULT_TO_ACCEPT
    options IPDIVERT

    Re-compile and re-install.

(2) Choose a fake network for NIC1, MyPC1, and MyPC2.  Let's assume
    you want router to be known as 10.0.0.1, MyPC1 as 10.0.0.5, and
    MyPC2 as 10.0.0.6.

(3) Edit your /etc/rc.conf file.

    ...
    firewall_enable="YES"
    firewall_type="open"  # Can make this more restrictive later
    natd_enable="YES"
    natd_interface="fxp0"
    natd_flags="-s -m -u" # man natd(8) to find out what these do

    ...
    network_interfaces="fxp0 vx0 lo0"
    ifconfig_vx0="inet 10.0.0.1 netmask 255.0.0.0"
    # You should have already set up for fxp0

    ...
    gateway_enable="YES"

(4) Edit your /etc/hosts file.  You don't need to do this if you
    decide to run a local DNS for your fake network.
    ...
    10.0.0.1 router
    10.0.0.5 MyPC1
    10.0.0.6 MyPC2

(5) Reboot the FreeBSD box.  Configure MyPC1 and MyPC2 to use router
    as their gateway, and your ISP's DNS for DNS.

--

http://www.cs.wustl.edu/~jxh/        Washington University in Saint Louis

Quote:>>>>>>>>>>>>> I use *SpamBeGone* <URL:http://www.internz.com/SpamBeGone/>

 
 
 

IP Routing and Distributing TCP/IP accross a LAN with FreeBSD

Post by Darr » Tue, 19 Jan 1999 04:00:00


First of all,
you need to set an IP address on each of the PC's.  If they are not
registered, they should be 192.168.y.x.  Where y is the network
you choose internally, and x is the address of the host.  I.E,
192.168.1.1, 192.168.1.2, etc.

The Freebsd machine should also have an address.  Once you have
that all set, then start ppp with the -alias flag which will start ppp
in ip masqarading mode.  It will handle the mapping of the real
ip (of your cable modem) to the individual PC's with the non-routable
ip address (192.168.y.x).

The FreeBSD handbook covers this in some detail, as well as
the FreeBSD web site.



Quote:>Could someone out there give me some simple instructions how to use
>FreeBSD as a gateway/router to distribute a cable modem connection to
>several PCs?
>Here's what the network will probably look like:

>|------------------|                      |-----------------|
>| FreeBSD       |-----------------| Cable           |-----------Coax
>connection
>| Router           |                      | Modem        |
>|------------------|                      |-----------------|
>         |
>|------------------|
>| 8 or 16 port   |---------| PC #1|
>| RJ-45 Hub     |
>|------------------|---------|PC #2|
>  |
>  |
>|PC #3|    etc,etc

>I have read the FreeBSD tutorial on how to route a PPP dial-up, but this
>network will only have 1 true IP address that originates at the Cable
>Modem.  Specifically, I need instructions on how to make create fake IP
>addresses for the PCs that will be connected to the router through the
>hub

 
 
 

1. tcp/ip LAN IPs and dynamic IP ppp connections....

My Friend and I have a tcp/ip LAN running in our apartment building, and are
having a great deal of trouble with running both the LAN and making PPP
connections w/ dynamic IPs. As of now we are only able to grab the nameserver
of our provider when we first kill the eth0 device and then run pppd. is
there some way that we can "point" to a name server, and at the same time
keep the LAN up.  I was also told that we could possibly ues both PPP
conections simultaneously to some benefit of greater throughput.... If I am
dreaming someone tell me, otherwise perhaps, some advice?  Verbose
explination of the situation would be appreciated, I am in the middle of a
self tought crash course in Linux... thanks...


2. 5.0-REL/XF86 4.3.0 prob

3. routed timing out my LAN card so tcp/ip seems not to work.

4. Q: The usage of awk?

5. routing algorithm in FreeBSD TCP/IP

6. NIS

7. routing algorithm in FreeBSD TCP/IP(2)

8. modules problem on 2.1.116/5

9. !!DDE->TCP/IP, REAL TIME DATA PUMP, Trans.DDE App.DATA via TCP/IP