Re: Home Network, step by step?

From: James (james_at_idea-anvil.net)
Date: 12/14/04

  • Next message: Tyler Gee: "Re: Network config issue"
    To: freebsd-newbies@freebsd.org
    Date: Tue, 14 Dec 2004 07:30:27 -0700
    
    

    Hi,

    On Monday 13 December 2004 10:48 pm, R. Scott Kennan wrote:
    > Ok, here's my setup: I have broadband over a surfboard modem from Cox
    > cable. I have an ethernet card (D-link) that I just picked up, and a
    > crossover cable that connects the two computers via this card, to
    > another, identical one on the linux box.

    so just to make sure I am clear,

    [world]<--->[cable gateway]<--->[fbsd box]<--->[hub]<--->[linux box]

    that look right?

    > Here's the results of ifconfig (I can't make heads or tails of it-
    > which one is my incoming internet connection? ):
    >

    This would be your firewire:
    > fwe0: flags=108802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
    > options=8<VLAN_MTU>
    > ether 02:e0:18:11:a5:2b
    > ch 1 dma -1

    This is a network card:
    > bfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    > options=8<VLAN_MTU>
    > inet6 fe80::2e0:18ff:fef9:96e9%bfe0 prefixlen 64 scopeid 0x2
    > inet 68.230.154.245 netmask 0xfffffe00 broadcast 68.230.155.255
    > ether 00:e0:18:f9:96:e9
    > media: Ethernet autoselect (100baseTX <full-duplex>)
    > status: active

    This is a network card:
    > rl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
    > options=8<VLAN_MTU>
    > ether 00:11:95:1d:43:fd
    > media: Ethernet autoselect (10baseT/UTP)
    > status: no carrier

    This would be the lpt port:
    > plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500

    This is the loopback interface:
    > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    > inet 127.0.0.1 netmask 0xff000000
    > inet6 ::1 prefixlen 128
    > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
    >

    You will need to know the ip address of the cable modem or if it is using
    dhcp. Use the http admin for the modem to see what the ip is unless you
    already know. Also note if dhcp is running on the modem, if you want to use
    dhcp then read this page (i don't know dhcp setup very well):
    http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-dhcp.html
    and ignore the rest of this. Or you can disable dhcp for the LAN and setup a
    static network.

    Static setup:

    # ifconfig rl0 down
    # ifconfig bfe0 down
    # route flush

    This will clean up your "mess" :-)

    Next, you need to know the public interface (going to the cable gateway) and
    the private interface (going to your LAN).

    Now to find the public interface: (assuming the ip address for the cable modem
    is 192.168.0.1 and has a netmask of 255.255.255.0):

    # ifconfig rl0 192.168.0.2 netmask 255.255.255.0
    # ifconfig rl0 up
    # route add default gateway 192.168.0.1
    # ping 192.168.0.1

    You should get a ping response from the cable modem at this point.
    If not then:

    # ifconfig rl0 down
    # route flush
    # ifconfig bfe0 192.168.0.2 netmask 255.255.255.0
    # ifconfig bfe0 up
    # route add default gateway 192.168.0.1
    # ping 192.168.0.1

    Make a note of the which interface is which. For the examples I am assuming
    rl0 is connected to the cable modem, that is is up, you can ping the modem
    and that bfe0 is connected to the LAN.

    So this will all be set up on reboot:

    Edit /etc/rc.conf and add:

    firewall_enable="YES"
    firewall_type="OPEN"
    natd_enable="YES"
    natd_interface="rl0"
    ifconfig_rl0="inet 192.168.0.1 netmask 255.255.255.0"
    ifconfig_bfe0="inet 10.0.0.1 netmask 255.255.255.0"
    gateway_enable="YES"

    Edit /etc/rc.firewall and edit the "open" section:

    FROM:
    # Prototype setups.
    #
    case ${firewall_type} in
    [Oo][Pp][Ee][Nn])
            setup_loopback
            ${fwcmd} add 65000 pass all from any to any
            ;;

    TO:
    # Prototype setups.
    #
    case ${firewall_type} in
    [Oo][Pp][Ee][Nn])
            setup_loopback
            ${fwcmd} add divert natd all from any to any via rl0
            ${fwcmd} add 65000 pass all from any to any
            ;;

    Now Reboot.

    On the linux box:
    ifconfig eth0 10.0.0.2 netmask 255.255.255.0
    ifconfig eth0 up
    route add default gateway 10.0.0.1

    Now, from the freebsd box:

    ping 192.168.0.1
    ping 10.0.0.2
    ping freebsd.org

    From the linux box:

    ping 10.0.0.1
    ping freebsd.org

    You should be up and running.

    You will still need to edit your firewall rules. The "open" setup is just so
    misformed rules aren't a possable problem in the trouble shoot. I'm sure you
    will be able to google for how to do this.

    Let me know if this helped or if you have any more questions.

    - James
    _______________________________________________
    freebsd-newbies@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-newbies
    To unsubscribe, send any mail to "freebsd-newbies-unsubscribe@freebsd.org"


  • Next message: Tyler Gee: "Re: Network config issue"

    Relevant Pages

    • Re: Internet connection problem
      ... Now I removed the ethernet card and added a modem. ... > modem connects ok but I can't ping anything other than localhost. ... How did you setup your modem? ...
      (alt.os.linux)
    • Re: [Fwd: KI-2.6.8-2-686 Upgrage And Modem Issuse]
      ... KI-2.6.8-2-686 Upgrage And Modem Issuse ... Can you ping another computer by address ... My /etc/resolv.conf file contains both ISP supplied DNS servers. ... traceroute or host usage) but can under woody. ...
      (Debian-User)
    • Re: usb not detected/ system crash/system freeze
      ... Get a Modem that connects to your computer via an Ethernet Cable. ... And use the Windows XP CD, to reformat and reinstall the operating system then install the new Cable Modem before you download and reapply all the Hotfixes again. ... This time however it showed me 2 more options, one i think was a fresh setup made and the other was a unfinished setup. ... Of this i had read on the web on the MS site of the first driver causing some problems, and a hotfix for the same. ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: Internet Connection Sharing Problem
      ... Modem solved the problem. ... > other PCs show activity on their NICs with the same amount of data ... I can ping 192.168.0.1 but not google. ... >> to the LAN connection is fine, but it has to be in a different subnet ...
      (microsoft.public.windowsxp.network_web)
    • Re: My Router does not accept a gateway ip that has a subnet address different from the laptop ip ad
      ... Power everything down....modem, rtr, PC. ... Turn on the modem. ... posted were for the wireless connection. ... You can do ping tests again, ...
      (alt.internet.wireless)