Defcon-1-Logo

           [Home]    [FBSD Articles]    [Scripts Corner]    [Contribute]    [Search]    [FBSD Links]    [Files]

About Us

FreeBSD Articles
  *Hardware
  *Networking
  *Security
  *Software
  *X Windows


Files / Scripts
Newbies Corner
Tech. Talk
Tips and Tricks


FreeBSD Links

Articles in other
Languages :
  *French Articles
  *Spanish Articles

Want to Help ?
 
   Click Here

Email Users 5

Search:
 

 


FreeBSD Search:


 

 

Powered-By-Apache-Logo

FreeBSD Cable Modem How-To


$Id: cable-modem-howto.html,v 1.2 2000/02/20 23:46:28 chrisw Exp chrisw $

These instructions assume FreeBSD 3.4 or later and were writtten based on my experience with AT&T's @Home service which includes a Motorola CyberSURFER modem. If you use these instructions with another service provider, please send me email which includes the name of your provider and describe any variations on these instructions you made.

Part I: Host configuration

1. Preliminaries

These instructions assume that FreeBSD is already running on the system which is to be connected to the cable modem (this system will simply be identified as the host from this point forward). If the host isn't already running FreeBSD, consult www.freebsd.org for information on obtaining and installing FreeBSD.

2. Install a supported network interface card (NIC)

The FreeBSD release notes contain a list of supported cards. The release notes should also be on your system.

$ zmore /stand/help/RELNOTES.TXT.gz

If you've upgraded from source, more recent release notes are in the release source directory.

$ more /usr/src/release/texts/i386/RELNOTES.TXT
 

If a NIC is supported then its interface name can be determined with the ifconfig utility after the system boots.

$ ifconfig -a


de0: flags=8843 mtu 1500
    ether 00:00:94:a1:42:95
    media: autoselect (10baseT/UTP) status: active
    supported media: autoselect 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP
fxp0: flags=a843 mtu 1500
    ether 00:90:27:86:8c:55
    media: autoselect (10baseT/UTP) status: active
    supported media: autoselect 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP
tun0: flags=8010 mtu 1500
sl0: flags=c010 mtu 552
ppp0: flags=8010 mtu 1500
ppp1: flags=8010 mtu 1500
lo0: flags=8049 mtu 16384
    inet 127.0.0.1 netmask 0xff000000
 

In the above example, two NICs are present (interfaces de0and fxp0.) The machine used to generate this example functions as a router and requires two NICs. The entry for your NIC should contain a line which specifies the NIC's Ethernet address.

ether xx:xx:xx:xx:xx:xx

From this point forward, eth0 will be used in place of the actual interface name. Remember to substitute the correct interface name (e.g. de0, fxp0, xl0, etc.) in place of eth0.

3. Static network configuration

If your service provider has provided an IP address, netmask, default gateway/router, and one or more name server addresses, then continue reading. If your provider requires use of DHCP to obtain this information, then skip ahead to step four. Remember that the IP addresses used below are merely examples.

First, verify that the file /etc/rc.conf contains the following lines with appropriate settings as provided by your Internet service provider.

hostname="myhost.mydomain.com" # fully-qualified domain name
network_interfaces="eth0 lo0" # network interfaces
ifconfig_eth0="inet 192.168.1.5 netmask 255.255.255.0"
defaultrouter="192.168.1.1" # address of default gateway
router_enable="NO" # do not run routed

Second, create a file called /etc/resolv.conf with the following lines. Use the domain name and name server addresses provided by your provider.

domain mydomain.com
nameserver 192.168.2.2
nameserver 192.168.2.3
 

Reboot the system and the new configuration will be applied or execute the commands below to reconfigure without rebooting.

# ifconfig eth0 inet 192.168.1.5 netmask 255.255.255.0 up
# route delete default
# route add default 192.168.1.1

Skip ahead to step five.

4. DHCP

Verify that /etc/rc.conf includes a network interfaces list which includes eth0.

network_interfaces="eth0 l0, ... "

Add the following line to /etc/rc.conf

ifconfig_eth0="DHCP"

@Home users will need to complete an additional step [1].

The DHCP client will be started each time the system boots. To start the DHCP client now and verify that it works correctly, issue this command:

# /sbin/dhclient eth0

If your IP address is dynamic and you'd like to be notified when the DHCP client receives a new address, fetch this file, save it as /etc/dhclient-exit-hooks, and make it executable.


# chmod 540 /etc/dhclient-exit-hooks
 

5. Security

Network security is now especially important with a continuous connection to the Internet. The following resources will be of assistance in making your system more secure.

Part II: Growing a home network

The second part of this article is not yet complete. It will be available at http://www.wicklein.org/~chrisw/FreeBSD/ in the future.

Footnotes

 

[1] Each @Home subscriber is assigned a hostname which typically begins with the letter c , contains several numbers, and ends with a - and a letter (e.g. c725179-a, c630900-a, cb670867-c). This hostname must be sent with each request from the DHCP client. Let hostnamestand for your assigned hostname.

# echo 'send host-name "hostname";' > /etc/dhclient.conf
# chmod 644 /etc/dhclient.conf


$Id: cable-modem-howto.html,v 1.2 2000/02/20 23:46:28 chrisw Exp chrisw $
 

Chris Wicklein, chrisw@wicklein.org

Email Us

ghostrdr@defcon1.org

This site cannot be duplicated without permission

© 1998 - 2010 Defcon1, www.defcon1.org. Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.