📄 00000005.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: life (o)寻求师傅中(o), 信区: Linux <BR>标 题: [技术]Linux as Router (1) <BR>发信站: BBS 水木清华站 (Sun Nov 16 13:07:41 1997) <BR> <BR> <BR> <BR> Documentation <BR> <BR>This is certainly not complete, just enough to get you going with the first <BR>release. This will eventually evolve into a FAQ and some actual docs... <BR> <BR>How it works: <BR>LRP is based upon media insestive scheme. As long as it can boot and be <BR>mounted by Linux, and if it can hold enough, use can use it. 1.44MB Floppies, <BR>ZIPs, LS-120's, flash ram cards, hardives, etc will all work. <BR> <BR>Under normal circumstances the boot media is not used after boot. The initrd <BR>functions of the Linux kernel are used to create a ramdrive (/dev/ram0) at boot <BR>time, and a raw root filesystem is copied into this drive by the boot loader. <BR>(IE LILO or syslinux) By a raw image, we mean on the creation system a ramdrive <BR>was initialize with Minix (or something else) a small root was copied to it, and <BR>then the ramdrive was read with dd (or cat) into a binary image file, that in <BR>turn is compressed with gzip. <BR> <BR>Having router run it's root out of ram is ideal. It's is fast. It is solid <BR>state. It is only a reboot away from restoring the entire root should a <BR>cracker cause havok. But as you can see making permanent modifications <BR>to the router usally required making a new root image with a Linux system, as it <BR>is very difficult to remake the image on the fly right within the router. <BR> <BR>This problem has been solved the best it can be without adding new features to <BR>the Linux kernel. We still use a small raw image file, but this file contains <BR>nothing more then enough commands to mount the boot device and then extract <BR>tar-gz files to the ramdisk. Now changes can be made easily and increntally <BR>directly by the router, giving us a completely self contained unit, requiring a <BR>Linux box for nothing but the preperation of the initial boot media. <BR>(And nothing but MS-DOS if you use syslinux and have pre-made files handy) <BR> <BR>What is what: <BR> initrd-image - contains a minature root and loader scripts that are made into <BR>a raw compressed image file. (initrd.rgz) <BR> root-tgz - contains the actual root fs. It is broken up into one or more .tgz files. <BR>This allows incremental updates and additions without having to back-up the entire <BR>root. Currently the default are two files root.tgz and etc.tgz. <BR> root.map - this file is placed on the root of the boot medium. It contains <BR>the files that inird-image should extract. It can be changed to allow more or <BR>different root components without having to change the initrd-image. <BR> mkrouter-disk et al - various scripts and files used to make the image, <BR>.tgz's, and final disk from scratch. <BR> <BR>So how do I make a router disk? <BR>Most people will be using a 1.44mb disk. The best boot loader for this is <BR>Syslinux by Peter Anvin. (See the floppy page) Once you have a disc loaded <BR>up with syslinux, and you have all the router files extracted: <BR> <BR>./mkrouter-disk -f -m -c <BR> <BR>That should do it. You now have a disk ready to go. Boot it, login, edit the <BR>config files, and you are running. <BR> <BR>What can I do with this? <BR>The base router root contains various essential system and network commands, <BR>full init, etc, etc. What it does not have are things like ppp, or isdn utils. <BR>These however can simpily be dropped in, and very soon we will make additional <BR>.tgz modules that can be loaded right with the root. As an example I currently <BR>use this version on on LS-120 in a terminal server that contains ppp and <BR>portslave (radius client). They fall right in place. <BR> <BR>What needs to be done? <BR>This is just the minimal root; our starting point. Now that we have something <BR>that can remain self contained, work will begin on slick web and snmp based <BR>configuration utilites. Pretty soon you won't even need to have a console to <BR>set it up. ( Don't buy stock in cisco : ) ) <BR> <BR> <BR>How much crack did you smoke before you made this init system? <BR>Ahh.. a slackware user. The LRP's work is based on Debian (sysvinit) and in <BR>fact the init has changed VERY little from a stock Debian install. If you <BR>use Debian you will be right at home. The current work is based on Debian <BR>1.3.1.? The only considerable things that did not come out of standard Debian <BR>are a minimal compile of bash 1.14 (for size reasons) and busybox (from the <BR>Debian rescue disk. It provide commands like mount and ls, in a single small <BR>executable.) One other note, libncurces as been stripped for size. Take this <BR>into consideration if you add any additional ncurses apps. libc5 is still <BR>complete AT THIS POINT. (hint: don't plan on it in the future) <BR> <BR> <BR> <BR> <BR> <BR>Here is some more information about booting 'Higher' Density formatted disks <BR>with Linux. <BR> <BR>If you're interested in helping out, join the mailing list and post what you <BR>would like to do. We certainly could use more people! <BR> <BR> <BR> <BR>LRP Mailing list: <BR>You can view the archive of all previous messages that have been posted. <BR> <BR>To join or leave the Linux-router Mailing List, send an email message to: <BR> <BR> To: linux-router-<A HREF="mailto:request@psychosis.com">request@psychosis.com</A> <BR> Put subscribe or unsubscribe for the subject. <BR> <BR>To post a message for others to read simply send an email message to: <BR> <BR> To: linux-<A HREF="mailto:router@psychosis.com">router@psychosis.com</A> <BR> <BR> <BR> <BR>-- <BR> <BR> 面对未知的世界因恐惧而发抖 <BR> <BR> <BR> <BR> <BR> <BR>※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 166.111.26.146] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -