Netowrking

I'm starting out with a basic lan configuration. We'll do a lan configuration
first then add PPP for your modem towards the end of this chapter.
The first package we'll install is net-tools. Type the following
make config
Hit enter to accept all the default answers.
make
make install
The next package we'll install is Netkit-Combo. Type the following:
./configure --without-pam
You probably will not want to install this entire package because of
security considerations, but it's up to you. You should only install and
use what is absolutely needed. The only two packages I installed were
ftp and telnet. Keep in mind, ftp and telnet
are both un-encrypted applications. Anyone running a sniffer can decode
every keystroke you type. If you require something secure, consider installing
ssh (secure shell). To compile these individually, go into there
individual directories and run make followed by make install.
Next, go into the packages /netkit-base/etc.sample folder. Copy the following
files to your /etc folder: inetd.conf, hosts, host.conf,
services, protocols, hosts.allow, hosts.deny
This next step is for everyone
Use vi to create a file called /etc/resolv.conf (Note: It's not
resolve, it's resolv)
This is where the nameserver addresses are stored. These are the IP addresses
your ISP gives you (usually two of them). These addresses convert www.whatever.com
into an numeric IP address. All names are translated into a number on
the internet. Here's an example:
nameserver 192.168.0.1
If your ISP gave you two addresses (most likely), line two would start
with 'nameserver' as well, then the IP address.
|
This next step is for
people with NIC's (Network Interface Card, or ethernet) |
In order for your nic to be recognized, you will need to create a /etc/modules.conf
file. The proper way to edit this file is to type the following:
alias eth0 3c59x
where 3c59x is the name of the module in /lib/modules/X.X.XX/net
without the .o assuming you compiled your nic as a module. Please
note, this setup assumes you are using a pci nic. You may get an isa nic
to work but I had some trouble with mine until I put some configuration
options in this file as well. It can't hurt to try. If worst comes to
worst, you could try and copy the file over from linux1. If you are using
Redhat, they call it conf.modules which is no longer an accepted
practice. It will still work, but linux will complain.
Type depmod to update the modules dependency file (This is located
in /lib/modules/X.X.XX in case your curious).
Also, upon reboot, if linux should complain that the /etc/modules.conf
file is newer than the /lib/modules/X.X.XX/modules.dep file, use vi to
edit the modules.dep and add a space or a blank line and then save the
file. This will cure the problem.
|
This next step is for
people with NIC's also |
Edit /etc/init.d/network and put in your proper IP address for
your machine as well as your netmask. Put in your gateway if you are using
one. (A gateway is just as the name sounds, a gateway to another network.
I use this because another computer on my home network is the computer
that is always hooked up to the internet). You can leave the other two
fields blank, linux will fill them in for you next time you reboot.
If your machine is not on a network, or you do not have a STATIC IP address
assigned to you from your IP, you can make up your own IP and netmask,
HOWEVER, make sure you are using an IP that is set aside for lan use and
NOT an internet address. This WILL create havoc on the internet if you
just make one up out of the blue! Here are suitable addresses for use
on a private lan:
10.0.0.0 through 10.255.255.255 with a netmask of 255.0.0.0
172.16.0.0 through 172.31.255.255 with a netmask of 255.255.0.0
192.168.0.0 through 192.168.255.25 with a netmask of 255.255.255.0
Next, goto /etc/rc2.d and type the following:
ln -s /etc/init.d/network S10network
Give the computer a reboot and then ping the loopback address and the
pc itself by typing the following:
ping 127.0.0.1
ping 192.168.0.1 (or whatever ip address you assigned to the pc)
This should not have any errors. Type ctrl-c to stop the output.
If you are connected to a LAN that is connected to the internet, you
should also be able to ping outside of the network to the internet provided
the gateway address is setup on your box.
|
This next step is for
people who want to use modems |
Let's install ppp. First, we need to add a group to the system called
daemon. Type the following:
groupadd -g 1 daemon
Next, unpack ppp and give it the standard configure, make, and make install.
This is all we need to do. KDE will handle your modem dialing.
|