This is for Red Hat 5.0 systems. You can probably do a similar thing for other linux systems. It is specifically configured for roadrunner in Columbus, Ohio. If you live somewhere else, you will have to change anything with "columbus" in the configuration to something else. So far, the only thing I see you have change is in /etc/resolv.conf, but I believe that gets changed everytime you start rrhdcpcd.
If you manage to pull this off, you are almost one step away from being able to install a real network to the internet. Think about it, the only difference between what we are doing here and a real network connected to the internet is that fact that your local intranet doesn't have real valid ip addresses. If you had real valid ip addresses and your gateway addressed stayed the same (it changes everytime you log into roadrunner) then you would have a real fixed network connected to the internet. Do this, and you can actually say you have real networking experience. This involves ethernet, DNS, ip forwarding, ip masquerading, ethernet configuration, and a lot of other stuff. Good luck!
I also wish to thank a bunch of people at The Ohio State University for their suggestions. I hope I was able to implement them correctly!
This will probably only work with RedHat 5.0. These steps you must not deviate from. For some reason, the installation of redhat detected both ethernet cards properly and also the kernel has ip forwarding in the kernel. It just needs to be enabled. Thus, Installing your own network is just a bunch of file copying and a couple of commands and you are done. Be sure to install roadrunner with Windows95 first to get a configuration file.
1. Install both ethernet cards before you install RedHat 5.0 The two ethernet cards I used were 3com 3c509. The first had values of, irq=10, address=300 and the second had irq=11, address=310. Also, when you install RedHat 5.0, go ahead and install it for a LAN and have it autoprobe the ethernet cards. I cannot figure it out, but when I installed redhat after installing these two ethernet cards, it gets them both everytime, when before it wouldn't. When it comes close to the end of the RedHat 5.0 installation, it will ask to to select which services you want started on bootup. I turn off sendmail and smb. I do this because it hanged on me at boot time. When you install RedHat 5.0, install everything. I did. You also shouldn't have to change /etc/lilo.conf.
2. You don't need to recompile the kernel. Just add this file to yours.
/etc/rc.d/rc.local
Also, add the krb5.ini file in C:\NETMANAG for Windows95 to
/etc/krb5.conf
Also, make a file called "/etc/rrpasswd" which only has one line on it which is the password for your roadrunner username.
3. Execute the commands
mkdir /etc/dhcpc
unset noglob
4. Copy these files to their exact location
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1
/etc/rc.d/init.d/roadrunner
/etc/dhcpc/resolv.conf
/etc/named.conf
/var/named/10.0.0
/var/named/mark.local
/var/named/named.local
/etc/HOSTNAME
/etc/hosts
/root/Login2.bat
/root/email.pl
/root/cron2
5. Downlaod rrclientd-1.3, untar and ungzip it, and copy all the files in rrclientd-1.3/bin to /sbin. For example, if you are in rrclientd-1.3/bin, execute "cp * /sbin". I had the binaries when I got mine, so hopefully you won't have to compile them. Compiling with the new libraries Red Hat has had has been tricky at times.
You may have to alter the /etc/services file as it says in the README file for rrclientd-1.3.
6. Execute the commands
mv /etc/resolv.conf /etc/resolv.conf_old
ln -s /etc/dhcpc/resolv.conf /etc/resolv.conf
mv /sbin/dhcpcd /sbin/dhcpcd_old
mv /usr/sbin/dhcpcd /usr/sbin/dhcpcd_old
mv /usr/bin/rdate /usr/bin/rdate_old
ln -s /sbin/rdate /usr/bin/rdate
ln -s /sbin/rrdhcpcd /sbin/dhcpcd
ln -s /sbin/rrdhcpcd /usr/sbin/dhcpcd
ln -s /sbin/rrclientd /usr/sbin/rrclientd
cp /root/roadrunner /etc/rc.d/init.d ## adding roadrunner service
chkconfig --add roadrunner
crontab /root/RR/cron2 ### resetting connection in a cron job
## Making it so we can execute the scripts with cron2
chmod 755 /root/Login2.bat /root/email.pl /etc/rc.d/init.d/roadrunner
### We only want root to see the password!
chmod 700 /etc/rrpasswd
7. In /etc/rc.d/init.d/roadrunner, make sure you change the username to your username that you got for roadrunner.
8. Follow the steps in Hook up your hub, gateway computer, and roadrunner and if you have clients, follow the steps in Setup your clients .
9. Now we need to attach dhpc to your first ethernet card. Follow the instructions on part b of Setting roadrunner up as a service.
10. Reboot your computer and you are done!
11. If you have any problems whatsoever, all I can say is, make sure your timezone is correct and that your time is not ahead of the current time by one second or behind it by more than 5 minutes, and if that doesn't help, use the rest of the instructions I have.
Also, setup your second ethernet card to NOT use the same irq and address of your first ethernet card. Traditionally, I use lower irq and address for my first ethernet card compared to the second. Often I use a dos computer using a dos program to set the values for the ethernet cards. You will probably have to do this as well.
Don't do anything yet with roadrunner or your rrdhcpcd program yet. Also, don't worry about the network configurations yet, we will take care of it later. Also don't worry about the fact Linux probably won't see the second ethernet card, we will take care of this later. Just make sure the ethernet cards don't use the same hardware values. Also, if your second ethernet card has a lower irq and address than the first, the computer might think it is the first, so I believe there really is a reason why I make the first ethernet card with the lower values. I ain't gonna test if I am wrong. You should just make sure at least one ethernet card is detected.
There are a couple of things you could change for your own personal needs. In /var/named/mark.local, I disabled localhost definition.
Now at least your clients computers can find each other. I assume you know how to setup ip addresses, gateways, and other stuff for your clients. I will give some pointers on this anyways. Setup clients to use DNS server.
The only thing you should have to change to each additional computer is the ip address and the name address. c2.mark.local and 10.0.0.22 would be used for the next computer. Get the idea?
Also, if you are using pc or mac clients or other stuff, check out the masquerading mini-howto.
If you were able to get your module(s) to detect both ethernet cards, then this section doesn't apply. But if you could not get the modules to recognize both ethernet cards, which will be the case for most people, you MUST COMPILE THE DRIVER of the ethernet card into your kernel and also compile in the masquerading bit. I have had problems getting modules to work with 2 ethernet cards of the same type. Somehow, when I installed RedHat 5.0 from scratch, it got both of my ethernet cards, but it was probably an unusal case.
Read the ip masquerading HOWTO. Follow its steps on compiling the kernel for masquerading. NOTE -- VERY DANGEROUS if you screw this up. About, installing the kernel, RedHat did something silly when they configured the /etc/lilo.conf file. Change this line "image=/boot/vmlinuz-2.0.32" to "image=/boot/vmlinuz" and make sure you run "lilo" at some point before you reboot your computer. Do it now to be safe.
1. And also, these are the steps I use to compile the kernel, first configure it like the howto says
cd /usr/src/linux
make config
2. and when that is done, compile it
make dep
make clean
make zImage
3. and if it worked, compile and install the modules
make modules
make modules_install
4. After you created your kernel, do the following steps to install your new kernel.
cp /usr/src/linux arch/i386/boot/zImage /boot/vmlinuz_NEW
rm /boot/vmlinuz
ln -s /boot/vmlinuz_NEW /boot/vmlinuz
lilo
That should install your kernel if you compiled it. Here is an example of my /etc/lilo.conf file.
YOUR /etc/lilo.conf WILL NOT BE THE SAME AS MINE. Change /etc/lilo.conf for your specific needs and please read about append in the BOOTPROMPT howto before you use it. You will have to modify this file yourself. Add the append statement like I did for two ethernet cards.
Now we need to get your gateway computer connected to the internet.
Download the rrclientd-1.3.tar.gz and rrdhcpcd-1.02.tar.gz files. You don't need rrdhcpcd-1.02.tar.gz unless you want to compile as it has a binary contained in rrclientd-1.3.tar.gz. Here are the briefs instructions on what to do, but read the README file that comes with rrclientd-1.3.tar.gz. It tells you in better detail what to do next. Use rrdhcpcd instead of dhcpcd. It works better and seems to initiate faster.
Once you have installed rrclientd-1.3.tar.gz properly, use this file /root/Login.bat to start your login session with "source /root/Login.bat". Remember to change USERNAME in the file to whatever username it is that you have. In my script, I stop and start rrdhcpcd, which is unecessary. Once rrdhcpcd is started, it tries to renew the ip address every 3 hours. Thus, you should never have to stop rrdhcpcd, but I do it anyways.
A. First, install roadrunner as a service.
B. Now use the control panel. Log in as root and use xwindows. "startx" will start xwindows at the prompt if you don't have xdm running. The control-panel should be there. This next step will set the first ethernet card to use dhcp which we replaced with rrdhcp (the computer doesn't know any better).
Okay, we got rrdhcpcd running by setting the first ethernet card to use the protocl dhcp and we installed the roadrunner service which uses rrclientd.
/etc/rc.d/init.d/roadrunner stop /etc/rc.d/init.d/network stop /etc/rc.d/init.d/network start /etc/rc.d/init.d/roadrunner start
But of course, that is a little drastic. Rrdhpcd supposedly tries to renew the ip address every 3 hours, so you should never have to start and stop it. That is good because it takes a while to initiate and stalls the network.
Why would you want to stop and start the roadrunner service? Well, in theory, rrdhpcd should get the same ip address 99% of the time if you leave it on all the time. If it doesn't, you are screwed and you will have to restart the roadrunner service. Thus, instead of using my /root/Login.bat script, just put into the cron for the roadrunner service to be stopped and started at specific times. Use the files /root/Login2.bat and /root/cron2 and /root/email.pl. Make sure you do a "chmod 755 /root/Login2.bat /root/email.pl". And also do a "crontab /root/cron2". Oh, uh, if you had other stuff cronned as root, I would "add the cron stuff" or otherwise you are going to blow away your previous cron jobs.
Also, a quote from Joshua Jackson when I e-mailed him about what problems you might have being logged in all the time.
If for some reason you lose your IP address (this SHOULD NOT happen under normal circumstances), you Kerberos tickets and GSS auth info would become invalid. If this happens, rrclientd will exit and you will need to log back in. The only reason that you would lose your IP address would either be a hardware/software malfunction at either the client or server end or a reset of the dhcp servers at RR. Joshua Jackson
echo starting rrdhcpcd /sbin/rrdhcpcd eth0 echo sleeping for 5 seconds sleep 5 echo Starting rrclientd /sbin/rrclientd -u USERNAME /etc/rrpasswd dce-server echo finished echo sleeping 20 more seconds sleep 20
domain columbus.rr.com search mark.local columbus.rr.com nameserver 10.0.0.10 ### this is our DNS nameserver 204.210.252.18 ### this is the roadrunner dns nameserver 128.146.1.7 ### ONLY FOR OSU PEOPLE IN COLUMBUS OHIO!
; ; a caching only nameserver config ; directory /var/named cache . named.ca primary 0.0.127.in-addr.arpa named.local primary mark.local mark.local primary 0.0.10.in-addr.arpa 10.0.0
domain columbus.rr.com search mark.local columbus.rr.com nameserver 10.0.0.10 ### this is our DNS nameserver 204.210.252.18 ### this is the roadrunner dns nameserver 128.146.1.7 ### ONLY FOR OSU PEOPLE IN COLUMBUS OHIO! ### You can probably use our dns first if you want. Actually, I would.
mark.local. IN SOA main.mark.local. root.main.mark.local. ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum mark.local. IN NS main.mark.local. ;localhost IN A 127.0.0.1 main.mark.local. IN A 10.0.0.10 c1.mark.local. IN A 10.0.0.21 c2.mark.local. IN A 10.0.0.22 c3.mark.local. IN A 10.0.0.23 c4.mark.local. IN A 10.0.0.24 c5.mark.local. IN A 10.0.0.25 c6.mark.local. IN A 10.0.0.26 c7.mark.local. IN A 10.0.0.27 c8.mark.local. IN A 10.0.0.28
0.0.10.in-addr.arpa. IN SOA main.mark.local. root.main.mark.local. ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS main.mark.local. 10.0.0.10.in-addr.arpa. IN PTR main.mark.local. 21.0.0.10.in-addr.arpa. IN PTR c1.mark.local. 22.0.0.10.in-addr.arpa. IN PTR c2.mark.local. 23.0.0.10.in-addr.arpa. IN PTR c3.mark.local. 24.0.0.10.in-addr.arpa. IN PTR c4.mark.local. 25.0.0.10.in-addr.arpa. IN PTR c5.mark.local. 26.0.0.10.in-addr.arpa. IN PTR c6.mark.local. 27.0.0.10.in-addr.arpa. IN PTR c7.mark.local. 28.0.0.10.in-addr.arpa. IN PTR c8.mark.local.
@ IN SOA localhost. root.localhost. ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS localhost. 1 IN PTR localhost.
127.0.0.1 localhost localhost.localdomain 10.0.0.21 c1.mark.local c1 10.0.0.10 main.mark.local main 10.0.0.22 c2.mark.local c2 10.0.0.23 c3.mark.local c3 10.0.0.24 c4.mark.local c4 10.0.0.25 c5.mark.local c5 10.0.0.26 c6.mark.local c6 10.0.0.27 c7.mark.local c7 10.0.0.28 c8.mark.local c8
search mark.local nameserver 10.0.0.10
boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=50 ### WARNING!!! THE APPEND STATEMENT IS FOR MY COMPUTER ONLY!!!!! image=/boot/vmlinuz label=linux root=/dev/hda1 append="ether10,0x300,eth0 ether=11,0x310,eth1" read-only
## Add this file to /etc/rc.d/rc.local echo "setting up ip masquerde" /sbin/depmod -a /sbin/modprobe ip_masq_ftp /sbin/modprobe ip_masq_raudio /sbin/modprobe ip_masq_irc echo "setting up permissions for 10.0.0.0 domain for mas" ipfwadm -F -p deny ipfwadm -F -a m -S 10.0.0.0/24 -D 0.0.0.0/0
NETWORKING=yes FORWARD_IPV4=true HOSTNAME=main.mark.local DOMAINNAME=mark.local GATEWAY= GATEWAYDEV=eth0
DEVICE=eth0 IPADDR=10.0.1.10 NETMASK=255.255.255.0 NETWORK=10.0.1.0 BROADCAST=10.0.1.255 ONBOOT=yes
DEVICE=eth1 IPADDR=10.0.0.10 NETMASK=255.255.255.0 NETWORK=10.0.0.0 BROADCAST=10.0.0.255 ONBOOT=yes
## This is a drastic solution to stop and start your roadrunner stuff ## Personally, you should only have to start and stop the roadunner ## service every once in a while, and you shouldn't mess with the network date echo killing rrclientd /sbin/rrclientd -k sleep 5 echo killing rrdhcpcd /sbin/rrdhcpcd -k eth0 echo sleeping 2 seconds sleep 2 ### uncomment the next 5 lines if you wish, you probably don't have to ##echo stopping and starting the network ##/etc/rc.d/init.d/network stop ##echo sleeping 5 seconds ##sleep 5 ##/etc/rc.d/init.d/network start echo starting rrdhcpcd /sbin/rrdhcpcd eth0 echo sleeping for 5 seconds sleep 5 echo Starting rrclientd /sbin/rrclientd -u USERNAME /etc/rrpasswd dce-server echo finished echo sleeping 20 more seconds sleep 20
#!/bin/sh # # roadrunner This shell script takes care of starting and stopping # rrclientd. # # chkconfig: 2345 11 30 # description: Logs the system into TWC Road Runner Internet Service # # Author: Joshua Jackson [email protected] # 1/6/98 # # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -f /usr/sbin/rrclientd ] || exit 0 RRUSER="Your Username Goes here!" # See how we were called. case "$1" in start) # Start daemons. echo -n "Logging into Road Runner: " daemon rrclientd -u ${RRUSER} /etc/rrpasswd dce-server echo ;; stop) # Stop daemons. echo -n "Logging out of Road Runner " killproc rrclientd echo ;; status) status rrclientd ;; restart) $0 stop $0 start ;; *) echo "Usage: roadrunner start|stop|restart" exit 1 esac exit 0
!/usr/bin/perl $EMAIL = "USERNAME\@somewhere.foo.edu"; open(EMAIL,"| /bin/mail -s RR $EMAIL"); $date = `date`; chop $date; print EMAIL "DATE AND TIME: $date\n"; print EMAIL "--------------------------------------------------\n"; print EMAIL "test\n"; close(EMAIL);
# Let us restart dhcpd and rrclient 7 a.m., 2 p.m., and 10 p.m. # and kill it at 1 a.m. # and e-mail once an hour 5 minutes after the hour 0 7,14,22 * * * /root/Login.bat >> /root/Login.log 0 1 * * * /root/Kill.bat >> /root/Kill.log 5 * * * * /root/mail.pl
date /sbin/rrclientd -k sleep 5 /sbin/rrdhcpcd -k eth0 sleep 5
### We just need to quickly stop and start roadrunner /etc/rc.d/init.d/roadrunner stop sleep 5 /etc/rc.d/init.d/roadrunner start
# Let us restart roadrunner 7 a.m., 2 p.m., and 10 p.m. # and e-mail once an hour 5 minutes after the hour 0 7,14,22 * * * /root/Login2.bat >> /root/Login2.log 5 * * * * /root/mail.pl
main.mark.local