home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BURKS 2
/
BURKS_AUG97.ISO
/
BURKS
/
LINUX
/
HOWTO
/
mini
/
dipslirp.txt
< prev
next >
Wrap
Text File
|
1997-07-07
|
14KB
|
457 lines
Linux Dip+SLiRP+CSLIP mini-HOWTO
by
Zenon Fortuna (zenon@netcom.com)
Version: 1.0 October 15th '95
INDEX
0. Why "Dip+SLiRP+CSLIP mini-HOWTO" ?
1. History of changes
2. Short description
3. Steps of the configuration
3.1 Installing the SLiRP
3.2 Testing the SLiRP
3.3 Configuring your Linux system
3.4 Testing your Linux system
3.5 Installing the DIP
3.6 Testing the DIP
4. Normal operation
4.1 Adding a DNS capability
5. Comments
----------------------------------------------------------------------------
0. Why "Dip+SLiRP+CSLIP mini-HOWTO" ?
This document is for users, who don't want to read the NET-2-HOWTO
with all its details, nor want to read the Dip/SLiRP documents, but
would like to install a SLIP-like connection to the Internet, using
available shell-only account.
The above mentioned documents should be considered as more exhaustive,
but also more exhausting.
The dip337n-uri and slirp-0.95h packages were used to test the described
functionality. The tests were verified under the stable (tm) Linux
kernel version 1.2.13, installed under the Slackware 2.2.0 OS
distribution.
1. History of changes
October 15th '95 Version: 1.0
The initial version of the document.
2. Short description
- I assume, that your Linux system is able to dial-up a remote
server of the ISP, where you have a shell-account. On this server
we will install the "slirp" utility.
- we would like to prepare the "dip" utility on the Linux system,
along with a specialized script, to dial-up the remote server,
and start the "slirp" on this remote system.
- the running "dip" will configure the serial line parameters and
will inform the Linux system about the IP mapping, performed by
the remote "slirp".
- as a result the TCP/IP packets sent over the serial-line/modem
connection will be handled by the remote server as though being
sent locally by this server.
Miracle happens: we will get a TCP/IP connection of the Linux system
to the Internet resources.
3. Steps of the configuration
3.1 Installing the SLiRP
- get the SLiRP distribution file, e.g. the slirp-0.95h.tar.gz,
and compile the "slirp" program on your remote host (the system
to which you will be dialing up). The SLiRP's docs/README.compiling
explains the details.
Instead, you can get the already precompiled binary from
ftp://ibc.wustl.edu/pub/slirp_bin/USE_AT_OWN_RISK/
as it is explained in the Alt.dcom.slip-emulators FAQ, included
with the docs.
- move the "slirp" program to a better location, e.g. "./bin/slirp"
or "./slirp" (i.e. at the $HOME directory)
- at your $HOME directory create the ".slirprc" file.
To keep it simple let's use only a few commands:
#### .slirprc file ####
add ptyexec /usr/bin/tcsh -l:10.0.2.1:23
compress
baudrate 38400
#### end
The "compress" command ensures to use the CSLIP protocol.
The "add ptyexec" command was used instead of the "shell"
command (see the SLiRP's docs/CONFIG for a list of commands),
because it is better to use the "tcsh -l" (for ".login" entry)
and the "shell" command does not accept flags (I believe).
You should use the remote system specific address of the "tcsh"
program (or use another shell, if you prefer).
The "baudrate" should be used with the speed proper for your modem
connection.
3.2 Testing the SLiRP
Login to your remote site and type
% bin/slirp (or "./slirp", depending on the location)
You should get a list of messages, with the following line at the end:
[talking CSLIP, MTU 1500, MRU 1500, 38400 baud]
To exit the "slirp" type slowly (>1 sec gap) five 0's (zeroes).
3.3 Configuring your Linux system
Essentially, what you need to do is to prepare a kernel able
to run network and the CSLIP. Then you should configure the network.
Start the "make config" in the "src/linux" directory and set "y"
to the following options:
Networking support (CONFIG_NET) [y]
TCP/IP networking (CONFIG_INET) [y]
Assume subnets are local (CONFIG_INET_SNARL) [y]
Network device support? (CONFIG_NETDEVICES) [y]
Dummy net driver support (CONFIG_DUMMY) [y]
SLIP (serial line) support (CONFIG_SLIP) [y]
CSLIP compressed headers (CONFIG_SLIP_COMPRESSED) [y]
PPP (point-to-point) support (CONFIG_PPP) [y]
Now, I use the 3c509 Ethernet card, so my additional options are:
3COM cards (CONFIG_NET_VENDOR_3COM) [y]
3c509/3c579 support (CONFIG_EL3) [y]
For the NFS installation you can add also:
NFS filesystem support (CONFIG_NFS_FS) [y]
Now, after successful "make config", complete the kernel generation
with "make dep" and "make zImage".
Then move the arch/i386/boot/zImage to your kernel location and
run "lilo".
To configure the network, first decide which IP address to use.
In a lack of your special address, take 192.168.1.100, allowed for
local networks by RFC1597.
Of course, you should rather read the NET-2-HOWTO for correct
information, but you can try to do the following:
A. Give your system a network name, e.g. "yourhost.linux.org",
where all the three names could be chosen to your tastes.
Place the above string (without the quotes) into the
"/etc/HOSTNAME" file.
B. Edit your "/etc/hosts" file, adding
192.168.1.100 yourhost.linux.org yourhost
The above "yourhost.linux.org" string should match the one chosen
in the step A above.
C. If you run local Ethernet edit also your "/etc/networks" file,
adding a line:
yournet 192.168.1.0
D. Edit your "rc.inet1" from the /etc/rc.d directory (save the
original somewhere :) and set
IPADDR=yourhost
NETMASK="255.255.255.0"
NETWORK=yournet
BROADCAST="192.168.1.255"
Then, if you have a real Ethernet card on your system,
uncomment the line
/sbin/ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
and then the following line
/sbin/route add -net ${NETWORK} netmask ${NETMASK}
E. Place your domain name "linux.org" (compare the step A) into the
"/etc/resolv.conf" file, as a line:
domain linux.org
Now, reboot your system.
3.4 Testing your Linux system
First of all watch the booting messages, or look into the
"/usr/adm/messages" file, if your syslogd(8) is running.
You should see messages like
IP Protocols: ICMP, UDP, TCP
PPP: version ...
TCP compression ...
PPP line discipline registered.
SLIP: version ...
CSLIP: code copyright ...
If you have the Ethernet interface it should be recognized as well, e.g:
eth0: 3c509 at 0x280 ...
Your network should be up and you could test it with a few commands:
A. Run "ifconfig", without arguments.
You should see the "lo" (loopback) interface activated, with its
addresses.
If you run a real Ethernet as well, you will see the information
about the "eth0" interface as well, and you should notice the
familiar addresses, like "inet addr: 192.168.1.100", etc.
B. Run "route", without arguments.
You should see a line about the "loopback" and maybe another one
about the "yournet".
OK, your Linux system is ready to work with the CSLIP as well.
3.5 Installing the DIP
- it may happen, that your Linux system has already the "dip"
binary. It would be nice to have the 3.3.7n version of it
(it has the updated documentation).
- otherwise, get the DIP distribution file, e.g. the dip337n-uri.tar.gz,
and compile the "dip" program on your local Linux host.
You do it by typing "make" in the dip-3.3.7n directory.
- move the "dip" program to a better location which is in your PATH,
e.g. /usr/local/bin/dip or $HOME/bin/dip.
- at convenient location, e.g. your $HOME directory, create the dip's
script file, for example "slirp.dip".
The dip's script file is usually long and complex. There are some
examples in the dip's "samples" directory (maybe installed as
/usr/doc/dip/samples.
Anyway, I submit my "slirp.dip" file as an example.
#### slirp.dip file ####
#
# slirp.dip Dialup IP script for u