📄 00000019.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: raner (就要离开清华了...), 信区: Linux <BR>标 题: 如何使用 Kermit + Modem 上网路(转载) <BR>发信站: BBS 水木清华站 (Mon Jun 29 11:17:37 1998) <BR> <BR>来 源: freebsd.csie.nctu.edu.tw <BR>档 名: 0/System/network/Kermit(使用 70 埠) <BR>标 题: 如何使用 Kermit + Modem 上网路 - How to use Kermit + Modem <BR> <BR> <BR> Last Updated: 95/11/10 <BR> <BR>From: <A HREF="mailto:jou.chen@nematic.ieo.nctu.edu.tw">jou.chen@nematic.ieo.nctu.edu.tw</A> ( 陈威州 Wei-Jou Chen ) <BR>Newsgroups: tw.bbs.comp.386bsd <BR>Subject: Re: 请使用数据机的朋友帮忙...... <BR>Date: 10 Nov 1995 01:50:14 GMT <BR>Organization: Sweet Home, Hsinchu, Taiwan. <BR> <BR> I would like to post my .kermrc file for using kermit to <BR>dial up to NCTU to play with PPP(pppd), SLIP and Terminal server. The macros <BR>'slip' and 'ppp' can be used to play 'slip' and 'ppp'. That means you can just <BR>keyin 'slip' for connection to slip server in NTU after go into kermit. Your <BR>kernel should support ppp and sl. <BR> I am a very poor Chinese typist, so I just can <BR>contribute my example .kermrc file. Have fun! <BR> <BR>PS. In FreeBSD, only root can add route table, so the .kermrc is for root. <BR> <BR>#------------.kermrc for root ---------------# <BR>; <BR>; basic assignment session <BR>; <BR>assign \%m /dev/cuaa3 <BR>assign \%s 57600 <BR>assign \%i ATH0L2M1\x0d <BR>; <BR>; basic setting session <BR>; <BR>set line \%m <BR>set modem hayes <BR>set dial init-string \%i <BR>set dial dial-command ATDT%s\x0d <BR>set dial timeout 60 <BR>set flow rts/cts <BR>set terminal bytesize 8 <BR>set command bytesize 8 <BR>set parity none <BR>set speed \%s <BR>set file type binary <BR>set file names literal <BR>set receive packet-length 1024 <BR>set send packet-length 1024 <BR>set window 8 <BR>set block 3 <BR>; <BR>; macro definitions session <BR>; <BR>; <BR>; rz and sz macro definitions <BR>; <BR>define rz - <BR> !rz \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 \%9 < \v(line) > \v(line) <BR>define sz - <BR> !sz \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 \%9 < \v(line) > \v(line) <BR>; <BR>; godial macro definition <BR>; <BR>define godial - <BR> assign \%n 0, - <BR>∶<I>dial, - </I><BR> increment \%n, - <BR> echo dial-up counting numbers: \%n, - <BR> dial 730600, - <BR> if equal \v(dialstatus) 22 goto dial, - <BR> if equal \v(dialstatus) 23 goto dial, - <BR>; <BR>; gotelnet macro definition <BR>; <BR>define gotelnet - <BR> if not equal \v(argc) 2 end 1 Usage: gotelnet hostname, - <BR> assign \%n 0, - <BR>∶<I>dial, - </I><BR> increment \%n, - <BR> echo dial-up counting numbers: \%n, - <BR> dial 730600, - <BR> if equal \v(dialstatus) 22 goto dial, - <BR> if equal \v(dialstatus) 23 goto dial, - <BR> input 50 choice:, if failure stop, - <BR> output 0\x0d, input 10 telnet:, if failure stop, - <BR> output open \%1\x0d, if failure stop, - <BR> connect <BR>; <BR>; slip macro definition <BR>; <BR>define slip - <BR> log session /var/log/kermit.\fsubstr(\v(line),6,10).log append, - <BR> assign \%n 0, - <BR>∶<I>dial, - </I><BR> increment \%n, - <BR> echo dial-up counting numbers: \%n, - <BR> dial 730600, - <BR> if equal \v(dialstatus) 22 goto dial, - <BR> if equal \v(dialstatus) 23 goto dial, - <BR> input 50 choice:, if failure stop, - <BR> clear, - <BR> output 7\x0d, - <BR> input 5 SLIP., - <BR> input 5 Annex address is, - <BR> input 5 ., input 5 ., input 5 ., input 5 ., - <BR> input 5 Your address is, - <BR> input 5 ., input 5 ., input 5 ., input 5 ., - <BR> close session, - <BR> assign \%d \fsubstr(\v(input),43,13), - <BR> assign \%l \fsubstr(\v(input),75,15), - <BR> !ifconfig sl0 inet \%l \%d netmask 0xffffff00 link0 -link2 mtu 1500, - <BR> !route add default \%d, - <BR> !slattach -h -c -s \v(speed) \v(line), - <BR> pause 1, - <BR> suspend, - <BR> open read /var/run/slattach.\fsubstr(\v(line),6,10).pid, - <BR> read \%p, - <BR> !kill -INT \%p, - <BR> !ifconfig sl0 down, - <BR> !ifconfig sl0 delete, - <BR> !route delete default, - <BR> quit <BR>; <BR>; ppp macro definition <BR>; <BR>define ppp - <BR> !touch /etc/ppp/options, - <BR> log session /var/log/kermit.\fsubstr(\v(line),6,10).log append, - <BR> assign \%n 0, - <BR>∶<I>dial, - </I><BR> increment \%n, - <BR> echo dial-up counting numbers: \%n, - <BR> dial 730600, - <BR> if equal \v(dialstatus) 22 goto dial, - <BR> if equal \v(dialstatus) 23 goto dial, - <BR> input 50 choice:, if failure stop, - <BR> clear, - <BR> output 6\x0d, - <BR> input 5 PPP., - <BR> close session, - <BR> !pppd crtscts modem noipdefault passive \v(line) \v(speed), - <BR> pause 5, - <BR> !route add default `tail -n 50 /var/log/messages|grep "pppd"|grep "remote IP"|tail -n 1|cut -d' ' -f10`, - <BR> suspend, - <BR> open read /var/run/ppp0.pid, - <BR> read \%p, - <BR> !kill -INT \%p, - <BR> !ifconfig ppp0 down, - <BR> !ifconfig ppp0 delete, - <BR> !route delete default, - <BR> quit <BR> <BR> <BR> <BR>--Jou <BR>== Wei-Jou Chen ( 陈威州 ) at Chen Sweet Home == <BR>== Email:<A HREF="mailto:jou.chen@nematic.ieo.nctu.edu.tw">jou.chen@nematic.ieo.nctu.edu.tw</A> == <BR>== Mail : No. 25, Lane 878, Nan-Ta Road, Hsinchu, Taiwan __o == <BR>== 新竹市南大路878巷25号 _\<,_, == <BR>== Fax/Data: +886-35-613285 Tel: +886-35-266575 . ..(*)/(*) == <BR> <BR> <BR>-- <BR>※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 166.111.68.98] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -