Redhat 6 comes pre-configured with a great deal of stuff setup for you. These instructions will touch on some things that may already be setup for you if you are using Redhat 6. Just because it's setup for you doesn't mean it's unimportant and you don't have to at least remember where you saw that file. Remembering some of the file locations and info will only help you in the long run, believe me.
There are a few HOWTOs that you might want to check out for further information. This HOWTO will only go over the basics of the things involved in getting you Linux machine connected to the net. These HOWTOs will go into much more depth on the various topics that I combined into this document. These documents are pretty general and some are old so they might not apply to exactly your situation but you're smart, you'll figure it out.
Serial HOWTO Modems are serial devices and if yours isn't Plug&Play, this applies to you
DNS HOWTO A little advanced so you won't need it unless you know you need it.
UNIX and Internet Fundementals HOWTO Non-technical overview of Unix like OSs and the net.
Tips HOWTO Always a good HOWTO to check out, although not directly related to this topic
Linux Advocacy miniHOWTO Suggestions on how to effectivly advocate the use of Linux, a must read for Linux fans
Linux HOWTO Index Repository of all Linux HOWTOs. In beautiful HTML for your viewing pleasure.
The best source of information on this topic is, of course, the Modem HOWTO.
Configuring a modem is traditionally one of the hardest things to install under linux, next to a strange sound card. Luckily, Redhat 6 comes with all the tools you'll need and you shouldn't need to download anything.
The different types of modems available are described below. If you want to count yourself as a knowledgeable member of the Linux community, at least skim each section. If you just want to get things working and forget about it, find the section that applies to your modem and go for it.
The first thing to remember is that WinModems will not work under Linux. No matter how much you spent on it or how much you whine. A WinModem is a sort of half-modem. Most of the functions that a real modem does are done by software which only works under Windows. If you a PCI modem you probably have a WinModem. If you have a modem that says it was made for use under Windows, you probably have a WinModem. Unless it is an ISA card or says DOS or Linux on the box, it's probably a WinModem. Sorry.
Check the Winmodems Are Not Modems page for more info and a list of real modems that will work with Linux.
Contrary to what you'll hear from some computer store employees, you can get Plug & Play devices to work under non-Windows systems, in our case, under Linux. To get a Plug & Pray, er, Play, modem to work, you'll need to use the isapnptools package, which comes with Redhat 6 or you can get the newest versions from The ISAPNPTOOLS Homepage. The isapnptools package is so nice in fact, it's easier to set up your modem this way than if it weren't a P&P modem, which is the point of P&P in the first place.
The easiest way to get P&P stuff to work is to look in Windows and see what Windows sets the device settings as. You'll need to know the IRQ(s), the Input/Output Ranges, and the DMAs for the device. You can find all of this info in the Device Manager under Win9X. Write down this info.
Log into your computer as root and run the command
pnpdump > /etc/isapnp.conf
You'll need to edit the /etc/isapnp.conf file for your particular hardware. Find the lines that correspond to your modem and the info you wrote down before and un-comment them (remove the # from the beginning of the line).
Running
man isapnp.conf
to see the man page (help file) for the isapnp.conf file. Also,
man isapnp
will give the main isapnp help file.
To make sure it works, run
ispnp /etc/isapnp.conf
Some startup info should appear. It may look a little strange but there shouldn't be any obvious errors. If there are errors, make sure that you have the correct lines un-commented in the /etc/isapnp.conf file. Make sure you have the line that says
(ACT Y)))
uncommented for the modem or it won't work. Check the PNP HOWTO for more info.
The isapnp command should be run on startup under Redhat 6 so it detects your modem when you boot Linux. If yours isn't started for some reason, check out the Redhat documentation on how to run commands at startup.
External modems are really easy to setup since the serial port you connect them to should already be setup by the BIOS of the computer. This means Linux just gets the info from the BIOS and that's pretty much it.
You need to know what COM port your modem is on and that's it. COM1 is /dev/ttyS0, COM2 is /dev/ttyS1, up to /dev/ttyS3. There are also devices called cua devices but they are becoming obsolete.
To make things easier in the future, I recommend executing the following command:
ln -s /dev/ttySX /dev/modem
Where ttySX is the port.
This creates a link from /dev/modem to the device of your modem so all you have to remember in the future is /dev/modem.
Non Plug & Play modems are seen as serial devices. The difference between these and external modems is that you have to setup the IRQ (interupt request) and Port of the serial device. If you skipped the External modem section above, check it out to get the device name before you continue.
One thing to make sure of is that the IRQ for your modem isn't conflicting with anything else in your computer.
cat /proc/interrupts
will tell you what each device is using. If you have the jumpers set on your modem to one of the ports that is being used, you'll have to change it to something else. The standard IRQ and Port chart is below:
/dev/ttys0 (COM1), port 0x3f8, irq 4
/dev/ttys1 (COM2), port 0x2f8, irq 3
/dev/ttys2 (COM3), port 0x3e8, irq 4
/dev/ttys3 (COM4), port 0x2e8, irq 3
You will use the program setserial to set this information once you determine what Port and IRQ your modem will use. Do a
man setserial
for more information. The setserial man page is pretty technical though. The Modem HOWTO has a good section about setserial if you need more info.
The serserial command for the first line in the chart above would be:
setserial /dev/ttyS0 port 0x3f8 irq 4
This command must be run each time you boot your machine in order for the modem to be accessable. This is done by adding an rc file under Redhat 6. Your Redhat 6 should have a sample rc.serial file available that does all of this automagically. Run
locate rc.serial
to find out where this file is located. If you don't seem to have this file, click here for the sample and save it to a file called rc.serial.
Copy the sample rc.serial file into the correct place by running
cp /location/of/sample/rc.serial /etc/rc.d/init.d/serial
Then run
chkconfig -add serial
to add the appropriate links for running the file on boot. You'll also have
to create a file /etc/serial.conf
with the line:
/dev/ttyS0 port 0x3f8 irq 4
to continue using the example above.
Now, when you reboot, the modem device should be setup.
At this point you can use Minicom to test your modem by dialing out to our computers at 938-7746. Minicom isn't for the faint of heart though so you might just want to wait until everything is configured and just go for it then.
This section will be expanded (and probably corrected) in the future. Check back if your questions haven't been answered or something doesn't seem to work. If you have input on this section, please send it to sysadmin@spinn.net.
This section is probably misnamed since not everything in here deals directly with DNS but that's okay.
Also, most of the stuff I'm about to describe can be done using the program linuxconf but I'm going to describe the non-linuxconf procedure because it's not that hard.
The first thing you need to do is deny everyone access to your computer by adding the following line to /etc/hosts.deny
ALL: ALL
You need to allow yourself access by adding the following to /etc/hosts.all
ALL: LOCAL
Then you need to name your machine by putting a name in the /etc/HOSTNAME file:
mymachine
or something more creative. Your last name for example, or a cartoon character you like:
dangermouse
Next you need to setup the nameservers in /etc/resolv.conf
search .
nameserver 209.234.137.6
nameserver 207.170.196.61
You'll also need to edit you /etc/hosts file so it resembles the following:
127.0.0.1 localhost 0.0.0.0 dangermouse
/etc/mailname should be set to:
spinn.net
At this point, you're almost ready to get online. You just need to setup what is called a chat script, a script that automates logging on to the net. The easiest way to do this is to use the program
netconf
which should be included with Redhat 6. If you don't have netconf, try linuxconf, you can do the same things in there.
First, start netconf by typing it in at the command line or if you have the GNOME Control Panel open, it's near the bottom. The following instructions are going to be for the command line version but if you change 'hit enter' to 'double-click with your mouse' it should work the same.
Netconf / Linuxconf sections and commands will be bold for the rest of this section.
Select the PPP/SLIP/PLIP section and hit enter. Choose ADD and then choose PPP. Type in the phone number
338-2150
If you are using a non-Plug&Play modem or an external modem, put the device of your modem in the box marked Modem Port. This is the /dev/modem from above if you followed my directions.
Put in your username and password in the blanks provided. You will not be using PAP so leave that unchecked.
The next thing to do is TAB over to Customize and hit enter. Arrow down to the line Allow any user to (de)activate the interface and hit the spacebar to check the box. This allows you to use the modem even when you're not logged in as root (which you shouldn't be except when you're doing maintenance). If you have other users on your machine, you need to choose whether or not you want to let them activate the modem. If you choose not to let other users activate the modem, you'll need to figure out how you want to run things from there. That setup is beyond the scope of this document.
You can now TAB over to Accept and you're on your way. You don't have any more configurations to do so choose Quit until you come to the box with Preview what has to be done andActivate the changes. At that point it's best to choose to preview the changes just to see what is happening, then go ahead and activate. If there's a bunch of stuff to be done, try to figure out what each one of them is. Think of it as one those great Linux learning experiences you're heard about.
That was the hardest section of the HOWTO for new Linux users so if you got through it alright, you're pretty good. Don't worry, you're almost ready to go.