Subject : Async PPP setup for Solaris 2.5 (Direct by null modem cable)
Description :
SUBJECT: Async PPP setup for Solaris 2.5 (Direct by null modem cable)
CONTENTS OF THIS MEMO : SUN CS Tech Hour 준비.
0. Introduction ( Solaris PPP FAQs and man aspppd, ppp)
1. Test Environment
2. Server System
3. Client System
4. Rebooting 후 확인할 사항.
5. Network Test ( ping, telnet, rlogin, rcp) and Routing.
6. Internet Connection and W.W.W test
7. Trouble shooting.
8. Q/A
1) How can I get PPP to always keep the line active?
2) what does in.routed do?
3) what does in.rdisc do?
4) Is the 'call cleanup(0)' message an error?
9. Appendix
A:PC configuration to use PC/TCP PPP module.
B:Async PPP setup for Solaris 2.5 with modem.
0. Introduction ( Solaris PPP FAQs)
1)PPP 란 무엇인가 ?
PPP 는 Point-to-point protocol 을 의미하여 point-to-point link 를
사용하여 netwokr packet 을 전송하는데 있어서 업계표준 이다.
SUN 은 PC-NFS, Sunlink PPP, Sunlink ISDN 에서 많은 PPP 를 구현하였다.
그러나 여기서는 단지 solaris 와 관계되는 bundled async PPP 에 대해서만
언급하겠다.
기본적인 PPP 에대한 information 은 다음에서 찾을수가 있다.
* SunOs 5.X Administering TCP/IP and PPP
* TCP/IP Network Administration Guide
* The man pages aspppd(1M) and ppp(7).
PPP 에관한 더많은 정보를 원한다면 RFC(Request for Comments) 1331참조.
( http://www.cis.ohio-state.edu/htbin/rfc/rfc1331.html)
2)PPP의 기본적인 구성요소.
* /usr/sbin/aspppd : PPP 연결을 초기화 하는데 사용되는 link manager.
물리적으로 연결이 되지않은 PPP inetface 에 packets 이 queuing
이 되었을때 link manager 는 connection 을 초기화하게된다.
* /usr/sbin/aspppls : dial-in PPP 연결을 위한 login shell 로써 PPP login
service 가 invoke 된다. inbound PPP 연결을 초기화하는데
/tmp/.asppp.fifo 를 통하여 aspppls 가 aspppd 와 communication 함.
( PPP server system 상에서 ppp user login shell 로 사용됨.)
* /etc/asppp.cf : 구동시에 aspppd 에 의해 읽혀지는 환경화일.
PPP 연결(path) 를 정의하는 요소와 interface 를 정의함.
* /etc/log/asppp.log : PPP log file. 각 inbound outbound 연결에 관한 log
information 을 포함하고 있다. aspppd 가 high level 의 debug option
으로 구동시 link 가 올라왔을때의 발생하는 PPP negotiation 뿐만아니라 다른 시스템으로 dial out 할 caller scripts 에 관한 중요한 정보를
가지고 있다.
* /etc/init.d/asppp : system 이 구동시에 수행되는 startup scrip.
아래와 같은 명령어로 사용될수도 있다.
#/etc/init.d/asppp stop
#/etc/init.d/asppp start
* /tmp/.asppp.fifo : aspppls 와 aspppd 간의 communication 에 사용되며
이것이 없으면 아마 link manager 는 돌아가지 않는다.
3) aspppd, aspppls 에 대하여(man page 참조)
NAME
aspppd, aspppls : Asynchronous PPP Link Manager.
SYNOPSIS
/usr/sbin/aspppd [ -d debug-level ]
/usr/sbin/aspppls
AVAILABILITY
SUNWapppr
SUNWapppu
DESCRIPTION
aspppd 는 RFC1331 에 명시된 asynchronous data link protocol 을
위한 link manager 로써 전화선을 사용하여 모뎀을 통한 IP network
service 를 제공하기위한 PPP streams module 과 IP-Dialup driver
(ipdcm) 과 구동하게되는 user level 의 daemon 이다.
이 link manager 는 PPP service 가 요청될때 remote host 와 연결하는
절차를 자동적으로 수행한다. 이러한 connection process 는 다음의 두
가지 경우에 수행될수가 있는데, 첫째는 상대편의 호스트에 IP datagram
을 보내는경우 이며 두번째는 connection 을 원하는 상대호스트로 부터
어떤 notification 을 받는경우이다.
aspppls 는 aspppd 에 상대호스트 를 연결시키는 login service 로써
상대호스트 가 가능한 account 로 login 을 할때 serial port monitor
에 의해서 구동된다.이 aspppls 의 목적은 link manager 이 incoming
call 을 받아서 처리할수있게 하는데 있다.
OPTIONS
-d debug-level
debug-level 은 0 부터 9 까지이며 높은 숫자일수록 더 자세한 debugging
정보를 나타낸다. output file 은 /etc/log/asppp.log.
USAGE
link manager 는 /etc/asppp.cf file 이 있으면 booting 중에 구동되며
configuration file 을 읽고난후에 각 peer host 에 대한 path 를
설정하며 ipd 또는 ipdptp interface 중의 하나에 IP datagram 이
실릴때까지 sleep 하거나 상대호스트의 connection 을 시도하는 login
service 에 의해 notify 된다.
In the First case, link manager 는 UUCP database 를 참조하여
모뎀을 다이얼링, 상대호스트에 login, PPP data link 확립, bring up
IP, 그리고 process 를 구동하는 IP data gram 을 forwarding.
In the second case, link manager 는 login service 에 의해 제공되는
file descriptor 를 open 하고 PPP data link 을 확립, 그리고
brings up IP 를 한다.
만약에 inactivity_timeout keyword 에 명시된 시간동안에 IP traffic
이 없다면 link manager 는 IP 와 PPP 를 down 함으로써 link 를 끊고
상대호스트 와의 connection 을 닫는다.
link manager 는 kill signal 에 의해 재초기화 되며 이때는 모든 open
PPP links 를 끊고 configuration file 를 다시읽는다.
Path
Path 는 상대호스트와의 connection 의 상태를 포함하고 있는 object
로써 system names, inteface names, timeout values 같은 정보가
path object 에 정의된다. 각 잠재적인 상대호스트에 대한 하나의 path
가 존재하며 configuration file 에 선언된다.
Interfaces
link manager 는 두가지 종류의 IP layer interfaces 를 지원하는데,
하나는 ipd(point-to-multipoint interface) 이고 나머지는 ipdptp
(point-to-poing interface) 이다.
point-to-multipoint interface 는 논리적으로 호스트 machine 을
하나 또는 그 이상의 peer hosts 를 포함하고 있는 network 에 연결하는
것이며 peer hosts 의 어느곳으로 갈것인지의 IP traffic 가 point-to
-multipoint interface 를 통한 route 가 요구된다.
ipd interface 가 구성되었을때 그 host 의 오직 하나의 IP address
가 할당된다. 즉, 이것은 Ethernet interface 와 매우 비슷하며 단지
broadcast capability 가 지원되지 않는다는것이다. 이러한 type 의
interface 는 dial in PPP server 에 매우 적합하다.
point-to-point interface 는 논리적으로 하나의 상대호스트와의 연결을
의미한다. 오직 이 interface 를 통하여 상대호스트와 의 route 가
설정된다.
하나의 ipdptp interface 가 구성되었을때 두개의 IP addresses 가
할당되며 이러한 종류의 interface 눈 remote 또는 nomadic machine
에 아주 적합하다.
하나의 interface 는 반드시 IP datagram 이 routed 되기전에 fully
configured and enabled ( i.e. up ).
Routing
하나의 host 가 하나이상의 interface 를 가지고 있을때는 특별한 주의가
routing issues 에 필요하다. 규칙에 따르면, 하나이상의 interface
를 가지는 host 는 router 이고 일반적으로 in.routed 라는 routing
daemon 이 PPP interfaces 에 의해 제공되는 routes 에 advertising 를
하게된다. 이것은 dial in server 를 위한것이지만 적절히 관리되지 않는
다면 network disruptions 를 일으킬수가 있다.
RIP (Routing information packets) 이 point-to-pint interfaces 에
작용하는것을 방지하기위해 /etc/gateways file 에 norip keyword 를
명시한다. ( in.routed man page 참고 )
Configuration File
/etc/asppp.cf file 의 주 목적은 상대시스템과의 communication 을
유지하고 확립하는데 link manager 에 의해 사용되는 각 path
를 정의하는것으로 blank space 에 의해 분리되는 tockens 의 sequence
로 구성되어있다. ( RFC1332)
Keywords
debug_level number
number i는 0 과 9 사이임.
ifconfig parameters
ifconfig(1M) man page 참조.
inactivity_timeout seconds
terminate 되기전의 idle 상태의 최대시간으로 0 는
no timeout, default 는 120 초.
interface ( ipdn | ipdptpn | ipdptp* )
........
peer_ip_address IP-address
point-to-multipoint paths 에만 펄요하며 현재의 path
의 IP address 를 나타내며 point-to-point interface 에는
무시된다.
peer_system_name name
point-to-point 에 필요하며 여기서 name 은 outbound
connection 을 위하여 UUCP 의 /etc/uucp/Systems file
에 있는 modem 과 peer specific information 을 찾는데
사용된다.
For incomming connection 를 위해서는 /etc/passwd file 의
username field 의 entry 를 /etc/asppp.cf 의 path 에 선언.
4) manual ppp 에 대하여 (man page 참조).
NAME
ppp, ppp_diag, ipd, ipdptp, ipdcm - STREAMS modules and
drivers for the Point-to-Point Protocol
AVAILABILITY
SUNWpppk
DESCRIPTION
PPP 는 point-to-point protocol 을 수행하는 STREAMS module 이며
serial point-to-point links 를 통하여 datagrams 의 전송을 위한
방법을 제공하는 datalink protocol 이다.
PPP 는 point-to-point link 의 두 host 간에 negotiated 되는 다양한
options 을 제공한다. 이러한 options 들은 peer authentication,
header compression, link quality monitoring, and mapping of
control characters 와 같은 것들이 있다.
pseudo device drivers 인 /dev/ipd, /dev/ipdptp, /dev/ipdcm 은
IP-dialup layer 를 만든다. 이 layer 는 IP network interface 에게
dialup point-to-point links 를 제공한다.
ipd 와 ipdptp devices 는 IP dialup network interface 로써 ipd 는
point-to-multipoint interface, ipdptp device 는 point-to-point
interface 를 제공한다. ipdcm device 는 ipd 또는 ipdptp device 와
link manager 간의 interface 를 제공한다.
PPP module 과 IP-dialup layer 는 serial point-to-point links 간의
IP connectivity 를 제공하기위해 서로 협력한다.
ppp_dial module 은 PPP layer packets 를 잡아서 debugging 를 위해
그 내용을 parsing 한다. 보통, parsed output 은 link manager 에 의해서
검증되어 strlog facility 로 보내지며 이 모듈은 debugging 가 enable
될때 link manager 에 의해 serial device 와 ppp module 사이에
push 된다.
Operation : 하나의 packet 이 IP-dialup point-to-point interface
(현재 remote host 와 연결되지않은) 보내지면 , ipdcm driver 는
connection 확립을 위해 link manager 에게 message 를 보내고 link
manager 는 communicaion channel 을 하나 open 하여 해당 serial device
에 ppp module 를 push 한다. ppp module 은 link 를 위해 사용될 options
을 remote host 와 negotiates 를 하여 양쪽 hstgs 가 일련의 options 에
대해 동의하면 link manager 는 remote host 에 IP interface 를 제공
하는 ipd 또는 ipdptp interface 를 serial device 와 ppp module 를
link 시킨다.
비슷하게 remote host 도 가능한 communication port 상에서 connection
을 시작한다. 이경우 link manager 는 request 를 받아 ppp module 를
해당되는 device 에 push 한다. 한번 ppp module 이 성공적으로
negotiate 되면, link manager 는 ppp modul 과 serial device 를
연결하여 IP-dialup interface 를 제공한다.
ppp module 과 serial device 가 IP-dialup interface 와 link 되면
IP packets 는 PPP frames 으로 point-to-point link 를 통하여
packet 를 주고 받는다.
FILES
/dev/ipd point-to-point interface 를 제공하는 pseudo device
driver.
/dev/ipdptp point-to-multipoint interface 를 제공하는 pseudo
device driver.
/dev/ipdcm ipd 와 ipdptp 와 link manager 간의 interface 를
제공하는 pseudo device driver.
1. Test Environment:
0) Configuration 192.9.10.X
|_________________________________________________|
| | |
|
----------- ------------
| WWW | | hyundai2 |
| Server | | (Gateway)|
----------- ------------
| | 203.240.159.X
|_______|____________________|___________________________________________|
| | | |
| ------------
|---------| | hyundai3 | 203.240.159.35
| Router | | h-ppp | 203.240.150.35
----------- ------------
| |
. |
. | ttya serial line
. | (38400 baud)
| |
----------- -------------
| 이 천 | | w-ppp | 203.240.150.81
| HEI | | wybee | 203.240.158.81
| Ami-Net | -------------
----------- | 203.240.158.X
|_________________|___________________________|
| |
1) Axil311
OS : Solaris 2.5 (KLE)
Name : hyundai3
Type : server
Port : ttya ( default value or dial in )
baud : 38400
2) Axil320
OS : Solaris 2.5 (KLE)
Name : wybee
Type : client
Port : ttya ( dial out or service disable:ux )
baud : 38400
3) Pin assign : null modem cable
( 1:gnd 2:tx 3:rx 4:rts 5:cts 6:dsr 7:gnd 8:dcd 20:dtr)
1 ------------------- 1
2 ------------------- 3
3 ------------------- 2
4 ------------------- 5
5 ------------------- 4
---- 6 6 ----
| 7 ------------------- 7 |
---- 8 ------------------- 20 |
20 ------------------- 8 ---|
4) Packages needed for PPP :
SUNWapppr PPP/IP Asynchronous PPP daemon configuration files
SUNWapppu PPP/IP Asynchronous PPP daemon and PPP login service
SUNWpppk PPP/IP and IPdialup Device Drivers
SUNWbnur Networking UUCP Utilities, (Root)
SUNWbnuu Networking UUCP Utilities, (Usr)
5) Patches needed for PPP :
For 2.3, you need patches:
101425-04 SunOS 5.3: fixes to ppp
101318-73 SunOS 5.3: Jumbo patch for kernel (includes libc, lockd)
For 2.4, you need patch:
101945-27 SunOS 5.4: jumbo patch for kernel
To find the patches already on your system, type:
# showrev -p
2. Server Configuration
1) /etc/hosts 에 등록.
hyundai3# more /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
203.240.159.35 hyundai3 loghost
203.240.158.81 wybee
192.9.10.105 hyundai2-gw
203.240.159.34 hyundai2
203.240.150.80 h-ppp
203.240.150.81 w-ppp
203.240.151.81 w-sl
203.240.151.80 h-sl
#203.240.152.81 w-sl2
203.240.151.80 h-sl2
2) /etc/asppp.cf 에 network device(ipdptp0) , options 등록.
hyundai3# more /etc/asppp.cf
ifconfig ipdptp0 plumb h-ppp w-ppp up
debug_level 9
path
interface ipdptp0
peer_system_name ppp
ipcp_async_map 0
inactivity_timeout 3600 # Approx. 2 minutes
3) client login 을 위한 ppp user id 를 등록.
hyundai3#useradd -u 13 -g 60001 -d / -s /usr/sbin/aspppls -m ppp
hyundai3#passwd ppp
ppp123 ( ppp password )
hyundai3# more /etc/passwd
......
ppp:x:13:60001::/:/usr/sbin/aspppls
hyundai3# more /etc/shadow
....
ppp:xud7Lry0i0mk6:9624::::::
3. Client Configuration
1) /etc/hosts 에 등록.
hyundai3# more /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
203.240.159.35 hyundai3 loghost
192.9.10.105 hyundai2-gw
203.240.159.34 hyundai2
203.240.158.81 wybee
203.240.150.80 h-ppp
203.240.150.81 w-ppp
203.240.151.81 w-sl
203.240.151.80 h-sl
#203.240.152.81 w-sl2
203.240.151.80 h-sl2
2) /etc/asppp.cf 에 network device(ipdptp0) , options 등록.
hyundai3# more /etc/asppp.cf
ifconfig ipdptp0 plumb h-ppp h-ppp up
debug_level 9
path
interface ipdptp0
peer_system_name h-ppp
inactivity_timeout 3600 # Approx. 2 minutes
3) client 의 UUCP file setup.
hyundai3#more /etc/uucp/System
............................
h-ppp Any Direct 38400 direct "" P_ZERO in: ppp word: ppp123
............................
hyundai3#more /etc/uucp/Devices
............................
Direct term/a - Any direct
...........................
hyundai3#more /etc/uucp/Dialers
............................
direct "" "" P_ZERO ""
...........................
4. Rebooting 후 , 확인할 사항.
1) server status (hyundai3)
hyundai3# ifconfig -a
lo0: flags=849 mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=863 mtu 1500
inet 203.240.159.35 netmask ffffff00 broadcast 203.240.159.255
ether 0:0:3b:80:17:dc
ipdptp0: flags=8d1 mtu 1500
inet 203.240.150.80 --> 203.240.150.81 netmask ffffff00
ether 0:0:0:0:0:0
hyundai3# netstat -rn
Routing Table:
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
127.0.0.1 127.0.0.1 UH 0 0 lo0
203.240.150.81 203.240.150.80 UH 3 0 ipdptp0
203.240.159.0 203.240.159.35 U 3 2 le0
224.0.0.0 203.240.159.35 U 3 0 le0
hyundai3# snoop -d ipdptp0
h-ppp -> w-ppp RLOGIN C port=1023
w-ppp -> h-ppp RLOGIN R port=1023
w-ppp -> h-ppp RLOGIN R port=1023 \fwybee# snoop -d ipd
h-ppp -> w-ppp RLOGIN C port=1023
w-ppp -> h-ppp RIP R (1 destinations)
hyundai3# cd /devices/pseudo
hyundai3# ls -al *ipd*
crw------- 1 root sys 11, 18 5월 8일 08:40 clone@0:ipd
crw------- 1 root sys 11, 8 5월 8일 08:40 clone@0:ipdcm
crw------- 1 root sys 11, 9 5월 8일 08:40 clone@0:ipdptp
hyundai3# ls -al /etc/defaultrouter
/etc/defaultrouter: 해당 파일이나 디렉토리가 없음
hyundai3# ls -al /etc/gateways
-rw-r--r-- 1 root other 14 5월 8일 10:05 /etc/gateways
hyundai3# pmadm -l
PMTAG PMTYPE SVCTAG FLGS ID
zsmon ttymon ttya u root /dev/term/a b - /usr/bin/login - 9600
ldterm,ttcompat login: - tvi925 y #
2) client status (hyundai3)
wybee# ifconfig -a
lo0: flags=849 mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=863 mtu 1500
inet 203.240.157.81 netmask ffffff00 broadcast 203.240.157.255
ether 0:3b:80:46:37:2a
ipdptp0: flags=8d1 mtu 1500
inet 203.240.150.81 --> 203.240.150.80 netmask ffffff00
ether 0:0:0:0:0:0
wybee# netstat -rn
Routing Table:
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
127.0.0.1 127.0.0.1 UH 0 0 lo0
203.240.150.80 203.240.150.81 UH 3 1 ipdptp0
203.240.157.0 203.240.157.81 U 3 0 le0
224.0.0.0 203.240.157.81 U 3 0 le0
wybee# snoop -d ipdptp0
Using device /dev/ipdptp (promiscuous mode)
w-ppp -> h-ppp ICMP Echo request
h-ppp -> w-ppp ICMP Echo reply
wybee# pwd
/devices/pseudo
wybee# ls -al *ipd*
crw------- 1 root sys 11, 18 5월 7일 10:04 clone@0:ipd
crw------- 1 root sys 11, 8 5월 7일 10:04 clone@0:ipdcm
crw-rw-rw- 1 root sys 11, 9 5월 7일 10:04 clone@0:ipdptp
hyundai3# ls -al /etc/gateways
-rw-r--r-- 1 root other 14 5월 8일 10:05 /etc/gateways
wybee# pmadm -l
PMTAG PMTYPE SVCTAG FLGS ID
zsmon ttymon ttya ux root /dev/term/a b - /usr/bin/login - 9600
ldterm,ttcompat login: - - n #
5. Network Test ( ping, telnet, rlogin, rcp) and Routing.
1) network test
wybee# ping w-ppp
w-ppp is alive
wybee# ping h-ppp
h-ppp is alive
wybee# telnet h-ppp
Trying 203.240.150.80...
Connected to h-ppp.
Escape character is '^]'.
UNIX(r) System V Release 4.0 (hyundai3)
login: root
wybee#tail -f asppp.log
...
08:22:28 process_ipd_msg: ipdptp0 needs connection
conn(h-ppp)
Trying entry from '/etc/uucp/Systems' - device type Direct.
Device Type Direct wanted
Trying device entry 'cua/a' from '/etc/uucp/Devices'.
processdev: calling setdevcfg(ppp, Direct)
fd_mklock: ok
fixline(10, 38400)
gdial(direct) called
Trying caller script 'direct' from '/etc/uucp/Dialers'.
expect: ("")
got it
expect: ("")
got it
getto ret 10
expect: ("")
got it
expect: (in:)
^M^M^Jlogin:got it
sendthem (ppp^M)
expect: (word:)
ppp^M^JPassword:got it
sendthem (ppp123^M)
call cleanup(0)^M
08:22:39 000023 ipdptp0 PPP DIAG OPEN
.....................................
hyundai3# ping h-ppp
h-ppp is alive
hyundai3# ping w-ppp
w-ppp is alive
hyundai3# telnet w-ppp
Trying 203.240.150.81...
Connected to w-ppp.
Escape character is '^]'.
UNIX(r) System V Release 4.0 (wybee)
login: root
Last login: Wed May 8 13:47:17 from h-ppp
Sun Microsystems Inc. SunOS 5.5 Generic November 1995
wybee#
2) routing.
mymy# more /etc/hosts
# Sun Host Database
#
# If the NIS is running, this file is only consulted when booting
#
127.0.0.1 localhost
#
##################################################
## Router Address
##################################################
203.240.159.33 router
202.30.143.101 nms.aminet.co.kr
202.30.128.20 ami3000.hei.co.kr ami3000 # Web server
202.30.128.40 ami2000.hei.co.kr ami2000
##################################################
##Axil SE.
##################################################
203.240.159.36 mymy.svc.hei.co.kr mymy loghost
203.240.159.35 hyundai3.svc.hei.co.kr hyundai3
203.240.159.41 wybee.svc.hei.co.kr wybee
##################################################
#ETC
##################################################
203.240.150.80 h-ppp
203.240.150.81 w-ppp
wybee# more /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
203.240.157.81 wybee loghost
203.240.159.35 hyundai3
203.240.159.36 mymy
203.240.150.81 w-ppp
203.240.150.80 h-ppp
mymy# route add host w-ppp hyundai3 1
add host w-ppp: gateway hyundai3.svc.hei.co.kr
mymy# ping w-ppp
w-ppp is alive
mymy#
wybee# route add host mymy h-ppp 1
add host mymy: gateway h-ppp
wybee# ping mymy
no answer from mymy
wybee# ping mymy
mymy is alive
wybee# rlogin mymy
Last login: Fri May 12 08:26:17 from hyundai3.svc.hei
Sun Microsystems Inc. SunOS 5.5 Generic November 1995
You have new mail.
mymy#
mymy# rlogin w-ppp
Last login: Fri May 10 11:54:17 on console
Sun Microsystems Inc. SunOS 5.5 Generic November 1995
wybee#
6. Internet Connection and W.W.W test (/etc/resolv.conf , /etc/nsswitch.conf)
6-1) Proxy server: hyundai3
hyunda3# /usr/ns-proxy/start-proxy
hyundai3# more start*
#!/bin/sh
# (c) Netscape Communications Corporation. All rights reserved.
#
# Start the Garbage Collector (if caching is turned on)
#
/usr/ns-proxy/ns-gc -d /usr/ns-proxy/admin/config &
#
# Start the proxy server daemon
#
/usr/ns-proxy/ns-proxy -d /usr/ns-proxy/admin/config $*
hyundai3# ps -ef |grep pro
nobody 328 306 0 10:11:12 ? 0:00 /usr/ns-proxy/ns-proxy -d
/usr/ns-proxy/admin/config
root 349 334 0 10:15:04 pts/4 0:00 grep pro
script(/etc/rc2.d/S*proxy) 를 만들어서 auto-restart (booting) 가능.
(netscape 에서 http://hyundai3:8080/admin/ 로 들어가서
process control field 에서 restart 가능.)
w-ppp 에서 netscape test OK ( speed problem)
6-2) Speed up test(9600 --> 19200 --> 38400)
baud 38400 is supported . (admintool,/etc/uucp/Systems)
admintool: terminal mode, 38400 baud
/etc/uucp/Systems:h-ppp Any Direct 38400 direct "" P_ZERO in: ppp word: ppp123
10:29:30 parse_config_file: Successful configuration
10:29:32 process_ipd_msg: ipdptp0 needs connection
conn(h-ppp)
Trying entry from '/etc/uucp/Systems' - device type Direct.
Device Type Direct wanted
Trying device entry 'term/a' from '/etc/uucp/Devices'.
processdev: calling setdevcfg(ppp, Direct)
fd_mklock: ok
fixline(8, 38400)
gdial(direct) called
Trying caller script 'direct' from '/etc/uucp/Dialers'.
expect: ("")
got it
expect: ("")
got it
getto ret 10
expect: ("")
got it
expect: (in:)
^M^M^Jlogin:got it
sendthem (ppp^M)
expect: (word:)
ppp^M^JPassword:got it
sendthem (ppp123^M)
call cleanup(0)^M
10:43:42 002401 ipdptp0 PPP DIAG OPEN
10:43:42 002402 ipdptp0 SEND PPP ASYNC 29 Octets LCP Config-Req ID=05
LEN=24 MRU=1500 ACCM=00000000 MAG#=446bb1d2 ProtFCOMP AddrCCOMP
......
w-ppp 에서 www 사용시 9600 보다 상당히 양호한 빠른속도 가능.
ex) http://www.sun.com
7. Trouble shooting.
7-1)RS232C(2.3.7) 인 경우 발생, Full spec 사용할것.
wybee# tail -f *
conn(hyundai3)
Trying entry from '/etc/uucp/Systems' - device type Direct.
Device Type Direct wanted
Trying device entry 'term/a' from '/etc/uucp/Devices'.
processdev: calling setdevcfg(ppp, Direct)
timed out
generic open timeout
set interface UNIX
getto ret -1
Call Failed: CAN'T ACCESS DEVICE
<----- rs232c(2,3,7) 인 경우발생. full spec 사용할것)
wybee#/etc/init.d/asppp stop
wybee#/etc/init.d/asppp start
14:50:19 Link manager (82) exited 05/08/96
14:50:25 Link manager (316) started 05/08/96
14:50:25 parse_config_file: Successful configuration
14:50:29 process_ipd_msg: ipdptp0 needs connection
conn(hyundai3)
Trying entry from '/etc/uucp/Systems' - device type Direct.
Device Type Direct wanted
Trying device entry 'term/a' from '/etc/uucp/Devices'.
processdev: calling setdevcfg(ppp, Direct)
timed out
generic open timeout
set interface UNIX
getto ret -1
Call Failed: CAN'T ACCESS DEVICE
<----- rs232c(2,3,7) 인 경우발생. full spec 사용할것)
7-2) Server 의 ppp user id , passwd 확인할것.
wybee# tail -f /var/adm/log/asppp.log
....
expect: ("")
got it
expect: (in:)
^J^J^Jlogin:got it
sendthem (ppp^M)
expect: (word:)
lost line errno - 0
close caller (8)
delock line (term/a)
Call Failed: LOGIN FAILED
or
failed to lock device /dev/term/a
set interface UNIX
getto ret -1
Call Failed: DEVICE LOCKED
sol) remote system 의 ppp user id passwd 확인
ex)passwd ppp
ppp123
7-3) client 의 log file 확인
14:26:26 parse_config_file: Successful configuration
14:26:29 process_ipd_msg: ipdptp0 needs connection
conn(h-ppp)
Trying entry from '/etc/uucp/Systems' - device type Direct.
Device Type Direct wanted
Trying device entry 'term/a' from '/etc/uucp/Devices'.
processdev: calling setdevcfg(ppp, Direct)
fd_mklock: ok
fixline(8, 38400)
gdial(direct) called
Trying caller script 'direct' from '/etc/uucp/Dialers'.
expect: ("")
got it
expect: ("")
got it
getto ret 8
expect: ("")
got it
expect: (in:)
~~^@x~x~^@~`x`x^@^@timed out
close caller (8)
delock line (term/a)
Call Failed: LOGIN FAILED
sol) system 의 baud rate 확인(9600 or 38400)
8. Q/A
1) How can I get PPP to always keep the line active?
sol) add this line to /etc/asppp.cf:
inactivity_timeout 0
2) what does in.routed do?
sol) in.routed 는 routing table 내의 특정한 networks 와 hosts 에 route를 관리
하며 다른 router 에게 routing information 을 제공하거나 information 을
받을수 있도록 구성될수 있으며 routing information 을 broadcast 할수는없다.
in.routed 는
- RIP packets 을 위한 모든 interface 를 listen and routing table 에
route 를 add 함.
- 정기적으로 최근에 갱신되지않았던 routes 를 expire 한다.
- -q mode(quite mode) 로 돌지않을때는 모든 system 의 interface 에
broadcast 한다.
in.routed does not "look" for routes, it just listens to other routers
that pass on their routing table.
n.routed is started (and how) is decided in /etc/rc2.d/S69inet.
만약 /etc/defaultrouter 이 존재하면 in.routed 는 구동되지않고 routing table
은 이 화일에 있는 ip address를 가리키는 하나의 default route 를 가지며 이것
이 바로 static routing 이다.
만약 시스템이 boot 시에 오직한개의 interface 만을 갖는다면, in.routed 가
quite mode 로 구동되며 이것은 RIP packets 를 listen 하고 routing table 을
update 하게 된다.그러나 이것은 시스템의 어떠한 route 에대해서도
advertise 는 하지않는다.
만약 시스템이 두개 또는 그이상의 interface 를 갖거나 /etc/gateways 를
갖는다면 in.routed 는 구동하게되고 30 초마다 모든 system 의 interface 에
routing table 을 전송한다.
하나의 interface 에 대해 system route 를 broadcasting 하는것을 방지하기
위해서 /etc/gateways 에 norip 를 넣을수가 있으며 이것은
in.routed 가 RIP packet 을 ppp interface 에 전송하는것을 방지한다.
이것은 당신이 in.routed 를 구동하여 PPP link 를 통하여 매30초마다 RIP
packet 을 전송하는것을 방지하면서 ppp link 의 active 를 유지하는데
상당히 유용하다.
in.routed 는 또한 "noripin "와 "noripout "
의 syntax 도 가능하다.
3) what does in.rdisc do?
in.rdisc (router discovery) 는 routing table 에서의 default route를
관리하는데 도움을 준다.
/etc/defaultrouter file 이 존재하면 in.routed 는 구동되지않고
routing table 은 default route 를 가지며 이 화일에 있는 ip address를
가리키며 이것이 바로 static routing 이다.
만약 시스템이 오직하나의 interface 만 가지게되면(host 로 구성되면)
in.rdisc 는 세개의 quick multicast messages 를 모든 interfaces 에 보내
근처에 다른 routers 가 있는가를 찾는다. 만약 찾지못하면 exit 하고
in.routed 는 -q mode 로 구동될것이다. 만약, interface 중의 하나가 dialing
out 이 가능한 PPP interface 이면 첫번째 packet 는 aspppd 가 이 interface
위에 dial-out 을 하게 할것이다.
만약 시스템이 두개 또는 그 이상의 interface 를 가지면(configured as a
router), in.rdisc 는 multicast messages 를 전송하는데 이 messages 는
router 로써 자기시스템을 advertising 한다.
그리고 이것은 매 10 분마다 multicast advertisement packets 를 전송한다.
in.router will run as well.
You can disable in.rdisc from running by setting up static routing with
an /etc/defaultrouter file, or by doing:
# mv /usr/sbin/in.rdisc /usr/sbin/in.rdisc.save
4)Is the 'call cleanup(0)' message an error?
sol) No, this is normal after the connection has been established with
the remote end and before the PPP protocol is exchanged between the
two systems.
9. Appendix
A:PC configuration to use PC/TCP PPP module. (by PC team)
* 이것은 PC engineer 의 도움을 받음.(PC <--direct--> W/S)
1) 현대 pctcp를install 할때 ppp module까지 설치한다.
2) pctcp.ini file에 다음 사항을 추가한다.
-----------------------------------
| [pctcp comscrpt toppp] |
| dialup=c:\pctcp\dialup.scr |
| hangup=c:\pctcp\hangup.scr |
| serial=0 ------------------------------
| accm=0x000a0000 | |
| addr-ctrl-field-comp=on | |
| mru=1500 | |
| prot-field-comp=on | |
| local-ip-address=0.0.0.0 -------------------> 항상 0.0.0.0로..
| remote-ip-address=0.0.0.0 -------------------> 항상 0.0.0.0로..
| swint=0x60 | |
| | |
| [pctcp serial 0]<---------------------------
| baud=9600 |
| hardware-flow-control=on |
| io-addr=0x3F8 |
| irq=4 |
| port=1 |
-----------------------------------
3) dialup.scr file에서 전화번호를 실제 연결할곳의 번호로 수정
4)prompt상에서 다음 순서로 입력
C:\PCTCP> set pctcp=c:\pctcp\pctcp.ini
C:\PCTCP> ppp16550.com -v0x60 -p1 -b9600
---- --- ------
| | |
| | ----> 전송 속도
| ---------> COM1 PORT
--------------> software interrupt(0x60 - 0x7e)
C:\PCTCP> pppdrv
C:\PCTCP> comscrpt toppp dialup
----- ------
|
-------------------> 위에 추가한 항목 이름
C:\PCTCP> inet ipcp config
C:\PCTCP> ping ppp-server
B:Async PPP setup for Solaris 2.5 with modem.
1) 위의 구성도 와 동일하며 다만 중간에 modem 만 둠.
Modemo dialing 부분에 대해언급하며 나머지는 direct 와 똑같다.
|__________________________________________________|
| | 203.240.159.X |
------------
| hyundai3 | 203.240.159.35
| h-ppp | 203.240.150.35
------------
|
|
--------
| Modem | 기종: X-TAL7181 (콤텍)
-------- 9600, T.284 (528-9284)
|
|
|
|
|
|
--------
| Modem | 기종: AT-2814SAM (SMART MODEM)
-------- 9600, T.319 (528-9319)
|
|
-------------
| w-ppp | 203.240.150.81
| wybee | 203.240.158.81
-------------
| 203.240.158.X
|_________________|___________________________|
| |
2) Server configuration
* admintool 로서 bi-direction mode setting.
hyundai3# sacadm -l
PMTAG PMTYPE FLGS RCNT STATUS COMMAND
tcp listen - 999 ENABLED /usr/lib/saf/listen tcp #
zsmon ttymon - 0 ENABLED /usr/lib/saf/ttymon #
hyundai3#pmadm -l
zsmon ttymon ttya u root /dev/term/a b - /usr/bin/login - 9600
ldterm,ttcompat login: - - n #
* hyundai3# fgrep cuaa /etc/remote
cuaa:dv=/dev/cua/a:br#9600
* hyundai3#tip cuaa
OK
at&f (공장출하시 초기값으로 세팅)
ref) server 쪽 modem setting 값
hyundai3# tip cuaa
all ports busy
hyundai3# fuser -k /dev/term/a
/dev/term/a: 555o 94o
hyundai3# tip cuaa
connected
tz
OK
at&v
ACTIVE PROFILE:
B0 E1 L0 M1 N1 Q0 T V1 W0 X0 Y1 &C1 &D3 &G0 &J0 &K3 &Q5 &R0 &S1 &T4 &X0 &Y0
S00:001 S01:000 S02:043 S03:013 S04:010 S05:008 S06:002 S07:050 S08:002 S09:006
S10:014 S11:095 S12:050 S18:000 S25:005 S26:001 S36:007 S37:000 S38:020 S44:003
S46:138 S48:007 S49:008 S50:255
STORED PROFILE 0:
B0 E1 L0 M1 N1 Q0 T V1 W0 X0 Y1 &C1 &D3 &G0 &J0 &K3 &Q5 &R0 &S1 &T4 &X0
S00:001 S02:043 S06:002 S07:050 S08:002 S09:006 S10:014 S11:095 S12:050 S18:000
S25:005 S26:001 S36:007 S37:000 S38:020 S44:003 S46:138 S48:007 S49:008 S50:255
STORED PROFILE 1:
B0 E1 L0 M1 N1 Q0 T V1 W0 X0 Y1 &C1 &D3 &G0 &J0 &K3 &Q5 &R0 &S1 &T4 &X0
S00:001 S02:043 S06:002 S07:050 S08:002 S09:006 S10:014 S11:095 S12:050 S18:000
S25:005 S26:001 S36:007 S37:000 S38:020 S44:003 S46:138 S48:007 S49:008 S50:255
TELEPHONE NUMBERS:
0= 1=
2= 3=
OK
3) client configuration
* admintool 로서 bi-direction mode setting.
wybee# sacadm -l
PMTAG PMTYPE FLGS RCNT STATUS COMMAND
tcp listen - 999 ENABLED /usr/lib/saf/listen tcp #
zsmon ttymon - 0 ENABLED /usr/lib/saf/ttymon #
wybee#pmadm -l
zsmon ttymon ttya u root /dev/term/a b - /usr/bin/login - 9600
ldterm,ttcompat login: - - n #
* wybee# fgrep cuaa /etc/remote
cuaa:dv=/dev/cua/a:br#9600
* hyundai3#tip cuaa
OK
at&f (공장출하시 초기값으로 세팅)
* wybee# more /etc/uucp/Devices
#######################
ACU cua/a - Any hayes
#######################
* wybee# fgrep hayes Dialers
#########################################################
hayes =,-, "" \dA\pTE1V1X1Q0S2=255S12=255\r\c OK\r
\EATDT\T\r\c CONNECT
#########################################################
( Dialers 의 default 값을 그대로 사용, 즉, Devices 에서 hayes 로
선언하면 Dialers 의 미리준비된 hayes 의 script 를 자동실행함.
* wybee# more /etc/uucp/Systems
######################################################
h-ppp Any ACU 9600 284 "" P_ZERO in: ppp word: ppp123
######################################################
3) Network test
wybee# ping h-ppp
wybee#tail -f /var/adm/log/asppp.log
........
17:01:23 parse_config_file: Successful configuration
17:01:34 process_ipd_msg: ipdptp0 needs connection
conn(h-ppp)
Trying entry from '/etc/uucp/Systems' - device type ACU.
Device Type ACU wanted
Trying device entry 'cua/a' from '/etc/uucp/Devices'.
processdev: calling setdevcfg(ppp, ACU)
fd_mklock: ok
fixline(8, 9600)
gdial(hayes) called
Trying caller script 'hayes' from '/etc/uucp/Dialers'.
expect: ("")
got it
sendthem (DELAY
APAUSE
TE1V1X1Q0S2=255S12=255^M)
expect: (OK^M)
ATE1V1X1Q0S2=255S12=255^M^M^JOK^Mgot it
sendthem (ECHO CHECK ON
A^JATTDDTT228844^M^M)
expect: (CONNECT)
^M^JCONNECTgot it
getto ret 8
expect: ("")
got it
expect: (in:)
9600^M^J^M^M^Jlogin:got it
sendthem (ppp^M)
expect: (word:)
ppp^M^JPassword:got it
sendthem (ppp123^M)
call cleanup(0)^M
17:02:11 000035 ipdptp0 SEND PPP ASYNC 23 Octets LCP Config-Req ID=04 LEN=18 MRU=1500 MAG#=b1afca2b ProtFCOMP AddrCCOMP
17:02:11 000036 ipdptp0 RECEIVE {Unescaped characters: 0a 0d } PPP ASYNC 47 Octets {BAD FCS} NB (AP) {Unrecognized protocol: d 0a 4c 61 73 74 20 6c 6f 67 69
6e 3a 20 54 75 65 20 4d 61 79 ..... }
17:02:11 000037 ipdptp0 RECEIVE PPP ASYNC 6 Octets {BAD FCS} NB LCP {Bad lcp size} 01
17:02:11 000038 ipdptp0 RECEIVE PPP ASYNC 29 Octets NB LCP Config-Req ID=03 LEN=24 MRU=1500 ACCM=00000000 MAG#=45a9e369 ProtFCOMP AddrCCOMP
17:02:11 000039 ipdptp0 SEND PPP ASYNC 23 Octets NB LCP Config-Req ID=05 LEN=18 MRU=1500 MAG#=b1afca2b ProtFCOMP AddrCCOMP
17:02:11 000040 ipdptp0 SEND PPP ASYNC 29 Octets NB LCP Config-ACK ID=03 LEN=24 MRU=1500 ACCM=00000000 MAG#=45a9e369 ProtFCOMP AddrCCOMP
17:02:12 000041 ipdptp0 RECEIVE PPP ASYNC 29 Octets NB LCP Config-Req ID=04 LEN=24 MRU=1500 ACCM=00000000 MAG#=45a9e369 ProtFCOMP AddrCCOMP
17:02:12 000042 ipdptp0 SEND PPP ASYNC 29 Octets NB LCP Config-ACK ID=04 LEN=24 MRU=1500 ACCM=00000000 MAG#=45a9e369 ProtFCOMP AddrCCOMP
17:02:12 000043 ipdptp0 RECEIVE PPP ASYNC 23 Octets NB LCP Config-ACK ID=05 LEN=18 MRU=1500 MAG#=b1afca2b ProtFCOMP AddrCCOMP
17:02:12 000044 ipdptp0 SEND PPP ASYNC 21 Octets NB (A) IP_NCP Config-Req ID=06 LEN=16 VJCOMP MAXSID=15 Sid-comp-OK IPADDR=203.240.150.81
17:02:12 000045 ipdptp0 RECEIVE PPP ASYNC 21 Octets NB (A) IP_NCP Config-Req ID=05 LEN=16 VJCOMP MAXSID=15 Sid-comp-OK IPADDR=203.240.150.80
17:02:12 000046 ipdptp0 SEND PPP ASYNC 21 Octets NB (A) IP_NCP Config-ACK ID=05 LEN=16 VJCOMP MAXSID=15 Sid-comp-OK IPADDR=203.240.150.80
17:02:12 000047 ipdptp0 RECEIVE PPP ASYNC 21 Octets NB (A) IP_NCP Config-ACK ID=06 LEN=16 VJCOMP MAXSID=15 Sid-comp-OK IPADDR=203.240.150.81
17:02:12 start_ip: IP up on interface ipdptp0, timeout set for 0 seconds
17:02:12 000048 ipdptp0 SEND PPP ASYNC 89 Octets NB (AP) IP_PROTO 45 00 00 54 b0 30 40 00 ff 01 06 f5 cb f0 96 51 cb f0 96 50 .....
wybee# ping h-ppp
h-ppp is alive
wybee#
wybee#
wybee# rlogin h-ppp
Password:
Last login: Tue May 23 17:13:36 from w-ppp
Sun Microsystems Inc. SunOS 5.5 Generic November 1995
You have new mail.
hyundai3#
4) Login 과정.
* client 에서 ping h-ppp 하면 h-ppp 의 /etc/uucp/Systems 의 file 을 뒤져서
login 을 하게된는데 이때 /etc/uucp/Devices 의 마지막 필드를 참고하여
다이얼링하는데 여기서는 hayes 이므로 /etc/uucp/Dialers 의 hayes field
의 script 를 수행한다. 따라서 client에서 전화를 걸면 server 쪽의 모뎀에서
connection 를 연결하게된다.
이때 주의할점은 모뎀의 setting 값이 혹시문제가 될수도 있다. 즉,
parameter 값이 다를수가 있으므로 저 같은경우는 공장 setting 값으로
초기화 시킴. 실제 다음과 같은 error 가 발생함.
wybee#tail /var/adm/asppp.log
...............
16:54:42 parse_config_file: Successful configuration
16:54:51 process_ipd_msg: ipdptp0 needs connection
conn(h-ppp)
Trying entry from '/etc/uucp/Systems' - device type ACU.
Device Type ACU wanted
Trying device entry 'cua/a' from '/etc/uucp/Devices'.
processdev: calling setdevcfg(ppp, ACU)
fd_mklock: ok
fixline(8, 9600)
gdial(hayes) called
Trying caller script 'hayes' from '/etc/uucp/Dialers'.
expect: ("")
got it
sendthem (DELAY
APAUSE
TE1V1X1Q0S2=255S12=255^M)
expect: (OK^M)
ATE1V1X1Q0S2=255S12=255^M^M^JOK^Mgot it
sendthem (ECHO CHECK ON
A^JATTDDTT228844^M^M)
expect: (CONNECT)
timed out
CHAT gdial(hayes) FAILED
set interface UNIX
getto ret -1
Call Failed: CALLER SCRIPT FAILED
Revision History
작성일자 : 96.06.12
작성자 : 이승훈
수정일자 :
수정자