Removed extraneous information.

Binh.
This commit is contained in:
binh 2005-01-17 12:43:40 +00:00
parent dea38aca97
commit ec32d9d91d
4 changed files with 58 additions and 845 deletions

View File

@ -21,17 +21,12 @@ Let's imagine the following situation:
  * We have 115,2 kbits/s ppp (modem) internet link (115,2/10 = 11,5 kbytes/
s). Note: with eth connections (network card) we would divide 115,2 by 8;
with ppp we divide by 10, because of start/stop bits (8 + 1 + 1 = 10).
  * We have some LAN stations and their users are doing bulk downloads all
the time.
  * We want web pages to open fast, no matter how many dowloads are
happening.
  * Our internet interface is ppp0.
  * Our LAN interface is eth0.
  * Our network is 192.168.1.0/24
@ -341,17 +336,24 @@ explain below.
-----------------------------------------------------------------------------
3.3. Solving remaining problems
<para>
OK, we have installed Squid and configured it to use delay pools. I bet
nobody wants to be restricted, especially our clever LAN users. They will
likely try to avoid our limitations, just to download their favourite mp3s a
little faster (and thus causing your headache).
</para>
<para>
I assume that you use IP-masquerade on your LAN so that your users could use
IRC, ICQ, e-mail, etc. That's OK, but we must make sure that our LAN users
will use our delay pooled Squid to access web pages and use ftp.
</para>
<para>
We can solve most of these problems by using ipchains (Linux 2.2.x kernels)
or iptables (Linux 2.4.x kernels).
</para>
-----------------------------------------------------------------------------
3.3.1. Linux 2.2.x kernels (ipchains)

View File

