|FreeBSD | | |<--> ISP's
| System |<----------->| Modem | Gateway
| | eth0 | |
This is what your configuration will look like after completing this section. The eth0 symbol represents the connectivity from an internal or external dial out modem, or an Ethernet cable between a system NIC connected to a DSL or cable modem. FBSD communicates across this outbound link to your ISP and from there out to the public Internet.
There are basically two providers of access to the public Internet in service today. The public telephone industry and the cable television industry. Both have copper wires connected to your house and in some cases to your business location. A marriage of satellite dish TV and the telephone has recently been marketed but has not penetrated the Internet access market. A new concept based on wireless radio waves has started to get some attention. It's a bleeding edge technology with high upfront costs, which needs a service area populated with a high density of subscribers to be profitable. Only the products offered by the public telephone industry and the cable television industry are covered here.
The following sections deal with enabling cable Internet access on your FBSD system. For public telephone industry access to the Internet, jump to the Products offered by the public telephone company section.
First of all, the street where you live must have been wired for cable TV. The cable service provider generally provides the cable modem as part of the Internet service. Some cable providers will let you chose what kind of cable modem to use. Do not select a USB cable modem. If the external cable modem has both USB and Ethernet ports on it, always use the Ethernet port. An Ethernet connection is more reliable than USB. The cable modem uses a short Ethernet cable with UTP-45 connector plugs on each end to plug into the cable modem and the Nic card in your FBSD system. Cable service is an "always on" service and has security implications. The user must make provisions for installing a firewall to keep out unwanted intruders. Most cable Internet service is based on wide area network technology and uses DHCP to provide all the necessary connection info to your PC. Get the specific details from your cable Internet access provider.
If you are following the 'incremental install method' recommended in this Installers Guide, then it's now time to install a single PCI NIC in your PC and cable it to your external cable modem. First make note of the manufacture of the NIC and what chips are used on the printed circuit board, as you may need this info to locate the correct device statement if the GENERIC kernel can not identify your NIC. With the power off to your PC, the cable modem, and with the PC case open, insert your PCI NIC into any of the PCI slots. Plug in the cable to the port on the external side of the NIC. Plug in the other end of the cable into the cable modem. Power on your PC and cable modem.
Remember that at this time your PC should only have a single NIC installed. There should not be any other PCI expansion cards installed as that is what this Installers Guide expects. PCI NICs come in different speeds. For the home user a 10Mbps speed NIC is more than adequate. Today prices have fallen so much on NICs that 10/100Mbps NIC are bargains and have almost forced the 10Mbps NICs out of the market.
On the first boot after installing your PCI NIC review the boot messages by hitting the 'scroll lock' keyboard key and then use the 'page up' key. You can also edit the /var/run/dmesg.boot log to verify that it was found.
This is what you are looking for in the boot log,
This means the GENERIC kernel found your NIC.
dc0: <Macronix 98715/98715A 10/100BaseTX> port 0xdc00-0xdcff mem 0xe30000ff irq 3 at device 19.0 on pci0 dc0: Ethernet address: 00:80:c6:f2:2e:3b miibus0: <MII bus> on dc0 dcphy0: <Intel 21143 NWAY media interface> on miibus0 dcphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc0 is the NICs internal interface name. Yours will more than likely be different, and that's ok.
The GENERIC kernel contains device statements for most of the NICs currently on the market. If the /var/run/dmesg.boot log shows your NIC as:
pci0: <unknown card> (vendor=0x1274, dev=0x5000) at 19.0
or no message to indicate the probe of the BIOS found any new PCI devices, then you may have legacy BIOS on your PC which does not handle PCI cards very well. On older (IE: pre Y2K) PC BIOSs, it's very common for the system probe process of the BIOS to be unable to find one or more PCI cards. If this happens to you, you have to do some research to determine the problem.
Try the pciconf -lv command to see if it gives you any useful info. Then review the GENERIC source at /usr/src/sys/i386/conf/GENERIC to see if it contains a device statement comment about your NIC based on the manufacturer or chips used. If you do find a device statement in the GENERIC source for your NIC, then add this statement to your kernel source and recompile your kernel:
This device has additional code to probe your systemís BIOS using different methods which in most cases results in your PCI NIC being found.
If the review of the GENERIC kernel source produces no results, then review the kernel source file named LINT at /usr/src/sys/i386/conf/ for comments that describe your NIC by manufacturer's name or chips used and copy the appropriate device statements to the GENERIC kernel source file. Then follow the instructions at Kernel Customizing. You will have to create a custom kernel from the GENERIC source including the device statement from the LINT source.
If you find no kernel device statements for your NIC, then itís not supported and you have to get one that is.
Your cable provider has computers called DHCP (Dynamic Host Configuration Protocol) servers that will automatically provide your FBSD system with all the information it needs to communicate over the Internet. In order to communicate with the cable provider's DHCP servers, you must configure your systemís NIC that is cabled to the cable modem to use the DHCP client software that is built into your system.
Assuming your cable modem is physically connected to your cable provider with a functioning circuit, that the cable service's ISP has Ďprovisionedí the modem so they know your modem is authorized, and their DHCP server is running, you should be able to connect to your cable ISP.
First issue the following command to display all network interface parameters. You are looking for the NIC's interface device name.
If your NIC is found, it will show in this display.
dc0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 ether 00:80:c6:f2:2e:3b media: Ethernet autoselect status: no carrier lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500 sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552 faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
The lp0, lo0, ppp0, and faith0 are all kernel default internal interfaces. The dc0 interface would be the interface name of your NIC. Yours will more than likely be different, and that's ok.
To active DHCP on that NIC, edit /etc/rc.conf and add the following statement:
Where dc0 is your NIC's interface name.
Reboot your system. After logging in issue:
This time you see the IP address assigned to you by your Cable ISP.
In this example it's 22.214.171.124
dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 126.96.36.199 netmask 0xffffff00 broadcast 188.8.131.52 ether 00:80:c6:f2:2e:3b media: Ethernet autoselect (none) status: no carrier
On the command line enter a ping command to some known Internet site:
ping -c2 184.108.40.206
This tests if you can reach the Internet. This is a site I know is there. But like everything else it may go away in time.
Now check out that your ISP DNS servers are functioning correctly.
ping -c2 freebsd.org
Check that resolv.conf name server statements have automatically been filled in with the IP addresses of your ISP's DNS servers.
It should look something like this, but contain your ISP specific info:
search clveoh.adelphia.net nameserver 220.127.116.11 nameserver 18.104.22.168 Issue ifconfig one more time. dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 22.214.171.124 netmask 0xffffff00 broadcast 126.96.36.199 ether 00:80:c6:f2:2e:3b media: Ethernet autoselect (100baseTX <full-duplex>) status: active
The status is now active. You now have a working connection to the public Internet. Your system is wide open; you are now vulnerable to attacks from the public Internet. It's best to power off your PC when you are not working on it, at least until you get a firewall installed. You should now go to the Network-Security section.
If you are unable to get DHCP to connect you to your cable ISP, call your tech support department and request them to verify they have Ďprovisionedí your modem and that they can ping it.
This FreeBSD Installer Guide is an public domain HOW-TO. This content may be reproduced, in any form or by any means, and used by all without permission in writing from the author.