> mpd 3.18
> FreeBSD 4.9-RELEASE
> Mpd kill default route , after interface up.
uname -a
FreeBSD 4.9-RELEASE FreeBSD 4.9-RELEASE #2: Tue Jun 15 11:08:21 GMT 2004
========================================================================#
ifconfig -a
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=3<rxcsum,txcsum>
inet 192.168.0.254 netmask 0xffffff00 broadcast 192.168.0.255
ether 00:10:4b:9f:38:ec
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=3<rxcsum,txcsum>
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
ether 00:50:04:33:e6:a9
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
ng0: flags=8890<POINTOPOINT,NOARP,SIMPLEX,MULTICAST> mtu 1500
ng1: flags=8890<POINTOPOINT,NOARP,SIMPLEX,MULTICAST> mtu 1500
ng2: flags=8890<POINTOPOINT,NOARP,SIMPLEX,MULTICAST> mtu 1500
============================================================netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.0.25 UGSc 0 0 xl0
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.0 link#1 UC 2 0 xl0
192.168.0.25 00:50:04:33:e6:b8 UHLW 1 6 xl0 922
192.168.0.31 00:50:04:34:77:99 UHLW 1 127 xl0 1197
192.168.2 link#2 UC 0 0 xl1
===========================================mpd.conf
default:
load client0
load client1
load client2
client0:
new -i ng0 pptp0 pptp0
set iface enable on-demand
set iface disable proxy-arp
set iface idle 0
set bundle disable multilink
set link yes acfcomp protocomp
set link no pap chap
set link enable chap
set link keep-alive 10 60
set link mtu 1460
set ipcp yes vjcomp
set ipcp ranges 172.16.1.1 172.16.1.2/32
set ipcp dns 192.168.0.25
client1:
new -i ng1 pptp1 pptp1
set iface enable on-demand
set iface disable proxy-arp
set iface idle 0
set bundle disable multilink
set link yes acfcomp protocomp
set link no pap chap
set link enable chap
set link keep-alive 10 60
set link mtu 1460
set ipcp yes vjcomp
set ipcp ranges 172.16.1.1 172.16.1.3/32
set ipcp dns 192.168.0.25
client2:
new -i ng2 pptp2 pptp2
set iface enable on-demand
set iface disable proxy-arp
set iface idle 0
set bundle disable multilink
set link yes acfcomp protocomp
set link no pap chap
set link enable chap
set link keep-alive 10 60
set link mtu 1460
set ipcp yes vjcomp
set ipcp ranges 172.16.1.1 172.16.1.4/32
set ipcp dns 192.168.0.25
=======================================================mpd.secret
user **** 172.16.1.2
user1 **** 172.16.1.3
user2 **** 172.16.1.4
=======================================================mpd.links
pptp0:
set link type pptp
set pptp enable incoming
set pptp disable originate
pptp1:
set link type pptp
set pptp enable incoming
set pptp disable originate
pptp2:
set link type pptp
set pptp enable incoming
set pptp disable originate
=====================================================================================================================================================================[pptp2:pptp2]
mpd: PPTP connection from 192.168.2.2:1107
pptp0: attached to connection with 192.168.2.2:1107
[pptp1] IFACE: Open event
[pptp1] setting interface ng1 MTU to 1500 bytes
[pptp1] exec: /sbin/ifconfig ng1 0.0.0.0 0.0.0.0 netmask 0xffffffff link0
[pptp1] exec: command returned 256
[pptp1] exec: /sbin/route add 0.0.0.0 -iface lo0
[pptp1] exec: command returned 256
[pptp1] IPCP: Open event
[pptp1] IPCP: state change Initial --> Starting
[pptp1] IPCP: LayerStart
[pptp1] bundle: OPEN event in state CLOSED
[pptp1] opening link "pptp1"...
[pptp1] link: OPEN event
[pptp1] LCP: Open event
[pptp1] LCP: state change Initial --> Starting
[pptp1] LCP: LayerStart
[pptp1] device: OPEN event in state DOWN
[pptp1] attaching to peer's outgoing call
[pptp1] device is now in state OPENING
[pptp1] device: UP event in state OPENING
[pptp1] device is now in state UP
[pptp1] link: UP event
[pptp1] link: origination is remote
[pptp1] LCP: Up event
[pptp1] LCP: state change Starting --> Req-Sent
[pptp1] LCP: phase shift DEAD --> ESTABLISH
[pptp1] LCP: SendConfigReq #1
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM aa084894
AUTHPROTO CHAP MSOFTv2
[pptp1] LCP: rec'd Configure Request #1 link 0 (Req-Sent)
ACCMAP 0x000a0000
MAGICNUM 08b2e4c6
PROTOCOMP
ACFCOMP
CALLBACK
Not supported
[pptp1] LCP: SendConfigRej #1
CALLBACK
[pptp1] LCP: rec'd Configure Nak #1 link 0 (Req-Sent)
AUTHPROTO CHAP MSOFT
[pptp1] LCP: SendConfigReq #2
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM aa084894
AUTHPROTO CHAP MSOFT
[pptp1] LCP: rec'd Configure Request #2 link 0 (Req-Sent)
ACCMAP 0x000a0000
MAGICNUM 08b2e4c6
PROTOCOMP
ACFCOMP
[pptp1] LCP: SendConfigAck #2
ACCMAP 0x000a0000
MAGICNUM 08b2e4c6
PROTOCOMP
ACFCOMP
[pptp1] LCP: state change Req-Sent --> Ack-Sent
[pptp1] LCP: rec'd Configure Ack #2 link 0 (Ack-Sent)
ACFCOMP
PROTOCOMP
MRU 1500
MAGICNUM aa084894
AUTHPROTO CHAP MSOFT
[pptp1] LCP: state change Ack-Sent --> Opened
[pptp1] LCP: phase shift ESTABLISH --> AUTHENTICATE
[pptp1] LCP: auth: peer wants nothing, I want CHAP
[pptp1] CHAP: sending CHALLENGE
[pptp1] LCP: LayerUp
[pptp1] CHAP: rec'd RESPONSE #1
Name: "cfibre.com\user"
Peer name: "user"
Response is valid
[pptp1] CHAP: sending SUCCESS
[pptp1] LCP: authorization successful
[pptp1] LCP: phase shift AUTHENTICATE --> NETWORK
[pptp1] setting interface ng1 MTU to 1460 bytes
[pptp1] up: 1 link, total bandwidth 64000 bps
[pptp1] IPCP: Up event
[pptp1] IPCP: state change Starting --> Req-Sent
[pptp1] IPCP: SendConfigReq #1
IPADDR 172.16.1.1
COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
[pptp1] IPCP: rec'd Configure Request #1 link 0 (Req-Sent)
COMPPROTO VJCOMP, 16 comp. channels, allow comp-cid
IPADDR 0.0.0.0
NAKing with 172.16.1.3
PRIDNS 0.0.0.0
NAKing with 192.168.0.25
PRINBNS 0.0.0.0
SECDNS 0.0.0.0
SECNBNS 0.0.0.0
[pptp1] IPCP: SendConfigRej #1
PRINBNS 0.0.0.0
SECDNS 0.0.0.0
SECNBNS 0.0.0.0
[pptp1] rec'd unexpected protocol CCP on link 0, rejecting
[pptp1] IPCP: rec'd Configure Ack #1 link 0 (Req-Sent)
IPADDR 172.16.1.1
COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
[pptp1] IPCP: state change Req-Sent --> Ack-Rcvd
[pptp1] IPCP: rec'd Configure Request #2 link 0 (Ack-Rcvd)
COMPPROTO VJCOMP, 16 comp. channels, allow comp-cid
IPADDR 0.0.0.0
NAKing with 172.16.1.3
PRIDNS 0.0.0.0
NAKing with 192.168.0.25
[pptp1] IPCP: SendConfigNak #2
IPADDR 172.16.1.3
PRIDNS 192.168.0.25
[pptp1] IPCP: rec'd Configure Request #3 link 0 (Ack-Rcvd)
COMPPROTO VJCOMP, 16 comp. channels, allow comp-cid
IPADDR 172.16.1.3
172.16.1.3 is OK
PRIDNS 192.168.0.25
[pptp1] IPCP: SendConfigAck #3
COMPPROTO VJCOMP, 16 comp. channels, allow comp-cid
IPADDR 172.16.1.3
PRIDNS 192.168.0.25
[pptp1] IPCP: state change Ack-Rcvd --> Opened
[pptp1] IPCP: LayerUp
172.16.1.1 -> 172.16.1.3
[pptp1] IFACE: Up event
[pptp1] exec: /sbin/route delete 0.0.0.0 -iface lo0
[pptp1] exec: /sbin/ifconfig ng1 down delete -link0
[pptp1] exec: command returned 256
[pptp1] setting interface ng1 MTU to 1460 bytes
[pptp1] exec: /sbin/ifconfig ng1 172.16.1.1 172.16.1.3 netmask 0xffffffff -link0
[pptp1] exec: /sbin/route add 172.16.1.1 -iface lo0
[pptp1] IFACE: Up event
show routes
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
127.0.0.1 127.0.0.1 UH 0 0 lo0
172.16.1.1 lo0 UHS 0 0 lo0
172.16.1.3 172.16.1.1 UH 0 23 ng1
192.168.0 link#1 UC 2 0 xl0
192.168.0.25 00:50:04:33:e6:b8 UHLW 0 6 xl0 459
192.168.0.31 00:50:04:34:77:99 UHLW 1 405 xl0 1109
192.168.2 link#2 UC 1 0 xl1
192.168.2.2 00:00:86:1f:68:5b UHLW 2 51 xl1 1134