@ -30,686 +30,6 @@ especially in large networks or networks which have lots of mobile users.
Resources section at the end of the document). You can also read
[32]http://web.syr.edu/~jmwobus/comfaqs/dhcp.faq.html.
This mini-HOWTO covers both the DHCP _SERVER_ daemon as well as DHCP
_CLIENT_ daemon. Most people need the client daemon which is used by
workstations to obtain network information from a remote server. The
server daemon is used by system administrators to distribute network
information to clients so if you are just a regular user you need the
_CLIENT_ daemon.
_________________________________________________________________
3. Client Setup
Currently there are three different DHCP client programs for Linux,
dhcpcd, pump and dhclient. This mini-HOWTO deals primarily with
dhcpcd.
_________________________________________________________________
3.1. Downloading the client daemon (dhcpcd)
Depending on your distribution you might have to download the DHCP
client daemon. If you want to compile it from the source you package
you need is called dhcpcd and the current version is 1.3.18. It is
maintained by Sergei Viznyuk <[33]sergei@phystech.com> and today it
comes as a binary package with most distributions.
dhcpcd source can be downloaded from following locations
* [34]ftp://ftp.phystech.com/pub/ (Primary site)
* [35]http://www.cps.msu.edu/~dunham/out/
Then follow the instructions below. They should be the same.
_________________________________________________________________
3.2. Slackware
You can download the latest copy of the DHCPcd from any Metalab mirror
or following:
* [36]ftp://metalab.unc.edu/pub/Linux/system/network/daemons
* [37]ftp://ftp.phystech.com/pub/ (Primary site)
Download the latest version of dhcpcd.tar.gz.
* Unpack it
tar -zxvf dhcpcd-1.3.18pl1.tar.gz
* cd into the directory and make dhcpcd
cd dhcpcd-1.3.18pl1
make
* Install it (you have to run the following command as root)
make install
This will create the directory /etc/dhcpc where DHCPcd will store the
DHCP information and dhcpcd file will be copied into /usr/sbin.
In order to make the system initialize using DHCP during boot type:
cd /etc/rc.d
mv rc.inet1 rc.inet1.OLD
This will move the old network initialization script into
rc.inet1.OLD. You now need to create the new rc.inet1 script.
Following code is all you need:
#!/bin/sh
#
# rc.inet1 This shell script boots up the base INET system.
HOSTNAME=`cat /etc/HOSTNAME` #This is probably not necessary but I
#will leave it in anyways
# Attach the loopback device.
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
# eth0 interface. If you're only using loopback or SLIP, don't include the
# rest of the lines in this file.
/usr/sbin/dhcpcd
Save it and reboot your computer.
When you are finished go the [38]last step.
_________________________________________________________________
3.3. RedHat 6.x and Mandrake 6.x
DHCPcd configuration under RedHat 6.0+ is really easy. All you need to
do is start the Control Panel by typing control-panel.
* Select "Network Configuration"
* Click on Interfaces
* Click Add
* Select Ethernet
* In the Edit Ethernet/Bus Interface select "Activate interface at
boot time" as well as select "DHCP" as "Interface configuration
protocol"
Please note that in RedHat 6.x Redhat as default includes a DHCP
client called pump instead of above mentioned dhcpcd. CD-ROM does
include dhcpcd RPM so if you have no luck with pump try with dhcpcd.
After you install dhcpcd (e.g. rpm -i dhcpcd-1.3.17pl2-1.i386.rpm) you
will have to make some [39]changes.
Additional notes from Alexander Stevenson
<[40]alexander.stevenson@home.com>:
I had no luck with DHCPcd. What finally worked for me was "pump",
which comes with Linux Mandrake 6.0 (and so I assume it is included
with RedHat as well). The command I used was:
pump -i eth0 -h hostname
It didn't matter what "hostname" was, but without it the server would
not respond.
I then changed the line in my /sbin/ifup script to reflect the change;
the default version does not have the -h switch, and so didn't work
for me.
Basically, if you're using linuxconf, and after setting the adapter to
"DHCP" it still doesn't work, try adding a "-h hostname" to the pump
line in the /sbin/ifup script. My script now looks like this:
...
if [ -n "$PUMP" ]; then
echo -n "Determining IP information for $DEVICE..."
if /sbin/pump -i $DEVICE -h hostname; then
echo " done."
else
echo " failed."
exit 1
fi
else ...
Another more elegant way to add hostname field is provided by Aad van
der Klaauw:
Currently i'm configuring a gateway system at home, needed to set the
MAC address and use the '-h hostname' workaround. So I decided to
*not* change the script but to use the configure file. In my
/etc/sysconfig/network-scripts/ifcfg-eth0 I have added the following
DEVICE="eth0"
MACADDR="00:11:22:33:44:55"
DHCP_HOSTNAME="trigger_for_terayon"
Which will survive upgrades, and is imho a "cleaner" way.
That is it. Reboot your machine or type /sbin/ifup eth0 on the command
line.
_________________________________________________________________
3.4. RedHat 5.x
DHCPcd configuration under RedHat 5.0+ is really easy. All you need to
do is start the Control Panel by typing control-panel.
* Select "Network Configuration"
* Click on Interfaces
* Click Add
* Select Ethernet
* In the Edit Ethernet/Bus Interface select "Activate interface at
boot time" as well as select "DHCP" as "Interface configuration
protocol"
When you are finished go the [41]last step.
_________________________________________________________________
3.5. RedHat 4.x and Caldera OpenLinux 1.1/1.2
DHCPcd is included in the standard RedHat distribution as an RPM and
you can find it on your distribution's CD-ROM in RPMS directory or you
can download it from:
[42]ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/dhcpcd
-0.6-2.i386.rpm
Install it with rpm -i dhcpcd-0.6-2.i386.rpm.
Alternatively you can compile your own version by following the steps
outlined in the [43]Slackware.
The following information was provided to me by nothing
<[44]nothing@cc.gatech.edu>.
Removed my static ip and name from /etc/resolv.conf. However, I did
leave in the search line and my two nameserver lines (for some
reason my dhcpcd never creates a /etc/dhcpc/resolv.conf, so I have
to use a static /etc/resolv.conf).
In /etc/sysconfig/network I removed the HOSTNAME and GATEWAY
entries. I left the other entries as is (NETWORKING, DOMAINNAME,
GATEWAYDEV).
In /etc/sysconfig/network-scripts/ifcfg-eth0 I removed the IPADDR,
NETMASK, NETWORK, and BROADCAST entries. I left DEVICE and ONBOOT
as is. I changed the BOOTPROTO line to BOOTPROTO=dhcp.
Save the file. Reboot your computer.
When you are finished go the [45]last step.
_________________________________________________________________
3.6. Debian
There is a deb package of DHCPcd (make sure it starts with dhcpcd) at:
[46]http://ftp.debian.org/debian/dists/slink/main/binary-i386/net/
Or, follow the [47]Slackware installation instructions.
To unpack the deb package type dpkg -i
/where/ever/your/debian/packages/are/dhcpcd*deb.
It appears that there isn't a need for any DHCPcd configuration
because:
The dhcpcd package installs it's startup script as usual for debian
packages in /etc/init.d/package_name, here as /etc/init.d/dhcpcd, and
links this to the various /etc/rc?.d/ directories.
--From: Heiko Schlittermann <[48]heiko@os.inf.tu-dresden.de>
The contents of the /etc/rc?.d/ dirs is then executed at boot time.
If you don't reboot after installing you should consider starting the
daemon manually: /etc/init.d/dhcpcd start.
When you are finished go the [49]last step.
_________________________________________________________________
3.7. LinuxPPC and MkLinux
Following section has been written by R. Shapiro
As of the "1999" (R5) release, Linuxppc is now almost completely
compatible with Redhat 6, with one caveat (see below). In general the
instructions are exactly the same as for the current release of
[50]RedHat 6.x and Mandrake 6.x.
The remaining problem is that Redhat 6 uses the 'pump' client for dhcp
by default, and 'pump' doesn't work reliably in Linuxppc. To get
around this, you should install the latest dhcpcd from Sergei Viznyuk,
and then edit /sbin/ifup to use dhcpcd instead of pump.
Change
if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
PUMP=true
fi
if [ -n "$PUMP" ]; then
with
if [ "$BOOTPROTO" = bootp ]; then
echo " done."
else
echo " failed."
exit 1
fi
elif [ "$BOOTPROTO" = dhcp ]; then
echo -n "Determining IP information for $DEVICE..."
if /sbin/dhcpcd -d $DEVICE ; then
if [ -f /etc/dhcpc/dhcpcd-${DEVICE}.exe ]; then
/etc/dhcpc/dhcpcd-${DEVICE}.exe
fi
and a coresponding changes for ifdown. Change
if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
....
fi
with
if [ "$BOOTPROTO" = bootp ]; then
fi
if [ "$BOOTPROTO" = dhcp ]; then
if [ -f /var/run/dhcpcd-${DEVICE}.pid ]; then
kill `cat /var/run/dhcpcd-${DEVICE}.pid`
rm -f /var/run/dhcpcd-${DEVICE}.pid
fi
fi
A working ppc rpm for dhcpcd is included on the Linuxppc 1999 cd; a
slightly later rpm is available in the contrib directory on
[51]ftp://ftp.linuxppc.org/. Sources, which compile out of the box in
Linuxppc 1999, are available from
[52]ftp://ftp.phystech.com/pub/dhcpcd-1.3.17-pl9.tar.gz.
_________________________________________________________________
3.8. Tying it all together
After your machine reboots your network interface should be
configured. Type: ifconfig.
You should get something like this:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:302 errors:0 dropped:0 overruns:0 frame:0
TX packets:302 errors:0 dropped:0 overruns:0 carrier:0 coll:0
eth0 Link encap:Ethernet HWaddr 00:20:AF:EE:05:45
inet addr:24.128.53.102 Bcast:24.128.53.255 Mask:255.255.254.0
^^^^^^^^^^^^^^^^^^^^^^^
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24783 errors:1 dropped:1 overruns:0 frame:1
TX packets:11598 errors:0 dropped:0 overruns:0 carrier:0 coll:96
Interrupt:10 Base address:0x300
If you have some normal number under inet addr you are set. If you see
0.0.0.0 don't despair, it is a temporary setting before dhcpcd
acquires the IP address. If even after few minutes you are seeing
0.0.0.0 please check out [53]Troubleshooting. DHCPcd is a daemon and
will stay running as long as you have your machine on. Every three
hours it will contact the DHCP server and try to renew the IP address
lease. It will log all the messages in the syslog (on Slackware
/var/adm/syslog, RedHat/OpenLinux /var/log/syslog).
One final thing. You need to specify your nameservers. There are two
ways to do it, you can either ask your provider to provide you with
the addresses of your name server and then put those in the
/etc/resolv.conf or DHCPcd will obtain the list from the DHCP server
and will build a resolv.conf in /etc/dhcpc.
I decided to use DHCPcd's resolv.conf by doing the following:
Back up your old /etc/resolv.conf: mv /etc/resolv.conf
/etc/resolv.conf.OLD
If directory /etc/dhcpc doesn't exist create it: mkdir /etc/dhcpc
Make a link from /etc/dhcpc/resolv.conf to /etc/resolv.conf: ln -s
/etc/dhcpc/resolv.conf /etc/resolv.conf
If that doesn't work try this (fix suggested by
<[54]nothing@cc.gatech.edu> with a little amendment by Henrik
Stoerner):
This last step I had to perform only because my dhcpcd doesn't create
an /etc/dhcpc/resolv.conf. In /etc/sysconfig/network-scripts/ifup I
made the following changes (which are a very poor hack, but they work
for me):
elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
echo -n "Using DHCP for ${DEVICE}... "
/sbin/dhcpcd -c /etc/sysconfig/network-scripts/ifdhcpc-done ${DEVICE}
echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh
if [ -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
^^^^
echo "failed."
exit 1
I changed to:
elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
echo -n "Using DHCP for ${DEVICE}... "
/sbin/dhcpcd
echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh
if [ ! -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
^^^^^^
echo "failed."
exit 1
Note: Notice the ! (bang) in if [ ! -f
/var/run/dhcp-wait-${DEVICE}.pid ];
Now sit back and enjoy :-).
_________________________________________________________________
3.9. Various notes
Following step(s) are not necessary but might be useful to some
people:
a. If you need network connectivity only occasionally you can start
dhcpcd from the command line (you have to be root to do this)
with: /usr/sbin/dhcpcd.
When you need to down (turn off) the network type /usr/sbin/dhcpcd
-k.
_________________________________________________________________
3.10. Troubleshooting
If you have followed the steps outlined above and you are unable to
access the network there are several possible explanations:
_________________________________________________________________
3.10.1. Your network card is not configured properly
During the boot up process your Linux will probe your network card and
should say something along these lines:
eth0: 3c509 at 0x300 tag 1, 10baseT port, address 00 20 af ee 11 11, IRQ 10.
3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov
If a message like this doesn't appear your ethernet card might not be
recognized by your Linux system. If you have a generic ethernet card
(a NE2000 clone) you should have received a disk with DOS utilities
that you can use to set up the card. Try playing with IRQs until Linux
recognizes your card (IRQ 9,10,12 are usually good).
_________________________________________________________________
3.10.2. Your DHCP server supports RFC 1541/My DHCP server is Windows NT
Try running dhcpcd by typing dhcpcd -r.
Use ifconfig to check if your network interface is configured (wait
few seconds for the configuration process, initally it will say
Inet.addr=0.0.0.0)
If this solves your problem add the "-r" flag to the boot up scripts,
ie: instead of /sbin/dhcpcd you will have /sbin/dhcpcd -r.
For example under RedHat edit script
/etc/sysconfig/network-scripts/ifup and change the following:
IFNAME=$[ {DEVICE} \
"/sbin/dhcpcd -r -c /etc/"- etc etc.
_________________________________________________________________
3.10.3. During bootup I get error message "Using DHCP for eth0 ... failed"
but my system works fine.
You are most likely using RedHat and you haven't followed instructions
carefully :-). You are missing the ! (bang) in one of the if
statements. Jump [55]here and check how to fix it.
_________________________________________________________________
3.10.4. My network works for few minutes and then stops responding
There are some reports of gated (gateway daemon) screwing up routing
on Linux boxes which results in problem described above. Check if
gated is running with: ps -auxww | grep gate.
If it is try removing it with RedHat's RPM manager or removing the
entry in /etc/rc.d/.
_________________________________________________________________
3.10.5. My ethernet card is recognized during boot up but I still get "NO
DHCPOFFER" message in my logs. I also happen to have a PCMCIA ethernet card.
You need to make sure that you have the 10BaseT port ("phone" plug) on
your network card activated. Best way to verify it is to check what
kind of connector your card is configured for during bootup e.g.
eth0: 3c509 at 0x300 tag 1, 10baseT port, address 00 20 af ee 11 11, IRQ 10.
^^^^^^^^^^^^
3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov
I have received reports of laptop users having this kind of problems
due to the PCMCIA utilities (specifically ifport) that would set the
connector type to 10Base2 (thinnet). You have to make sure you use
10BaseT for your connection. If you are not reconfigure the card and
restart the computer.
_________________________________________________________________
3.10.6. My DHCP client broadcasts requests but no one answers (Contributed
by Peter Amstutz)
On some systems, you need to include some hostname for your machine as
part of the request. With dhcpcd, do this with dhcpcd -h foohost
Probably the hostname wanted will be your account username on the
network.
_________________________________________________________________
3.10.7. I have followed all the steps but still my machine is not able to
connect
The cable modem will usually memorize the ethernet address of your
network card so if you connect a new computer or switch network cards
you will somehow have to "teach" your cable modem to recognize the new
computer/card. Usually you can turn of the modem and bring it back up
while computer is on or you will have to call tech support and tell
them that you have changed a network card in the computer.
You have firewall rules (ipfwadm rules) that disallow port 67/68
traffic used by DHCP to distribute configuration info. Check your
firewall rules carefully.
_________________________________________________________________
3.10.8. I have MediaOne Express service and I still can't connect.
It appears that MediaOne has been using adding some things to DHCP
that shouldn't be there. Supposedly this is not a problem anymore but
if you experience outages check for these things. If you are (un)lucky
to have Windows NT on your machine if you go into Event Viewer you
will see a warning like this:
DHCP received an unknown option 067 of length 005. The raw option data is
given below.
0000: 62 61 73 69 63 basic
If this is the problem go to [56]ftp://vanbuer.ddns.org/pub/ and
either download a binary or get the source for the change.
_________________________________________________________________
3.11. Alternative DHCP client (ISC dhclient)
If you have not had success getting your Linux connection running with
the dhcpcd you might want to try ISC dhclient. dhclient comes with the
DHCP distribution from ISC which includes both a DHCP client and a
DHCP server. Instructions on how to get and compile the DHCP
distribution can be found [57]here. When you are done with it please
return to this section to configure the client.
Note: Following information has been provided by Ted Lemon
<[58]mellon@isc.org> one of the authors of dhclient.
With the current version of the DHCP client, you don't actually need a
dhclient.conf. All you have to do is invoke dhclient e.g.:
/sbin/dhclient.
This will configure all broadcast interfaces. If this doesn't work or
you want to specify only one interface create a /etc/dhclient.conf
file with this example configuration.
interface "eth0" {
send dhcp-client-identifier 1:xx:xx:xx:xx:xx:xx;
send dhcp-lease-time 86400;
}
Here we assume that the ethernet interface is eth0. If not change
accordingly. Also replace xx:xx:xx:xx:xx with your ethernet address.
This dhclient.conf makes the client look more like a Win95 client.
_________________________________________________________________
4. DHCP Server Setup
4.1. DHCP server for UNIX
There are several DHCP servers available for U*X-like OSes, both
commercial and free. One of the more popular free DHCP servers is Paul
Vixie/ISC DHCPd. Currently the latest version is 2.0 (suggested for
most users) but 3.0 is in beta testing. You can get them from
[59]ftp://ftp.isc.org/isc/dhcp/
Some of the distributions provide binary packages for dhcpd so skip
the following section if you got it installed that way.
After you download unpack it. After you do cd into the distribution
directory and type: ./configure
It will take some time to configure the settings. After it is done
type: make and make install.
_________________________________________________________________
4.2. DHCP server configuration
When done with installation type ifconfig -a. You should see something
like this:
eth0 Link encap:10Mbps Ethernet HWaddr 00:C0:4F:D3:C4:62
inet addr:183.217.19.43 Bcast:183.217.19.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2875542 errors:0 dropped:0 overruns:0
TX packets:218647 errors:0 dropped:0 overruns:0
Interrupt:11 Base address:0x210
If it doesn't say MULTICAST you should reconfigure your kernel and add
multicast support. On most systems you will not need to do this.
Next step is to add route for 255.255.255.255. Quoted from DHCPd
README:
"In order for dhcpd to work correctly with picky DHCP clients
(e.g., Windows 95), it must be able to send packets with an IP
destination address of 255.255.255.255. Unfortunately, Linux
insists on changing 255.255.255.255 into the local subnet broadcast
address (here, that's 192.5.5.223). This results in a DHCP protocol
violation, and while many DHCP clients don't notice the problem,
some (e.g., all Microsoft DHCP clients) do. Clients that have this
problem will appear not to see DHCPOFFER messages from the server."
Type: route add -host 255.255.255.255 dev eth0
If you get a message "255.255.255.255: Unknown host", you should try
adding the following entry to your /etc/hosts file:
255.255.255.255 all-ones
Then, try:
route add -host all-ones dev eth0
or
route add 255.255.255.0 dev eth0
eth0 is of course the name of the network device you are using. If it
differs change appropriately.
_________________________________________________________________
4.3. Options for DHCPd
Now you need to configure DHCPd. In order to do this you will have to
create or edit /etc/dhcpd.conf. There is a graphical interface for
dhcpd configuration under KDE ( [60]http://www.kde.org/ ) called
kcmdhcpd that is very similar to the DHCP configurator on Windows NT.
When KDE 2.0 comes out it should come with kcmdhcpd or you could get
it directly from:
[61]ftp://ftp.us.kde.org/pub/kde/unstable/apps/network/
If you want to configure it by hand follow instructions below.
Most commonly what you want to do is assign IP addresses randomly.
This can be done with settings as follows:
# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
This will result in DHCP server giving a client an IP address from the
range 192.168.1.10-192.168.1.100 or 192.168.1.150-192.168.1.200. It
will lease an IP address for 600 seconds if the client doesn't ask for
specific time frame. Otherwise the maximum (allowed) lease will be
7200 seconds. The server will also "advise" the client that it should
use 255.255.255.0 as its subnet mask, 192.168.1.255 as its broadcast
address, 192.168.1.254 as the router/gateway and 192.168.1.1 and
192.168.1.2 as its DNS servers.
If you need to specify a WINS server for your Windows clients you will
need to include the netbios-name-servers option e.g.
option netbios-name-servers 192.168.1.1;
You can also assign specific IP addresses based on clients ethernet
address e.g.
host haagen {
hardware ethernet 08:00:2b:4c:59:23;
fixed-address 192.168.1.222;
}
This will assign IP address 192.168.1.222 to a client with ethernet
address 08:00:2b:4c:59:23.
You can also mix and match e.g. you can have certain clients getting
"static" IP addresses (e.g. servers) and others being alloted dynamic
IPs (e.g. mobile users with laptops). There are a number of other
options e.g. nis server addresses, time server addresses etc., if you
need any of those options please read the dhcpd.conf man page.
_________________________________________________________________
4.4. Starting the server
There is only one thing to do before starting the server. In most
cases DHCP installation doesn't create a dhcpd.leases files. This file
is used by DHCPd to store information about current leases. It is in
the plain text form so you can view it during the operation of DHCPd.
To create dhcpd.leases type:
touch /var/state/dhcp/dhcpd.leases
This will create an empty file (file size = 0). Some of the older
version of dhcpd 2.0 placed the file in /etc/dhcpd.leases. You do not
need to make any changes to the leases file it will be manipulated by
the dhcpd. If you get a message saying that file exists simply ignore
it and go to the next step.
You can now invoke the DHCP server. Simply type (or include in the
bootup scripts)
/usr/sbin/dhcpd
This will invoke dhcpd on eth0 device. If you want to invoke it on
another device simply supply it on the command line e.g.
/usr/sbin/dhcpd eth1
To verify that everything is working fine you should first turn on the
debugging mode and put the server in foreground. You can do this by
typing
/usr/sbin/dhcpd -d -f
Then boot up one of your clients and check out the console of your
server. You will see a number of debugging messages come up. If
everything works out fine you are done :-). Quit dhcpd and start it
without the -d -f and arguments. If you want dhcpd to start at boot-up
include dhcpd in e.g.
/etc/rc.d/rc.local
_________________________________________________________________
4.5. Other interesting documents
Linux Magazine has a pretty good article in their April issue called

View File

@ -6,65 +6,39 @@
Media Types
Common network media include twisted pair (UTP and STP), coaxial cable, fiber-optic cable, and wireless
transmissions via infrared and radio waves. Network media are usually chosen based on several criteria:
their cost, their vulnerability to EMI and eavesdropping, their bandwidth, and the maximum distance at
which they can be used.
Common network media include twisted pair (UTP and STP), coaxial cable, fiber-optic cable, and wireless transmissions via infrared and radio waves. Network media are usually chosen based on several criteria: their cost, their vulnerability to EMI and eavesdropping, their bandwidth, and the maximum distance at which they can be used.
Twisted Pair Ethernet Cable
Unshielded Twisted Pair (UTP)
UTP is the most common type of network cable in use today. UTP consits of one or more pairs of insulated
copper wires. The wires are twisted together to reduce crosstalk, and enclosed in a plastic insulator.
UTP is the type of cable used in telephone systems.
UTP is the most common type of network cable in use today. UTP consits of one or more pairs of insulated copper wires. The wires are twisted together to reduce crosstalk, and enclosed in a plastic insulator. UTP is the type of cable used in telephone systems.
UTP cables are generally wires using RJ-45 jacks and plugs. These are 8-conductor connectors similar to
the RJ-11 connectors used in telephone cables. UTP is inexpensive and easy to install compared with other
types of cable, although the differenet types of UTP vary in cost.
UTP cables are generally wires using RJ-45 jacks and plugs. These are 8-conductor connectors similar to the RJ-11 connectors used in telephone cables. UTP is inexpensive and easy to install compared with other types of cable, although the differenet types of UTP vary in cost.
Copper wire has a high level of attenuation. YTP cable is limited to transmission distances of 100 meters
or less. UTP is more susceptible to interference (EMI) than mos types of cable, and is vaulnerable to
eavesdropping since its own emissions are not shielded.
Copper wire has a high level of attenuation. YTP cable is limited to transmission distances of 100 meters or less. UTP is more susceptible to interference (EMI) than mos types of cable, and is vaulnerable to eavesdropping since its own emissions are not shielded.
Types of UTP cable are defined by the EIA standards, which specify the three categories of cable. Category
3 is the minimum requiredment for networking, and Category 5 is the highest-quality network cable. The UTP
categories and the bandwidth they support are summarized below.
Types of UTP cable are defined by the EIA standards, which specify the three categories of cable. Category 3 is the minimum requiredment for networking, and Category 5 is the highest-quality network cable. The UTP categories and the bandwidth they support are summarized below.
Category Maximum Data and Transfer Rate Description
3 10 Mbps Least expensive network cable, commonly used
4 16 Mbps Medium quality; rarely used
5 100 Mbps Highest quality
3 10 Mbps Least expensive network cable, commonly used
4 16 Mbps Medium quality; rarely used
5 100 Mbps Highest quality
> Start Binh
5 1000Mbps Highest Quality
5 1000Mbps Highest Quality
> End Binh
Shielded Twisted Pair (STP)
STP cable is similar to UTP, but inclues a foil or wire mesh shield between the wire pairs and
the outer insulation. The shield is electrically grounded, and reduces emissions and
susceptibility to EMI.
STP cable is used in some Token Ting and AppleTalk networks. STP is more expensive than
UTP, and its thickness and rigidity make it more difficult to install. It also uses grounded
connection connectors, adding to the expense.
STP uses the same copper wires as UTP as the same level of attenuation, and therefore the same
maximum distance of about 100 meters. However, it is much less susceptible to EMI and eavesdropping.
The reduced inteference allows for higher bandwidth, potentially as high as 500 Mbps.
STP cable is similar to UTP, but inclues a foil or wire mesh shield between the wire pairs and the outer insulation. The shield is electrically grounded, and reduces emissions and susceptibility to EMI. STP cable is used in some Token Ting and AppleTalk networks. STP is more expensive than
UTP, and its thickness and rigidity make it more difficult to install. It also uses grounded connection connectors, adding to the expense. STP uses the same copper wires as UTP as the same level of attenuation, and therefore the same maximum distance of about 100 meters. However, it is much less susceptible to EMI and eavesdropping. The reduced inteference allows for higher bandwidth, potentially as high as 500 Mbps.
Coaxial
Coaxial Cable consists of a single thick copper wire surrounded by an insulator. A shield surrounding
the insulator is used as the second conductor, and is encased in an outer insulation. One type of
coaxial cable is that used for cable television.
Coaxial Cable consists of a single thick copper wire surrounded by an insulator. A shield surrounding the insulator is used as the second conductor, and is encased in an outer insulation. One type of coaxial cable is that used for cable television. The shielding cable makes coaxial cable less susceptible to EMI and emissions than UTP. The cable used in most nteworks is either Thick Ethernet (RG-8) or Thin Ethernet (RG-58). Thin coaxial cable is less expensive than the highest quality (Category 5) UTP, but is more difficult to install due to its thickness, its lack of flexibility, the connectors (you should keep the length of cable between the `T piece' and the actual ethernet card in the PC as short as possible, ideally the `T piece' will be plugged directly into the ethernet card), and the neccesity for terminators (a terminator is a 52 ohm resistor that helps to ensure that the signal is absorbed and not reflected when it reaches the end of the cable. Without a terminator at each end of the cabling you may find that the ethernet is unreliable or doesn't work at all).
The shielding cable makes coaxial cable less susceptible to EMI and emissions than UTP. The cable used
in most nteworks is either Thick Ethernet (RG-8) or Thin Ethernet (RG-58).
Thin coaxial cable is less expensive than the highest quality (Category 5) UTP, but is more difficult
to install due to its thickness, its lack of flexibility, and the connectors. The generally available types
of coaxial cable are described in the table below.
The generally available types of coaxial cable are described in the table below.
Type Impendance Common Cable
RG-8 50 ohms Thick Ethernet (thicknet)
@ -75,72 +49,35 @@ RG-62 93 ohms ARCnet
Fiber Optic
A fiber optic cable consists of a thin glass or clear plastic fiber encased in a protective jacket.
Signals are sent through the cable in form of light.
There are two types of fiber optic cable: single-mode, which uses a single wavelength, and multimode,
which uses multiple multiple wavelengths in the same cable.
Fiber optic cable is completely invulnerable to EMI, and has no detectable emissions, It and its
associated equipment are expensive compared to other types of cable, and the most difficult to install.
Single-mode cable is much more expensive than multimode cable.
The advantages of fiber are high bandwidth (up to 2 Gbps (gigabits per second) and extremely low
attenuation. Fiber cable can reach distances ranging from severak miles for multimode cable to
hundreds of miles for single-mode cable.
A fiber optic cable consists of a thin glass or clear plastic fiber encased in a protective jacket. Signals are sent through the cable in form of light. There are two types of fiber optic cable: single-mode, which uses a single wavelength, and multimode, which uses multiple multiple wavelengths in the same cable. Fiber optic cable is completely invulnerable to EMI, and has no detectable emissions. However, it and its associated equipment are expensive compared to other types of cable, and the most difficult to install. Single-mode cable is much more expensive than multimode cable. The advantages of fiber are high bandwidth (up to 2 Gbps (gigabits per second) and extremely low attenuation. Fiber cable can reach distances ranging from severak miles for multimode cable to hundreds of miles for single-mode cable.
Infrared
Wireless infrared networking systems are modulated beams of infrared light
to transmit data. These types of networks require a line of sight, and are generally used for short
distances such as networks within buildings or between nearby buildings.
Wireless infrared networking systems are modulated beams of infrared light to transmit data. These types of networks require a line of sight, and are generally used for short distances such as networks within buildings or between nearby buildings. Infrared communications are not subject to EMI, but are vulnerable to obstructions (such as weather conditions) and bright light, and suseceptible to eavesdropping. There are two types of infrared networks:
Infrared communications are not subject to EMI, but are vulnerable to obstructions (such as weather conditions)
and bright light, and suseceptible to eavesdropping. There are two types of infrared networks:
- Point-to-point networks use a focused beam, usually generated by a laser. They are less vulnerable to dispersion and can theorectically be used for long distance networking, although the need for precise alignment between receiever and transmitter and the vulneraibility to obstructions often makes it impractical. Bandwidth can be as high as 16 Mbps.
- Point-to-point networks use a focused beam, usually generated by a laser. They are less vulnerable
to dispersion and can theorectically be used for long distance networking, although the need for precise
alignment between receiever and transmitter and the vulneraibility to obstructions often makes it impractical.
Bandwidth can be as high as 16 Mbps.
- Broadcast networks use a less focused beam that disperses rapidly. These systems can transmit to multiple
workstations ar once, but are much more vulnerable to dispersion, limiting their useful distance and bandwidth.
Bandwidth is usually no more than 1 Mbps.
- Broadcast networks use a less focused beam that disperses rapidly. These systems can transmit to multiple workstations ar once, but are much more vulnerable to dispersion, limiting their useful distance and bandwidth. Bandwidth is usually no more than 1 Mbps.
Radio
The most common type of wireless networks use radio waves. Tdaio-based networks have
a reasonably high bandwidth, but are very sensitve to EMI and eavesdropping. Also,
many radio frequencies are regulated by the FCC and are unavailable for use without a
license. There are three types of radio links:
The most common type of wireless networks use radio waves. Tdaio-based networks have a reasonably high bandwidth, but are very sensitve to EMI and eavesdropping. Also, many radio frequencies are regulated by the FCC and are unavailable for use without a license. There are three types of radio links:
- Low power single frequency
This type of system is best suited for small ares, such as within a building. It uses
a lower-power transmitter on a single radio frequency. The available range is
approximately 30 meters. This is the lowest-cost method of radio networking. Bandwidth
may be as high as 10 Mbps.
This type of system is best suited for small ares, such as within a building. It uses a lower-power transmitter on a single radio frequency. The available range is approximately 30 meters. This is the lowest-cost method of radio networking. Bandwidth may be as high as 10 Mbps.
- High power single frequency
This system is also uses a single frequency, but at a higher power. This allows for
a much greater range, often covering an entire metropolitan area. Bandwidth is typically
10 Mbps. The greater range makes this type of network the most vulnerable to eavesdropping.
This system is also uses a single frequency, but at a higher power. This allows for a much greater range, often covering an entire metropolitan area. Bandwidth is typically 10 Mbps. The greater range makes this type of network the most vulnerable to eavesdropping.
- Spread-spectrum
These systems use multiple frequencies, primarily to avoid eavesdropping. This is done in
two ways, direct sequence modulation sends packets sequentially over several different
frequencies, while frequency hopping transmission change frequencies at scheduled intervals
known to both ends. Both of these are significantly less vulnerable less vulnerable to EMI
and snooping than other radio networks.
These systems use multiple frequencies, primarily to avoid eavesdropping. This is done in two ways, direct sequence modulation sends packets sequentially over several different frequencies, while frequency hopping transmission change frequencies at scheduled intervals known to both ends. Both of these are significantly less vulnerable less vulnerable to EMI and snooping than other radio networks.
Microwave
Another type of wireless network communications uses microwaves, which are similar to radio
waves but at a higher frequency. Higher frequencies are less vulnerable to interference and
snooping, and can provide greater bandwidth. Two common types of microwave networks are in
use:
Another type of wireless network communications uses microwaves, which are similar to radio waves but at a higher frequency. Higher frequencies are less vulnerable to interference and snooping, and can provide greater bandwidth. Two common types of microwave networks are in use:
- Terrestial
@ -155,22 +92,12 @@ range. The bandwidth can be as high as 10 Mbps, but the satellite relays cause d
may impair real-time communication. These systems are more expensive than wireless
communication.
9. Cables and Cabling
Serial NULL Modem cable
Those of you handy with a soldering iron may want to build your own
cables to interconnect two linux machines. The following cabling
diagrams should assist you in this.
9.1. Serial NULL Modem cable
Not all NULL modem cables are alike. Many null modem cables do little
more than trick your computer into thinking all the appropriate
signals are present and swap transmit and receive data. This is ok but
means that you must use software flow control (XON/XOFF) which is less
efficient than hardware flow control. The following cable provides the
best possible signalling between machines and allows you to use
hardware (RTS/CTS) flow control.
Not all NULL modem cables are alike. Many null modem cables do little more than trick your computer into thinking all the appropriate signals are present and swap transmit and receive data. This is ok but means that you must use software flow control (XON/XOFF) which is less efficient than hardware flow control. The following cable provides the best possible signalling between machines and allows you to use hardware (RTS/CTS) flow control.
<para>
<screen>
Pin Name Pin Pin
Tx Data 2 ----------------------------- 3
Rx Data 3 ----------------------------- 2
@ -181,13 +108,17 @@ communication.
DSR 6 -/
RLSD/DCD 8 ---------------------------/- 20
\- 6
</screen>
</para>
9.2. Parallel port cable (PLIP cable)
Parallel port cable (PLIP cable)
If you intend to use the PLIP protocol between two machines then this
cable will work for you irrespective of what sort of parallel ports
you have installed.
<para>
If you intend to use the PLIP protocol between two machines then this cable will work for you irrespective of what sort of parallel ports you have installed.
</para>
<para>
<screen>
Pin Name pin pin
STROBE 1*
D0->ERROR 2 ----------- 15
@ -207,62 +138,22 @@ communication.
INIT 16*
SLCTIN 17*
GROUND 25 ----------- 25
</screen>
</para>
Notes:
Notes:
· Do not connect the pins marked with an asterisk `*'.
· Do not connect the pins marked with an asterisk `*'.
· Extra grounds are 18,19,20,21,22,23 and 24.
· If the cable you are using has a metallic shield, it should be
connected to the metallic DB-25 shell at one end only.
· Extra grounds are 18,19,20,21,22,23 and 24.
· If the cable you are using has a metallic shield, it should be
connected to the metallic DB-25 shell at one end only.
Warning: A miswired PLIP cable can destroy your controller card. Be
very careful and double check every connection to ensure you don't
cause yourself any unnecessary work or heartache.
While you may be able to run PLIP cables for long distances, you
should avoid it if you can. The specifications for the cable allow for
a cable length of about 1 metre or so. Please be very careful when
running long plip cables as sources of strong electromagnetic fields
such as lightning, power lines and radio transmitters can interfere
with and sometimes even damage your controller. If you really want to
connect two of your computers over a large distance you really should
be looking at obtaining a pair of thin-net ethernet cards and running
some coaxial cable.
9.3. 10base2 (thin coax) Ethernet Cabling
10base2 is an ethernet cabling standard that specifies the use of 52
ohm coaxial cable with a diameter of about 5 millimeters. There are a
couple of important rules to remember when interconnecting machines
with 10base2 cabling. The first is that you must use terminators at
both ends of the cabling. A terminator is a 52 ohm resistor that
helps to ensure that the signal is absorbed and not reflected when it
reaches the end of the cable. Without a terminator at each end of the
cabling you may find that the ethernet is unreliable or doesn't work
at all. Normally you'd use `T pieces' to interconnect the machines, so
that you end up with something that looks like:
|==========T=============T=============T==========T==========|
| | | |
| | | |
----- ----- ----- -----
| | | | | | | |
----- ----- ----- -----
where the `|' at either end represents a terminator, the `======' rep­
resents a length of coaxial cable with BNC plugs at either end and the
`T' represents a `T piece' connector. You should keep the length of
cable between the `T piece' and the actual ethernet card in the PC as
short as possible, ideally the `T piece' will be plugged directly into
the ethernet card.
9.4. Twisted Pair Ethernet Cable
If you have only two twisted pair ethernet cards and you wish to
connect them you do not require a hub. You can cable the two cards
directly together. A diagram showing how to do this is included in
the Ethernet-HOWTO
<para>
Warning: A miswired PLIP cable can destroy your controller card. Be very careful and double check every connection to ensure you don't cause yourself any unnecessary work or heartache.
</para>
<para>
While you may be able to run PLIP cables for long distances, you should avoid it if you can. The specifications for the cable allow for a cable length of about 1 metre or so. Please be very careful when running long plip cables as sources of strong electromagnetic fields such as lightning, power lines and radio transmitters can interfere with and sometimes even damage your controller. If you really want to connect two of your computers over a large distance you really should be looking at alternatives such as obtaining a pair of thin-net ethernet cards and running some coaxial cable.
</para>
</sect1>

View File

@ -9,7 +9,7 @@ the same way.
</para>
<para>
You can get information on the Wavelan card from Wavelan.com.
You can get information on the Wavelan card from wavelan.com.
</para>
<para>