16a3193a7SBrian Somers.\" 26a3193a7SBrian Somers.\" Copyright (c) 2001 Brian Somers <brian@Awfulhak.org> 36a3193a7SBrian Somers.\" All rights reserved. 46a3193a7SBrian Somers.\" 56a3193a7SBrian Somers.\" Redistribution and use in source and binary forms, with or without 66a3193a7SBrian Somers.\" modification, are permitted provided that the following conditions 76a3193a7SBrian Somers.\" are met: 86a3193a7SBrian Somers.\" 1. Redistributions of source code must retain the above copyright 96a3193a7SBrian Somers.\" notice, this list of conditions and the following disclaimer. 106a3193a7SBrian Somers.\" 2. Redistributions in binary form must reproduce the above copyright 116a3193a7SBrian Somers.\" notice, this list of conditions and the following disclaimer in the 126a3193a7SBrian Somers.\" documentation and/or other materials provided with the distribution. 136a3193a7SBrian Somers.\" 146a3193a7SBrian Somers.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 156a3193a7SBrian Somers.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 166a3193a7SBrian Somers.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 176a3193a7SBrian Somers.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 186a3193a7SBrian Somers.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 196a3193a7SBrian Somers.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 206a3193a7SBrian Somers.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 216a3193a7SBrian Somers.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 226a3193a7SBrian Somers.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 236a3193a7SBrian Somers.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 246a3193a7SBrian Somers.\" SUCH DAMAGE. 256a3193a7SBrian Somers.\" 26cb21fa3dSDamjan Jovanovic.Dd December 6, 2024 276a3193a7SBrian Somers.Dt PPP 8 286a3193a7SBrian Somers.Os 296a3193a7SBrian Somers.Sh NAME 306a3193a7SBrian Somers.Nm ppp 316a3193a7SBrian Somers.Nd Point to Point Protocol (a.k.a. user-ppp) 326a3193a7SBrian Somers.Sh SYNOPSIS 336a3193a7SBrian Somers.Nm 346a3193a7SBrian Somers.Op Fl Va mode 356a3193a7SBrian Somers.Op Fl nat 366a3193a7SBrian Somers.Op Fl quiet 376a3193a7SBrian Somers.Op Fl unit Ns Ar N 386a3193a7SBrian Somers.Op Ar system ... 396a3193a7SBrian Somers.Sh DESCRIPTION 406a3193a7SBrian SomersThis is a user process 416a3193a7SBrian Somers.Em PPP 426a3193a7SBrian Somerssoftware package. 436a3193a7SBrian SomersSometimes, 446a3193a7SBrian Somers.Em PPP 456a3193a7SBrian Somersis implemented as a part of the kernel (e.g., as managed by 466a3193a7SBrian Somers.Nm pppd ) 476a3193a7SBrian Somersand it is thus somewhat hard to debug and/or modify its behaviour. 486a3193a7SBrian SomersHowever, in this implementation 496a3193a7SBrian Somers.Em PPP 506a3193a7SBrian Somersis done as a user process with the help of the 516a3193a7SBrian Somerstunnel device driver (tun). 526a3193a7SBrian Somers.Pp 536a3193a7SBrian SomersThe 546a3193a7SBrian Somers.Fl nat 556a3193a7SBrian Somersflag does the equivalent of a 566a3193a7SBrian Somers.Dq nat enable yes , 576a3193a7SBrian Somersenabling 586a3193a7SBrian Somers.Nm Ns No 's 596a3193a7SBrian Somersnetwork address translation features. 606a3193a7SBrian SomersThis allows 616a3193a7SBrian Somers.Nm 626a3193a7SBrian Somersto act as a NAT or masquerading engine for all machines on an internal 636a3193a7SBrian SomersLAN. 646a3193a7SBrian SomersRefer to 656a3193a7SBrian Somers.Xr libalias 3 666a3193a7SBrian Somersfor details on the technical side of the NAT engine. 676a3193a7SBrian SomersRefer to the 686a3193a7SBrian Somers.Sx NETWORK ADDRESS TRANSLATION (PACKET ALIASING) 696a3193a7SBrian Somerssection of this manual page for details on how to configure NAT in 706a3193a7SBrian Somers.Nm . 716a3193a7SBrian Somers.Pp 726a3193a7SBrian SomersThe 736a3193a7SBrian Somers.Fl quiet 746a3193a7SBrian Somersflag tells 756a3193a7SBrian Somers.Nm 766a3193a7SBrian Somersto be silent at startup rather than displaying the mode and interface 776a3193a7SBrian Somersto standard output. 786a3193a7SBrian Somers.Pp 796a3193a7SBrian SomersThe 806a3193a7SBrian Somers.Fl unit 816a3193a7SBrian Somersflag tells 826a3193a7SBrian Somers.Nm 836a3193a7SBrian Somersto only attempt to open 846a3193a7SBrian Somers.Pa /dev/tun Ns Ar N . 856a3193a7SBrian SomersNormally, 866a3193a7SBrian Somers.Nm 876a3193a7SBrian Somerswill start with a value of 0 for 886a3193a7SBrian Somers.Ar N , 896a3193a7SBrian Somersand keep trying to open a tunnel device by incrementing the value of 906a3193a7SBrian Somers.Ar N 916a3193a7SBrian Somersby one each time until it succeeds. 926a3193a7SBrian SomersIf it fails three times in a row 936a3193a7SBrian Somersbecause the device file is missing, it gives up. 946a3193a7SBrian Somers.Pp 956a3193a7SBrian SomersThe following 966a3193a7SBrian Somers.Va mode Ns No s 976a3193a7SBrian Somersare understood by 986a3193a7SBrian Somers.Nm : 996a3193a7SBrian Somers.Bl -tag -width XXX -offset XXX 1006a3193a7SBrian Somers.It Fl auto 1016a3193a7SBrian Somers.Nm 1026a3193a7SBrian Somersopens the tun interface, configures it then goes into the background. 1036a3193a7SBrian SomersThe link is not brought up until outgoing data is detected on the tun 1046a3193a7SBrian Somersinterface at which point 1056a3193a7SBrian Somers.Nm 1066a3193a7SBrian Somersattempts to bring up the link. 1076a3193a7SBrian SomersPackets received (including the first one) while 1086a3193a7SBrian Somers.Nm 1096a3193a7SBrian Somersis trying to bring the link up will remain queued for a default of 1106a3193a7SBrian Somers2 minutes. 1116a3193a7SBrian SomersSee the 1126a3193a7SBrian Somers.Dq set choked 1136a3193a7SBrian Somerscommand below. 1146a3193a7SBrian Somers.Pp 1156a3193a7SBrian SomersIn 1166a3193a7SBrian Somers.Fl auto 1176a3193a7SBrian Somersmode, at least one 1186a3193a7SBrian Somers.Dq system 1196a3193a7SBrian Somersmust be given on the command line (see below) and a 1206a3193a7SBrian Somers.Dq set ifaddr 1216a3193a7SBrian Somersmust be done in the system profile that specifies a peer IP address to 1226a3193a7SBrian Somersuse when configuring the interface. 1236a3193a7SBrian SomersSomething like 1246a3193a7SBrian Somers.Dq 10.0.0.1/0 1256a3193a7SBrian Somersis usually appropriate. 1266a3193a7SBrian SomersSee the 1276a3193a7SBrian Somers.Dq pmdemand 1286a3193a7SBrian Somerssystem in 1296a3193a7SBrian Somers.Pa /usr/share/examples/ppp/ppp.conf.sample 1306a3193a7SBrian Somersfor an example. 1316a3193a7SBrian Somers.It Fl background 1326a3193a7SBrian SomersHere, 1336a3193a7SBrian Somers.Nm 1346a3193a7SBrian Somersattempts to establish a connection with the peer immediately. 1356a3193a7SBrian SomersIf it succeeds, 1366a3193a7SBrian Somers.Nm 1376a3193a7SBrian Somersgoes into the background and the parent process returns an exit code 1386a3193a7SBrian Somersof 0. 1396a3193a7SBrian SomersIf it fails, 1406a3193a7SBrian Somers.Nm 1416a3193a7SBrian Somersexits with a non-zero result. 1426a3193a7SBrian Somers.It Fl foreground 1436a3193a7SBrian SomersIn foreground mode, 1446a3193a7SBrian Somers.Nm 1456a3193a7SBrian Somersattempts to establish a connection with the peer immediately, but never 1466a3193a7SBrian Somersbecomes a daemon. 1476a3193a7SBrian SomersThe link is created in background mode. 1486a3193a7SBrian SomersThis is useful if you wish to control 1496a3193a7SBrian Somers.Nm Ns No 's 1506a3193a7SBrian Somersinvocation from another process. 1516a3193a7SBrian Somers.It Fl direct 1526a3193a7SBrian SomersThis is used for communicating over an already established connection, 1536a3193a7SBrian Somersusually when receiving incoming connections accepted by 1546a3193a7SBrian Somers.Xr getty 8 . 1556a3193a7SBrian Somers.Nm 1566a3193a7SBrian Somersignores the 1576a3193a7SBrian Somers.Dq set device 1586a3193a7SBrian Somersline and uses descriptor 0 as the link. 1596a3193a7SBrian Somers.Nm 1606a3193a7SBrian Somerswill also ignore any configured chat scripts unless the 1616a3193a7SBrian Somers.Dq force-scripts 1626a3193a7SBrian Somersoption has been enabled. 1636a3193a7SBrian Somers.Pp 1646a3193a7SBrian SomersIf callback is configured, 1656a3193a7SBrian Somers.Nm 1666a3193a7SBrian Somerswill use the 1676a3193a7SBrian Somers.Dq set device 1686a3193a7SBrian Somersinformation when dialing back. 1696a3193a7SBrian Somers.Pp 1706a3193a7SBrian SomersWhen run in 1716a3193a7SBrian Somers.Fl direct 1726a3193a7SBrian Somersmode, 1736a3193a7SBrian Somers.Nm 1746a3193a7SBrian Somerswill behave slightly differently if descriptor 0 was created by 1756a3193a7SBrian Somers.Xr pipe 2 . 1766a3193a7SBrian SomersAs pipes are not bi-directional, ppp will redirect all writes to descriptor 1776a3193a7SBrian Somers1 (standard output), leaving only reads acting on descriptor 0. 1786a3193a7SBrian SomersNo special action is taken if descriptor 0 was created by 1796a3193a7SBrian Somers.Xr socketpair 2 . 1806a3193a7SBrian Somers.It Fl dedicated 1816a3193a7SBrian SomersThis option is designed for machines connected with a dedicated 1826a3193a7SBrian Somerswire. 1836a3193a7SBrian Somers.Nm 1846a3193a7SBrian Somerswill always keep the device open and will ignore any configured 1856a3193a7SBrian Somerschat scripts unless the 1866a3193a7SBrian Somers.Dq force-scripts 1876a3193a7SBrian Somersoption has been enabled. 1886a3193a7SBrian Somers.It Fl ddial 1896a3193a7SBrian SomersThis mode is equivalent to 1906a3193a7SBrian Somers.Fl auto 1916a3193a7SBrian Somersmode except that 1926a3193a7SBrian Somers.Nm 1936a3193a7SBrian Somerswill bring the link back up any time it is dropped for any reason. 1946a3193a7SBrian Somers.It Fl interactive 1956a3193a7SBrian SomersThis is a no-op, and gives the same behaviour as if none of the above 1966a3193a7SBrian Somersmodes have been specified. 1976a3193a7SBrian Somers.Nm 1986a3193a7SBrian Somersloads any sections specified on the command line then provides an 1996a3193a7SBrian Somersinteractive prompt. 2006a3193a7SBrian Somers.El 2016a3193a7SBrian Somers.Pp 2026a3193a7SBrian SomersOne or more configuration entries or systems 2036a3193a7SBrian Somers(as specified in 2046a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf ) 2056a3193a7SBrian Somersmay also be specified on the command line. 2066a3193a7SBrian Somers.Nm 2076a3193a7SBrian Somerswill read the 2086a3193a7SBrian Somers.Dq default 2096a3193a7SBrian Somerssystem from 2106a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 2116a3193a7SBrian Somersat startup, followed by each of the systems specified on the command line. 2126a3193a7SBrian Somers.Sh Major Features 2136a3193a7SBrian Somers.Bl -diag 2146a3193a7SBrian Somers.It Provides an interactive user interface. 2156a3193a7SBrian SomersUsing its command mode, the user can 2166a3193a7SBrian Somerseasily enter commands to establish the connection with the remote end, check 2176a3193a7SBrian Somersthe status of connection and close the connection. 2186a3193a7SBrian SomersAll functions can also be optionally password protected for security. 2196a3193a7SBrian Somers.It Supports both manual and automatic dialing. 2206a3193a7SBrian SomersInteractive mode has a 2216a3193a7SBrian Somers.Dq term 2226a3193a7SBrian Somerscommand which enables you to talk to the device directly. 2236a3193a7SBrian SomersWhen you are connected to the remote peer and it starts to talk 2246a3193a7SBrian Somers.Em PPP , 2256a3193a7SBrian Somers.Nm 2266a3193a7SBrian Somersdetects it and switches to packet mode automatically. 2276a3193a7SBrian SomersOnce you have 2286a3193a7SBrian Somersdetermined the proper sequence for connecting with the remote host, you 2296a3193a7SBrian Somerscan write a chat script to {define} the necessary dialing and login 2306a3193a7SBrian Somersprocedure for later convenience. 2316a3193a7SBrian Somers.It Supports on-demand dialup capability. 2326a3193a7SBrian SomersBy using 2336a3193a7SBrian Somers.Fl auto 2346a3193a7SBrian Somersmode, 2356a3193a7SBrian Somers.Nm 2366a3193a7SBrian Somerswill act as a daemon and wait for a packet to be sent over the 2376a3193a7SBrian Somers.Em PPP 2386a3193a7SBrian Somerslink. 2396a3193a7SBrian SomersWhen this happens, the daemon automatically dials and establishes the 2406a3193a7SBrian Somersconnection. 2416a3193a7SBrian SomersIn almost the same manner 2426a3193a7SBrian Somers.Fl ddial 2436a3193a7SBrian Somersmode (direct-dial mode) also automatically dials and establishes the 2446a3193a7SBrian Somersconnection. 2456a3193a7SBrian SomersHowever, it differs in that it will dial the remote site 2466a3193a7SBrian Somersany time it detects the link is down, even if there are no packets to be 2476a3193a7SBrian Somerssent. 2486a3193a7SBrian SomersThis mode is useful for full-time connections where we worry less 2496a3193a7SBrian Somersabout line charges and more about being connected full time. 2506a3193a7SBrian SomersA third 2516a3193a7SBrian Somers.Fl dedicated 2526a3193a7SBrian Somersmode is also available. 2536a3193a7SBrian SomersThis mode is targeted at a dedicated link between two machines. 2546a3193a7SBrian Somers.Nm 2556a3193a7SBrian Somerswill never voluntarily quit from dedicated mode - you must send it the 2566a3193a7SBrian Somers.Dq quit all 2576a3193a7SBrian Somerscommand via its diagnostic socket. 2586a3193a7SBrian SomersA 2596a3193a7SBrian Somers.Dv SIGHUP 2606a3193a7SBrian Somerswill force an LCP renegotiation, and a 2616a3193a7SBrian Somers.Dv SIGTERM 2626a3193a7SBrian Somerswill force it to exit. 2636a3193a7SBrian Somers.It Supports client callback. 2646a3193a7SBrian Somers.Nm 2656a3193a7SBrian Somerscan use either the standard LCP callback protocol or the Microsoft 26621ca690bSJose Luis DuranCallBack Control Protocol 26721ca690bSJose Luis Duran.Pq Lk https://winprotocoldocs-bhdugrdyduf5h2e4.b02.azurefd.net/MS-CBCP/%5bMS-CBCP%5d.pdf . 2686a3193a7SBrian Somers.It Supports NAT or packet aliasing. 2696a3193a7SBrian SomersPacket aliasing (a.k.a.\& IP masquerading) allows computers on a 2706a3193a7SBrian Somersprivate, unregistered network to access the Internet. 2716a3193a7SBrian SomersThe 2726a3193a7SBrian Somers.Em PPP 2736a3193a7SBrian Somershost acts as a masquerading gateway. 2746a3193a7SBrian SomersIP addresses as well as TCP and 2756a3193a7SBrian SomersUDP port numbers are NAT'd for outgoing packets and de-NAT'd for 2766a3193a7SBrian Somersreturning packets. 2776a3193a7SBrian Somers.It Supports background PPP connections. 2786a3193a7SBrian SomersIn background mode, if 2796a3193a7SBrian Somers.Nm 2806a3193a7SBrian Somerssuccessfully establishes the connection, it will become a daemon. 2816a3193a7SBrian SomersOtherwise, it will exit with an error. 2826a3193a7SBrian SomersThis allows the setup of 2836a3193a7SBrian Somersscripts that wish to execute certain commands only if the connection 2846a3193a7SBrian Somersis successfully established. 2856a3193a7SBrian Somers.It Supports server-side PPP connections. 2866a3193a7SBrian SomersIn direct mode, 2876a3193a7SBrian Somers.Nm 2886a3193a7SBrian Somersacts as server which accepts incoming 2896a3193a7SBrian Somers.Em PPP 2906a3193a7SBrian Somersconnections on stdin/stdout. 2916a3193a7SBrian Somers.It Supports PAP and CHAP (rfc 1994, 2433 and 2759) authentication. 2926a3193a7SBrian SomersWith PAP or CHAP, it is possible to skip the Unix style 2936a3193a7SBrian Somers.Xr login 1 2946a3193a7SBrian Somersprocedure, and use the 2956a3193a7SBrian Somers.Em PPP 2966a3193a7SBrian Somersprotocol for authentication instead. 2976a3193a7SBrian SomersIf the peer requests Microsoft CHAP authentication and 2986a3193a7SBrian Somers.Nm 2996a3193a7SBrian Somersis compiled with DES support, an appropriate MD4/DES response will be 3006a3193a7SBrian Somersmade. 3016a3193a7SBrian Somers.It Supports RADIUS (rfc 2138 & 2548) authentication. 3026a3193a7SBrian SomersAn extension to PAP and CHAP, 3036a3193a7SBrian Somers.Em \&R Ns No emote 3046a3193a7SBrian Somers.Em \&A Ns No ccess 3056a3193a7SBrian Somers.Em \&D Ns No ial 3066a3193a7SBrian Somers.Em \&I Ns No n 3076a3193a7SBrian Somers.Em \&U Ns No ser 3086a3193a7SBrian Somers.Em \&S Ns No ervice 3096a3193a7SBrian Somersallows authentication information to be stored in a central or 3106a3193a7SBrian Somersdistributed database along with various per-user framed connection 3116a3193a7SBrian Somerscharacteristics. 3126a3193a7SBrian SomersIf 3136a3193a7SBrian Somers.Xr libradius 3 3146a3193a7SBrian Somersis available at compile time, 3156a3193a7SBrian Somers.Nm 3166a3193a7SBrian Somerswill use it to make 3176a3193a7SBrian Somers.Em RADIUS 3186a3193a7SBrian Somersrequests when configured to do so. 3196a3193a7SBrian Somers.It Supports Proxy Arp. 3206a3193a7SBrian Somers.Nm 3216a3193a7SBrian Somerscan be configured to make one or more proxy arp entries on behalf of 3226a3193a7SBrian Somersthe peer. 3236a3193a7SBrian SomersThis allows routing from the peer to the LAN without 3246a3193a7SBrian Somersconfiguring each machine on that LAN. 3256a3193a7SBrian Somers.It Supports packet filtering. 3266a3193a7SBrian SomersUser can {define} four kinds of filters: the 3276a3193a7SBrian Somers.Em in 3286a3193a7SBrian Somersfilter for incoming packets, the 3296a3193a7SBrian Somers.Em out 3306a3193a7SBrian Somersfilter for outgoing packets, the 3316a3193a7SBrian Somers.Em dial 3326a3193a7SBrian Somersfilter to {define} a dialing trigger packet and the 3336a3193a7SBrian Somers.Em alive 3346a3193a7SBrian Somersfilter for keeping a connection alive with the trigger packet. 3356a3193a7SBrian Somers.It Tunnel driver supports bpf. 3366a3193a7SBrian SomersThe user can use 3376a3193a7SBrian Somers.Xr tcpdump 1 3386a3193a7SBrian Somersto check the packet flow over the 3396a3193a7SBrian Somers.Em PPP 3406a3193a7SBrian Somerslink. 3416a3193a7SBrian Somers.It Supports PPP over TCP and PPP over UDP. 3426a3193a7SBrian SomersIf a device name is specified as 34321ca690bSJose Luis Duran.Em host : Ns Em port Ns 3446a3193a7SBrian Somers.Xo 3456a3193a7SBrian Somers.Op / Ns tcp|udp , 3466a3193a7SBrian Somers.Xc 3476a3193a7SBrian Somers.Nm 3486a3193a7SBrian Somerswill open a TCP or UDP connection for transporting data rather than using a 3496a3193a7SBrian Somersconventional serial device. 3506a3193a7SBrian SomersUDP connections force 3516a3193a7SBrian Somers.Nm 3526a3193a7SBrian Somersinto synchronous mode. 3536a3193a7SBrian Somers.It Supports PPP over Ethernet (rfc 2516). 3546a3193a7SBrian SomersIf 3556a3193a7SBrian Somers.Nm 3566a3193a7SBrian Somersis given a device specification of the format 35721ca690bSJose Luis Duran.No PPPoE\&: Ns Ar iface Ns Xo 3586a3193a7SBrian Somers.Op \&: Ns Ar provider Ns 3596a3193a7SBrian Somers.Xc 3606a3193a7SBrian Somersand if 3616a3193a7SBrian Somers.Xr netgraph 4 3626a3193a7SBrian Somersis available, 3636a3193a7SBrian Somers.Nm 3646a3193a7SBrian Somerswill attempt talk 3656a3193a7SBrian Somers.Em PPP 3666a3193a7SBrian Somersover Ethernet to 3676a3193a7SBrian Somers.Ar provider 3686a3193a7SBrian Somersusing the 3696a3193a7SBrian Somers.Ar iface 3706a3193a7SBrian Somersnetwork interface. 3716a3193a7SBrian Somers.Pp 3726a3193a7SBrian SomersOn systems that do not support 3736a3193a7SBrian Somers.Xr netgraph 4 , 3746a3193a7SBrian Somersan external program such as 3756a3193a7SBrian Somers.Xr pppoed 8 3766a3193a7SBrian Somersmay be used. 3776a3193a7SBrian Somers.It "Supports IETF draft Predictor-1 (rfc 1978) and DEFLATE (rfc 1979) compression." 3786a3193a7SBrian Somers.Nm 3796a3193a7SBrian Somerssupports not only VJ-compression but also Predictor-1 and DEFLATE compression. 3806a3193a7SBrian SomersNormally, a modem has built-in compression (e.g., v42.bis) and the system 3816a3193a7SBrian Somersmay receive higher data rates from it as a result of such compression. 3826a3193a7SBrian SomersWhile this is generally a good thing in most other situations, this 3836a3193a7SBrian Somershigher speed data imposes a penalty on the system by increasing the 3846a3193a7SBrian Somersnumber of serial interrupts the system has to process in talking to the 3856a3193a7SBrian Somersmodem and also increases latency. 3866a3193a7SBrian SomersUnlike VJ-compression, Predictor-1 and DEFLATE compression pre-compresses 3876a3193a7SBrian Somers.Em all 3886a3193a7SBrian Somersnetwork traffic flowing through the link, thus reducing overheads to a 3896a3193a7SBrian Somersminimum. 3906a3193a7SBrian Somers.It Supports Microsoft's IPCP extensions (rfc 1877). 3916a3193a7SBrian SomersName Server Addresses and NetBIOS Name Server Addresses can be negotiated 3926a3193a7SBrian Somerswith clients using the Microsoft 3936a3193a7SBrian Somers.Em PPP 3946a3193a7SBrian Somersstack (i.e., Win95, WinNT) 3956a3193a7SBrian Somers.It Supports Multi-link PPP (rfc 1990) 3966a3193a7SBrian SomersIt is possible to configure 3976a3193a7SBrian Somers.Nm 3986a3193a7SBrian Somersto open more than one physical connection to the peer, combining the 3996a3193a7SBrian Somersbandwidth of all links for better throughput. 4006a3193a7SBrian Somers.It Supports MPPE (draft-ietf-pppext-mppe) 4016a3193a7SBrian SomersMPPE is Microsoft Point to Point Encryption scheme. 4026a3193a7SBrian SomersIt is possible to configure 4036a3193a7SBrian Somers.Nm 4046a3193a7SBrian Somersto participate in Microsoft's Windows VPN. 4056a3193a7SBrian SomersFor now, 4066a3193a7SBrian Somers.Nm 4076a3193a7SBrian Somerscan only get encryption keys from CHAP 81 authentication. 4086a3193a7SBrian Somers.Nm 4096a3193a7SBrian Somersmust be compiled with DES for MPPE to operate. 4106a3193a7SBrian Somers.It Supports IPV6CP (rfc 2023). 4116a3193a7SBrian SomersAn IPv6 connection can be made in addition to or instead of the normal 4126a3193a7SBrian SomersIPv4 connection. 4136a3193a7SBrian Somers.El 4146a3193a7SBrian Somers.Sh PERMISSIONS 4156a3193a7SBrian Somers.Nm 4166a3193a7SBrian Somersis installed as user 4176a3193a7SBrian Somers.Dv root 4186a3193a7SBrian Somersand group 4196a3193a7SBrian Somers.Dv network , 4206a3193a7SBrian Somerswith permissions 4216a3193a7SBrian Somers.Dv 04554 . 4226a3193a7SBrian SomersBy default, 4236a3193a7SBrian Somers.Nm 4246a3193a7SBrian Somerswill not run if the invoking user id is not zero. 4256a3193a7SBrian SomersThis may be overridden by using the 4266a3193a7SBrian Somers.Dq allow users 4276a3193a7SBrian Somerscommand in 4286a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf . 4296a3193a7SBrian SomersWhen running as a normal user, 4306a3193a7SBrian Somers.Nm 4316a3193a7SBrian Somersswitches to user id 0 in order to alter the system routing table, set up 4326a3193a7SBrian Somerssystem lock files and read the ppp configuration files. 4336a3193a7SBrian SomersAll external commands (executed via the "shell" or "!bg" commands) are executed 4346a3193a7SBrian Somersas the user id that invoked 4356a3193a7SBrian Somers.Nm . 4366a3193a7SBrian SomersRefer to the 4376a3193a7SBrian Somers.Sq ID0 4386a3193a7SBrian Somerslogging facility if you are interested in what exactly is done as user id 4396a3193a7SBrian Somerszero. 4406a3193a7SBrian Somers.Sh GETTING STARTED 4416a3193a7SBrian SomersWhen you first run 4426a3193a7SBrian Somers.Nm 4436a3193a7SBrian Somersyou may need to deal with some initial configuration details. 4446a3193a7SBrian Somers.Bl -bullet 4456a3193a7SBrian Somers.It 4466a3193a7SBrian SomersMake sure that your system has a group named 4476a3193a7SBrian Somers.Dq network 4486a3193a7SBrian Somersin the 4496a3193a7SBrian Somers.Pa /etc/group 4506a3193a7SBrian Somersfile and that the group contains the names of all users expected to use 4516a3193a7SBrian Somers.Nm . 4526a3193a7SBrian SomersRefer to the 4536a3193a7SBrian Somers.Xr group 5 4546a3193a7SBrian Somersmanual page for details. 4556a3193a7SBrian SomersEach of these users must also be given access using the 4566a3193a7SBrian Somers.Dq allow users 4576a3193a7SBrian Somerscommand in 4586a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf . 4596a3193a7SBrian Somers.It 4606a3193a7SBrian SomersCreate a log file. 4616a3193a7SBrian Somers.Nm 4626a3193a7SBrian Somersuses 4636a3193a7SBrian Somers.Xr syslog 3 4646a3193a7SBrian Somersto log information. 4656a3193a7SBrian SomersA common log file name is 4666a3193a7SBrian Somers.Pa /var/log/ppp.log . 4676a3193a7SBrian SomersTo make output go to this file, put the following lines in the 4686a3193a7SBrian Somers.Pa /etc/syslog.conf 4696a3193a7SBrian Somersfile: 4706a3193a7SBrian Somers.Bd -literal -offset indent 4716a3193a7SBrian Somers!ppp 4726a3193a7SBrian Somers*.*<TAB>/var/log/ppp.log 4736a3193a7SBrian Somers.Ed 4746a3193a7SBrian Somers.Pp 4756a3193a7SBrian SomersIt is possible to have more than one 4766a3193a7SBrian Somers.Em PPP 4776a3193a7SBrian Somerslog file by creating a link to the 4786a3193a7SBrian Somers.Nm 4796a3193a7SBrian Somersexecutable: 4806a3193a7SBrian Somers.Pp 4816a3193a7SBrian Somers.Dl # cd /usr/sbin 4826a3193a7SBrian Somers.Dl # ln ppp ppp0 4836a3193a7SBrian Somers.Pp 4846a3193a7SBrian Somersand using 4856a3193a7SBrian Somers.Bd -literal -offset indent 4866a3193a7SBrian Somers!ppp0 4876a3193a7SBrian Somers*.*<TAB>/var/log/ppp0.log 4886a3193a7SBrian Somers.Ed 4896a3193a7SBrian Somers.Pp 4906a3193a7SBrian Somersin 4916a3193a7SBrian Somers.Pa /etc/syslog.conf . 4926a3193a7SBrian SomersDo not forget to send a 4936a3193a7SBrian Somers.Dv HUP 4946a3193a7SBrian Somerssignal to 4956a3193a7SBrian Somers.Xr syslogd 8 4966a3193a7SBrian Somersafter altering 4976a3193a7SBrian Somers.Pa /etc/syslog.conf . 4986a3193a7SBrian Somers.It 4996a3193a7SBrian SomersAlthough not strictly relevant to 5006a3193a7SBrian Somers.Nm Ns No 's 5016a3193a7SBrian Somersoperation, you should configure your resolver so that it works correctly. 502942e234dSFernando ApesteguíaThis can be done by configuring a local DNS resolver or by adding the correct 5036a3193a7SBrian Somers.Sq nameserver 5046a3193a7SBrian Somerslines to the file 5056a3193a7SBrian Somers.Pa /etc/resolv.conf . 5066a3193a7SBrian SomersRefer to the 5076a3193a7SBrian Somers.Xr resolv.conf 5 5086a3193a7SBrian Somersmanual page for details. 5096a3193a7SBrian Somers.Pp 5106a3193a7SBrian SomersAlternatively, if the peer supports it, 5116a3193a7SBrian Somers.Nm 5126a3193a7SBrian Somerscan be configured to ask the peer for the nameserver address(es) and to 5136a3193a7SBrian Somersupdate 5146a3193a7SBrian Somers.Pa /etc/resolv.conf 5156a3193a7SBrian Somersautomatically. 5166a3193a7SBrian SomersRefer to the 5176a3193a7SBrian Somers.Dq enable dns 5186a3193a7SBrian Somersand 5196a3193a7SBrian Somers.Dq resolv 5206a3193a7SBrian Somerscommands below for details. 5216a3193a7SBrian Somers.El 5226a3193a7SBrian Somers.Sh MANUAL DIALING 5236a3193a7SBrian SomersIn the following examples, we assume that your machine name is 5246a3193a7SBrian Somers.Dv awfulhak . 5256a3193a7SBrian Somerswhen you invoke 5266a3193a7SBrian Somers.Nm 5276a3193a7SBrian Somers(see 5286a3193a7SBrian Somers.Sx PERMISSIONS 5296a3193a7SBrian Somersabove) with no arguments, you are presented with a prompt: 5306a3193a7SBrian Somers.Bd -literal -offset indent 5316a3193a7SBrian Somersppp ON awfulhak> 5326a3193a7SBrian Somers.Ed 5336a3193a7SBrian Somers.Pp 5346a3193a7SBrian SomersThe 5356a3193a7SBrian Somers.Sq ON 5366a3193a7SBrian Somerspart of your prompt should always be in upper case. 5376a3193a7SBrian SomersIf it is in lower case, it means that you must supply a password using the 5386a3193a7SBrian Somers.Dq passwd 5396a3193a7SBrian Somerscommand. 5406a3193a7SBrian SomersThis only ever happens if you connect to a running version of 5416a3193a7SBrian Somers.Nm 5426a3193a7SBrian Somersand have not authenticated yourself using the correct password. 5436a3193a7SBrian Somers.Pp 5446a3193a7SBrian SomersYou can start by specifying the device name and speed: 5456a3193a7SBrian Somers.Bd -literal -offset indent 5466a3193a7SBrian Somersppp ON awfulhak> set device /dev/cuau0 5476a3193a7SBrian Somersppp ON awfulhak> set speed 38400 5486a3193a7SBrian Somers.Ed 5496a3193a7SBrian Somers.Pp 5506a3193a7SBrian SomersNormally, hardware flow control (CTS/RTS) is used. 5516a3193a7SBrian SomersHowever, under 5526a3193a7SBrian Somerscertain circumstances (as may happen when you are connected directly 5536a3193a7SBrian Somersto certain PPP-capable terminal servers), this may result in 5546a3193a7SBrian Somers.Nm 5556a3193a7SBrian Somershanging as soon as it tries to write data to your communications link 5566a3193a7SBrian Somersas it is waiting for the CTS (clear to send) signal - which will never 5576a3193a7SBrian Somerscome. 5586a3193a7SBrian SomersThus, if you have a direct line and cannot seem to make a 5596a3193a7SBrian Somersconnection, try turning CTS/RTS off with 5606a3193a7SBrian Somers.Dq set ctsrts off . 5616a3193a7SBrian SomersIf you need to do this, check the 5626a3193a7SBrian Somers.Dq set accmap 5636a3193a7SBrian Somersdescription below too - you will probably need to 5646a3193a7SBrian Somers.Dq set accmap 000a0000 . 5656a3193a7SBrian Somers.Pp 5666a3193a7SBrian SomersUsually, parity is set to 5676a3193a7SBrian Somers.Dq none , 5686a3193a7SBrian Somersand this is 5696a3193a7SBrian Somers.Nm Ns No 's 5706a3193a7SBrian Somersdefault. 5716a3193a7SBrian SomersParity is a rather archaic error checking mechanism that is no 5726a3193a7SBrian Somerslonger used because modern modems do their own error checking, and most 5736a3193a7SBrian Somerslink-layer protocols (that is what 5746a3193a7SBrian Somers.Nm 5756a3193a7SBrian Somersis) use much more reliable checking mechanisms. 5766a3193a7SBrian SomersParity has a relatively 5776a3193a7SBrian Somershuge overhead (a 12.5% increase in traffic) and as a result, it is always 5786a3193a7SBrian Somersdisabled 5796a3193a7SBrian Somers(set to 5806a3193a7SBrian Somers.Dq none ) 5816a3193a7SBrian Somerswhen 5826a3193a7SBrian Somers.Dv PPP 5836a3193a7SBrian Somersis opened. 5846a3193a7SBrian SomersHowever, some ISPs (Internet Service Providers) may use 5856a3193a7SBrian Somersspecific parity settings at connection time (before 5866a3193a7SBrian Somers.Dv PPP 5876a3193a7SBrian Somersis opened). 5886a3193a7SBrian SomersNotably, Compuserve insist on even parity when logging in: 5896a3193a7SBrian Somers.Bd -literal -offset indent 5906a3193a7SBrian Somersppp ON awfulhak> set parity even 5916a3193a7SBrian Somers.Ed 5926a3193a7SBrian Somers.Pp 5936a3193a7SBrian SomersYou can now see what your current device settings look like: 5946a3193a7SBrian Somers.Bd -literal -offset indent 5956a3193a7SBrian Somersppp ON awfulhak> show physical 5966a3193a7SBrian SomersName: deflink 5976a3193a7SBrian Somers State: closed 5986a3193a7SBrian Somers Device: N/A 5996a3193a7SBrian Somers Link Type: interactive 6006a3193a7SBrian Somers Connect Count: 0 6016a3193a7SBrian Somers Queued Packets: 0 6026a3193a7SBrian Somers Phone Number: N/A 6036a3193a7SBrian Somers 6046a3193a7SBrian SomersDefaults: 6056a3193a7SBrian Somers Device List: /dev/cuau0 6066a3193a7SBrian Somers Characteristics: 38400bps, cs8, even parity, CTS/RTS on 6076a3193a7SBrian Somers 6086a3193a7SBrian SomersConnect time: 0 secs 6096a3193a7SBrian Somers0 octets in, 0 octets out 6106a3193a7SBrian SomersOverall 0 bytes/sec 6116a3193a7SBrian Somersppp ON awfulhak> 6126a3193a7SBrian Somers.Ed 6136a3193a7SBrian Somers.Pp 6146a3193a7SBrian SomersThe term command can now be used to talk directly to the device: 6156a3193a7SBrian Somers.Bd -literal -offset indent 6166a3193a7SBrian Somersppp ON awfulhak> term 6176a3193a7SBrian Somersat 6186a3193a7SBrian SomersOK 6196a3193a7SBrian Somersatdt123456 6206a3193a7SBrian SomersCONNECT 6216a3193a7SBrian Somerslogin: myispusername 6226a3193a7SBrian SomersPassword: myisppassword 6236a3193a7SBrian SomersProtocol: ppp 6246a3193a7SBrian Somers.Ed 6256a3193a7SBrian Somers.Pp 6266a3193a7SBrian SomersWhen the peer starts to talk in 6276a3193a7SBrian Somers.Em PPP , 6286a3193a7SBrian Somers.Nm 6296a3193a7SBrian Somersdetects this automatically and returns to command mode. 6306a3193a7SBrian Somers.Bd -literal -offset indent 6316a3193a7SBrian Somersppp ON awfulhak> # No link has been established 6326a3193a7SBrian SomersPpp ON awfulhak> # We've connected & finished LCP 6336a3193a7SBrian SomersPPp ON awfulhak> # We've authenticated 6346a3193a7SBrian SomersPPP ON awfulhak> # We've agreed IP numbers 6356a3193a7SBrian Somers.Ed 6366a3193a7SBrian Somers.Pp 6376a3193a7SBrian SomersIf it does not, it is probable that the peer is waiting for your end to 6386a3193a7SBrian Somersstart negotiating. 6396a3193a7SBrian SomersTo force 6406a3193a7SBrian Somers.Nm 6416a3193a7SBrian Somersto start sending 6426a3193a7SBrian Somers.Em PPP 6436a3193a7SBrian Somersconfiguration packets to the peer, use the 6446a3193a7SBrian Somers.Dq ~p 6456a3193a7SBrian Somerscommand to drop out of terminal mode and enter packet mode. 6466a3193a7SBrian Somers.Pp 6476a3193a7SBrian SomersIf you never even receive a login prompt, it is quite likely that the 6486a3193a7SBrian Somerspeer wants to use PAP or CHAP authentication instead of using Unix-style 6496a3193a7SBrian Somerslogin/password authentication. 6506a3193a7SBrian SomersTo set things up properly, drop back to 6516a3193a7SBrian Somersthe prompt and set your authentication name and key, then reconnect: 6526a3193a7SBrian Somers.Bd -literal -offset indent 6536a3193a7SBrian Somers~. 6546a3193a7SBrian Somersppp ON awfulhak> set authname myispusername 6556a3193a7SBrian Somersppp ON awfulhak> set authkey myisppassword 6566a3193a7SBrian Somersppp ON awfulhak> term 6576a3193a7SBrian Somersat 6586a3193a7SBrian SomersOK 6596a3193a7SBrian Somersatdt123456 6606a3193a7SBrian SomersCONNECT 6616a3193a7SBrian Somers.Ed 6626a3193a7SBrian Somers.Pp 6636a3193a7SBrian SomersYou may need to tell ppp to initiate negotiations with the peer here too: 6646a3193a7SBrian Somers.Bd -literal -offset indent 6656a3193a7SBrian Somers~p 6666a3193a7SBrian Somersppp ON awfulhak> # No link has been established 6676a3193a7SBrian SomersPpp ON awfulhak> # We've connected & finished LCP 6686a3193a7SBrian SomersPPp ON awfulhak> # We've authenticated 6696a3193a7SBrian SomersPPP ON awfulhak> # We've agreed IP numbers 6706a3193a7SBrian Somers.Ed 6716a3193a7SBrian Somers.Pp 6726a3193a7SBrian SomersYou are now connected! 6736a3193a7SBrian SomersNote that 6746a3193a7SBrian Somers.Sq PPP 6756a3193a7SBrian Somersin the prompt has changed to capital letters to indicate that you have 6766a3193a7SBrian Somersa peer connection. 6776a3193a7SBrian SomersIf only some of the three Ps go uppercase, wait until 6786a3193a7SBrian Somerseither everything is uppercase or lowercase. 6796a3193a7SBrian SomersIf they revert to lowercase, it means that 6806a3193a7SBrian Somers.Nm 6816a3193a7SBrian Somerscould not successfully negotiate with the peer. 6826a3193a7SBrian SomersA good first step for troubleshooting at this point would be to 6836a3193a7SBrian Somers.Bd -literal -offset indent 6846a3193a7SBrian Somersppp ON awfulhak> set log local phase lcp ipcp 6856a3193a7SBrian Somers.Ed 6866a3193a7SBrian Somers.Pp 6876a3193a7SBrian Somersand try again. 6886a3193a7SBrian SomersRefer to the 6896a3193a7SBrian Somers.Dq set log 6906a3193a7SBrian Somerscommand description below for further details. 6916a3193a7SBrian SomersIf things fail at this point, 6926a3193a7SBrian Somersit is quite important that you turn logging on and try again. 6936a3193a7SBrian SomersIt is also 6946a3193a7SBrian Somersimportant that you note any prompt changes and report them to anyone trying 6956a3193a7SBrian Somersto help you. 6966a3193a7SBrian Somers.Pp 6976a3193a7SBrian SomersWhen the link is established, the show command can be used to see how 6986a3193a7SBrian Somersthings are going: 6996a3193a7SBrian Somers.Bd -literal -offset indent 7006a3193a7SBrian SomersPPP ON awfulhak> show physical 7016a3193a7SBrian Somers* Modem related information is shown here * 7026a3193a7SBrian SomersPPP ON awfulhak> show ccp 7036a3193a7SBrian Somers* CCP (compression) related information is shown here * 7046a3193a7SBrian SomersPPP ON awfulhak> show lcp 7056a3193a7SBrian Somers* LCP (line control) related information is shown here * 7066a3193a7SBrian SomersPPP ON awfulhak> show ipcp 7076a3193a7SBrian Somers* IPCP (IP) related information is shown here * 7086a3193a7SBrian SomersPPP ON awfulhak> show ipv6cp 7096a3193a7SBrian Somers* IPV6CP (IPv6) related information is shown here * 7106a3193a7SBrian SomersPPP ON awfulhak> show link 7116a3193a7SBrian Somers* Link (high level) related information is shown here * 7126a3193a7SBrian SomersPPP ON awfulhak> show bundle 7136a3193a7SBrian Somers* Logical (high level) connection related information is shown here * 7146a3193a7SBrian Somers.Ed 7156a3193a7SBrian Somers.Pp 7166a3193a7SBrian SomersAt this point, your machine has a host route to the peer. 7176a3193a7SBrian SomersThis means 7186a3193a7SBrian Somersthat you can only make a connection with the host on the other side 7196a3193a7SBrian Somersof the link. 7206a3193a7SBrian SomersIf you want to add a default route entry (telling your 7216a3193a7SBrian Somersmachine to send all packets without another routing entry to the other 7226a3193a7SBrian Somersside of the 7236a3193a7SBrian Somers.Em PPP 7246a3193a7SBrian Somerslink), enter the following command: 7256a3193a7SBrian Somers.Bd -literal -offset indent 7266a3193a7SBrian SomersPPP ON awfulhak> add default HISADDR 7276a3193a7SBrian Somers.Ed 7286a3193a7SBrian Somers.Pp 7296a3193a7SBrian SomersThe string 7306a3193a7SBrian Somers.Sq HISADDR 7316a3193a7SBrian Somersrepresents the IP address of the connected peer. 7326a3193a7SBrian SomersIf the 7336a3193a7SBrian Somers.Dq add 7346a3193a7SBrian Somerscommand fails due to an existing route, you can overwrite the existing 7356a3193a7SBrian Somersroute using: 7366a3193a7SBrian Somers.Bd -literal -offset indent 7376a3193a7SBrian SomersPPP ON awfulhak> add! default HISADDR 7386a3193a7SBrian Somers.Ed 7396a3193a7SBrian Somers.Pp 7406a3193a7SBrian SomersThis command can also be executed before actually making the connection. 7416a3193a7SBrian SomersIf a new IP address is negotiated at connection time, 7426a3193a7SBrian Somers.Nm 7436a3193a7SBrian Somerswill update your default route accordingly. 7446a3193a7SBrian Somers.Pp 7456a3193a7SBrian SomersYou can now use your network applications (ping, telnet, ftp, etc.) 7466a3193a7SBrian Somersin other windows or terminals on your machine. 7476a3193a7SBrian SomersIf you wish to reuse the current terminal, you can put 7486a3193a7SBrian Somers.Nm 7496a3193a7SBrian Somersinto the background using your standard shell suspend and background 7506a3193a7SBrian Somerscommands (usually 7516a3193a7SBrian Somers.Dq ^Z 7526a3193a7SBrian Somersfollowed by 7536a3193a7SBrian Somers.Dq bg ) . 7546a3193a7SBrian Somers.Pp 7556a3193a7SBrian SomersRefer to the 7566a3193a7SBrian Somers.Sx PPP COMMAND LIST 7576a3193a7SBrian Somerssection for details on all available commands. 7586a3193a7SBrian Somers.Sh AUTOMATIC DIALING 7596a3193a7SBrian SomersTo use automatic dialing, you must prepare some Dial and Login chat scripts. 7606a3193a7SBrian SomersSee the example definitions in 7616a3193a7SBrian Somers.Pa /usr/share/examples/ppp/ppp.conf.sample 7626a3193a7SBrian Somers(the format of 7636a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 7646a3193a7SBrian Somersis pretty simple). 7656a3193a7SBrian SomersEach line contains one comment, inclusion, label or command: 7666a3193a7SBrian Somers.Bl -bullet 7676a3193a7SBrian Somers.It 7686a3193a7SBrian SomersA line starting with a 7696a3193a7SBrian Somers.Pq Dq # 7706a3193a7SBrian Somerscharacter is treated as a comment line. 7716a3193a7SBrian SomersLeading whitespace are ignored when identifying comment lines. 7726a3193a7SBrian Somers.It 7736a3193a7SBrian SomersAn inclusion is a line beginning with the word 7746a3193a7SBrian Somers.Sq {!include} . 7756a3193a7SBrian SomersIt must have one argument - the file to {include}. 7766a3193a7SBrian SomersYou may wish to 7776a3193a7SBrian Somers.Dq {!include} ~/.ppp.conf 7786a3193a7SBrian Somersfor compatibility with older versions of 7796a3193a7SBrian Somers.Nm . 7806a3193a7SBrian Somers.It 7816a3193a7SBrian SomersA label name starts in the first column and is followed by 7826a3193a7SBrian Somersa colon 7836a3193a7SBrian Somers.Pq Dq \&: . 7846a3193a7SBrian Somers.It 7856a3193a7SBrian SomersA command line must contain a space or tab in the first column. 7866a3193a7SBrian Somers.It 7876a3193a7SBrian SomersA string starting with the 7886a3193a7SBrian Somers.Dq $ 7896a3193a7SBrian Somerscharacter is substituted with the value of the environment variable by 7906a3193a7SBrian Somersthe same name. 7916a3193a7SBrian SomersLikewise, a string starting with the 7926a3193a7SBrian Somers.Dq ~ 7936a3193a7SBrian Somerscharacter is substituted with the full path to the home directory of 7946a3193a7SBrian Somersthe user account by the same name, and the 7956a3193a7SBrian Somers.Dq ~ 7966a3193a7SBrian Somerscharacter by itself is substituted with the full path to the home directory 7976a3193a7SBrian Somersof the current user. 7986a3193a7SBrian SomersIf you want to include a literal 7996a3193a7SBrian Somers.Dq $ 8006a3193a7SBrian Somersor 8016a3193a7SBrian Somers.Dq ~ 8026a3193a7SBrian Somerscharacter in a command or argument, enclose them in double quotes, e.g., 8036a3193a7SBrian Somers.Bd -literal -offset indent 8046a3193a7SBrian Somersset password "pa$ss~word" 8056a3193a7SBrian Somers.Ed 8066a3193a7SBrian Somers.El 8076a3193a7SBrian Somers.Pp 8086a3193a7SBrian SomersThe 8096a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 8106a3193a7SBrian Somersfile should consist of at least a 8116a3193a7SBrian Somers.Dq default 8126a3193a7SBrian Somerssection. 8136a3193a7SBrian SomersThis section is always executed. 8146a3193a7SBrian SomersIt should also contain 8156a3193a7SBrian Somersone or more sections, named according to their purpose, for example, 8166a3193a7SBrian Somers.Dq MyISP 8176a3193a7SBrian Somerswould represent your ISP, and 8186a3193a7SBrian Somers.Dq ppp-in 8196a3193a7SBrian Somerswould represent an incoming 8206a3193a7SBrian Somers.Nm 8216a3193a7SBrian Somersconfiguration. 8226a3193a7SBrian SomersYou can now specify the destination label name when you invoke 8236a3193a7SBrian Somers.Nm . 8246a3193a7SBrian SomersCommands associated with the 8256a3193a7SBrian Somers.Dq default 8266a3193a7SBrian Somerslabel are executed, followed by those associated with the destination 8276a3193a7SBrian Somerslabel provided. 8286a3193a7SBrian SomersWhen 8296a3193a7SBrian Somers.Nm 8306a3193a7SBrian Somersis started with no arguments, the 8316a3193a7SBrian Somers.Dq default 8326a3193a7SBrian Somerssection is still executed. 8336a3193a7SBrian SomersThe load command can be used to manually load a section from the 8346a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 8356a3193a7SBrian Somersfile: 8366a3193a7SBrian Somers.Bd -literal -offset indent 8376a3193a7SBrian Somersppp ON awfulhak> load MyISP 8386a3193a7SBrian Somers.Ed 8396a3193a7SBrian Somers.Pp 8406a3193a7SBrian SomersNote, no action is taken by 8416a3193a7SBrian Somers.Nm 8426a3193a7SBrian Somersafter a section is loaded, whether it is the result of passing a label on 8436a3193a7SBrian Somersthe command line or using the 8446a3193a7SBrian Somers.Dq load 8456a3193a7SBrian Somerscommand. 8466a3193a7SBrian SomersOnly the commands specified for that label in the configuration 8476a3193a7SBrian Somersfile are executed. 8486a3193a7SBrian SomersHowever, when invoking 8496a3193a7SBrian Somers.Nm 8506a3193a7SBrian Somerswith the 8516a3193a7SBrian Somers.Fl background , 8526a3193a7SBrian Somers.Fl ddial , 8536a3193a7SBrian Somersor 8546a3193a7SBrian Somers.Fl dedicated 8556a3193a7SBrian Somersswitches, the link mode tells 8566a3193a7SBrian Somers.Nm 8576a3193a7SBrian Somersto establish a connection. 8586a3193a7SBrian SomersRefer to the 8596a3193a7SBrian Somers.Dq set mode 8606a3193a7SBrian Somerscommand below for further details. 8616a3193a7SBrian Somers.Pp 8626a3193a7SBrian SomersOnce the connection is made, the 8636a3193a7SBrian Somers.Sq ppp 8646a3193a7SBrian Somersportion of the prompt will change to 8656a3193a7SBrian Somers.Sq PPP : 8666a3193a7SBrian Somers.Bd -literal -offset indent 8676a3193a7SBrian Somers# ppp MyISP 8686a3193a7SBrian Somers\&... 8696a3193a7SBrian Somersppp ON awfulhak> dial 8706a3193a7SBrian SomersPpp ON awfulhak> 8716a3193a7SBrian SomersPPp ON awfulhak> 8726a3193a7SBrian SomersPPP ON awfulhak> 8736a3193a7SBrian Somers.Ed 8746a3193a7SBrian Somers.Pp 8756a3193a7SBrian SomersThe Ppp prompt indicates that 8766a3193a7SBrian Somers.Nm 8776a3193a7SBrian Somershas entered the authentication phase. 8786a3193a7SBrian SomersThe PPp prompt indicates that 8796a3193a7SBrian Somers.Nm 8806a3193a7SBrian Somershas entered the network phase. 8816a3193a7SBrian SomersThe PPP prompt indicates that 8826a3193a7SBrian Somers.Nm 8836a3193a7SBrian Somershas successfully negotiated a network layer protocol and is in 8846a3193a7SBrian Somersa usable state. 8856a3193a7SBrian Somers.Pp 8866a3193a7SBrian SomersIf the 8876a3193a7SBrian Somers.Pa /etc/ppp/ppp.linkup 8886a3193a7SBrian Somersfile is available, its contents are executed 8896a3193a7SBrian Somerswhen the 8906a3193a7SBrian Somers.Em PPP 8916a3193a7SBrian Somersconnection is established. 8926a3193a7SBrian SomersSee the provided 8936a3193a7SBrian Somers.Dq pmdemand 8946a3193a7SBrian Somersexample in 8956a3193a7SBrian Somers.Pa /usr/share/examples/ppp/ppp.conf.sample 8966a3193a7SBrian Somerswhich runs a script in the background after the connection is established 8976a3193a7SBrian Somers(refer to the 8986a3193a7SBrian Somers.Dq shell 8996a3193a7SBrian Somersand 9006a3193a7SBrian Somers.Dq bg 9016a3193a7SBrian Somerscommands below for a description of possible substitution strings). 9026a3193a7SBrian SomersSimilarly, when a connection is closed, the contents of the 9036a3193a7SBrian Somers.Pa /etc/ppp/ppp.linkdown 9046a3193a7SBrian Somersfile are executed. 9056a3193a7SBrian SomersBoth of these files have the same format as 9066a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf . 9076a3193a7SBrian Somers.Pp 9086a3193a7SBrian SomersIn previous versions of 9096a3193a7SBrian Somers.Nm , 9106a3193a7SBrian Somersit was necessary to re-add routes such as the default route in the 9116a3193a7SBrian Somers.Pa ppp.linkup 9126a3193a7SBrian Somersfile. 9136a3193a7SBrian Somers.Nm 9146a3193a7SBrian Somerssupports 9156a3193a7SBrian Somers.Sq sticky routes , 9166a3193a7SBrian Somerswhere all routes that contain the 9176a3193a7SBrian Somers.Dv HISADDR , 9186a3193a7SBrian Somers.Dv MYADDR , 9196a3193a7SBrian Somers.Dv HISADDR6 9206a3193a7SBrian Somersor 9216a3193a7SBrian Somers.Dv MYADDR6 9226a3193a7SBrian Somersliterals will automatically be updated when the values of these variables 9236a3193a7SBrian Somerschange. 9246a3193a7SBrian Somers.Sh BACKGROUND DIALING 9256a3193a7SBrian SomersIf you want to establish a connection using 9266a3193a7SBrian Somers.Nm 9276a3193a7SBrian Somersnon-interactively (such as from a 9286a3193a7SBrian Somers.Xr crontab 5 9296a3193a7SBrian Somersentry or an 9306a3193a7SBrian Somers.Xr at 1 9316a3193a7SBrian Somersjob) you should use the 9326a3193a7SBrian Somers.Fl background 9336a3193a7SBrian Somersoption. 9346a3193a7SBrian SomersWhen 9356a3193a7SBrian Somers.Fl background 9366a3193a7SBrian Somersis specified, 9376a3193a7SBrian Somers.Nm 9386a3193a7SBrian Somersattempts to establish the connection immediately. 9396a3193a7SBrian SomersIf multiple phone 9406a3193a7SBrian Somersnumbers are specified, each phone number will be tried once. 9416a3193a7SBrian SomersIf the attempt fails, 9426a3193a7SBrian Somers.Nm 9436a3193a7SBrian Somersexits immediately with a non-zero exit code. 9446a3193a7SBrian SomersIf it succeeds, then 9456a3193a7SBrian Somers.Nm 9466a3193a7SBrian Somersbecomes a daemon, and returns an exit status of zero to its caller. 9476a3193a7SBrian SomersThe daemon exits automatically if the connection is dropped by the 9486a3193a7SBrian Somersremote system, or it receives a 9496a3193a7SBrian Somers.Dv TERM 9506a3193a7SBrian Somerssignal. 9516a3193a7SBrian Somers.Sh DIAL ON DEMAND 9526a3193a7SBrian SomersDemand dialing is enabled with the 9536a3193a7SBrian Somers.Fl auto 9546a3193a7SBrian Somersor 9556a3193a7SBrian Somers.Fl ddial 9566a3193a7SBrian Somersoptions. 9576a3193a7SBrian SomersYou must also specify the destination label in 9586a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 9596a3193a7SBrian Somersto use. 9606a3193a7SBrian SomersIt must contain the 9616a3193a7SBrian Somers.Dq set ifaddr 9626a3193a7SBrian Somerscommand to {define} the remote peers IP address. 9636a3193a7SBrian Somers(refer to 9646a3193a7SBrian Somers.Pa /usr/share/examples/ppp/ppp.conf.sample ) 9656a3193a7SBrian Somers.Bd -literal -offset indent 9666a3193a7SBrian Somers# ppp -auto pmdemand 9676a3193a7SBrian Somers.Ed 9686a3193a7SBrian Somers.Pp 9696a3193a7SBrian SomersWhen 9706a3193a7SBrian Somers.Fl auto 9716a3193a7SBrian Somersor 9726a3193a7SBrian Somers.Fl ddial 9736a3193a7SBrian Somersis specified, 9746a3193a7SBrian Somers.Nm 9756a3193a7SBrian Somersruns as a daemon but you can still configure or examine its 9766a3193a7SBrian Somersconfiguration by using the 9776a3193a7SBrian Somers.Dq set server 9786a3193a7SBrian Somerscommand in 9796a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf , 9806a3193a7SBrian Somers(for example, 9816a3193a7SBrian Somers.Dq Li "set server +3000 mypasswd" ) 9826a3193a7SBrian Somersand connecting to the diagnostic port as follows: 9836a3193a7SBrian Somers.Bd -literal -offset indent 9846a3193a7SBrian Somers# pppctl 3000 (assuming tun0) 9856a3193a7SBrian SomersPassword: 9866a3193a7SBrian SomersPPP ON awfulhak> show who 9876a3193a7SBrian Somerstcp (127.0.0.1:1028) * 9886a3193a7SBrian Somers.Ed 9896a3193a7SBrian Somers.Pp 9906a3193a7SBrian SomersThe 9916a3193a7SBrian Somers.Dq show who 9926a3193a7SBrian Somerscommand lists users that are currently connected to 9936a3193a7SBrian Somers.Nm 9946a3193a7SBrian Somersitself. 9956a3193a7SBrian SomersIf the diagnostic socket is closed or changed to a different 9966a3193a7SBrian Somerssocket, all connections are immediately dropped. 9976a3193a7SBrian Somers.Pp 9986a3193a7SBrian SomersIn 9996a3193a7SBrian Somers.Fl auto 10006a3193a7SBrian Somersmode, when an outgoing packet is detected, 10016a3193a7SBrian Somers.Nm 10026a3193a7SBrian Somerswill perform the dialing action (chat script) and try to connect 10036a3193a7SBrian Somerswith the peer. 10046a3193a7SBrian SomersIn 10056a3193a7SBrian Somers.Fl ddial 10066a3193a7SBrian Somersmode, the dialing action is performed any time the line is found 10076a3193a7SBrian Somersto be down. 10086a3193a7SBrian SomersIf the connect fails, the default behaviour is to wait 30 seconds 10096a3193a7SBrian Somersand then attempt to connect when another outgoing packet is detected. 10106a3193a7SBrian SomersThis behaviour can be changed using the 10116a3193a7SBrian Somers.Dq set redial 10126a3193a7SBrian Somerscommand: 10136a3193a7SBrian Somers.Pp 10146a3193a7SBrian Somers.No set redial Ar secs Ns 10156a3193a7SBrian Somers.Oo + Ns Ar inc Ns 10166a3193a7SBrian Somers.Oo - Ns Ar max Ns Oc Oc Ns 10176a3193a7SBrian Somers.Op . Ns Ar next 10186a3193a7SBrian Somers.Op Ar attempts 10196a3193a7SBrian Somers.Pp 10206a3193a7SBrian Somers.Bl -tag -width attempts -compact 10216a3193a7SBrian Somers.It Ar secs 10226a3193a7SBrian Somersis the number of seconds to wait before attempting 10236a3193a7SBrian Somersto connect again. 10246a3193a7SBrian SomersIf the argument is the literal string 10256a3193a7SBrian Somers.Sq Li random , 10266a3193a7SBrian Somersthe delay period is a random value between 1 and 30 seconds inclusive. 10276a3193a7SBrian Somers.It Ar inc 10286a3193a7SBrian Somersis the number of seconds that 10296a3193a7SBrian Somers.Ar secs 10306a3193a7SBrian Somersshould be incremented each time a new dial attempt is made. 10316a3193a7SBrian SomersThe timeout reverts to 10326a3193a7SBrian Somers.Ar secs 10336a3193a7SBrian Somersonly after a successful connection is established. 10346a3193a7SBrian SomersThe default value for 10356a3193a7SBrian Somers.Ar inc 10366a3193a7SBrian Somersis zero. 10376a3193a7SBrian Somers.It Ar max 10386a3193a7SBrian Somersis the maximum number of times 10396a3193a7SBrian Somers.Nm 10406a3193a7SBrian Somersshould increment 10416a3193a7SBrian Somers.Ar secs . 10426a3193a7SBrian SomersThe default value for 10436a3193a7SBrian Somers.Ar max 10446a3193a7SBrian Somersis 10. 10456a3193a7SBrian Somers.It Ar next 10466a3193a7SBrian Somersis the number of seconds to wait before attempting 10476a3193a7SBrian Somersto dial the next number in a list of numbers (see the 10486a3193a7SBrian Somers.Dq set phone 10496a3193a7SBrian Somerscommand). 10506a3193a7SBrian SomersThe default is 3 seconds. 10516a3193a7SBrian SomersAgain, if the argument is the literal string 10526a3193a7SBrian Somers.Sq Li random , 10536a3193a7SBrian Somersthe delay period is a random value between 1 and 30 seconds. 10546a3193a7SBrian Somers.It Ar attempts 10556a3193a7SBrian Somersis the maximum number of times to try to connect for each outgoing packet 10566a3193a7SBrian Somersthat triggers a dial. 10576a3193a7SBrian SomersThe previous value is unchanged if this parameter is omitted. 10586a3193a7SBrian SomersIf a value of zero is specified for 10596a3193a7SBrian Somers.Ar attempts , 10606a3193a7SBrian Somers.Nm 10616a3193a7SBrian Somerswill keep trying until a connection is made. 10626a3193a7SBrian Somers.El 10636a3193a7SBrian Somers.Pp 10646a3193a7SBrian SomersSo, for example: 10656a3193a7SBrian Somers.Bd -literal -offset indent 10666a3193a7SBrian Somersset redial 10.3 4 10676a3193a7SBrian Somers.Ed 10686a3193a7SBrian Somers.Pp 10696a3193a7SBrian Somerswill attempt to connect 4 times for each outgoing packet that causes 10706a3193a7SBrian Somersa dial attempt with a 3 second delay between each number and a 10 second 10716a3193a7SBrian Somersdelay after all numbers have been tried. 10726a3193a7SBrian SomersIf multiple phone numbers 10736a3193a7SBrian Somersare specified, the total number of attempts is still 4 (it does not 10746a3193a7SBrian Somersattempt each number 4 times). 10756a3193a7SBrian Somers.Pp 10766a3193a7SBrian SomersAlternatively, 10776a3193a7SBrian Somers.Bd -literal -offset indent 10786a3193a7SBrian Somersset redial 10+10-5.3 20 10796a3193a7SBrian Somers.Ed 10806a3193a7SBrian Somers.Pp 10816a3193a7SBrian Somerstells 10826a3193a7SBrian Somers.Nm 10836a3193a7SBrian Somersto attempt to connect 20 times. 10846a3193a7SBrian SomersAfter the first attempt, 10856a3193a7SBrian Somers.Nm 10866a3193a7SBrian Somerspauses for 10 seconds. 10876a3193a7SBrian SomersAfter the next attempt it pauses for 20 seconds 10886a3193a7SBrian Somersand so on until after the sixth attempt it pauses for 1 minute. 10896a3193a7SBrian SomersThe next 14 pauses will also have a duration of one minute. 10906a3193a7SBrian SomersIf 10916a3193a7SBrian Somers.Nm 10926a3193a7SBrian Somersconnects, disconnects and fails to connect again, the timeout starts again 10936a3193a7SBrian Somersat 10 seconds. 10946a3193a7SBrian Somers.Pp 10956a3193a7SBrian SomersModifying the dial delay is very useful when running 10966a3193a7SBrian Somers.Nm 10976a3193a7SBrian Somersin 10986a3193a7SBrian Somers.Fl auto 10996a3193a7SBrian Somersmode on both ends of the link. 11006a3193a7SBrian SomersIf each end has the same timeout, 11016a3193a7SBrian Somersboth ends wind up calling each other at the same time if the link 11026a3193a7SBrian Somersdrops and both ends have packets queued. 11036a3193a7SBrian SomersAt some locations, the serial link may not be reliable, and carrier 11046a3193a7SBrian Somersmay be lost at inappropriate times. 11056a3193a7SBrian SomersIt is possible to have 11066a3193a7SBrian Somers.Nm 11076a3193a7SBrian Somersredial should carrier be unexpectedly lost during a session. 11086a3193a7SBrian Somers.Bd -literal -offset indent 11096a3193a7SBrian Somersset reconnect timeout ntries 11106a3193a7SBrian Somers.Ed 11116a3193a7SBrian Somers.Pp 11126a3193a7SBrian SomersThis command tells 11136a3193a7SBrian Somers.Nm 11146a3193a7SBrian Somersto re-establish the connection 11156a3193a7SBrian Somers.Ar ntries 11166a3193a7SBrian Somerstimes on loss of carrier with a pause of 11176a3193a7SBrian Somers.Ar timeout 11186a3193a7SBrian Somersseconds before each try. 11196a3193a7SBrian SomersFor example, 11206a3193a7SBrian Somers.Bd -literal -offset indent 11216a3193a7SBrian Somersset reconnect 3 5 11226a3193a7SBrian Somers.Ed 11236a3193a7SBrian Somers.Pp 11246a3193a7SBrian Somerstells 11256a3193a7SBrian Somers.Nm 11266a3193a7SBrian Somersthat on an unexpected loss of carrier, it should wait 11276a3193a7SBrian Somers.Ar 3 11286a3193a7SBrian Somersseconds before attempting to reconnect. 11296a3193a7SBrian SomersThis may happen up to 11306a3193a7SBrian Somers.Ar 5 11316a3193a7SBrian Somerstimes before 11326a3193a7SBrian Somers.Nm 11336a3193a7SBrian Somersgives up. 11346a3193a7SBrian SomersThe default value of ntries is zero (no reconnect). 11356a3193a7SBrian SomersCare should be taken with this option. 11366a3193a7SBrian SomersIf the local timeout is slightly 11376a3193a7SBrian Somerslonger than the remote timeout, the reconnect feature will always be 11386a3193a7SBrian Somerstriggered (up to the given number of times) after the remote side 11396a3193a7SBrian Somerstimes out and hangs up. 11406a3193a7SBrian SomersNOTE: In this context, losing too many LQRs constitutes a loss of 11416a3193a7SBrian Somerscarrier and will trigger a reconnect. 11426a3193a7SBrian SomersIf the 11436a3193a7SBrian Somers.Fl background 11446a3193a7SBrian Somersflag is specified, all phone numbers are dialed at most once until 11456a3193a7SBrian Somersa connection is made. 11466a3193a7SBrian SomersThe next number redial period specified with the 11476a3193a7SBrian Somers.Dq set redial 11486a3193a7SBrian Somerscommand is honoured, as is the reconnect tries value. 11496a3193a7SBrian SomersIf your redial 11506a3193a7SBrian Somersvalue is less than the number of phone numbers specified, not all 11516a3193a7SBrian Somersthe specified numbers will be tried. 11526a3193a7SBrian SomersTo terminate the program, type 11536a3193a7SBrian Somers.Bd -literal -offset indent 11546a3193a7SBrian SomersPPP ON awfulhak> close 11556a3193a7SBrian Somersppp ON awfulhak> quit all 11566a3193a7SBrian Somers.Ed 11576a3193a7SBrian Somers.Pp 11586a3193a7SBrian SomersA simple 11596a3193a7SBrian Somers.Dq quit 11606a3193a7SBrian Somerscommand will terminate the 11616a3193a7SBrian Somers.Xr pppctl 8 11626a3193a7SBrian Somersor 11636a3193a7SBrian Somers.Xr telnet 1 11646a3193a7SBrian Somersconnection but not the 11656a3193a7SBrian Somers.Nm 11666a3193a7SBrian Somersprogram itself. 11676a3193a7SBrian SomersYou must use 11686a3193a7SBrian Somers.Dq quit all 11696a3193a7SBrian Somersto terminate 11706a3193a7SBrian Somers.Nm 11716a3193a7SBrian Somersas well. 11726a3193a7SBrian Somers.Sh RECEIVING INCOMING PPP CONNECTIONS (Method 1) 11736a3193a7SBrian SomersTo handle an incoming 11746a3193a7SBrian Somers.Em PPP 11756a3193a7SBrian Somersconnection request, follow these steps: 11766a3193a7SBrian Somers.Bl -enum 11776a3193a7SBrian Somers.It 11786a3193a7SBrian SomersMake sure the modem and (optionally) 11796a3193a7SBrian Somers.Pa /etc/rc.serial 11806a3193a7SBrian Somersis configured correctly. 11816a3193a7SBrian Somers.Bl -bullet -compact 11826a3193a7SBrian Somers.It 11836a3193a7SBrian SomersUse Hardware Handshake (CTS/RTS) for flow control. 11846a3193a7SBrian Somers.It 11856a3193a7SBrian SomersModem should be set to NO echo back (ATE0) and NO results string (ATQ1). 11866a3193a7SBrian Somers.El 11876a3193a7SBrian Somers.It 11886a3193a7SBrian SomersEdit 11896a3193a7SBrian Somers.Pa /etc/ttys 11906a3193a7SBrian Somersto enable a 11916a3193a7SBrian Somers.Xr getty 8 11926a3193a7SBrian Somerson the port where the modem is attached. 11936a3193a7SBrian SomersFor example: 11946a3193a7SBrian Somers.Pp 11956a3193a7SBrian Somers.Dl ttyd1 Qo /usr/libexec/getty std.38400 Qc dialup on secure 11966a3193a7SBrian Somers.Pp 11976a3193a7SBrian SomersDo not forget to send a 11986a3193a7SBrian Somers.Dv HUP 11996a3193a7SBrian Somerssignal to the 12006a3193a7SBrian Somers.Xr init 8 12016a3193a7SBrian Somersprocess to start the 12026a3193a7SBrian Somers.Xr getty 8 : 12036a3193a7SBrian Somers.Pp 12046a3193a7SBrian Somers.Dl # kill -HUP 1 12056a3193a7SBrian Somers.Pp 12066a3193a7SBrian SomersIt is usually also necessary to train your modem to the same DTR speed 12076a3193a7SBrian Somersas the getty: 12086a3193a7SBrian Somers.Bd -literal -offset indent 12096a3193a7SBrian Somers# ppp 12106a3193a7SBrian Somersppp ON awfulhak> set device /dev/cuau1 12116a3193a7SBrian Somersppp ON awfulhak> set speed 38400 12126a3193a7SBrian Somersppp ON awfulhak> term 12136a3193a7SBrian Somersdeflink: Entering terminal mode on /dev/cuau1 12146a3193a7SBrian SomersType `~?' for help 12156a3193a7SBrian Somersat 12166a3193a7SBrian SomersOK 12176a3193a7SBrian Somersat 12186a3193a7SBrian SomersOK 12196a3193a7SBrian Somersatz 12206a3193a7SBrian SomersOK 12216a3193a7SBrian Somersat 12226a3193a7SBrian SomersOK 12236a3193a7SBrian Somers~. 12246a3193a7SBrian Somersppp ON awfulhak> quit 12256a3193a7SBrian Somers.Ed 12266a3193a7SBrian Somers.It 12276a3193a7SBrian SomersCreate a 12286a3193a7SBrian Somers.Pa /usr/local/bin/ppplogin 12296a3193a7SBrian Somersfile with the following contents: 12306a3193a7SBrian Somers.Bd -literal -offset indent 12316a3193a7SBrian Somers#! /bin/sh 12326a3193a7SBrian Somersexec /usr/sbin/ppp -direct incoming 12336a3193a7SBrian Somers.Ed 12346a3193a7SBrian Somers.Pp 12356a3193a7SBrian SomersDirect mode 12366a3193a7SBrian Somers.Pq Fl direct 12376a3193a7SBrian Somerslets 12386a3193a7SBrian Somers.Nm 12396a3193a7SBrian Somerswork with stdin and stdout. 12406a3193a7SBrian SomersYou can also use 12416a3193a7SBrian Somers.Xr pppctl 8 12426a3193a7SBrian Somersto connect to a configured diagnostic port, in the same manner as with 12436a3193a7SBrian Somersclient-side 12446a3193a7SBrian Somers.Nm . 12456a3193a7SBrian Somers.Pp 12466a3193a7SBrian SomersHere, the 12476a3193a7SBrian Somers.Ar incoming 12486a3193a7SBrian Somerssection must be set up in 12496a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf . 12506a3193a7SBrian Somers.Pp 12516a3193a7SBrian SomersMake sure that the 12526a3193a7SBrian Somers.Ar incoming 12536a3193a7SBrian Somerssection contains the 12546a3193a7SBrian Somers.Dq allow users 12556a3193a7SBrian Somerscommand as appropriate. 12566a3193a7SBrian Somers.It 12576a3193a7SBrian SomersPrepare an account for the incoming user. 12586a3193a7SBrian Somers.Bd -literal 12596a3193a7SBrian Somersppp:xxxx:66:66:PPP Login User:/home/ppp:/usr/local/bin/ppplogin 12606a3193a7SBrian Somers.Ed 12616a3193a7SBrian Somers.Pp 12626a3193a7SBrian SomersRefer to the manual entries for 12636a3193a7SBrian Somers.Xr adduser 8 12646a3193a7SBrian Somersand 12656a3193a7SBrian Somers.Xr vipw 8 12666a3193a7SBrian Somersfor details. 12676a3193a7SBrian Somers.It 12686a3193a7SBrian SomersSupport for IPCP Domain Name Server and NetBIOS Name Server negotiation 12696a3193a7SBrian Somerscan be enabled using the 12706a3193a7SBrian Somers.Dq accept dns 12716a3193a7SBrian Somersand 12726a3193a7SBrian Somers.Dq set nbns 12736a3193a7SBrian Somerscommands. 12746a3193a7SBrian SomersRefer to their descriptions below. 12756a3193a7SBrian Somers.El 12766a3193a7SBrian Somers.Sh RECEIVING INCOMING PPP CONNECTIONS (Method 2) 12776a3193a7SBrian SomersThis method differs in that we use 12786a3193a7SBrian Somers.Nm 12796a3193a7SBrian Somersto authenticate the connection rather than 12806a3193a7SBrian Somers.Xr login 1 : 12816a3193a7SBrian Somers.Bl -enum 12826a3193a7SBrian Somers.It 12836a3193a7SBrian SomersConfigure your default section in 12846a3193a7SBrian Somers.Pa /etc/gettytab 12856a3193a7SBrian Somerswith automatic ppp recognition by specifying the 12866a3193a7SBrian Somers.Dq pp 12876a3193a7SBrian Somerscapability: 12886a3193a7SBrian Somers.Bd -literal 12896a3193a7SBrian Somersdefault:\\ 12906a3193a7SBrian Somers :pp=/usr/local/bin/ppplogin:\\ 12916a3193a7SBrian Somers ..... 12926a3193a7SBrian Somers.Ed 12936a3193a7SBrian Somers.It 12946a3193a7SBrian SomersConfigure your serial device(s), enable a 12956a3193a7SBrian Somers.Xr getty 8 12966a3193a7SBrian Somersand create 12976a3193a7SBrian Somers.Pa /usr/local/bin/ppplogin 12986a3193a7SBrian Somersas in the first three steps for method 1 above. 12996a3193a7SBrian Somers.It 13006a3193a7SBrian SomersAdd either 13016a3193a7SBrian Somers.Dq enable chap 13026a3193a7SBrian Somersor 13036a3193a7SBrian Somers.Dq enable pap 13046a3193a7SBrian Somers(or both) 13056a3193a7SBrian Somersto 13066a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 13076a3193a7SBrian Somersunder the 13086a3193a7SBrian Somers.Sq incoming 13096a3193a7SBrian Somerslabel (or whatever label 13106a3193a7SBrian Somers.Pa ppplogin 13116a3193a7SBrian Somersuses). 13126a3193a7SBrian Somers.It 13136a3193a7SBrian SomersCreate an entry in 13146a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret 13156a3193a7SBrian Somersfor each incoming user: 13166a3193a7SBrian Somers.Bd -literal 13176a3193a7SBrian SomersPfred<TAB>xxxx 13186a3193a7SBrian SomersPgeorge<TAB>yyyy 13196a3193a7SBrian Somers.Ed 13206a3193a7SBrian Somers.El 13216a3193a7SBrian Somers.Pp 13226a3193a7SBrian SomersNow, as soon as 13236a3193a7SBrian Somers.Xr getty 8 13246a3193a7SBrian Somersdetects a ppp connection (by recognising the HDLC frame headers), it runs 13256a3193a7SBrian Somers.Dq /usr/local/bin/ppplogin . 13266a3193a7SBrian Somers.Pp 13276a3193a7SBrian SomersIt is 13286a3193a7SBrian Somers.Em VITAL 13296a3193a7SBrian Somersthat either PAP or CHAP are enabled as above. 13306a3193a7SBrian SomersIf they are not, you are 13316a3193a7SBrian Somersallowing anybody to establish a ppp session with your machine 13326a3193a7SBrian Somers.Em without 13336a3193a7SBrian Somersa password, opening yourself up to all sorts of potential attacks. 13346a3193a7SBrian Somers.Sh AUTHENTICATING INCOMING CONNECTIONS 13356a3193a7SBrian SomersNormally, the receiver of a connection requires that the peer 13366a3193a7SBrian Somersauthenticates itself. 13376a3193a7SBrian SomersThis may be done using 13386a3193a7SBrian Somers.Xr login 1 , 13396a3193a7SBrian Somersbut alternatively, you can use PAP or CHAP. 13406a3193a7SBrian SomersCHAP is the more secure of the two, but some clients may not support it. 13416a3193a7SBrian SomersOnce you decide which you wish to use, add the command 13426a3193a7SBrian Somers.Sq enable chap 13436a3193a7SBrian Somersor 13446a3193a7SBrian Somers.Sq enable pap 13456a3193a7SBrian Somersto the relevant section of 13466a3193a7SBrian Somers.Pa ppp.conf . 13476a3193a7SBrian Somers.Pp 13486a3193a7SBrian SomersYou must then configure the 13496a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret 13506a3193a7SBrian Somersfile. 13516a3193a7SBrian SomersThis file contains one line per possible client, each line 13526a3193a7SBrian Somerscontaining up to five fields: 13536a3193a7SBrian Somers.Pp 13546a3193a7SBrian Somers.Ar name Ar key Oo 13556a3193a7SBrian Somers.Ar hisaddr Op Ar label Op Ar callback-number 13566a3193a7SBrian Somers.Oc 13576a3193a7SBrian Somers.Pp 13586a3193a7SBrian SomersThe 13596a3193a7SBrian Somers.Ar name 13606a3193a7SBrian Somersand 13616a3193a7SBrian Somers.Ar key 13626a3193a7SBrian Somersspecify the client username and password. 13636a3193a7SBrian SomersIf 13646a3193a7SBrian Somers.Ar key 13656a3193a7SBrian Somersis 13666a3193a7SBrian Somers.Dq \&* 13676a3193a7SBrian Somersand PAP is being used, 13686a3193a7SBrian Somers.Nm 13696a3193a7SBrian Somerswill look up the password database 13706a3193a7SBrian Somers.Pq Xr passwd 5 13716a3193a7SBrian Somerswhen authenticating. 13726a3193a7SBrian SomersIf the client does not offer a suitable response based on any 13736a3193a7SBrian Somers.Ar name Ns No / Ns Ar key 13746a3193a7SBrian Somerscombination in 13756a3193a7SBrian Somers.Pa ppp.secret , 13766a3193a7SBrian Somersauthentication fails. 13776a3193a7SBrian Somers.Pp 13786a3193a7SBrian SomersIf authentication is successful, 13796a3193a7SBrian Somers.Ar hisaddr 13806a3193a7SBrian Somers(if specified) 13816a3193a7SBrian Somersis used when negotiating IP numbers. 13826a3193a7SBrian SomersSee the 13836a3193a7SBrian Somers.Dq set ifaddr 13846a3193a7SBrian Somerscommand for details. 13856a3193a7SBrian Somers.Pp 13866a3193a7SBrian SomersIf authentication is successful and 13876a3193a7SBrian Somers.Ar label 13886a3193a7SBrian Somersis specified, the current system label is changed to match the given 13896a3193a7SBrian Somers.Ar label . 13906a3193a7SBrian SomersThis will change the subsequent parsing of the 13916a3193a7SBrian Somers.Pa ppp.linkup 13926a3193a7SBrian Somersand 13936a3193a7SBrian Somers.Pa ppp.linkdown 13946a3193a7SBrian Somersfiles. 13956a3193a7SBrian Somers.Pp 13966a3193a7SBrian SomersIf authentication is successful and 13976a3193a7SBrian Somers.Ar callback-number 13986a3193a7SBrian Somersis specified and 13996a3193a7SBrian Somers.Dq set callback 14006a3193a7SBrian Somershas been used in 14016a3193a7SBrian Somers.Pa ppp.conf , 14026a3193a7SBrian Somersthe client will be called back on the given number. 14036a3193a7SBrian SomersIf CBCP is being used, 14046a3193a7SBrian Somers.Ar callback-number 14056a3193a7SBrian Somersmay also contain a list of numbers or a 14066a3193a7SBrian Somers.Dq \&* , 14076a3193a7SBrian Somersas if passed to the 14086a3193a7SBrian Somers.Dq set cbcp 14096a3193a7SBrian Somerscommand. 14106a3193a7SBrian SomersThe value will be used in 14116a3193a7SBrian Somers.Nm Ns No 's 14126a3193a7SBrian Somerssubsequent CBCP phase. 14136a3193a7SBrian Somers.Sh PPP OVER TCP and UDP (a.k.a Tunnelling) 14146a3193a7SBrian SomersInstead of running 14156a3193a7SBrian Somers.Nm 14166a3193a7SBrian Somersover a serial link, it is possible to 14176a3193a7SBrian Somersuse a TCP connection instead by specifying the host, port and protocol as the 14186a3193a7SBrian Somersdevice: 14196a3193a7SBrian Somers.Pp 14206a3193a7SBrian Somers.Dl set device ui-gate:6669/tcp 14216a3193a7SBrian Somers.Pp 14226a3193a7SBrian SomersInstead of opening a serial device, 14236a3193a7SBrian Somers.Nm 14246a3193a7SBrian Somerswill open a TCP connection to the given machine on the given 14256a3193a7SBrian Somerssocket. 14266a3193a7SBrian SomersIt should be noted however that 14276a3193a7SBrian Somers.Nm 14286a3193a7SBrian Somersdoes not use the telnet protocol and will be unable to negotiate 14296a3193a7SBrian Somerswith a telnet server. 14306a3193a7SBrian SomersYou should set up a port for receiving this 14316a3193a7SBrian Somers.Em PPP 14326a3193a7SBrian Somersconnection on the receiving machine (ui-gate). 14336a3193a7SBrian SomersThis is done by first updating 14346a3193a7SBrian Somers.Pa /etc/services 14356a3193a7SBrian Somersto name the service: 14366a3193a7SBrian Somers.Pp 14376a3193a7SBrian Somers.Dl ppp-in 6669/tcp # Incoming PPP connections over TCP 14386a3193a7SBrian Somers.Pp 14396a3193a7SBrian Somersand updating 14406a3193a7SBrian Somers.Pa /etc/inetd.conf 14416a3193a7SBrian Somersto tell 14426a3193a7SBrian Somers.Xr inetd 8 14436a3193a7SBrian Somershow to deal with incoming connections on that port: 14446a3193a7SBrian Somers.Pp 14456a3193a7SBrian Somers.Dl ppp-in stream tcp nowait root /usr/sbin/ppp ppp -direct ppp-in 14466a3193a7SBrian Somers.Pp 14476a3193a7SBrian SomersDo not forget to send a 14486a3193a7SBrian Somers.Dv HUP 14496a3193a7SBrian Somerssignal to 14506a3193a7SBrian Somers.Xr inetd 8 14516a3193a7SBrian Somersafter you have updated 14526a3193a7SBrian Somers.Pa /etc/inetd.conf . 14536a3193a7SBrian SomersHere, we use a label named 14546a3193a7SBrian Somers.Dq ppp-in . 14556a3193a7SBrian SomersThe entry in 14566a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 14576a3193a7SBrian Somerson ui-gate (the receiver) should contain the following: 14586a3193a7SBrian Somers.Bd -literal -offset indent 14596a3193a7SBrian Somersppp-in: 14606a3193a7SBrian Somers set timeout 0 14616a3193a7SBrian Somers set ifaddr 10.0.4.1 10.0.4.2 14626a3193a7SBrian Somers.Ed 14636a3193a7SBrian Somers.Pp 14646a3193a7SBrian Somersand the entry in 14656a3193a7SBrian Somers.Pa /etc/ppp/ppp.linkup 14666a3193a7SBrian Somersshould contain: 14676a3193a7SBrian Somers.Bd -literal -offset indent 14686a3193a7SBrian Somersppp-in: 14696a3193a7SBrian Somers add 10.0.1.0/24 HISADDR 14706a3193a7SBrian Somers.Ed 14716a3193a7SBrian Somers.Pp 14726a3193a7SBrian SomersIt is necessary to put the 14736a3193a7SBrian Somers.Dq add 14746a3193a7SBrian Somerscommand in 14756a3193a7SBrian Somers.Pa ppp.linkup 14766a3193a7SBrian Somersto ensure that the route is only added after 14776a3193a7SBrian Somers.Nm 14786a3193a7SBrian Somershas negotiated and assigned addresses to its interface. 14796a3193a7SBrian Somers.Pp 14806a3193a7SBrian SomersYou may also want to enable PAP or CHAP for security. 14816a3193a7SBrian SomersTo enable PAP, add the following line: 14826a3193a7SBrian Somers.Bd -literal -offset indent 14836a3193a7SBrian Somers enable PAP 14846a3193a7SBrian Somers.Ed 14856a3193a7SBrian Somers.Pp 14866a3193a7SBrian SomersYou will also need to create the following entry in 14876a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret : 14886a3193a7SBrian Somers.Bd -literal -offset indent 14896a3193a7SBrian SomersMyAuthName MyAuthPasswd 14906a3193a7SBrian Somers.Ed 14916a3193a7SBrian Somers.Pp 14926a3193a7SBrian SomersIf 14936a3193a7SBrian Somers.Ar MyAuthPasswd 14946a3193a7SBrian Somersis a 14956a3193a7SBrian Somers.Dq * , 14966a3193a7SBrian Somersthe password is looked up in the 14976a3193a7SBrian Somers.Xr passwd 5 14986a3193a7SBrian Somersdatabase. 14996a3193a7SBrian Somers.Pp 15006a3193a7SBrian SomersThe entry in 15016a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 15026a3193a7SBrian Somerson awfulhak (the initiator) should contain the following: 15036a3193a7SBrian Somers.Bd -literal -offset indent 15046a3193a7SBrian Somersui-gate: 15056a3193a7SBrian Somers set escape 0xff 15066a3193a7SBrian Somers set device ui-gate:ppp-in/tcp 15076a3193a7SBrian Somers set dial 15086a3193a7SBrian Somers set timeout 30 15096a3193a7SBrian Somers set log Phase Chat Connect hdlc LCP IPCP IPV6CP CCP tun 15106a3193a7SBrian Somers set ifaddr 10.0.4.2 10.0.4.1 15116a3193a7SBrian Somers.Ed 15126a3193a7SBrian Somers.Pp 15136a3193a7SBrian Somerswith the route setup in 15146a3193a7SBrian Somers.Pa /etc/ppp/ppp.linkup : 15156a3193a7SBrian Somers.Bd -literal -offset indent 15166a3193a7SBrian Somersui-gate: 15176a3193a7SBrian Somers add 10.0.2.0/24 HISADDR 15186a3193a7SBrian Somers.Ed 15196a3193a7SBrian Somers.Pp 15206a3193a7SBrian SomersAgain, if you are enabling PAP, you will also need this in the 15216a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 15226a3193a7SBrian Somersprofile: 15236a3193a7SBrian Somers.Bd -literal -offset indent 15246a3193a7SBrian Somers set authname MyAuthName 15256a3193a7SBrian Somers set authkey MyAuthKey 15266a3193a7SBrian Somers.Ed 15276a3193a7SBrian Somers.Pp 15286a3193a7SBrian SomersWe are assigning the address of 10.0.4.1 to ui-gate, and the address 15296a3193a7SBrian Somers10.0.4.2 to awfulhak. 15306a3193a7SBrian SomersTo open the connection, just type 15316a3193a7SBrian Somers.Pp 15326a3193a7SBrian Somers.Dl awfulhak # ppp -background ui-gate 15336a3193a7SBrian Somers.Pp 15346a3193a7SBrian SomersThe result will be an additional "route" on awfulhak to the 15356a3193a7SBrian Somers10.0.2.0/24 network via the TCP connection, and an additional 15366a3193a7SBrian Somers"route" on ui-gate to the 10.0.1.0/24 network. 15376a3193a7SBrian SomersThe networks are effectively bridged - the underlying TCP 15386a3193a7SBrian Somersconnection may be across a public network (such as the 15396a3193a7SBrian SomersInternet), and the 15406a3193a7SBrian Somers.Em PPP 15416a3193a7SBrian Somerstraffic is conceptually encapsulated 15426a3193a7SBrian Somers(although not packet by packet) inside the TCP stream between 15436a3193a7SBrian Somersthe two gateways. 15446a3193a7SBrian Somers.Pp 15456a3193a7SBrian SomersThe major disadvantage of this mechanism is that there are two 15466a3193a7SBrian Somers"guaranteed delivery" mechanisms in place - the underlying TCP 15476a3193a7SBrian Somersstream and whatever protocol is used over the 15486a3193a7SBrian Somers.Em PPP 15496a3193a7SBrian Somerslink - probably TCP again. 15506a3193a7SBrian SomersIf packets are lost, both levels will 15516a3193a7SBrian Somersget in each others way trying to negotiate sending of the missing 15526a3193a7SBrian Somerspacket. 15536a3193a7SBrian Somers.Pp 15546a3193a7SBrian SomersTo avoid this overhead, it is also possible to do all this using 15556a3193a7SBrian SomersUDP instead of TCP as the transport by simply changing the protocol 15566a3193a7SBrian Somersfrom "tcp" to "udp". 15576a3193a7SBrian SomersWhen using UDP as a transport, 15586a3193a7SBrian Somers.Nm 15596a3193a7SBrian Somerswill operate in synchronous mode. 15606a3193a7SBrian SomersThis is another gain as the incoming 15616a3193a7SBrian Somersdata does not have to be rearranged into packets. 15626a3193a7SBrian Somers.Pp 15636a3193a7SBrian SomersCare should be taken when adding a default route through a tunneled 15646a3193a7SBrian Somerssetup like this. 15656a3193a7SBrian SomersIt is quite common for the default route 15666a3193a7SBrian Somers(added in 15676a3193a7SBrian Somers.Pa /etc/ppp/ppp.linkup ) 15686a3193a7SBrian Somersto end up routing the link's TCP connection through the tunnel, 15696a3193a7SBrian Somerseffectively garrotting the connection. 15706a3193a7SBrian SomersTo avoid this, make sure you add a static route for the benefit of 15716a3193a7SBrian Somersthe link: 15726a3193a7SBrian Somers.Bd -literal -offset indent 15736a3193a7SBrian Somersui-gate: 15746a3193a7SBrian Somers set escape 0xff 15756a3193a7SBrian Somers set device ui-gate:ppp-in/tcp 15766a3193a7SBrian Somers add ui-gate x.x.x.x 15776a3193a7SBrian Somers ..... 15786a3193a7SBrian Somers.Ed 15796a3193a7SBrian Somers.Pp 15806a3193a7SBrian Somerswhere 15816a3193a7SBrian Somers.Dq x.x.x.x 15826a3193a7SBrian Somersis the IP number that your route to 15836a3193a7SBrian Somers.Dq ui-gate 15846a3193a7SBrian Somerswould normally use. 15856a3193a7SBrian Somers.Pp 15866a3193a7SBrian SomersWhen routing your connection across a public network such as the Internet, 15876a3193a7SBrian Somersit is preferable to encrypt the data. 15886a3193a7SBrian SomersThis can be done with the help of the MPPE protocol, although currently this 15896a3193a7SBrian Somersmeans that you will not be able to also compress the traffic as MPPE is 15906a3193a7SBrian Somersimplemented as a compression layer (thank Microsoft for this). 15916a3193a7SBrian SomersTo enable MPPE encryption, add the following lines to 15926a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 15936a3193a7SBrian Somerson the server: 15946a3193a7SBrian Somers.Bd -literal -offset indent 15956a3193a7SBrian Somers enable MSCHAPv2 15966a3193a7SBrian Somers disable deflate pred1 15976a3193a7SBrian Somers deny deflate pred1 15986a3193a7SBrian Somers.Ed 15996a3193a7SBrian Somers.Pp 16006a3193a7SBrian Somersensuring that you have put the requisite entry in 16016a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret 16026a3193a7SBrian Somers(MSCHAPv2 is challenge based, so 16036a3193a7SBrian Somers.Xr passwd 5 16046a3193a7SBrian Somerscannot be used) 16056a3193a7SBrian Somers.Pp 16066a3193a7SBrian SomersMSCHAPv2 and MPPE are accepted by default, so the client end should work 16076a3193a7SBrian Somerswithout any additional changes (although ensure you have 16086a3193a7SBrian Somers.Dq set authname 16096a3193a7SBrian Somersand 16106a3193a7SBrian Somers.Dq set authkey 16116a3193a7SBrian Somersin your profile). 16126a3193a7SBrian Somers.Sh NETWORK ADDRESS TRANSLATION (PACKET ALIASING) 16136a3193a7SBrian SomersThe 16146a3193a7SBrian Somers.Fl nat 16156a3193a7SBrian Somerscommand line option enables network address translation (a.k.a.\& packet 16166a3193a7SBrian Somersaliasing). 16176a3193a7SBrian SomersThis allows the 16186a3193a7SBrian Somers.Nm 16196a3193a7SBrian Somershost to act as a masquerading gateway for other computers over 16206a3193a7SBrian Somersa local area network. 16216a3193a7SBrian SomersOutgoing IP packets are NAT'd so that they appear to come from the 16226a3193a7SBrian Somers.Nm 16236a3193a7SBrian Somershost, and incoming packets are de-NAT'd so that they are routed 16246a3193a7SBrian Somersto the correct machine on the local area network. 16256a3193a7SBrian SomersNAT allows computers on private, unregistered subnets to have Internet 16266a3193a7SBrian Somersaccess, although they are invisible from the outside world. 16276a3193a7SBrian SomersIn general, correct 16286a3193a7SBrian Somers.Nm 16296a3193a7SBrian Somersoperation should first be verified with network address translation disabled. 16306a3193a7SBrian SomersThen, the 16316a3193a7SBrian Somers.Fl nat 16326a3193a7SBrian Somersoption should be switched on, and network applications (web browser, 16336a3193a7SBrian Somers.Xr telnet 1 , 16346a3193a7SBrian Somers.Xr ftp 1 , 16356a3193a7SBrian Somers.Xr ping 8 , 16366a3193a7SBrian Somers.Xr traceroute 8 ) 16376a3193a7SBrian Somersshould be checked on the 16386a3193a7SBrian Somers.Nm 16396a3193a7SBrian Somershost. 16406a3193a7SBrian SomersFinally, the same or similar applications should be checked on other 16416a3193a7SBrian Somerscomputers in the LAN. 16426a3193a7SBrian SomersIf network applications work correctly on the 16436a3193a7SBrian Somers.Nm 16446a3193a7SBrian Somershost, but not on other machines in the LAN, then the masquerading 16456a3193a7SBrian Somerssoftware is working properly, but the host is either not forwarding 16466a3193a7SBrian Somersor possibly receiving IP packets. 16476a3193a7SBrian SomersCheck that IP forwarding is enabled in 16486a3193a7SBrian Somers.Pa /etc/rc.conf 16496a3193a7SBrian Somersand that other machines have designated the 16506a3193a7SBrian Somers.Nm 16516a3193a7SBrian Somershost as the gateway for the LAN. 16529d4c84deSAllan JudeWhen starting 16539d4c84deSAllan Jude.Nm 16549d4c84deSAllan Judewith the provided rc script, the default is to 16559d4c84deSAllan Judeenable NAT; see 16569d4c84deSAllan Jude.Va ppp_nat 16579d4c84deSAllan Judein 16589d4c84deSAllan Jude.Xr rc.conf 5 16599d4c84deSAllan Judeand 16609d4c84deSAllan Jude.Pa /etc/defaults/rc.conf . 16616a3193a7SBrian Somers.Sh PACKET FILTERING 16626a3193a7SBrian SomersThis implementation supports packet filtering. 16636a3193a7SBrian SomersThere are four kinds of 16646a3193a7SBrian Somersfilters: the 16656a3193a7SBrian Somers.Em in 16666a3193a7SBrian Somersfilter, the 16676a3193a7SBrian Somers.Em out 16686a3193a7SBrian Somersfilter, the 16696a3193a7SBrian Somers.Em dial 16706a3193a7SBrian Somersfilter and the 16716a3193a7SBrian Somers.Em alive 16726a3193a7SBrian Somersfilter. 16736a3193a7SBrian SomersHere are the basics: 16746a3193a7SBrian Somers.Bl -bullet 16756a3193a7SBrian Somers.It 16766a3193a7SBrian SomersA filter definition has the following syntax: 16776a3193a7SBrian Somers.Pp 16786a3193a7SBrian Somersset filter 16796a3193a7SBrian Somers.Ar name 16806a3193a7SBrian Somers.Ar rule-no 16816a3193a7SBrian Somers.Ar action 16826a3193a7SBrian Somers.Op !\& 16836a3193a7SBrian Somers.Oo 16846a3193a7SBrian Somers.Op host 16856a3193a7SBrian Somers.Ar src_addr Ns Op / Ns Ar width 16866a3193a7SBrian Somers.Op Ar dst_addr Ns Op / Ns Ar width 16876a3193a7SBrian Somers.Oc 16886a3193a7SBrian Somers.Ar [ proto Op src Ar cmp port 16896a3193a7SBrian Somers.Op dst Ar cmp port 16906a3193a7SBrian Somers.Op estab 16916a3193a7SBrian Somers.Op syn 16926a3193a7SBrian Somers.Op finrst 16936a3193a7SBrian Somers.Op timeout Ar secs ] 16946a3193a7SBrian Somers.Bl -enum 16956a3193a7SBrian Somers.It 16966a3193a7SBrian Somers.Ar Name 16976a3193a7SBrian Somersshould be one of 16986a3193a7SBrian Somers.Sq in , 16996a3193a7SBrian Somers.Sq out , 17006a3193a7SBrian Somers.Sq dial 17016a3193a7SBrian Somersor 17026a3193a7SBrian Somers.Sq alive . 17036a3193a7SBrian Somers.It 17046a3193a7SBrian Somers.Ar Rule-no 17056a3193a7SBrian Somersis a numeric value between 17066a3193a7SBrian Somers.Sq 0 17076a3193a7SBrian Somersand 17086a3193a7SBrian Somers.Sq 39 17096a3193a7SBrian Somersspecifying the rule number. 17106a3193a7SBrian SomersRules are specified in numeric order according to 17116a3193a7SBrian Somers.Ar rule-no , 17126a3193a7SBrian Somersbut only if rule 17136a3193a7SBrian Somers.Sq 0 17146a3193a7SBrian Somersis defined. 17156a3193a7SBrian Somers.It 17166a3193a7SBrian Somers.Ar Action 17176a3193a7SBrian Somersmay be specified as 17186a3193a7SBrian Somers.Sq permit 17196a3193a7SBrian Somersor 17206a3193a7SBrian Somers.Sq deny , 17216a3193a7SBrian Somersin which case, if a given packet matches the rule, the associated action 17226a3193a7SBrian Somersis taken immediately. 17236a3193a7SBrian Somers.Ar Action 17246a3193a7SBrian Somerscan also be specified as 17256a3193a7SBrian Somers.Sq clear 17266a3193a7SBrian Somersto clear the action associated with that particular rule, or as a new 17276a3193a7SBrian Somersrule number greater than the current rule. 17286a3193a7SBrian SomersIn this case, if a given 17296a3193a7SBrian Somerspacket matches the current rule, the packet will next be matched against 17306a3193a7SBrian Somersthe new rule number (rather than the next rule number). 17316a3193a7SBrian Somers.Pp 17326a3193a7SBrian SomersThe 17336a3193a7SBrian Somers.Ar action 17346a3193a7SBrian Somersmay optionally be followed with an exclamation mark 17356a3193a7SBrian Somers.Pq Dq !\& , 17366a3193a7SBrian Somerstelling 17376a3193a7SBrian Somers.Nm 17386a3193a7SBrian Somersto reverse the sense of the following match. 17396a3193a7SBrian Somers.It 17406a3193a7SBrian Somers.Op Ar src_addr Ns Op / Ns Ar width 17416a3193a7SBrian Somersand 17426a3193a7SBrian Somers.Op Ar dst_addr Ns Op / Ns Ar width 17436a3193a7SBrian Somersare the source and destination IP number specifications. 17446a3193a7SBrian SomersIf 17456a3193a7SBrian Somers.Op / Ns Ar width 17466a3193a7SBrian Somersis specified, it gives the number of relevant netmask bits, 17476a3193a7SBrian Somersallowing the specification of an address range. 17486a3193a7SBrian Somers.Pp 17496a3193a7SBrian SomersEither 17506a3193a7SBrian Somers.Ar src_addr 17516a3193a7SBrian Somersor 17526a3193a7SBrian Somers.Ar dst_addr 17536a3193a7SBrian Somersmay be given the values 17546a3193a7SBrian Somers.Dv MYADDR , 17556a3193a7SBrian Somers.Dv HISADDR , 17566a3193a7SBrian Somers.Dv MYADDR6 17576a3193a7SBrian Somersor 17586a3193a7SBrian Somers.Dv HISADDR6 17596a3193a7SBrian Somers(refer to the description of the 17606a3193a7SBrian Somers.Dq bg 17616a3193a7SBrian Somerscommand for a description of these values). 17626a3193a7SBrian SomersWhen these values are used, 17636a3193a7SBrian Somersthe filters will be updated any time the values change. 17646a3193a7SBrian SomersThis is similar to the behaviour of the 17656a3193a7SBrian Somers.Dq add 17666a3193a7SBrian Somerscommand below. 17676a3193a7SBrian Somers.It 17686a3193a7SBrian Somers.Ar Proto 17696a3193a7SBrian Somersmay be any protocol from 17706a3193a7SBrian Somers.Xr protocols 5 . 17716a3193a7SBrian Somers.It 17726a3193a7SBrian Somers.Ar Cmp 17736a3193a7SBrian Somersis one of 17746a3193a7SBrian Somers.Sq \< , 17756a3193a7SBrian Somers.Sq \&eq 17766a3193a7SBrian Somersor 17776a3193a7SBrian Somers.Sq \> , 17786a3193a7SBrian Somersmeaning less-than, equal and greater-than respectively. 17796a3193a7SBrian Somers.Ar Port 17806a3193a7SBrian Somerscan be specified as a numeric port or by service name from 17816a3193a7SBrian Somers.Pa /etc/services . 17826a3193a7SBrian Somers.It 17836a3193a7SBrian SomersThe 17846a3193a7SBrian Somers.Sq estab , 17856a3193a7SBrian Somers.Sq syn , 17866a3193a7SBrian Somersand 17876a3193a7SBrian Somers.Sq finrst 17886a3193a7SBrian Somersflags are only allowed when 17896a3193a7SBrian Somers.Ar proto 17906a3193a7SBrian Somersis set to 17916a3193a7SBrian Somers.Sq tcp , 17926a3193a7SBrian Somersand represent the TH_ACK, TH_SYN and TH_FIN or TH_RST TCP flags respectively. 17936a3193a7SBrian Somers.It 17946a3193a7SBrian SomersThe timeout value adjusts the current idle timeout to at least 17956a3193a7SBrian Somers.Ar secs 17966a3193a7SBrian Somersseconds. 17976a3193a7SBrian SomersIf a timeout is given in the alive filter as well as in the in/out 17986a3193a7SBrian Somersfilter, the in/out value is used. 17996a3193a7SBrian SomersIf no timeout is given, the default timeout (set using 18006a3193a7SBrian Somers.Ic set timeout 18016a3193a7SBrian Somersand defaulting to 180 seconds) is used. 18026a3193a7SBrian Somers.El 18036a3193a7SBrian Somers.It 18046a3193a7SBrian SomersEach filter can hold up to 40 rules, starting from rule 0. 18056a3193a7SBrian SomersThe entire rule set is not effective until rule 0 is defined, 18066a3193a7SBrian Somersi.e., the default is to allow everything through. 18076a3193a7SBrian Somers.It 18086a3193a7SBrian SomersIf no rule in a defined set of rules matches a packet, that packet will 18096a3193a7SBrian Somersbe discarded (blocked). 18106a3193a7SBrian SomersIf there are no rules in a given filter, the packet will be permitted. 18116a3193a7SBrian Somers.It 18126a3193a7SBrian SomersIt is possible to filter based on the payload of UDP frames where those 18136a3193a7SBrian Somersframes contain a 18146a3193a7SBrian Somers.Em PROTO_IP 18156a3193a7SBrian Somers.Em PPP 18166a3193a7SBrian Somersframe header. 18176a3193a7SBrian SomersSee the 18186a3193a7SBrian Somers.Ar filter-decapsulation 18196a3193a7SBrian Somersoption below for further details. 18206a3193a7SBrian Somers.It 18216a3193a7SBrian SomersUse 18226a3193a7SBrian Somers.Dq set filter Ar name No -1 18236a3193a7SBrian Somersto flush all rules. 18246a3193a7SBrian Somers.El 18256a3193a7SBrian Somers.Pp 18266a3193a7SBrian SomersSee 18276a3193a7SBrian Somers.Pa /usr/share/examples/ppp/ppp.conf.sample . 18286a3193a7SBrian Somers.Sh SETTING THE IDLE TIMER 18296a3193a7SBrian SomersTo check/set the idle timer, use the 18306a3193a7SBrian Somers.Dq show bundle 18316a3193a7SBrian Somersand 18326a3193a7SBrian Somers.Dq set timeout 18336a3193a7SBrian Somerscommands: 18346a3193a7SBrian Somers.Bd -literal -offset indent 18356a3193a7SBrian Somersppp ON awfulhak> set timeout 600 18366a3193a7SBrian Somers.Ed 18376a3193a7SBrian Somers.Pp 18386a3193a7SBrian SomersThe timeout period is measured in seconds, the default value for which 18396a3193a7SBrian Somersis 180 seconds 18406a3193a7SBrian Somers(or 3 min). 18416a3193a7SBrian SomersTo disable the idle timer function, use the command 18426a3193a7SBrian Somers.Bd -literal -offset indent 18436a3193a7SBrian Somersppp ON awfulhak> set timeout 0 18446a3193a7SBrian Somers.Ed 18456a3193a7SBrian Somers.Pp 18466a3193a7SBrian SomersIn 18476a3193a7SBrian Somers.Fl ddial 18486a3193a7SBrian Somersand 18496a3193a7SBrian Somers.Fl dedicated 18506a3193a7SBrian Somersmodes, the idle timeout is ignored. 18516a3193a7SBrian SomersIn 18526a3193a7SBrian Somers.Fl auto 18536a3193a7SBrian Somersmode, when the idle timeout causes the 18546a3193a7SBrian Somers.Em PPP 18556a3193a7SBrian Somerssession to be 18566a3193a7SBrian Somersclosed, the 18576a3193a7SBrian Somers.Nm 18586a3193a7SBrian Somersprogram itself remains running. 18596a3193a7SBrian SomersAnother trigger packet will cause it to attempt to re-establish the link. 18606a3193a7SBrian Somers.Sh PREDICTOR-1 and DEFLATE COMPRESSION 18616a3193a7SBrian Somers.Nm 18626a3193a7SBrian Somerssupports both Predictor type 1 and deflate compression. 18636a3193a7SBrian SomersBy default, 18646a3193a7SBrian Somers.Nm 18656a3193a7SBrian Somerswill attempt to use (or be willing to accept) both compression protocols 18666a3193a7SBrian Somerswhen the peer agrees 18676a3193a7SBrian Somers(or requests them). 18686a3193a7SBrian SomersThe deflate protocol is preferred by 18696a3193a7SBrian Somers.Nm . 18706a3193a7SBrian SomersRefer to the 18716a3193a7SBrian Somers.Dq disable 18726a3193a7SBrian Somersand 18736a3193a7SBrian Somers.Dq deny 18746a3193a7SBrian Somerscommands if you wish to disable this functionality. 18756a3193a7SBrian Somers.Pp 18766a3193a7SBrian SomersIt is possible to use a different compression algorithm in each direction 18776a3193a7SBrian Somersby using only one of 18786a3193a7SBrian Somers.Dq disable deflate 18796a3193a7SBrian Somersand 18806a3193a7SBrian Somers.Dq deny deflate 18816a3193a7SBrian Somers(assuming that the peer supports both algorithms). 18826a3193a7SBrian Somers.Pp 18836a3193a7SBrian SomersBy default, when negotiating DEFLATE, 18846a3193a7SBrian Somers.Nm 18856a3193a7SBrian Somerswill use a window size of 15. 18866a3193a7SBrian SomersRefer to the 18876a3193a7SBrian Somers.Dq set deflate 18886a3193a7SBrian Somerscommand if you wish to change this behaviour. 18896a3193a7SBrian Somers.Pp 18906a3193a7SBrian SomersA special algorithm called DEFLATE24 is also available, and is disabled 18916a3193a7SBrian Somersand denied by default. 18926a3193a7SBrian SomersThis is exactly the same as DEFLATE except that 18936a3193a7SBrian Somersit uses CCP ID 24 to negotiate. 18946a3193a7SBrian SomersThis allows 18956a3193a7SBrian Somers.Nm 18966a3193a7SBrian Somersto successfully negotiate DEFLATE with 18976a3193a7SBrian Somers.Nm pppd 18986a3193a7SBrian Somersversion 2.3.*. 18996a3193a7SBrian Somers.Sh CONTROLLING IP ADDRESS 19006a3193a7SBrian SomersFor IPv4, 19016a3193a7SBrian Somers.Nm 19026a3193a7SBrian Somersuses IPCP to negotiate IP addresses. 19036a3193a7SBrian SomersEach side of the connection 19046a3193a7SBrian Somersspecifies the IP address that it is willing to use, and if the requested 19056a3193a7SBrian SomersIP address is acceptable then 19066a3193a7SBrian Somers.Nm 19076a3193a7SBrian Somersreturns an ACK to the requester. 19086a3193a7SBrian SomersOtherwise, 19096a3193a7SBrian Somers.Nm 19106a3193a7SBrian Somersreturns NAK to suggest that the peer use a different IP address. 19116a3193a7SBrian SomersWhen 19126a3193a7SBrian Somersboth sides of the connection agree to accept the received request (and 19136a3193a7SBrian Somerssend an ACK), IPCP is set to the open state and a network level connection 19146a3193a7SBrian Somersis established. 19156a3193a7SBrian SomersTo control this IPCP behaviour, this implementation has the 19166a3193a7SBrian Somers.Dq set ifaddr 19176a3193a7SBrian Somerscommand for defining the local and remote IP address: 19186a3193a7SBrian Somers.Bd -ragged -offset indent 19196a3193a7SBrian Somers.No set ifaddr Oo Ar src_addr Ns 19206a3193a7SBrian Somers.Op / Ns Ar \&nn 19216a3193a7SBrian Somers.Oo Ar dst_addr Ns Op / Ns Ar \&nn 19226a3193a7SBrian Somers.Oo Ar netmask 19236a3193a7SBrian Somers.Op Ar trigger_addr 19246a3193a7SBrian Somers.Oc 19256a3193a7SBrian Somers.Oc 19266a3193a7SBrian Somers.Oc 19276a3193a7SBrian Somers.Ed 19286a3193a7SBrian Somers.Pp 19296a3193a7SBrian Somerswhere, 19306a3193a7SBrian Somers.Sq src_addr 19316a3193a7SBrian Somersis the IP address that the local side is willing to use, 19326a3193a7SBrian Somers.Sq dst_addr 19336a3193a7SBrian Somersis the IP address which the remote side should use and 19346a3193a7SBrian Somers.Sq netmask 19356a3193a7SBrian Somersis the netmask that should be used. 19366a3193a7SBrian Somers.Sq Src_addr 19376a3193a7SBrian Somersdefaults to the current 19386a3193a7SBrian Somers.Xr hostname 1 , 19396a3193a7SBrian Somers.Sq dst_addr 19406a3193a7SBrian Somersdefaults to 0.0.0.0, and 19416a3193a7SBrian Somers.Sq netmask 19426a3193a7SBrian Somersdefaults to whatever mask is appropriate for 19436a3193a7SBrian Somers.Sq src_addr . 19446a3193a7SBrian SomersIt is only possible to make 19456a3193a7SBrian Somers.Sq netmask 19466a3193a7SBrian Somerssmaller than the default. 19476a3193a7SBrian SomersThe usual value is 255.255.255.255, as 19486a3193a7SBrian Somersmost kernels ignore the netmask of a POINTOPOINT interface. 19496a3193a7SBrian Somers.Pp 19506a3193a7SBrian SomersSome incorrect 19516a3193a7SBrian Somers.Em PPP 19526a3193a7SBrian Somersimplementations require that the peer negotiates a specific IP 19536a3193a7SBrian Somersaddress instead of 19546a3193a7SBrian Somers.Sq src_addr . 19556a3193a7SBrian SomersIf this is the case, 19566a3193a7SBrian Somers.Sq trigger_addr 19576a3193a7SBrian Somersmay be used to specify this IP number. 19586a3193a7SBrian SomersThis will not affect the 19596a3193a7SBrian Somersrouting table unless the other side agrees with this proposed number. 19606a3193a7SBrian Somers.Bd -literal -offset indent 19616a3193a7SBrian Somersset ifaddr 192.244.177.38 192.244.177.2 255.255.255.255 0.0.0.0 19626a3193a7SBrian Somers.Ed 19636a3193a7SBrian Somers.Pp 19646a3193a7SBrian SomersThe above specification means: 19656a3193a7SBrian Somers.Pp 19666a3193a7SBrian Somers.Bl -bullet -compact 19676a3193a7SBrian Somers.It 19686a3193a7SBrian SomersI will first suggest that my IP address should be 0.0.0.0, but I 19696a3193a7SBrian Somerswill only accept an address of 192.244.177.38. 19706a3193a7SBrian Somers.It 19716a3193a7SBrian SomersI strongly insist that the peer uses 192.244.177.2 as his own 19726a3193a7SBrian Somersaddress and will not permit the use of any IP address but 192.244.177.2. 19736a3193a7SBrian SomersWhen the peer requests another IP address, I will always suggest that 19746a3193a7SBrian Somersit uses 192.244.177.2. 19756a3193a7SBrian Somers.It 19766a3193a7SBrian SomersThe routing table entry will have a netmask of 0xffffffff. 19776a3193a7SBrian Somers.El 19786a3193a7SBrian Somers.Pp 19796a3193a7SBrian SomersThis is all fine when each side has a pre-determined IP address, however 19806a3193a7SBrian Somersit is often the case that one side is acting as a server which controls 19816a3193a7SBrian Somersall IP addresses and the other side should go along with it. 19826a3193a7SBrian SomersIn order to allow more flexible behaviour, the 19836a3193a7SBrian Somers.Dq set ifaddr 19846a3193a7SBrian Somerscommand allows the user to specify IP addresses more loosely: 19856a3193a7SBrian Somers.Pp 19866a3193a7SBrian Somers.Dl set ifaddr 192.244.177.38/24 192.244.177.2/20 19876a3193a7SBrian Somers.Pp 19886a3193a7SBrian SomersA number followed by a slash 19896a3193a7SBrian Somers.Pq Dq / 19906a3193a7SBrian Somersrepresents the number of bits significant in the IP address. 19916a3193a7SBrian SomersThe above example means: 19926a3193a7SBrian Somers.Pp 19936a3193a7SBrian Somers.Bl -bullet -compact 19946a3193a7SBrian Somers.It 19956a3193a7SBrian SomersI would like to use 192.244.177.38 as my address if it is possible, but I will 19966a3193a7SBrian Somersalso accept any IP address between 192.244.177.0 and 192.244.177.255. 19976a3193a7SBrian Somers.It 19986a3193a7SBrian SomersI would like to make him use 192.244.177.2 as his own address, but I will also 19996a3193a7SBrian Somerspermit him to use any IP address between 192.244.176.0 and 20006a3193a7SBrian Somers192.244.191.255. 20016a3193a7SBrian Somers.It 20026a3193a7SBrian SomersAs you may have already noticed, 192.244.177.2 is equivalent to saying 20036a3193a7SBrian Somers192.244.177.2/32. 20046a3193a7SBrian Somers.It 20056a3193a7SBrian SomersAs an exception, 0 is equivalent to 0.0.0.0/0, meaning that I have no 20066a3193a7SBrian Somerspreferred IP address and will obey the remote peers selection. 20076a3193a7SBrian SomersWhen using zero, no routing table entries will be made until a connection 20086a3193a7SBrian Somersis established. 20096a3193a7SBrian Somers.It 20106a3193a7SBrian Somers192.244.177.2/0 means that I will accept/permit any IP address but I will 20116a3193a7SBrian Somerssuggest that 192.244.177.2 be used first. 20126a3193a7SBrian Somers.El 20136a3193a7SBrian Somers.Pp 20146a3193a7SBrian SomersWhen negotiating IPv6 addresses, no control is given to the user. 20156a3193a7SBrian SomersIPV6CP negotiation is fully automatic. 20166a3193a7SBrian Somers.Sh CONNECTING WITH YOUR INTERNET SERVICE PROVIDER 20176a3193a7SBrian SomersThe following steps should be taken when connecting to your ISP: 20186a3193a7SBrian Somers.Bl -enum 20196a3193a7SBrian Somers.It 20206a3193a7SBrian SomersDescribe your providers phone number(s) in the dial script using the 20216a3193a7SBrian Somers.Dq set phone 20226a3193a7SBrian Somerscommand. 20236a3193a7SBrian SomersThis command allows you to set multiple phone numbers for 20246a3193a7SBrian Somersdialing and redialing separated by either a pipe 20256a3193a7SBrian Somers.Pq Dq \&| 20266a3193a7SBrian Somersor a colon 20276a3193a7SBrian Somers.Pq Dq \&: : 20286a3193a7SBrian Somers.Bd -ragged -offset indent 20296a3193a7SBrian Somers.No set phone Ar telno Ns 20306a3193a7SBrian Somers.Oo \&| Ns Ar backupnumber Oc Ns ... Ns Oo : Ns Ar nextnumber Oc Ns ... 20316a3193a7SBrian Somers.Ed 20326a3193a7SBrian Somers.Pp 20336a3193a7SBrian SomersNumbers after the first in a pipe-separated list are only used if the 20346a3193a7SBrian Somersprevious number was used in a failed dial or login script. 20356a3193a7SBrian SomersNumbers 20366a3193a7SBrian Somersseparated by a colon are used sequentially, irrespective of what happened 20376a3193a7SBrian Somersas a result of using the previous number. 20386a3193a7SBrian SomersFor example: 20396a3193a7SBrian Somers.Bd -literal -offset indent 20406a3193a7SBrian Somersset phone "1234567|2345678:3456789|4567890" 20416a3193a7SBrian Somers.Ed 20426a3193a7SBrian Somers.Pp 20436a3193a7SBrian SomersHere, the 1234567 number is attempted. 20446a3193a7SBrian SomersIf the dial or login script fails, 20456a3193a7SBrian Somersthe 2345678 number is used next time, but *only* if the dial or login script 20466a3193a7SBrian Somersfails. 20476a3193a7SBrian SomersOn the dial after this, the 3456789 number is used. 20486a3193a7SBrian SomersThe 4567890 20496a3193a7SBrian Somersnumber is only used if the dial or login script using the 3456789 fails. 20506a3193a7SBrian SomersIf the login script of the 2345678 number fails, the next number is still the 20516a3193a7SBrian Somers3456789 number. 20526a3193a7SBrian SomersAs many pipes and colons can be used as are necessary 20536a3193a7SBrian Somers(although a given site would usually prefer to use either the pipe or the 20546a3193a7SBrian Somerscolon, but not both). 20556a3193a7SBrian SomersThe next number redial timeout is used between all numbers. 20566a3193a7SBrian SomersWhen the end of the list is reached, the normal redial period is 20576a3193a7SBrian Somersused before starting at the beginning again. 20586a3193a7SBrian SomersThe selected phone number is substituted for the \\\\T string in the 20596a3193a7SBrian Somers.Dq set dial 20606a3193a7SBrian Somerscommand (see below). 20616a3193a7SBrian Somers.It 20626a3193a7SBrian SomersSet up your redial requirements using 20636a3193a7SBrian Somers.Dq set redial . 20646a3193a7SBrian SomersFor example, if you have a bad telephone line or your provider is 20656a3193a7SBrian Somersusually engaged (not so common these days), you may want to specify 20666a3193a7SBrian Somersthe following: 20676a3193a7SBrian Somers.Bd -literal -offset indent 20686a3193a7SBrian Somersset redial 10 4 20696a3193a7SBrian Somers.Ed 20706a3193a7SBrian Somers.Pp 20716a3193a7SBrian SomersThis says that up to 4 phone calls should be attempted with a pause of 10 20726a3193a7SBrian Somersseconds before dialing the first number again. 20736a3193a7SBrian Somers.It 20746a3193a7SBrian SomersDescribe your login procedure using the 20756a3193a7SBrian Somers.Dq set dial 20766a3193a7SBrian Somersand 20776a3193a7SBrian Somers.Dq set login 20786a3193a7SBrian Somerscommands. 20796a3193a7SBrian SomersThe 20806a3193a7SBrian Somers.Dq set dial 20816a3193a7SBrian Somerscommand is used to talk to your modem and establish a link with your 20826a3193a7SBrian SomersISP, for example: 20836a3193a7SBrian Somers.Bd -literal -offset indent 20846a3193a7SBrian Somersset dial "ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 4 \\"\\" \e 20856a3193a7SBrian Somers ATZ OK-ATZ-OK ATDT\\\\T TIMEOUT 60 CONNECT" 20866a3193a7SBrian Somers.Ed 20876a3193a7SBrian Somers.Pp 20886a3193a7SBrian SomersThis modem "chat" string means: 20896a3193a7SBrian Somers.Bl -bullet 20906a3193a7SBrian Somers.It 20916a3193a7SBrian SomersAbort if the string "BUSY" or "NO CARRIER" are received. 20926a3193a7SBrian Somers.It 20936a3193a7SBrian SomersSet the timeout to 4 seconds. 20946a3193a7SBrian Somers.It 20956a3193a7SBrian SomersExpect nothing. 20966a3193a7SBrian Somers.It 20976a3193a7SBrian SomersSend ATZ. 20986a3193a7SBrian Somers.It 20996a3193a7SBrian SomersExpect OK. 21006a3193a7SBrian SomersIf that is not received within the 4 second timeout, send ATZ 21016a3193a7SBrian Somersand expect OK. 21026a3193a7SBrian Somers.It 21036a3193a7SBrian SomersSend ATDTxxxxxxx where xxxxxxx is the next number in the phone list from 21046a3193a7SBrian Somersabove. 21056a3193a7SBrian Somers.It 21066a3193a7SBrian SomersSet the timeout to 60. 21076a3193a7SBrian Somers.It 21086a3193a7SBrian SomersWait for the CONNECT string. 21096a3193a7SBrian Somers.El 21106a3193a7SBrian Somers.Pp 21116a3193a7SBrian SomersOnce the connection is established, the login script is executed. 21126a3193a7SBrian SomersThis script is written in the same style as the dial script, but care should 21136a3193a7SBrian Somersbe taken to avoid having your password logged: 21146a3193a7SBrian Somers.Bd -literal -offset indent 21156a3193a7SBrian Somersset authkey MySecret 21166a3193a7SBrian Somersset login "TIMEOUT 15 login:-\\\\r-login: awfulhak \e 21176a3193a7SBrian Somers word: \\\\P ocol: PPP HELLO" 21186a3193a7SBrian Somers.Ed 21196a3193a7SBrian Somers.Pp 21206a3193a7SBrian SomersThis login "chat" string means: 21216a3193a7SBrian Somers.Bl -bullet 21226a3193a7SBrian Somers.It 21236a3193a7SBrian SomersSet the timeout to 15 seconds. 21246a3193a7SBrian Somers.It 21256a3193a7SBrian SomersExpect "login:". 21266a3193a7SBrian SomersIf it is not received, send a carriage return and expect 21276a3193a7SBrian Somers"login:" again. 21286a3193a7SBrian Somers.It 21296a3193a7SBrian SomersSend "awfulhak" 21306a3193a7SBrian Somers.It 21316a3193a7SBrian SomersExpect "word:" (the tail end of a "Password:" prompt). 21326a3193a7SBrian Somers.It 21336a3193a7SBrian SomersSend whatever our current 21346a3193a7SBrian Somers.Ar authkey 21356a3193a7SBrian Somersvalue is set to. 21366a3193a7SBrian Somers.It 21376a3193a7SBrian SomersExpect "ocol:" (the tail end of a "Protocol:" prompt). 21386a3193a7SBrian Somers.It 21396a3193a7SBrian SomersSend "PPP". 21406a3193a7SBrian Somers.It 21416a3193a7SBrian SomersExpect "HELLO". 21426a3193a7SBrian Somers.El 21436a3193a7SBrian Somers.Pp 21446a3193a7SBrian SomersThe 21456a3193a7SBrian Somers.Dq set authkey 21466a3193a7SBrian Somerscommand is logged specially. 21476a3193a7SBrian SomersWhen 21486a3193a7SBrian Somers.Ar command 21496a3193a7SBrian Somersor 21506a3193a7SBrian Somers.Ar chat 21516a3193a7SBrian Somerslogging is enabled, the actual password is not logged; 21526a3193a7SBrian Somers.Sq ******** 21536a3193a7SBrian Somersis logged instead. 21546a3193a7SBrian Somers.Pp 21556a3193a7SBrian SomersLogin scripts vary greatly between ISPs. 21566a3193a7SBrian SomersIf you are setting one up for the first time, 21576a3193a7SBrian Somers.Em ENABLE CHAT LOGGING 21586a3193a7SBrian Somersso that you can see if your script is behaving as you expect. 21596a3193a7SBrian Somers.It 21606a3193a7SBrian SomersUse 21616a3193a7SBrian Somers.Dq set device 21626a3193a7SBrian Somersand 21636a3193a7SBrian Somers.Dq set speed 21646a3193a7SBrian Somersto specify your serial line and speed, for example: 21656a3193a7SBrian Somers.Bd -literal -offset indent 21666a3193a7SBrian Somersset device /dev/cuau0 21676a3193a7SBrian Somersset speed 115200 21686a3193a7SBrian Somers.Ed 21696a3193a7SBrian Somers.Pp 217021ca690bSJose Luis Duran.Pa cuaU0 217121ca690bSJose Luis Duranand 217221ca690bSJose Luis Duran.Pa cuau0 217321ca690bSJose Luis Duranare the first 217421ca690bSJose Luis Duran.Xr usb 4 217521ca690bSJose Luis Duranand 217621ca690bSJose Luis Duran.Xr uart 4 217721ca690bSJose Luis Duranserial ports found by 217821ca690bSJose Luis Duran.Fx , 217921ca690bSJose Luis Duranrespectively. 21806a3193a7SBrian SomersIf you are running 21816a3193a7SBrian Somers.Nm 21826a3193a7SBrian Somerson 21836a3193a7SBrian Somers.Ox , 218421ca690bSJose Luis Duran.Pa cua00 218521ca690bSJose Luis Duranis the first. 21866a3193a7SBrian SomersA speed of 115200 should be specified 21876a3193a7SBrian Somersif you have a modem capable of bit rates of 28800 or more. 21886a3193a7SBrian SomersIn general, the serial speed should be about four times the modem speed. 21896a3193a7SBrian Somers.It 21906a3193a7SBrian SomersUse the 21916a3193a7SBrian Somers.Dq set ifaddr 21926a3193a7SBrian Somerscommand to {define} the IP address. 21936a3193a7SBrian Somers.Bl -bullet 21946a3193a7SBrian Somers.It 21956a3193a7SBrian SomersIf you know what IP address your provider uses, then use it as the remote 21966a3193a7SBrian Somersaddress (dst_addr), otherwise choose something like 10.0.0.2/0 (see below). 21976a3193a7SBrian Somers.It 21986a3193a7SBrian SomersIf your provider has assigned a particular IP address to you, then use 21996a3193a7SBrian Somersit as your address (src_addr). 22006a3193a7SBrian Somers.It 22016a3193a7SBrian SomersIf your provider assigns your address dynamically, choose a suitably 22026a3193a7SBrian Somersunobtrusive and unspecific IP number as your address. 22036a3193a7SBrian Somers10.0.0.1/0 would be appropriate. 22046a3193a7SBrian SomersThe bit after the / specifies how many bits of the 2205*f16ca171SOlivier Cochardaddress you consider to be important, so if you wanted to specify an 2206*f16ca171SOlivier Cochardaddress within the 1.2.3.0/24 subnet, you could specify 1.2.3.1/24. 22076a3193a7SBrian Somers.It 22086a3193a7SBrian SomersIf you find that your ISP accepts the first IP number that you suggest, 22096a3193a7SBrian Somersspecify third and forth arguments of 22106a3193a7SBrian Somers.Dq 0.0.0.0 . 22116a3193a7SBrian SomersThis will force your ISP to assign a number. 22126a3193a7SBrian Somers(The third argument will 22136a3193a7SBrian Somersbe ignored as it is less restrictive than the default mask for your 22146a3193a7SBrian Somers.Sq src_addr ) . 22156a3193a7SBrian Somers.El 22166a3193a7SBrian Somers.Pp 22176a3193a7SBrian SomersAn example for a connection where you do not know your IP number or your 22186a3193a7SBrian SomersISPs IP number would be: 22196a3193a7SBrian Somers.Bd -literal -offset indent 22206a3193a7SBrian Somersset ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0 22216a3193a7SBrian Somers.Ed 22226a3193a7SBrian Somers.It 22236a3193a7SBrian SomersIn most cases, your ISP will also be your default router. 22246a3193a7SBrian SomersIf this is the case, add the line 22256a3193a7SBrian Somers.Bd -literal -offset indent 22266a3193a7SBrian Somersadd default HISADDR 22276a3193a7SBrian Somers.Ed 22286a3193a7SBrian Somers.Pp 22296a3193a7SBrian Somersto 22306a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 22316a3193a7SBrian Somers(or to 22326a3193a7SBrian Somers.Pa /etc/ppp/ppp.linkup 22336a3193a7SBrian Somersfor setups that do not use 22346a3193a7SBrian Somers.Fl auto 22356a3193a7SBrian Somersmode). 22366a3193a7SBrian Somers.Pp 22376a3193a7SBrian SomersThis tells 22386a3193a7SBrian Somers.Nm 22396a3193a7SBrian Somersto add a default route to whatever the peer address is 22406a3193a7SBrian Somers(10.0.0.2 in this example). 22416a3193a7SBrian SomersThis route is 22426a3193a7SBrian Somers.Sq sticky , 22436a3193a7SBrian Somersmeaning that should the value of 22446a3193a7SBrian Somers.Dv HISADDR 22456a3193a7SBrian Somerschange, the route will be updated accordingly. 22466a3193a7SBrian Somers.It 22476a3193a7SBrian SomersIf your provider requests that you use PAP/CHAP authentication methods, add 22486a3193a7SBrian Somersthe next lines to your 22496a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf 22506a3193a7SBrian Somersfile: 22516a3193a7SBrian Somers.Bd -literal -offset indent 22526a3193a7SBrian Somersset authname MyName 22536a3193a7SBrian Somersset authkey MyPassword 22546a3193a7SBrian Somers.Ed 22556a3193a7SBrian Somers.Pp 22566a3193a7SBrian SomersBoth are accepted by default, so 22576a3193a7SBrian Somers.Nm 22586a3193a7SBrian Somerswill provide whatever your ISP requires. 22596a3193a7SBrian Somers.Pp 22606a3193a7SBrian SomersIt should be noted that a login script is rarely (if ever) required 22616a3193a7SBrian Somerswhen PAP or CHAP are in use. 22626a3193a7SBrian Somers.It 22636a3193a7SBrian SomersAsk your ISP to authenticate your nameserver address(es) with the line 22646a3193a7SBrian Somers.Bd -literal -offset indent 22656a3193a7SBrian Somersenable dns 22666a3193a7SBrian Somers.Ed 22676a3193a7SBrian Somers.Pp 22686a3193a7SBrian SomersDo 22696a3193a7SBrian Somers.Em NOT 22706a3193a7SBrian Somersdo this if you are running a local DNS unless you also either use 22716a3193a7SBrian Somers.Dq resolv readonly 22726a3193a7SBrian Somersor have 22736a3193a7SBrian Somers.Dq resolv restore 22746a3193a7SBrian Somersin 22756a3193a7SBrian Somers.Pa /etc/ppp/ppp.linkdown , 22766a3193a7SBrian Somersas 22776a3193a7SBrian Somers.Nm 22786a3193a7SBrian Somerswill simply circumvent its use by entering some nameserver lines in 22796a3193a7SBrian Somers.Pa /etc/resolv.conf . 22806a3193a7SBrian Somers.El 22816a3193a7SBrian Somers.Pp 22826a3193a7SBrian SomersPlease refer to 22836a3193a7SBrian Somers.Pa /usr/share/examples/ppp/ppp.conf.sample 22846a3193a7SBrian Somersand 22856a3193a7SBrian Somers.Pa /usr/share/examples/ppp/ppp.linkup.sample 22866a3193a7SBrian Somersfor some real examples. 22876a3193a7SBrian SomersThe pmdemand label should be appropriate for most ISPs. 22886a3193a7SBrian Somers.Sh LOGGING FACILITY 22896a3193a7SBrian Somers.Nm 22906a3193a7SBrian Somersis able to generate the following log info either via 22916a3193a7SBrian Somers.Xr syslog 3 22926a3193a7SBrian Somersor directly to the screen: 22936a3193a7SBrian Somers.Pp 22946a3193a7SBrian Somers.Bl -tag -width XXXXXXXXX -offset XXX -compact 22956a3193a7SBrian Somers.It Li All 22966a3193a7SBrian SomersEnable all logging facilities. 22976a3193a7SBrian SomersThis generates a lot of log. 22986a3193a7SBrian SomersThe most common use of 'all' is as a basis, where you remove some facilities 22996a3193a7SBrian Somersafter enabling 'all' ('debug' and 'timer' are usually best disabled.) 23006a3193a7SBrian Somers.It Li Async 23016a3193a7SBrian SomersDump async level packet in hex. 23026a3193a7SBrian Somers.It Li CBCP 23036a3193a7SBrian SomersGenerate CBCP (CallBack Control Protocol) logs. 23046a3193a7SBrian Somers.It Li CCP 23056a3193a7SBrian SomersGenerate a CCP packet trace. 23066a3193a7SBrian Somers.It Li Chat 23076a3193a7SBrian SomersGenerate 23086a3193a7SBrian Somers.Sq dial , 23096a3193a7SBrian Somers.Sq login , 23106a3193a7SBrian Somers.Sq logout 23116a3193a7SBrian Somersand 23126a3193a7SBrian Somers.Sq hangup 23136a3193a7SBrian Somerschat script trace logs. 23146a3193a7SBrian Somers.It Li Command 23156a3193a7SBrian SomersLog commands executed either from the command line or any of the configuration 23166a3193a7SBrian Somersfiles. 23176a3193a7SBrian Somers.It Li Connect 23186a3193a7SBrian SomersLog Chat lines containing the string "CONNECT". 23196a3193a7SBrian Somers.It Li Debug 23206a3193a7SBrian SomersLog debug information. 23216a3193a7SBrian Somers.It Li DNS 23226a3193a7SBrian SomersLog DNS QUERY packets. 23236a3193a7SBrian Somers.It Li Filter 23246a3193a7SBrian SomersLog packets permitted by the dial filter and denied by any filter. 23256a3193a7SBrian Somers.It Li HDLC 23266a3193a7SBrian SomersDump HDLC packet in hex. 23276a3193a7SBrian Somers.It Li ID0 23286a3193a7SBrian SomersLog all function calls specifically made as user id 0. 23296a3193a7SBrian Somers.It Li IPCP 23306a3193a7SBrian SomersGenerate an IPCP packet trace. 23316a3193a7SBrian Somers.It Li LCP 23326a3193a7SBrian SomersGenerate an LCP packet trace. 23336a3193a7SBrian Somers.It Li LQM 23346a3193a7SBrian SomersGenerate LQR reports. 23356a3193a7SBrian Somers.It Li Phase 23366a3193a7SBrian SomersPhase transition log output. 23376a3193a7SBrian Somers.It Li Physical 23386a3193a7SBrian SomersDump physical level packet in hex. 23396a3193a7SBrian Somers.It Li Radius 23406a3193a7SBrian SomersDump RADIUS information. 23416a3193a7SBrian SomersRADIUS information resulting from the link coming up or down is logged at 23426a3193a7SBrian Somers.Dq Phase 23436a3193a7SBrian Somerslevel unless 23446a3193a7SBrian Somers.Dq Radius 23456a3193a7SBrian Somerslogging is enabled. 23466a3193a7SBrian SomersThis log level is most useful for monitoring RADIUS alive information. 23476a3193a7SBrian Somers.It Li Sync 23486a3193a7SBrian SomersDump sync level packet in hex. 23496a3193a7SBrian Somers.It Li TCP/IP 23506a3193a7SBrian SomersDump all TCP/IP packets. 23516a3193a7SBrian Somers.It Li Timer 23526a3193a7SBrian SomersLog timer manipulation. 23536a3193a7SBrian Somers.It Li TUN 23546a3193a7SBrian SomersInclude the tun device on each log line. 23556a3193a7SBrian Somers.It Li Warning 23566a3193a7SBrian SomersOutput to the terminal device. 23576a3193a7SBrian SomersIf there is currently no terminal, 23586a3193a7SBrian Somersoutput is sent to the log file using syslogs 23596a3193a7SBrian Somers.Dv LOG_WARNING . 23606a3193a7SBrian Somers.It Li Error 23616a3193a7SBrian SomersOutput to both the terminal device 23626a3193a7SBrian Somersand the log file using syslogs 23636a3193a7SBrian Somers.Dv LOG_ERROR . 23646a3193a7SBrian Somers.It Li Alert 23656a3193a7SBrian SomersOutput to the log file using 23666a3193a7SBrian Somers.Dv LOG_ALERT . 23676a3193a7SBrian Somers.El 23686a3193a7SBrian Somers.Pp 23696a3193a7SBrian SomersThe 23706a3193a7SBrian Somers.Dq set log 23716a3193a7SBrian Somerscommand allows you to set the logging output level. 23726a3193a7SBrian SomersMultiple levels can be specified on a single command line. 23736a3193a7SBrian SomersThe default is equivalent to 23746a3193a7SBrian Somers.Dq set log Phase . 23756a3193a7SBrian Somers.Pp 23766a3193a7SBrian SomersIt is also possible to log directly to the screen. 23776a3193a7SBrian SomersThe syntax is the same except that the word 23786a3193a7SBrian Somers.Dq local 23796a3193a7SBrian Somersshould immediately follow 23806a3193a7SBrian Somers.Dq set log . 23816a3193a7SBrian SomersThe default is 23826a3193a7SBrian Somers.Dq set log local 23836a3193a7SBrian Somers(i.e., only the un-maskable warning, error and alert output). 23846a3193a7SBrian Somers.Pp 23856a3193a7SBrian SomersIf The first argument to 23866a3193a7SBrian Somers.Dq set log Op local 23876a3193a7SBrian Somersbegins with a 23886a3193a7SBrian Somers.Sq + 23896a3193a7SBrian Somersor a 23906a3193a7SBrian Somers.Sq - 23916a3193a7SBrian Somerscharacter, the current log levels are 23926a3193a7SBrian Somersnot cleared, for example: 23936a3193a7SBrian Somers.Bd -literal -offset indent 23946a3193a7SBrian SomersPPP ON awfulhak> set log phase 23956a3193a7SBrian SomersPPP ON awfulhak> show log 23966a3193a7SBrian SomersLog: Phase Warning Error Alert 23976a3193a7SBrian SomersLocal: Warning Error Alert 23986a3193a7SBrian SomersPPP ON awfulhak> set log +tcp/ip -warning 23996a3193a7SBrian SomersPPP ON awfulhak> set log local +command 24006a3193a7SBrian SomersPPP ON awfulhak> show log 24016a3193a7SBrian SomersLog: Phase TCP/IP Warning Error Alert 24026a3193a7SBrian SomersLocal: Command Warning Error Alert 24036a3193a7SBrian Somers.Ed 24046a3193a7SBrian Somers.Pp 24056a3193a7SBrian SomersLog messages of level Warning, Error and Alert are not controllable 24066a3193a7SBrian Somersusing 24076a3193a7SBrian Somers.Dq set log Op local . 24086a3193a7SBrian Somers.Pp 24096a3193a7SBrian SomersThe 24106a3193a7SBrian Somers.Ar Warning 24116a3193a7SBrian Somerslevel is special in that it will not be logged if it can be displayed 24126a3193a7SBrian Somerslocally. 24136a3193a7SBrian Somers.Sh SIGNAL HANDLING 24146a3193a7SBrian Somers.Nm 24156a3193a7SBrian Somersdeals with the following signals: 24166a3193a7SBrian Somers.Bl -tag -width "USR2" 24176a3193a7SBrian Somers.It INT 24186a3193a7SBrian SomersReceipt of this signal causes the termination of the current connection 24196a3193a7SBrian Somers(if any). 24206a3193a7SBrian SomersThis will cause 24216a3193a7SBrian Somers.Nm 24226a3193a7SBrian Somersto exit unless it is in 24236a3193a7SBrian Somers.Fl auto 24246a3193a7SBrian Somersor 24256a3193a7SBrian Somers.Fl ddial 24266a3193a7SBrian Somersmode. 24276a3193a7SBrian Somers.It HUP, TERM & QUIT 24286a3193a7SBrian SomersThese signals tell 24296a3193a7SBrian Somers.Nm 24306a3193a7SBrian Somersto exit. 24316a3193a7SBrian Somers.It USR1 24326a3193a7SBrian SomersThis signal, tells 24336a3193a7SBrian Somers.Nm 24346a3193a7SBrian Somersto re-open any existing server socket, dropping all existing diagnostic 24356a3193a7SBrian Somersconnections. 24366a3193a7SBrian SomersSockets that could not previously be opened will be retried. 24376a3193a7SBrian Somers.It USR2 24386a3193a7SBrian SomersThis signal, tells 24396a3193a7SBrian Somers.Nm 24406a3193a7SBrian Somersto close any existing server socket, dropping all existing diagnostic 24416a3193a7SBrian Somersconnections. 24426a3193a7SBrian Somers.Dv SIGUSR1 24436a3193a7SBrian Somerscan still be used to re-open the socket. 24446a3193a7SBrian Somers.El 24456a3193a7SBrian Somers.Sh MULTI-LINK PPP 24466a3193a7SBrian SomersIf you wish to use more than one physical link to connect to a 24476a3193a7SBrian Somers.Em PPP 24486a3193a7SBrian Somerspeer, that peer must also understand the 24496a3193a7SBrian Somers.Em MULTI-LINK PPP 24506a3193a7SBrian Somersprotocol. 24516a3193a7SBrian SomersRefer to RFC 1990 for specification details. 24526a3193a7SBrian Somers.Pp 24536a3193a7SBrian SomersThe peer is identified using a combination of his 24546a3193a7SBrian Somers.Dq endpoint discriminator 24556a3193a7SBrian Somersand his 24566a3193a7SBrian Somers.Dq authentication id . 24576a3193a7SBrian SomersEither or both of these may be specified. 24586a3193a7SBrian SomersIt is recommended that 24596a3193a7SBrian Somersat least one is specified, otherwise there is no way of ensuring that 24606a3193a7SBrian Somersall links are actually connected to the same peer program, and some 24616a3193a7SBrian Somersconfusing lock-ups may result. 24626a3193a7SBrian SomersLocally, these identification variables are specified using the 24636a3193a7SBrian Somers.Dq set enddisc 24646a3193a7SBrian Somersand 24656a3193a7SBrian Somers.Dq set authname 24666a3193a7SBrian Somerscommands. 24676a3193a7SBrian SomersThe 24686a3193a7SBrian Somers.Sq authname 24696a3193a7SBrian Somers(and 24706a3193a7SBrian Somers.Sq authkey ) 24716a3193a7SBrian Somersmust be agreed in advance with the peer. 24726a3193a7SBrian Somers.Pp 24736a3193a7SBrian SomersMulti-link capabilities are enabled using the 24746a3193a7SBrian Somers.Dq set mrru 24756a3193a7SBrian Somerscommand (set maximum reconstructed receive unit). 24766a3193a7SBrian SomersOnce multi-link is enabled, 24776a3193a7SBrian Somers.Nm 24786a3193a7SBrian Somerswill attempt to negotiate a multi-link connection with the peer. 24796a3193a7SBrian Somers.Pp 24806a3193a7SBrian SomersBy default, only one 24816a3193a7SBrian Somers.Sq link 24826a3193a7SBrian Somersis available 24836a3193a7SBrian Somers(called 24846a3193a7SBrian Somers.Sq deflink ) . 24856a3193a7SBrian SomersTo create more links, the 24866a3193a7SBrian Somers.Dq clone 24876a3193a7SBrian Somerscommand is used. 24886a3193a7SBrian SomersThis command will clone existing links, where all 24896a3193a7SBrian Somerscharacteristics are the same except: 24906a3193a7SBrian Somers.Bl -enum 24916a3193a7SBrian Somers.It 24926a3193a7SBrian SomersThe new link has its own name as specified on the 24936a3193a7SBrian Somers.Dq clone 24946a3193a7SBrian Somerscommand line. 24956a3193a7SBrian Somers.It 24966a3193a7SBrian SomersThe new link is an 24976a3193a7SBrian Somers.Sq interactive 24986a3193a7SBrian Somerslink. 24996a3193a7SBrian SomersIts mode may subsequently be changed using the 25006a3193a7SBrian Somers.Dq set mode 25016a3193a7SBrian Somerscommand. 25026a3193a7SBrian Somers.It 25036a3193a7SBrian SomersThe new link is in a 25046a3193a7SBrian Somers.Sq closed 25056a3193a7SBrian Somersstate. 25066a3193a7SBrian Somers.El 25076a3193a7SBrian Somers.Pp 25086a3193a7SBrian SomersA summary of all available links can be seen using the 25096a3193a7SBrian Somers.Dq show links 25106a3193a7SBrian Somerscommand. 25116a3193a7SBrian Somers.Pp 25126a3193a7SBrian SomersOnce a new link has been created, command usage varies. 25136a3193a7SBrian SomersAll link specific commands must be prefixed with the 25146a3193a7SBrian Somers.Dq link Ar name 25156a3193a7SBrian Somerscommand, specifying on which link the command is to be applied. 25166a3193a7SBrian SomersWhen only a single link is available, 25176a3193a7SBrian Somers.Nm 25186a3193a7SBrian Somersis smart enough not to require the 25196a3193a7SBrian Somers.Dq link Ar name 25206a3193a7SBrian Somersprefix. 25216a3193a7SBrian Somers.Pp 25226a3193a7SBrian SomersSome commands can still be used without specifying a link - resulting 25236a3193a7SBrian Somersin an operation at the 25246a3193a7SBrian Somers.Sq bundle 25256a3193a7SBrian Somerslevel. 25266a3193a7SBrian SomersFor example, once two or more links are available, the command 25276a3193a7SBrian Somers.Dq show ccp 25286a3193a7SBrian Somerswill show CCP configuration and statistics at the multi-link level, and 25296a3193a7SBrian Somers.Dq link deflink show ccp 25306a3193a7SBrian Somerswill show the same information at the 25316a3193a7SBrian Somers.Dq deflink 25326a3193a7SBrian Somerslink level. 25336a3193a7SBrian Somers.Pp 25346a3193a7SBrian SomersArmed with this information, the following configuration might be used: 25356a3193a7SBrian Somers.Bd -literal -offset indent 25366a3193a7SBrian Somersmp: 25376a3193a7SBrian Somers set timeout 0 25386a3193a7SBrian Somers set log phase chat 25396a3193a7SBrian Somers set device /dev/cuau0 /dev/cuau1 /dev/cuau2 25406a3193a7SBrian Somers set phone "123456789" 25416a3193a7SBrian Somers set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \\"\\" ATZ \e 25426a3193a7SBrian Somers OK-AT-OK \\\\dATDT\\\\T TIMEOUT 45 CONNECT" 25436a3193a7SBrian Somers set login 25446a3193a7SBrian Somers set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0 25456a3193a7SBrian Somers set authname ppp 25466a3193a7SBrian Somers set authkey ppppassword 25476a3193a7SBrian Somers 25486a3193a7SBrian Somers set mrru 1500 25496a3193a7SBrian Somers clone 1,2,3 # Create 3 new links - duplicates of the default 25506a3193a7SBrian Somers link deflink remove # Delete the default link (called ``deflink'') 25516a3193a7SBrian Somers.Ed 25526a3193a7SBrian Somers.Pp 25536a3193a7SBrian SomersNote how all cloning is done at the end of the configuration. 25546a3193a7SBrian SomersUsually, the link will be configured first, then cloned. 25556a3193a7SBrian SomersIf you wish all links 25566a3193a7SBrian Somersto be up all the time, you can add the following line to the end of your 25576a3193a7SBrian Somersconfiguration. 25586a3193a7SBrian Somers.Bd -literal -offset indent 25596a3193a7SBrian Somers link 1,2,3 set mode ddial 25606a3193a7SBrian Somers.Ed 25616a3193a7SBrian Somers.Pp 25626a3193a7SBrian SomersIf you want the links to dial on demand, this command could be used: 25636a3193a7SBrian Somers.Bd -literal -offset indent 25646a3193a7SBrian Somers link * set mode auto 25656a3193a7SBrian Somers.Ed 25666a3193a7SBrian Somers.Pp 25676a3193a7SBrian SomersLinks may be tied to specific names by removing the 25686a3193a7SBrian Somers.Dq set device 25696a3193a7SBrian Somersline above, and specifying the following after the 25706a3193a7SBrian Somers.Dq clone 25716a3193a7SBrian Somerscommand: 25726a3193a7SBrian Somers.Bd -literal -offset indent 25736a3193a7SBrian Somers link 1 set device /dev/cuau0 25746a3193a7SBrian Somers link 2 set device /dev/cuau1 25756a3193a7SBrian Somers link 3 set device /dev/cuau2 25766a3193a7SBrian Somers.Ed 25776a3193a7SBrian Somers.Pp 25786a3193a7SBrian SomersUse the 25796a3193a7SBrian Somers.Dq help 25806a3193a7SBrian Somerscommand to see which commands require context (using the 25816a3193a7SBrian Somers.Dq link 25826a3193a7SBrian Somerscommand), which have optional 25836a3193a7SBrian Somerscontext and which should not have any context. 25846a3193a7SBrian Somers.Pp 25856a3193a7SBrian SomersWhen 25866a3193a7SBrian Somers.Nm 25876a3193a7SBrian Somershas negotiated 25886a3193a7SBrian Somers.Em MULTI-LINK 25896a3193a7SBrian Somersmode with the peer, it creates a local domain socket in the 25906a3193a7SBrian Somers.Pa /var/run 25916a3193a7SBrian Somersdirectory. 25926a3193a7SBrian SomersThis socket is used to pass link information (including 25936a3193a7SBrian Somersthe actual link file descriptor) between different 25946a3193a7SBrian Somers.Nm 25956a3193a7SBrian Somersinvocations. 25966a3193a7SBrian SomersThis facilitates 25976a3193a7SBrian Somers.Nm Ns No 's 25986a3193a7SBrian Somersability to be run from a 25996a3193a7SBrian Somers.Xr getty 8 26006a3193a7SBrian Somersor directly from 26016a3193a7SBrian Somers.Pa /etc/gettydefs 26026a3193a7SBrian Somers(using the 26036a3193a7SBrian Somers.Sq pp= 26046a3193a7SBrian Somerscapability), without needing to have initial control of the serial 26056a3193a7SBrian Somersline. 26066a3193a7SBrian SomersOnce 26076a3193a7SBrian Somers.Nm 26086a3193a7SBrian Somersnegotiates multi-link mode, it will pass its open link to any 26096a3193a7SBrian Somersalready running process. 26106a3193a7SBrian SomersIf there is no already running process, 26116a3193a7SBrian Somers.Nm 26126a3193a7SBrian Somerswill act as the master, creating the socket and listening for new 26136a3193a7SBrian Somersconnections. 26146a3193a7SBrian Somers.Sh PPP COMMAND LIST 26156a3193a7SBrian SomersThis section lists the available commands and their effect. 26166a3193a7SBrian SomersThey are usable either from an interactive 26176a3193a7SBrian Somers.Nm 26186a3193a7SBrian Somerssession, from a configuration file or from a 26196a3193a7SBrian Somers.Xr pppctl 8 26206a3193a7SBrian Somersor 26216a3193a7SBrian Somers.Xr telnet 1 26226a3193a7SBrian Somerssession. 26236a3193a7SBrian Somers.Bl -tag -width 2n 26246a3193a7SBrian Somers.It accept|deny|enable|disable Ar option.... 26256a3193a7SBrian SomersThese directives tell 26266a3193a7SBrian Somers.Nm 26276a3193a7SBrian Somershow to negotiate the initial connection with the peer. 26286a3193a7SBrian SomersEach 26296a3193a7SBrian Somers.Dq option 26306a3193a7SBrian Somershas a default of either accept or deny and enable or disable. 26316a3193a7SBrian Somers.Dq Accept 26326a3193a7SBrian Somersmeans that the option will be ACK'd if the peer asks for it. 26336a3193a7SBrian Somers.Dq Deny 26346a3193a7SBrian Somersmeans that the option will be NAK'd if the peer asks for it. 26356a3193a7SBrian Somers.Dq Enable 26366a3193a7SBrian Somersmeans that the option will be requested by us. 26376a3193a7SBrian Somers.Dq Disable 26386a3193a7SBrian Somersmeans that the option will not be requested by us. 26396a3193a7SBrian Somers.Pp 26406a3193a7SBrian Somers.Dq Option 26416a3193a7SBrian Somersmay be one of the following: 26426a3193a7SBrian Somers.Bl -tag -width 2n 26436a3193a7SBrian Somers.It acfcomp 26446a3193a7SBrian SomersDefault: Enabled and Accepted. 26456a3193a7SBrian SomersACFComp stands for Address and Control Field Compression. 26466a3193a7SBrian SomersNon LCP packets will usually have an address 26476a3193a7SBrian Somersfield of 0xff (the All-Stations address) and a control field of 26486a3193a7SBrian Somers0x03 (the Unnumbered Information command). 26496a3193a7SBrian SomersIf this option is 26506a3193a7SBrian Somersnegotiated, these two bytes are simply not sent, thus minimising 26516a3193a7SBrian Somerstraffic. 26526a3193a7SBrian Somers.Pp 26536a3193a7SBrian SomersSee 26546a3193a7SBrian Somers.Pa rfc1662 26556a3193a7SBrian Somersfor details. 26566a3193a7SBrian Somers.It chap Ns Op \&05 26576a3193a7SBrian SomersDefault: Disabled and Accepted. 26586a3193a7SBrian SomersCHAP stands for Challenge Handshake Authentication Protocol. 26596a3193a7SBrian SomersOnly one of CHAP and PAP (below) may be negotiated. 26606a3193a7SBrian SomersWith CHAP, the authenticator sends a "challenge" message to its peer. 26616a3193a7SBrian SomersThe peer uses a one-way hash function to encrypt the 26626a3193a7SBrian Somerschallenge and sends the result back. 26636a3193a7SBrian SomersThe authenticator does the same, and compares the results. 26646a3193a7SBrian SomersThe advantage of this mechanism is that no 26656a3193a7SBrian Somerspasswords are sent across the connection. 26666a3193a7SBrian SomersA challenge is made when the connection is first made. 26676a3193a7SBrian SomersSubsequent challenges may occur. 26686a3193a7SBrian SomersIf you want to have your peer authenticate itself, you must 26696a3193a7SBrian Somers.Dq enable chap . 26706a3193a7SBrian Somersin 26716a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf , 26726a3193a7SBrian Somersand have an entry in 26736a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret 26746a3193a7SBrian Somersfor the peer. 26756a3193a7SBrian Somers.Pp 26766a3193a7SBrian SomersWhen using CHAP as the client, you need only specify 26776a3193a7SBrian Somers.Dq AuthName 26786a3193a7SBrian Somersand 26796a3193a7SBrian Somers.Dq AuthKey 26806a3193a7SBrian Somersin 26816a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf . 26826a3193a7SBrian SomersCHAP is accepted by default. 26836a3193a7SBrian SomersSome 26846a3193a7SBrian Somers.Em PPP 26856a3193a7SBrian Somersimplementations use "MS-CHAP" rather than MD5 when encrypting the 26866a3193a7SBrian Somerschallenge. 26876a3193a7SBrian SomersMS-CHAP is a combination of MD4 and DES. 26886a3193a7SBrian SomersIf 26896a3193a7SBrian Somers.Nm 26906a3193a7SBrian Somerswas built on a machine with DES libraries available, it will respond 26916a3193a7SBrian Somersto MS-CHAP authentication requests, but will never request them. 26926a3193a7SBrian Somers.It deflate 26936a3193a7SBrian SomersDefault: Enabled and Accepted. 26946a3193a7SBrian SomersThis option decides if deflate 26956a3193a7SBrian Somerscompression will be used by the Compression Control Protocol (CCP). 26966a3193a7SBrian SomersThis is the same algorithm as used by the 26976a3193a7SBrian Somers.Xr gzip 1 26986a3193a7SBrian Somersprogram. 26996a3193a7SBrian SomersNote: There is a problem negotiating 27006a3193a7SBrian Somers.Ar deflate 27016a3193a7SBrian Somerscapabilities with 27026a3193a7SBrian Somers.Nm pppd 27036a3193a7SBrian Somers- a 27046a3193a7SBrian Somers.Em PPP 27056a3193a7SBrian Somersimplementation available under many operating systems. 27066a3193a7SBrian Somers.Nm pppd 27076a3193a7SBrian Somers(version 2.3.1) incorrectly attempts to negotiate 27086a3193a7SBrian Somers.Ar deflate 27096a3193a7SBrian Somerscompression using type 27106a3193a7SBrian Somers.Em 24 27116a3193a7SBrian Somersas the CCP configuration type rather than type 27126a3193a7SBrian Somers.Em 26 27136a3193a7SBrian Somersas specified in 27146a3193a7SBrian Somers.Pa rfc1979 . 27156a3193a7SBrian SomersType 27166a3193a7SBrian Somers.Ar 24 27176a3193a7SBrian Somersis actually specified as 27186a3193a7SBrian Somers.Dq PPP Magna-link Variable Resource Compression 27196a3193a7SBrian Somersin 27206a3193a7SBrian Somers.Pa rfc1975 ! 27216a3193a7SBrian Somers.Nm 27226a3193a7SBrian Somersis capable of negotiating with 27236a3193a7SBrian Somers.Nm pppd , 27246a3193a7SBrian Somersbut only if 27256a3193a7SBrian Somers.Dq deflate24 27266a3193a7SBrian Somersis 27276a3193a7SBrian Somers.Ar enable Ns No d 27286a3193a7SBrian Somersand 27296a3193a7SBrian Somers.Ar accept Ns No ed . 27306a3193a7SBrian Somers.It deflate24 27316a3193a7SBrian SomersDefault: Disabled and Denied. 27326a3193a7SBrian SomersThis is a variance of the 27336a3193a7SBrian Somers.Ar deflate 27346a3193a7SBrian Somersoption, allowing negotiation with the 27356a3193a7SBrian Somers.Nm pppd 27366a3193a7SBrian Somersprogram. 27376a3193a7SBrian SomersRefer to the 27386a3193a7SBrian Somers.Ar deflate 27396a3193a7SBrian Somerssection above for details. 27406a3193a7SBrian SomersIt is disabled by default as it violates 27416a3193a7SBrian Somers.Pa rfc1975 . 27426a3193a7SBrian Somers.It dns 27436a3193a7SBrian SomersDefault: Disabled and Denied. 27446a3193a7SBrian SomersThis option allows DNS negotiation. 27456a3193a7SBrian Somers.Pp 27466a3193a7SBrian SomersIf 27476a3193a7SBrian Somers.Dq enable Ns No d , 27486a3193a7SBrian Somers.Nm 27496a3193a7SBrian Somerswill request that the peer confirms the entries in 27506a3193a7SBrian Somers.Pa /etc/resolv.conf . 27516a3193a7SBrian SomersIf the peer NAKs our request (suggesting new IP numbers), 27526a3193a7SBrian Somers.Pa /etc/resolv.conf 27536a3193a7SBrian Somersis updated and another request is sent to confirm the new entries. 27546a3193a7SBrian Somers.Pp 27556a3193a7SBrian SomersIf 27566a3193a7SBrian Somers.Dq accept Ns No ed , 27576a3193a7SBrian Somers.Nm 27586a3193a7SBrian Somerswill answer any DNS queries requested by the peer rather than rejecting 27596a3193a7SBrian Somersthem. 27606a3193a7SBrian SomersThe answer is taken from 27616a3193a7SBrian Somers.Pa /etc/resolv.conf 27626a3193a7SBrian Somersunless the 27636a3193a7SBrian Somers.Dq set dns 27646a3193a7SBrian Somerscommand is used as an override. 27656a3193a7SBrian Somers.It enddisc 27666a3193a7SBrian SomersDefault: Enabled and Accepted. 27676a3193a7SBrian SomersThis option allows control over whether we 27686a3193a7SBrian Somersnegotiate an endpoint discriminator. 27696a3193a7SBrian SomersWe only send our discriminator if 27706a3193a7SBrian Somers.Dq set enddisc 27716a3193a7SBrian Somersis used and 27726a3193a7SBrian Somers.Ar enddisc 27736a3193a7SBrian Somersis enabled. 27746a3193a7SBrian SomersWe reject the peers discriminator if 27756a3193a7SBrian Somers.Ar enddisc 27766a3193a7SBrian Somersis denied. 27776a3193a7SBrian Somers.It LANMan|chap80lm 27786a3193a7SBrian SomersDefault: Disabled and Accepted. 27796a3193a7SBrian SomersThe use of this authentication protocol 27806a3193a7SBrian Somersis discouraged as it partially violates the authentication protocol by 27816a3193a7SBrian Somersimplementing two different mechanisms (LANMan & NT) under the guise of 27826a3193a7SBrian Somersa single CHAP type (0x80). 27836a3193a7SBrian Somers.Dq LANMan 27846a3193a7SBrian Somersuses a simple DES encryption mechanism and is the least secure of the 27856a3193a7SBrian SomersCHAP alternatives (although is still more secure than PAP). 27866a3193a7SBrian Somers.Pp 27876a3193a7SBrian SomersRefer to the 27886a3193a7SBrian Somers.Dq MSChap 27896a3193a7SBrian Somersdescription below for more details. 27906a3193a7SBrian Somers.It lqr 27916a3193a7SBrian SomersDefault: Disabled and Accepted. 27926a3193a7SBrian SomersThis option decides if Link Quality Requests will be sent or accepted. 27936a3193a7SBrian SomersLQR is a protocol that allows 27946a3193a7SBrian Somers.Nm 27956a3193a7SBrian Somersto determine that the link is down without relying on the modems 27966a3193a7SBrian Somerscarrier detect. 27976a3193a7SBrian SomersWhen LQR is enabled, 27986a3193a7SBrian Somers.Nm 27996a3193a7SBrian Somerssends the 28006a3193a7SBrian Somers.Em QUALPROTO 28016a3193a7SBrian Somersoption (see 28026a3193a7SBrian Somers.Dq set lqrperiod 28036a3193a7SBrian Somersbelow) as part of the LCP request. 28046a3193a7SBrian SomersIf the peer agrees, both sides will 28056a3193a7SBrian Somersexchange LQR packets at the agreed frequency, allowing detailed link 28066a3193a7SBrian Somersquality monitoring by enabling LQM logging. 28076a3193a7SBrian SomersIf the peer does not agree, and if the 28086a3193a7SBrian Somers.Dq echo 28096a3193a7SBrian Somersoption is enabled, 28106a3193a7SBrian Somers.Nm 28116a3193a7SBrian Somerswill send 28126a3193a7SBrian Somers.Em LCP ECHO 28136a3193a7SBrian Somersrequests instead. 28146a3193a7SBrian SomersThese packets pass no information of interest, but they 28156a3193a7SBrian Somers.Em MUST 28166a3193a7SBrian Somersbe replied to by the peer. 28176a3193a7SBrian Somers.Pp 28186a3193a7SBrian SomersWhether using 28196a3193a7SBrian Somers.Em LQR 28206a3193a7SBrian Somersor 28216a3193a7SBrian Somers.Em LCP ECHO , 28226a3193a7SBrian Somers.Nm 28236a3193a7SBrian Somerswill abruptly drop the connection if 5 unacknowledged packets have been 28246a3193a7SBrian Somerssent rather than sending a 6th. 28256a3193a7SBrian SomersA message is logged at the 28266a3193a7SBrian Somers.Em PHASE 28276a3193a7SBrian Somerslevel, and any appropriate 28286a3193a7SBrian Somers.Dq reconnect 28296a3193a7SBrian Somersvalues are honoured as if the peer were responsible for dropping the 28306a3193a7SBrian Somersconnection. 28316a3193a7SBrian Somers.Pp 28326a3193a7SBrian SomersRefer to the 28336a3193a7SBrian Somers.Dq enable echo 28346a3193a7SBrian Somerscommand description for differences in behaviour prior to 28356a3193a7SBrian Somers.Nm 28366a3193a7SBrian Somersversion 3.4.2. 28376a3193a7SBrian Somers.It mppe 28386a3193a7SBrian SomersDefault: Enabled and Accepted. 28396a3193a7SBrian SomersThis is Microsoft Point to Point Encryption scheme. 28406a3193a7SBrian SomersMPPE key size can be 28416a3193a7SBrian Somers40-, 56- and 128-bits. 28426a3193a7SBrian SomersRefer to 28436a3193a7SBrian Somers.Dq set mppe 28446a3193a7SBrian Somerscommand. 28456a3193a7SBrian Somers.It MSChapV2|chap81 28466a3193a7SBrian SomersDefault: Disabled and Accepted. 28476a3193a7SBrian SomersIt is very similar to standard CHAP (type 0x05) 28486a3193a7SBrian Somersexcept that it issues challenges of a fixed 16 bytes in length and uses a 28496a3193a7SBrian Somerscombination of MD4, SHA-1 and DES to encrypt the challenge rather than using the 28506a3193a7SBrian Somersstandard MD5 mechanism. 28516a3193a7SBrian Somers.It MSChap|chap80nt 28526a3193a7SBrian SomersDefault: Disabled and Accepted. 28536a3193a7SBrian SomersThe use of this authentication protocol 28546a3193a7SBrian Somersis discouraged as it partially violates the authentication protocol by 28556a3193a7SBrian Somersimplementing two different mechanisms (LANMan & NT) under the guise of 28566a3193a7SBrian Somersa single CHAP type (0x80). 28576a3193a7SBrian SomersIt is very similar to standard CHAP (type 0x05) 28586a3193a7SBrian Somersexcept that it issues challenges of a fixed 8 bytes in length and uses a 28596a3193a7SBrian Somerscombination of MD4 and DES to encrypt the challenge rather than using the 28606a3193a7SBrian Somersstandard MD5 mechanism. 28616a3193a7SBrian SomersCHAP type 0x80 for LANMan is also supported - see 28626a3193a7SBrian Somers.Dq enable LANMan 28636a3193a7SBrian Somersfor details. 28646a3193a7SBrian Somers.Pp 28656a3193a7SBrian SomersBecause both 28666a3193a7SBrian Somers.Dq LANMan 28676a3193a7SBrian Somersand 28686a3193a7SBrian Somers.Dq NT 28696a3193a7SBrian Somersuse CHAP type 0x80, when acting as authenticator with both 28706a3193a7SBrian Somers.Dq enable Ns No d , 28716a3193a7SBrian Somers.Nm 28726a3193a7SBrian Somerswill rechallenge the peer up to three times if it responds using the wrong 28736a3193a7SBrian Somersone of the two protocols. 28746a3193a7SBrian SomersThis gives the peer a chance to attempt using both protocols. 28756a3193a7SBrian Somers.Pp 28766a3193a7SBrian SomersConversely, when 28776a3193a7SBrian Somers.Nm 28786a3193a7SBrian Somersacts as the authenticatee with both protocols 28796a3193a7SBrian Somers.Dq accept Ns No ed , 28806a3193a7SBrian Somersthe protocols are used alternately in response to challenges. 28816a3193a7SBrian Somers.Pp 28826a3193a7SBrian SomersNote: If only LANMan is enabled, 28836a3193a7SBrian Somers.Nm pppd 28846a3193a7SBrian Somers(version 2.3.5) misbehaves when acting as authenticatee. 28856a3193a7SBrian SomersIt provides both 28866a3193a7SBrian Somersthe NT and the LANMan answers, but also suggests that only the NT answer 28876a3193a7SBrian Somersshould be used. 28886a3193a7SBrian Somers.It pap 28896a3193a7SBrian SomersDefault: Disabled and Accepted. 28906a3193a7SBrian SomersPAP stands for Password Authentication Protocol. 28916a3193a7SBrian SomersOnly one of PAP and CHAP (above) may be negotiated. 28926a3193a7SBrian SomersWith PAP, the ID and Password are sent repeatedly to the peer until 28936a3193a7SBrian Somersauthentication is acknowledged or the connection is terminated. 28946a3193a7SBrian SomersThis is a rather poor security mechanism. 28956a3193a7SBrian SomersIt is only performed when the connection is first established. 28966a3193a7SBrian SomersIf you want to have your peer authenticate itself, you must 28976a3193a7SBrian Somers.Dq enable pap . 28986a3193a7SBrian Somersin 28996a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf , 29006a3193a7SBrian Somersand have an entry in 29016a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret 29026a3193a7SBrian Somersfor the peer (although see the 29036a3193a7SBrian Somers.Dq passwdauth 29046a3193a7SBrian Somersand 29056a3193a7SBrian Somers.Dq set radius 29066a3193a7SBrian Somersoptions below). 29076a3193a7SBrian Somers.Pp 29086a3193a7SBrian SomersWhen using PAP as the client, you need only specify 29096a3193a7SBrian Somers.Dq AuthName 29106a3193a7SBrian Somersand 29116a3193a7SBrian Somers.Dq AuthKey 29126a3193a7SBrian Somersin 29136a3193a7SBrian Somers.Pa /etc/ppp/ppp.conf . 29146a3193a7SBrian SomersPAP is accepted by default. 29156a3193a7SBrian Somers.It pred1 29166a3193a7SBrian SomersDefault: Enabled and Accepted. 29176a3193a7SBrian SomersThis option decides if Predictor 1 29186a3193a7SBrian Somerscompression will be used by the Compression Control Protocol (CCP). 29196a3193a7SBrian Somers.It protocomp 29206a3193a7SBrian SomersDefault: Enabled and Accepted. 29216a3193a7SBrian SomersThis option is used to negotiate 29226a3193a7SBrian SomersPFC (Protocol Field Compression), a mechanism where the protocol 29236a3193a7SBrian Somersfield number is reduced to one octet rather than two. 29246a3193a7SBrian Somers.It shortseq 29256a3193a7SBrian SomersDefault: Enabled and Accepted. 29266a3193a7SBrian SomersThis option determines if 29276a3193a7SBrian Somers.Nm 29286a3193a7SBrian Somerswill request and accept requests for short 29296a3193a7SBrian Somers(12 bit) 29306a3193a7SBrian Somerssequence numbers when negotiating multi-link mode. 29316a3193a7SBrian SomersThis is only applicable if our MRRU is set (thus enabling multi-link). 29326a3193a7SBrian Somers.It vjcomp 29336a3193a7SBrian SomersDefault: Enabled and Accepted. 29346a3193a7SBrian SomersThis option determines if Van Jacobson header compression will be used. 29356a3193a7SBrian Somers.El 29366a3193a7SBrian Somers.Pp 29376a3193a7SBrian SomersThe following options are not actually negotiated with the peer. 29386a3193a7SBrian SomersTherefore, accepting or denying them makes no sense. 29396a3193a7SBrian Somers.Bl -tag -width 2n 29406a3193a7SBrian Somers.It echo 29416a3193a7SBrian SomersDefault: Disabled. 29426a3193a7SBrian SomersWhen this option is enabled, 29436a3193a7SBrian Somers.Nm 29446a3193a7SBrian Somerswill send 29456a3193a7SBrian Somers.Em LCP ECHO 29466a3193a7SBrian Somersrequests to the peer at the frequency defined by 29476a3193a7SBrian Somers.Dq echoperiod . 29486a3193a7SBrian SomersNote, 29496a3193a7SBrian Somers.Em LQR 29506a3193a7SBrian Somersrequests will supersede 29516a3193a7SBrian Somers.Em LCP ECHO 29526a3193a7SBrian Somersrequests if enabled and negotiated. 29536a3193a7SBrian SomersSee 29546a3193a7SBrian Somers.Dq set lqrperiod 29556a3193a7SBrian Somersbelow for details. 29566a3193a7SBrian Somers.Pp 29576a3193a7SBrian SomersPrior to 29586a3193a7SBrian Somers.Nm 29596a3193a7SBrian Somersversion 3.4.2, 29606a3193a7SBrian Somers.Dq echo 29616a3193a7SBrian Somerswas considered enabled if lqr was enabled and negotiated, otherwise it was 29626a3193a7SBrian Somersconsidered disabled. 29636a3193a7SBrian SomersFor the same behaviour, it is now necessary to 29646a3193a7SBrian Somers.Dq enable lqr echo 29656a3193a7SBrian Somersrather than just 29666a3193a7SBrian Somers.Dq enable lqr . 29676a3193a7SBrian Somers.It filter-decapsulation 29686a3193a7SBrian SomersDefault: Disabled. 29696a3193a7SBrian SomersWhen this option is enabled, 29706a3193a7SBrian Somers.Nm 29716a3193a7SBrian Somerswill examine UDP frames to see if they actually contain a 29726a3193a7SBrian Somers.Em PPP 29736a3193a7SBrian Somersframe as their payload. 29746a3193a7SBrian SomersIf this is the case, all filters will operate on the payload rather 29756a3193a7SBrian Somersthan the actual packet. 29766a3193a7SBrian Somers.Pp 29776a3193a7SBrian SomersThis is useful if you want to send PPPoUDP traffic over a 29786a3193a7SBrian Somers.Em PPP 29796a3193a7SBrian Somerslink, but want that link to do smart things with the real data rather than 29806a3193a7SBrian Somersthe UDP wrapper. 29816a3193a7SBrian Somers.Pp 29826a3193a7SBrian SomersThe UDP frame payload must not be compressed in any way, otherwise 29836a3193a7SBrian Somers.Nm 29846a3193a7SBrian Somerswill not be able to interpret it. 29856a3193a7SBrian SomersIt is therefore recommended that you 29866a3193a7SBrian Somers.Ic disable vj pred1 deflate 29876a3193a7SBrian Somersand 29886a3193a7SBrian Somers.Ic deny vj pred1 deflate 29896a3193a7SBrian Somersin the configuration for the 29906a3193a7SBrian Somers.Nm 29916a3193a7SBrian Somersinvocation with the udp link. 29926a3193a7SBrian Somers.It force-scripts 29936a3193a7SBrian SomersDefault: Disabled. 29946a3193a7SBrian SomersForces execution of the configured chat scripts in 29956a3193a7SBrian Somers.Dv direct 29966a3193a7SBrian Somersand 29976a3193a7SBrian Somers.Dv dedicated 29986a3193a7SBrian Somersmodes. 29996a3193a7SBrian Somers.It idcheck 30006a3193a7SBrian SomersDefault: Enabled. 30016a3193a7SBrian SomersWhen 30026a3193a7SBrian Somers.Nm 30036a3193a7SBrian Somersexchanges low-level LCP, CCP and IPCP configuration traffic, the 30046a3193a7SBrian Somers.Em Identifier 30056a3193a7SBrian Somersfield of any replies is expected to be the same as that of the request. 30066a3193a7SBrian SomersBy default, 30076a3193a7SBrian Somers.Nm 30086a3193a7SBrian Somersdrops any reply packets that do not contain the expected identifier 30096a3193a7SBrian Somersfield, reporting the fact at the respective log level. 30106a3193a7SBrian SomersIf 30116a3193a7SBrian Somers.Ar idcheck 30126a3193a7SBrian Somersis disabled, 30136a3193a7SBrian Somers.Nm 30146a3193a7SBrian Somerswill ignore the identifier field. 30156a3193a7SBrian Somers.It iface-alias 30166a3193a7SBrian SomersDefault: Enabled if 30176a3193a7SBrian Somers.Fl nat 30186a3193a7SBrian Somersis specified. 30196a3193a7SBrian SomersThis option simply tells 30206a3193a7SBrian Somers.Nm 30216a3193a7SBrian Somersto add new interface addresses to the interface rather than replacing them. 30226a3193a7SBrian SomersThe option can only be enabled if network address translation is enabled 30236a3193a7SBrian Somers.Pq Dq nat enable yes . 30246a3193a7SBrian Somers.Pp 30256a3193a7SBrian SomersWith this option enabled, 30266a3193a7SBrian Somers.Nm 30276a3193a7SBrian Somerswill pass traffic for old interface addresses through the NAT 30286a3193a7SBrian Somersengine 30296a3193a7SBrian Somers(see 30306a3193a7SBrian Somers.Xr libalias 3 ) , 30316a3193a7SBrian Somersresulting in the ability (in 30326a3193a7SBrian Somers.Fl auto 30336a3193a7SBrian Somersmode) to properly connect the process that caused the PPP link to 30346a3193a7SBrian Somerscome up in the first place. 30356a3193a7SBrian Somers.Pp 30366a3193a7SBrian SomersDisabling NAT with 30376a3193a7SBrian Somers.Dq nat enable no 30386a3193a7SBrian Somerswill also disable 30396a3193a7SBrian Somers.Sq iface-alias . 30406a3193a7SBrian Somers.It ipcp 30416a3193a7SBrian SomersDefault: Enabled. 30426a3193a7SBrian SomersThis option allows 30436a3193a7SBrian Somers.Nm 30446a3193a7SBrian Somersto attempt to negotiate IP control protocol capabilities and if 30456a3193a7SBrian Somerssuccessful to exchange IP datagrams with the peer. 30466a3193a7SBrian Somers.It ipv6cp 30476a3193a7SBrian SomersDefault: Enabled. 30486a3193a7SBrian SomersThis option allows 30496a3193a7SBrian Somers.Nm 30506a3193a7SBrian Somersto attempt to negotiate IPv6 control protocol capabilities and if 30516a3193a7SBrian Somerssuccessful to exchange IPv6 datagrams with the peer. 30526a3193a7SBrian Somers.It keep-session 30536a3193a7SBrian SomersDefault: Disabled. 30546a3193a7SBrian SomersWhen 30556a3193a7SBrian Somers.Nm 30566a3193a7SBrian Somersruns as a Multi-link server, a different 30576a3193a7SBrian Somers.Nm 30586a3193a7SBrian Somersinstance initially receives each connection. 30596a3193a7SBrian SomersAfter determining that 30606a3193a7SBrian Somersthe link belongs to an already existing bundle (controlled by another 30616a3193a7SBrian Somers.Nm 30626a3193a7SBrian Somersinvocation), 30636a3193a7SBrian Somers.Nm 30646a3193a7SBrian Somerswill transfer the link to that process. 30656a3193a7SBrian Somers.Pp 30666a3193a7SBrian SomersIf the link is a tty device or if this option is enabled, 30676a3193a7SBrian Somers.Nm 30686a3193a7SBrian Somerswill not exit, but will change its process name to 30696a3193a7SBrian Somers.Dq session owner 30706a3193a7SBrian Somersand wait for the controlling 30716a3193a7SBrian Somers.Nm 30726a3193a7SBrian Somersto finish with the link and deliver a signal back to the idle process. 30736a3193a7SBrian SomersThis prevents the confusion that results from 30746a3193a7SBrian Somers.Nm Ns No 's 30756a3193a7SBrian Somersparent considering the link resource available again. 30766a3193a7SBrian Somers.Pp 30776a3193a7SBrian SomersFor tty devices that have entries in 30786a3193a7SBrian Somers.Pa /etc/ttys , 30796a3193a7SBrian Somersthis is necessary to prevent another 30806a3193a7SBrian Somers.Xr getty 8 30816a3193a7SBrian Somersfrom being started, and for program links such as 30826a3193a7SBrian Somers.Xr sshd 8 , 30836a3193a7SBrian Somersit prevents 30846a3193a7SBrian Somers.Xr sshd 8 30856a3193a7SBrian Somersfrom exiting due to the death of its child. 30866a3193a7SBrian SomersAs 30876a3193a7SBrian Somers.Nm 30886a3193a7SBrian Somerscannot determine its parents requirements (except for the tty case), this 30896a3193a7SBrian Somersoption must be enabled manually depending on the circumstances. 30906a3193a7SBrian Somers.It loopback 30916a3193a7SBrian SomersDefault: Enabled. 30926a3193a7SBrian SomersWhen 30936a3193a7SBrian Somers.Ar loopback 30946a3193a7SBrian Somersis enabled, 30956a3193a7SBrian Somers.Nm 30966a3193a7SBrian Somerswill automatically loop back packets being sent 30976a3193a7SBrian Somersout with a destination address equal to that of the 30986a3193a7SBrian Somers.Em PPP 30996a3193a7SBrian Somersinterface. 31006a3193a7SBrian SomersIf disabled, 31016a3193a7SBrian Somers.Nm 31026a3193a7SBrian Somerswill send the packet, probably resulting in an ICMP redirect from 31036a3193a7SBrian Somersthe other end. 31046a3193a7SBrian SomersIt is convenient to have this option enabled when 31056a3193a7SBrian Somersthe interface is also the default route as it avoids the necessity 31066a3193a7SBrian Somersof a loopback route. 31076a3193a7SBrian Somers.It NAS-IP-Address 31086a3193a7SBrian SomersDefault: Enabled. 31096a3193a7SBrian SomersThis option controls whether 31106a3193a7SBrian Somers.Nm 31116a3193a7SBrian Somerssends the 31126a3193a7SBrian Somers.Dq NAS-IP-Address 31136a3193a7SBrian Somersattribute to the RADIUS server when RADIUS is in use 31146a3193a7SBrian Somers.Pq see Dq set radius . 31156a3193a7SBrian Somers.Pp 31166a3193a7SBrian SomersNote, at least one of 31176a3193a7SBrian Somers.Dq NAS-IP-Address 31186a3193a7SBrian Somersand 31196a3193a7SBrian Somers.Dq NAS-Identifier 31206a3193a7SBrian Somersmust be enabled. 31216a3193a7SBrian Somers.Pp 31226a3193a7SBrian SomersVersions of 31236a3193a7SBrian Somers.Nm 31246a3193a7SBrian Somersprior to version 3.4.1 did not send the 31256a3193a7SBrian Somers.Dq NAS-IP-Address 31266a3193a7SBrian Somersattribute as it was reported to break the Radiator RADIUS server. 31276a3193a7SBrian SomersAs the latest rfc (2865) no longer hints that only one of 31286a3193a7SBrian Somers.Dq NAS-IP-Address 31296a3193a7SBrian Somersand 31306a3193a7SBrian Somers.Dq NAS-Identifier 31316a3193a7SBrian Somersshould be sent (as rfc 2138 did), 31326a3193a7SBrian Somers.Nm 31336a3193a7SBrian Somersnow sends both and leaves it up to the administrator that chooses to use 31346a3193a7SBrian Somersbad RADIUS implementations to 31356a3193a7SBrian Somers.Dq disable NAS-IP-Address . 31366a3193a7SBrian Somers.It NAS-Identifier 31376a3193a7SBrian SomersDefault: Enabled. 31386a3193a7SBrian SomersThis option controls whether 31396a3193a7SBrian Somers.Nm 31406a3193a7SBrian Somerssends the 31416a3193a7SBrian Somers.Dq NAS-Identifier 31426a3193a7SBrian Somersattribute to the RADIUS server when RADIUS is in use 31436a3193a7SBrian Somers.Pq see Dq set radius . 31446a3193a7SBrian Somers.Pp 31456a3193a7SBrian SomersNote, at least one of 31466a3193a7SBrian Somers.Dq NAS-IP-Address 31476a3193a7SBrian Somersand 31486a3193a7SBrian Somers.Dq NAS-Identifier 31496a3193a7SBrian Somersmust be enabled. 31506a3193a7SBrian Somers.It passwdauth 31516a3193a7SBrian SomersDefault: Disabled. 31526a3193a7SBrian SomersEnabling this option will tell the PAP authentication 31536a3193a7SBrian Somerscode to use the password database (see 31546a3193a7SBrian Somers.Xr passwd 5 ) 31556a3193a7SBrian Somersto authenticate the caller if they cannot be found in the 31566a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret 31576a3193a7SBrian Somersfile. 31586a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret 31596a3193a7SBrian Somersis always checked first. 31606a3193a7SBrian SomersIf you wish to use passwords from 31616a3193a7SBrian Somers.Xr passwd 5 , 31626a3193a7SBrian Somersbut also to specify an IP number or label for a given client, use 31636a3193a7SBrian Somers.Dq \&* 31646a3193a7SBrian Somersas the client password in 31656a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret . 31666a3193a7SBrian Somers.It proxy 31676a3193a7SBrian SomersDefault: Disabled. 31686a3193a7SBrian SomersEnabling this option will tell 31696a3193a7SBrian Somers.Nm 31706a3193a7SBrian Somersto proxy ARP for the peer. 31716a3193a7SBrian SomersThis means that 31726a3193a7SBrian Somers.Nm 31736a3193a7SBrian Somerswill make an entry in the ARP table using 31746a3193a7SBrian Somers.Dv HISADDR 31756a3193a7SBrian Somersand the 31766a3193a7SBrian Somers.Dv MAC 31776a3193a7SBrian Somersaddress of the local network in which 31786a3193a7SBrian Somers.Dv HISADDR 31796a3193a7SBrian Somersappears. 31806a3193a7SBrian SomersThis allows other machines connecteed to the LAN to talk to 31816a3193a7SBrian Somersthe peer as if the peer itself was connected to the LAN. 31826a3193a7SBrian SomersThe proxy entry cannot be made unless 31836a3193a7SBrian Somers.Dv HISADDR 31846a3193a7SBrian Somersis an address from a LAN. 31856a3193a7SBrian Somers.It proxyall 31866a3193a7SBrian SomersDefault: Disabled. 31876a3193a7SBrian SomersEnabling this will tell 31886a3193a7SBrian Somers.Nm 3189*f16ca171SOlivier Cochardto add proxy arp entries for every IP address in all /24 subnets or 31906a3193a7SBrian Somerssmaller subnets routed via the tun interface. 31916a3193a7SBrian Somers.Pp 31926a3193a7SBrian SomersProxy arp entries are only made for sticky routes that are added 31936a3193a7SBrian Somersusing the 31946a3193a7SBrian Somers.Dq add 31956a3193a7SBrian Somerscommand. 31966a3193a7SBrian SomersNo proxy arp entries are made for the interface address itself 31976a3193a7SBrian Somers(as created by the 31986a3193a7SBrian Somers.Dq set ifaddr 31996a3193a7SBrian Somerscommand). 32006a3193a7SBrian Somers.It sroutes 32016a3193a7SBrian SomersDefault: Enabled. 32026a3193a7SBrian SomersWhen the 32036a3193a7SBrian Somers.Dq add 32046a3193a7SBrian Somerscommand is used with the 32056a3193a7SBrian Somers.Dv HISADDR , 32066a3193a7SBrian Somers.Dv MYADDR , 32076a3193a7SBrian Somers.Dv HISADDR6 32086a3193a7SBrian Somersor 32096a3193a7SBrian Somers.Dv MYADDR6 32106a3193a7SBrian Somersvalues, entries are stored in the 32116a3193a7SBrian Somers.Sq sticky route 32126a3193a7SBrian Somerslist. 32136a3193a7SBrian SomersEach time these variables change, this list is re-applied to the routing table. 32146a3193a7SBrian Somers.Pp 32156a3193a7SBrian SomersDisabling this option will prevent the re-application of sticky routes, 32166a3193a7SBrian Somersalthough the 32176a3193a7SBrian Somers.Sq stick route 32186a3193a7SBrian Somerslist will still be maintained. 32196a3193a7SBrian Somers.It Oo tcp Oc Ns No mssfixup 32206a3193a7SBrian SomersDefault: Enabled. 32216a3193a7SBrian SomersThis option tells 32226a3193a7SBrian Somers.Nm 32236a3193a7SBrian Somersto adjust TCP SYN packets so that the maximum receive segment 32246a3193a7SBrian Somerssize is not greater than the amount allowed by the interface MTU. 32256a3193a7SBrian Somers.It throughput 32266a3193a7SBrian SomersDefault: Enabled. 32276a3193a7SBrian SomersThis option tells 32286a3193a7SBrian Somers.Nm 32296a3193a7SBrian Somersto gather throughput statistics. 32306a3193a7SBrian SomersInput and output is sampled over 32316a3193a7SBrian Somersa rolling 5 second window, and current, best and total figures are retained. 32326a3193a7SBrian SomersThis data is output when the relevant 32336a3193a7SBrian Somers.Em PPP 32346a3193a7SBrian Somerslayer shuts down, and is also available using the 32356a3193a7SBrian Somers.Dq show 32366a3193a7SBrian Somerscommand. 32376a3193a7SBrian SomersThroughput statistics are available at the 32386a3193a7SBrian Somers.Dq IPCP 32396a3193a7SBrian Somersand 32406a3193a7SBrian Somers.Dq physical 32416a3193a7SBrian Somerslevels. 32426a3193a7SBrian Somers.It utmp 32436a3193a7SBrian SomersDefault: Enabled. 32446a3193a7SBrian SomersNormally, when a user is authenticated using PAP or CHAP, and when 32456a3193a7SBrian Somers.Nm 32466a3193a7SBrian Somersis running in 32476a3193a7SBrian Somers.Fl direct 32486a3193a7SBrian Somersmode, an entry is made in the utmp and wtmp files for that user. 32496a3193a7SBrian SomersDisabling this option will tell 32506a3193a7SBrian Somers.Nm 32516a3193a7SBrian Somersnot to make any utmp or wtmp entries. 32526a3193a7SBrian SomersThis is usually only necessary if 32536a3193a7SBrian Somersyou require the user to both login and authenticate themselves. 32546a3193a7SBrian Somers.El 32556a3193a7SBrian Somers.It add Ns Xo 32566a3193a7SBrian Somers.Op !\& 32576a3193a7SBrian Somers.Ar dest Ns Op / Ns Ar nn 32586a3193a7SBrian Somers.Op Ar mask 32596a3193a7SBrian Somers.Op Ar gateway 32606a3193a7SBrian Somers.Xc 32616a3193a7SBrian Somers.Ar Dest 32626a3193a7SBrian Somersis the destination IP address. 32636a3193a7SBrian SomersThe netmask is specified either as a number of bits with 32646a3193a7SBrian Somers.Ar /nn 32656a3193a7SBrian Somersor as an IP number using 32666a3193a7SBrian Somers.Ar mask . 32676a3193a7SBrian Somers.Ar 0 0 32686a3193a7SBrian Somersor simply 32696a3193a7SBrian Somers.Ar 0 32706a3193a7SBrian Somerswith no mask refers to the default route. 32716a3193a7SBrian SomersIt is also possible to use the literal name 32726a3193a7SBrian Somers.Sq default 32736a3193a7SBrian Somersinstead of 32746a3193a7SBrian Somers.Ar 0 . 32756a3193a7SBrian Somers.Ar Gateway 32766a3193a7SBrian Somersis the next hop gateway to get to the given 32776a3193a7SBrian Somers.Ar dest 32786a3193a7SBrian Somersmachine/network. 32796a3193a7SBrian SomersRefer to the 32806a3193a7SBrian Somers.Xr route 8 32816a3193a7SBrian Somerscommand for further details. 32826a3193a7SBrian Somers.Pp 32836a3193a7SBrian SomersIt is possible to use the symbolic names 32846a3193a7SBrian Somers.Sq MYADDR , 32856a3193a7SBrian Somers.Sq HISADDR , 32866a3193a7SBrian Somers.Sq MYADDR6 32876a3193a7SBrian Somersor 32886a3193a7SBrian Somers.Sq HISADDR6 32896a3193a7SBrian Somersas the destination, and 32906a3193a7SBrian Somers.Sq HISADDR 32916a3193a7SBrian Somersor 32926a3193a7SBrian Somers.Sq HISADDR6 32936a3193a7SBrian Somersas the 32946a3193a7SBrian Somers.Ar gateway . 32956a3193a7SBrian Somers.Sq MYADDR 32966a3193a7SBrian Somersis replaced with the interface IP address, 32976a3193a7SBrian Somers.Sq HISADDR 32986a3193a7SBrian Somersis replaced with the interface IP destination (peer) address, 32996a3193a7SBrian Somers.Sq MYADDR6 33006a3193a7SBrian Somersis replaced with the interface IPv6 address, and 33016a3193a7SBrian Somers.Sq HISADDR6 33026a3193a7SBrian Somersis replaced with the interface IPv6 destination address, 33036a3193a7SBrian Somers.Pp 33046a3193a7SBrian SomersIf the 33056a3193a7SBrian Somers.Ar add!\& 33066a3193a7SBrian Somerscommand is used 33076a3193a7SBrian Somers(note the trailing 33086a3193a7SBrian Somers.Dq !\& ) , 33096a3193a7SBrian Somersthen if the route already exists, it will be updated as with the 33106a3193a7SBrian Somers.Sq route change 33116a3193a7SBrian Somerscommand (see 33126a3193a7SBrian Somers.Xr route 8 33136a3193a7SBrian Somersfor further details). 33146a3193a7SBrian Somers.Pp 33156a3193a7SBrian SomersRoutes that contain the 33166a3193a7SBrian Somers.Dq HISADDR , 33176a3193a7SBrian Somers.Dq MYADDR , 33186a3193a7SBrian Somers.Dq HISADDR6 , 33196a3193a7SBrian Somers.Dq MYADDR6 , 33206a3193a7SBrian Somers.Dq DNS0 , 33216a3193a7SBrian Somersor 33226a3193a7SBrian Somers.Dq DNS1 33236a3193a7SBrian Somersconstants are considered 33246a3193a7SBrian Somers.Sq sticky . 33256a3193a7SBrian SomersThey are stored in a list (use 33266a3193a7SBrian Somers.Dq show ncp 33276a3193a7SBrian Somersto see the list), and each time the value of one of these variables 33286a3193a7SBrian Somerschanges, the appropriate routing table entries are updated. 33296a3193a7SBrian SomersThis facility may be disabled using 33306a3193a7SBrian Somers.Dq disable sroutes . 33316a3193a7SBrian Somers.It allow Ar command Op Ar args 33326a3193a7SBrian SomersThis command controls access to 33336a3193a7SBrian Somers.Nm 33346a3193a7SBrian Somersand its configuration files. 33356a3193a7SBrian SomersIt is possible to allow user-level access, 33366a3193a7SBrian Somersdepending on the configuration file label and on the mode that 33376a3193a7SBrian Somers.Nm 33386a3193a7SBrian Somersis being run in. 33396a3193a7SBrian SomersFor example, you may wish to configure 33406a3193a7SBrian Somers.Nm 33416a3193a7SBrian Somersso that only user 33426a3193a7SBrian Somers.Sq fred 33436a3193a7SBrian Somersmay access label 33446a3193a7SBrian Somers.Sq fredlabel 33456a3193a7SBrian Somersin 33466a3193a7SBrian Somers.Fl background 33476a3193a7SBrian Somersmode. 33486a3193a7SBrian Somers.Pp 33496a3193a7SBrian SomersUser id 0 is immune to these commands. 33506a3193a7SBrian Somers.Bl -tag -width 2n 33516a3193a7SBrian Somers.It allow user Ns Xo 33526a3193a7SBrian Somers.Op s 33536a3193a7SBrian Somers.Ar logname Ns No ... 33546a3193a7SBrian Somers.Xc 33556a3193a7SBrian SomersBy default, only user id 0 is allowed access to 33566a3193a7SBrian Somers.Nm . 33576a3193a7SBrian SomersIf this command is used, all of the listed users are allowed access to 33586a3193a7SBrian Somersthe section in which the 33596a3193a7SBrian Somers.Dq allow users 33606a3193a7SBrian Somerscommand is found. 33616a3193a7SBrian SomersThe 33626a3193a7SBrian Somers.Sq default 33636a3193a7SBrian Somerssection is always checked first (even though it is only ever automatically 33646a3193a7SBrian Somersloaded at startup). 33656a3193a7SBrian Somers.Dq allow users 33666a3193a7SBrian Somerscommands are cumulative in a given section, but users allowed in any given 33676a3193a7SBrian Somerssection override users allowed in the default section, so it is possible to 33686a3193a7SBrian Somersallow users access to everything except a given label by specifying default 33696a3193a7SBrian Somersusers in the 33706a3193a7SBrian Somers.Sq default 33716a3193a7SBrian Somerssection, and then specifying a new user list for that label. 33726a3193a7SBrian Somers.Pp 33736a3193a7SBrian SomersIf user 33746a3193a7SBrian Somers.Sq * 33756a3193a7SBrian Somersis specified, access is allowed to all users. 33766a3193a7SBrian Somers.It allow mode Ns Xo 33776a3193a7SBrian Somers.Op s 33786a3193a7SBrian Somers.Ar mode Ns No ... 33796a3193a7SBrian Somers.Xc 33806a3193a7SBrian SomersBy default, access using any 33816a3193a7SBrian Somers.Nm 33826a3193a7SBrian Somersmode is possible. 33836a3193a7SBrian SomersIf this command is used, it restricts the access 33846a3193a7SBrian Somers.Ar modes 33856a3193a7SBrian Somersallowed to load the label under which this command is specified. 33866a3193a7SBrian SomersAgain, as with the 33876a3193a7SBrian Somers.Dq allow users 33886a3193a7SBrian Somerscommand, each 33896a3193a7SBrian Somers.Dq allow modes 33906a3193a7SBrian Somerscommand overrides any previous settings, and the 33916a3193a7SBrian Somers.Sq default 33926a3193a7SBrian Somerssection is always checked first. 33936a3193a7SBrian Somers.Pp 33946a3193a7SBrian SomersPossible modes are: 33956a3193a7SBrian Somers.Sq interactive , 33966a3193a7SBrian Somers.Sq auto , 33976a3193a7SBrian Somers.Sq direct , 33986a3193a7SBrian Somers.Sq dedicated , 33996a3193a7SBrian Somers.Sq ddial , 34006a3193a7SBrian Somers.Sq background 34016a3193a7SBrian Somersand 34026a3193a7SBrian Somers.Sq * . 34036a3193a7SBrian Somers.Pp 34046a3193a7SBrian SomersWhen running in multi-link mode, a section can be loaded if it allows 34056a3193a7SBrian Somers.Em any 34066a3193a7SBrian Somersof the currently existing line modes. 34076a3193a7SBrian Somers.El 34086a3193a7SBrian Somers.It nat Ar command Op Ar args 34096a3193a7SBrian SomersThis command allows the control of the network address translation (also 34106a3193a7SBrian Somersknown as masquerading or IP aliasing) facilities that are built into 34116a3193a7SBrian Somers.Nm . 34126a3193a7SBrian SomersNAT is done on the external interface only, and is unlikely to make sense 34136a3193a7SBrian Somersif used with the 34146a3193a7SBrian Somers.Fl direct 34156a3193a7SBrian Somersflag. 34166a3193a7SBrian Somers.Pp 34176a3193a7SBrian SomersIf nat is enabled on your system (it may be omitted at compile time), 34186a3193a7SBrian Somersthe following commands are possible: 34196a3193a7SBrian Somers.Bl -tag -width 2n 34206a3193a7SBrian Somers.It nat enable yes|no 34216a3193a7SBrian SomersThis command either switches network address translation on or turns it off. 34226a3193a7SBrian SomersThe 34236a3193a7SBrian Somers.Fl nat 34246a3193a7SBrian Somerscommand line flag is synonymous with 34256a3193a7SBrian Somers.Dq nat enable yes . 34266a3193a7SBrian Somers.It nat addr Op Ar addr_local addr_alias 34276a3193a7SBrian SomersThis command allows data for 34286a3193a7SBrian Somers.Ar addr_alias 34296a3193a7SBrian Somersto be redirected to 34306a3193a7SBrian Somers.Ar addr_local . 34316a3193a7SBrian SomersIt is useful if you own a small number of real IP numbers that 34326a3193a7SBrian Somersyou wish to map to specific machines behind your gateway. 34336a3193a7SBrian Somers.It nat deny_incoming yes|no 34346a3193a7SBrian SomersIf set to yes, this command will refuse all incoming packets where an 34356a3193a7SBrian Somersaliasing link does not already exist. 34366a3193a7SBrian SomersRefer to the 34376a3193a7SBrian Somers.Sx CONCEPTUAL BACKGROUND 34386a3193a7SBrian Somerssection of 34396a3193a7SBrian Somers.Xr libalias 3 34406a3193a7SBrian Somersfor a description of what an 34416a3193a7SBrian Somers.Dq aliasing link 34426a3193a7SBrian Somersis. 34436a3193a7SBrian Somers.Pp 34446a3193a7SBrian SomersIt should be noted under what circumstances an aliasing link is 34456a3193a7SBrian Somerscreated by 34466a3193a7SBrian Somers.Xr libalias 3 . 34476a3193a7SBrian SomersIt may be necessary to further protect your network from outside 34486a3193a7SBrian Somersconnections using the 34496a3193a7SBrian Somers.Dq set filter 34506a3193a7SBrian Somersor 34516a3193a7SBrian Somers.Dq nat target 34526a3193a7SBrian Somerscommands. 34536a3193a7SBrian Somers.It nat help|? 34546a3193a7SBrian SomersThis command gives a summary of available nat commands. 34556a3193a7SBrian Somers.It nat log yes|no 34566a3193a7SBrian SomersThis option causes various NAT statistics and information to 34576a3193a7SBrian Somersbe logged to the file 34586a3193a7SBrian Somers.Pa /var/log/alias.log . 345921ca690bSJose Luis Duran.It nat port Ar proto Ar targetIP Ns Xo : Ns Ar targetPort Ns 34606a3193a7SBrian Somers.Oo 34616a3193a7SBrian Somers.No - Ns Ar targetPort 34626a3193a7SBrian Somers.Oc Ar aliasPort Ns 34636a3193a7SBrian Somers.Oo 34646a3193a7SBrian Somers.No - Ns Ar aliasPort 34656a3193a7SBrian Somers.Oc Oo Ar remoteIP : Ns 34666a3193a7SBrian Somers.Ar remotePort Ns 34676a3193a7SBrian Somers.Oo 34686a3193a7SBrian Somers.No - Ns Ar remotePort 34696a3193a7SBrian Somers.Oc 34706a3193a7SBrian Somers.Oc 34716a3193a7SBrian Somers.Xc 34726a3193a7SBrian SomersThis command causes incoming 34736a3193a7SBrian Somers.Ar proto 34746a3193a7SBrian Somersconnections to 34756a3193a7SBrian Somers.Ar aliasPort 34766a3193a7SBrian Somersto be redirected to 34776a3193a7SBrian Somers.Ar targetPort 34786a3193a7SBrian Somerson 34796a3193a7SBrian Somers.Ar targetIP . 34806a3193a7SBrian Somers.Ar proto 34816a3193a7SBrian Somersis either 34826a3193a7SBrian Somers.Dq tcp 34836a3193a7SBrian Somersor 34846a3193a7SBrian Somers.Dq udp . 34856a3193a7SBrian Somers.Pp 34866a3193a7SBrian SomersA range of port numbers may be specified as shown above. 34876a3193a7SBrian SomersThe ranges must be of the same size. 34886a3193a7SBrian Somers.Pp 34896a3193a7SBrian SomersIf 34906a3193a7SBrian Somers.Ar remoteIP 34916a3193a7SBrian Somersis specified, only data coming from that IP number is redirected. 34926a3193a7SBrian Somers.Ar remotePort 34936a3193a7SBrian Somersmust either be 34946a3193a7SBrian Somers.Dq 0 34956a3193a7SBrian Somers(indicating any source port) 34966a3193a7SBrian Somersor a range of ports the same size as the other ranges. 34976a3193a7SBrian Somers.Pp 34986a3193a7SBrian SomersThis option is useful if you wish to run things like Internet phone on 34996a3193a7SBrian Somersmachines behind your gateway, but is limited in that connections to only 35006a3193a7SBrian Somersone interior machine per source machine and target port are possible. 35016a3193a7SBrian Somers.It nat proto Ar proto localIP Oo 35026a3193a7SBrian Somers.Ar publicIP Op Ar remoteIP 35036a3193a7SBrian Somers.Oc 35046a3193a7SBrian SomersThis command tells 35056a3193a7SBrian Somers.Nm 35066a3193a7SBrian Somersto redirect packets of protocol type 35076a3193a7SBrian Somers.Ar proto 35086a3193a7SBrian Somers(see 35096a3193a7SBrian Somers.Xr protocols 5 ) 35106a3193a7SBrian Somersto the internal address 35116a3193a7SBrian Somers.Ar localIP . 35126a3193a7SBrian Somers.Pp 35136a3193a7SBrian SomersIf 35146a3193a7SBrian Somers.Ar publicIP 35156a3193a7SBrian Somersis specified, only packets destined for that address are matched, 35166a3193a7SBrian Somersotherwise the default alias address is used. 35176a3193a7SBrian Somers.Pp 35186a3193a7SBrian SomersIf 35196a3193a7SBrian Somers.Ar remoteIP 35206a3193a7SBrian Somersis specified, only packets matching that source address are matched, 35216a3193a7SBrian Somers.Pp 35226a3193a7SBrian SomersThis command is useful for redirecting tunnel endpoints to an internal machine, 35236a3193a7SBrian Somersfor example: 35246a3193a7SBrian Somers.Pp 35256a3193a7SBrian Somers.Dl nat proto ipencap 10.0.0.1 35266a3193a7SBrian Somers.It "nat proxy cmd" Ar arg Ns No ... 35276a3193a7SBrian SomersThis command tells 35286a3193a7SBrian Somers.Nm 35296a3193a7SBrian Somersto proxy certain connections, redirecting them to a given server. 35306a3193a7SBrian SomersRefer to the description of 35316a3193a7SBrian Somers.Fn PacketAliasProxyRule 35326a3193a7SBrian Somersin 35336a3193a7SBrian Somers.Xr libalias 3 35346a3193a7SBrian Somersfor details of the available commands. 35356a3193a7SBrian Somers.It nat punch_fw Op Ar base count 35366a3193a7SBrian SomersThis command tells 35376a3193a7SBrian Somers.Nm 35386a3193a7SBrian Somersto punch holes in the firewall for FTP or IRC DCC connections. 353956e4d8d5SSevan JaniyanThis is done dynamically by installing temporary firewall rules which 35406a3193a7SBrian Somersallow a particular connection (and only that connection) to go through 35416a3193a7SBrian Somersthe firewall. 35426a3193a7SBrian SomersThe rules are removed once the corresponding connection terminates. 35436a3193a7SBrian Somers.Pp 35446a3193a7SBrian SomersA maximum of 35456a3193a7SBrian Somers.Ar count 35466a3193a7SBrian Somersrules starting from rule number 35476a3193a7SBrian Somers.Ar base 35486a3193a7SBrian Somerswill be used for punching firewall holes. 35496a3193a7SBrian SomersThe range will be cleared when the 35506a3193a7SBrian Somers.Dq nat punch_fw 35516a3193a7SBrian Somerscommand is run. 35526a3193a7SBrian Somers.Pp 35536a3193a7SBrian SomersIf no arguments are given, firewall punching is disabled. 35546a3193a7SBrian Somers.It nat skinny_port Op Ar port 35556a3193a7SBrian SomersThis command tells 35566a3193a7SBrian Somers.Nm 35576a3193a7SBrian Somerswhich TCP port is used by the Skinny Station protocol. 35586a3193a7SBrian SomersSkinny is used by 35596a3193a7SBrian SomersCisco IP phones to communicate with Cisco Call Managers to setup voice 35606a3193a7SBrian Somersover IP calls. 35616a3193a7SBrian SomersThe typical port used by Skinny is 2000. 35626a3193a7SBrian Somers.Pp 35636a3193a7SBrian SomersIf no argument is given, skinny aliasing is disabled. 35646a3193a7SBrian Somers.It nat same_ports yes|no 35656a3193a7SBrian SomersWhen enabled, this command will tell the network address translation engine to 35666a3193a7SBrian Somersattempt to avoid changing the port number on outgoing packets. 35676a3193a7SBrian SomersThis is useful 35686a3193a7SBrian Somersif you want to support protocols such as RPC and LPD which require 35696a3193a7SBrian Somersconnections to come from a well known port. 35706a3193a7SBrian Somers.It nat target Op Ar address 35716a3193a7SBrian SomersSet the given target address or clear it if no address is given. 35726a3193a7SBrian SomersThe target address is used by libalias to specify how to NAT incoming packets 35736a3193a7SBrian Somersby default. 35746a3193a7SBrian SomersIf a target address is not set or if 35756a3193a7SBrian Somers.Dq default 35766a3193a7SBrian Somersis given, packets are not altered and are allowed to route to the internal 35776a3193a7SBrian Somersnetwork. 35786a3193a7SBrian Somers.Pp 35796a3193a7SBrian SomersThe target address may be set to 35806a3193a7SBrian Somers.Dq MYADDR , 35816a3193a7SBrian Somersin which case libalias will redirect all packets to the interface address. 3582cb21fa3dSDamjan Jovanovic.It nat udp_eim yes|no 3583cb21fa3dSDamjan JovanovicWhen enabled, UDP packets use endpoint-independent mapping (EIM) from RFC 4787 3584cb21fa3dSDamjan Jovanovic("full cone" NAT of RFC 3489). 3585cb21fa3dSDamjan JovanovicAll packets from the same internal address:port are mapped to the same NAT 3586cb21fa3dSDamjan Jovanovicaddress:port, regardless of their destination address:port. 3587cb21fa3dSDamjan JovanovicIf filtering rules allow, and if 3588cb21fa3dSDamjan Jovanovic.Em deny_incoming 3589cb21fa3dSDamjan Jovanovicis disabled, any other external address:port can 3590cb21fa3dSDamjan Jovanovicalso send to the internal address:port through its mapped NAT address:port. 3591cb21fa3dSDamjan JovanovicThis is more compatible with applications, and can reduce the need for port 3592cb21fa3dSDamjan Jovanovicforwarding, but less scalable as each NAT address:port can only be 3593cb21fa3dSDamjan Jovanovicconcurrently used by at most one internal address:port. 3594cb21fa3dSDamjan Jovanovic.Pp 3595cb21fa3dSDamjan JovanovicWhen disabled, UDP packets use endpoint-dependent mapping (EDM) ("symmetric" 3596cb21fa3dSDamjan JovanovicNAT). 3597cb21fa3dSDamjan JovanovicEach connection from a particular internal address:port to different 3598cb21fa3dSDamjan Jovanovicexternal addresses:ports is mapped to a random and unpredictable NAT 3599cb21fa3dSDamjan Jovanovicaddress:port. 3600cb21fa3dSDamjan JovanovicTwo appplications behind EDM NATs can only connect to each other 3601cb21fa3dSDamjan Jovanovicby port forwarding on the NAT, or tunnelling through an in-between server. 36026a3193a7SBrian Somers.It nat use_sockets yes|no 36036a3193a7SBrian SomersWhen enabled, this option tells the network address translation engine to 36046a3193a7SBrian Somerscreate a socket so that it can guarantee a correct incoming ftp data or 36056a3193a7SBrian SomersIRC connection. 36066a3193a7SBrian Somers.It nat unregistered_only yes|no 36076a3193a7SBrian SomersOnly alter outgoing packets with an unregistered source address. 36086a3193a7SBrian SomersAccording to RFC 1918, unregistered source addresses 36096a3193a7SBrian Somersare 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. 36106a3193a7SBrian Somers.El 36116a3193a7SBrian Somers.Pp 36126a3193a7SBrian SomersThese commands are also discussed in the file 36136a3193a7SBrian Somers.Pa README.nat 36146a3193a7SBrian Somerswhich comes with the source distribution. 36156a3193a7SBrian Somers.It Oo !\& Oc Ns Xo 36166a3193a7SBrian Somers.No bg Ar command 36176a3193a7SBrian Somers.Xc 36186a3193a7SBrian SomersThe given 36196a3193a7SBrian Somers.Ar command 36206a3193a7SBrian Somersis executed in the background with the following words replaced: 36216a3193a7SBrian Somers.Bl -tag -width COMPILATIONDATE 36226a3193a7SBrian Somers.It Li AUTHNAME 36236a3193a7SBrian SomersThis is replaced with the local 36246a3193a7SBrian Somers.Ar authname 36256a3193a7SBrian Somersvalue. 36266a3193a7SBrian SomersSee the 36276a3193a7SBrian Somers.Dq set authname 36286a3193a7SBrian Somerscommand below. 36296a3193a7SBrian Somers.It Li COMPILATIONDATE 36306a3193a7SBrian SomersIn previous software revisions, this was replaced with the date on which 36316a3193a7SBrian Somers.Nm 36326a3193a7SBrian Somerswas compiled. 36336a3193a7SBrian SomersThis is no longer supported as it breaks the ability to recompile the same 36346a3193a7SBrian Somerscode to produce an exact duplicate of a previous compilation. 36356a3193a7SBrian Somers.It Li DNS0 & DNS1 36366a3193a7SBrian SomersThese are replaced with the primary and secondary nameserver IP numbers. 36376a3193a7SBrian SomersIf nameservers are negotiated by IPCP, the values of these macros will change. 36386a3193a7SBrian Somers.It Li ENDDISC 36396a3193a7SBrian SomersThis is replaced with the local endpoint discriminator value. 36406a3193a7SBrian SomersSee the 36416a3193a7SBrian Somers.Dq set enddisc 36426a3193a7SBrian Somerscommand below. 36436a3193a7SBrian Somers.It Li HISADDR 36446a3193a7SBrian SomersThis is replaced with the peers IP number. 36456a3193a7SBrian Somers.It Li HISADDR6 36466a3193a7SBrian SomersThis is replaced with the peers IPv6 number. 36476a3193a7SBrian Somers.It Li INTERFACE 36486a3193a7SBrian SomersThis is replaced with the name of the interface that is in use. 36496a3193a7SBrian Somers.It Li IPOCTETSIN 36506a3193a7SBrian SomersThis is replaced with the number of IP bytes received since the connection 36516a3193a7SBrian Somerswas established. 36526a3193a7SBrian Somers.It Li IPOCTETSOUT 36536a3193a7SBrian SomersThis is replaced with the number of IP bytes sent since the connection 36546a3193a7SBrian Somerswas established. 36556a3193a7SBrian Somers.It Li IPPACKETSIN 36566a3193a7SBrian SomersThis is replaced with the number of IP packets received since the connection 36576a3193a7SBrian Somerswas established. 36586a3193a7SBrian Somers.It Li IPPACKETSOUT 36596a3193a7SBrian SomersThis is replaced with the number of IP packets sent since the connection 36606a3193a7SBrian Somerswas established. 36616a3193a7SBrian Somers.It Li IPV6OCTETSIN 36626a3193a7SBrian SomersThis is replaced with the number of IPv6 bytes received since the connection 36636a3193a7SBrian Somerswas established. 36646a3193a7SBrian Somers.It Li IPV6OCTETSOUT 36656a3193a7SBrian SomersThis is replaced with the number of IPv6 bytes sent since the connection 36666a3193a7SBrian Somerswas established. 36676a3193a7SBrian Somers.It Li IPV6PACKETSIN 36686a3193a7SBrian SomersThis is replaced with the number of IPv6 packets received since the connection 36696a3193a7SBrian Somerswas established. 36706a3193a7SBrian Somers.It Li IPV6PACKETSOUT 36716a3193a7SBrian SomersThis is replaced with the number of IPv6 packets sent since the connection 36726a3193a7SBrian Somerswas established. 36736a3193a7SBrian Somers.It Li LABEL 36746a3193a7SBrian SomersThis is replaced with the last label name used. 36756a3193a7SBrian SomersA label may be specified on the 36766a3193a7SBrian Somers.Nm 36776a3193a7SBrian Somerscommand line, via the 36786a3193a7SBrian Somers.Dq load 36796a3193a7SBrian Somersor 36806a3193a7SBrian Somers.Dq dial 36816a3193a7SBrian Somerscommands and in the 36826a3193a7SBrian Somers.Pa ppp.secret 36836a3193a7SBrian Somersfile. 36846a3193a7SBrian Somers.It Li MYADDR 36856a3193a7SBrian SomersThis is replaced with the IP number assigned to the local interface. 36866a3193a7SBrian Somers.It Li MYADDR6 36876a3193a7SBrian SomersThis is replaced with the IPv6 number assigned to the local interface. 36886a3193a7SBrian Somers.It Li OCTETSIN 36896a3193a7SBrian SomersThis is replaced with the number of bytes received since the connection 36906a3193a7SBrian Somerswas established. 36916a3193a7SBrian Somers.It Li OCTETSOUT 36926a3193a7SBrian SomersThis is replaced with the number of bytes sent since the connection 36936a3193a7SBrian Somerswas established. 36946a3193a7SBrian Somers.It Li PACKETSIN 36956a3193a7SBrian SomersThis is replaced with the number of packets received since the connection 36966a3193a7SBrian Somerswas established. 36976a3193a7SBrian Somers.It Li PACKETSOUT 36986a3193a7SBrian SomersThis is replaced with the number of packets sent since the connection 36996a3193a7SBrian Somerswas established. 37006a3193a7SBrian Somers.It Li PEER_ENDDISC 37016a3193a7SBrian SomersThis is replaced with the value of the peers endpoint discriminator. 37026a3193a7SBrian Somers.It Li PROCESSID 37036a3193a7SBrian SomersThis is replaced with the current process id. 37046a3193a7SBrian Somers.It Li SOCKNAME 37056a3193a7SBrian SomersThis is replaced with the name of the diagnostic socket. 37066a3193a7SBrian Somers.It Li UPTIME 37076a3193a7SBrian SomersThis is replaced with the bundle uptime in HH:MM:SS format. 37086a3193a7SBrian Somers.It Li USER 37096a3193a7SBrian SomersThis is replaced with the username that has been authenticated with PAP or 37106a3193a7SBrian SomersCHAP. 37116a3193a7SBrian SomersNormally, this variable is assigned only in -direct mode. 37126a3193a7SBrian SomersThis value is available irrespective of whether utmp logging is enabled. 37136a3193a7SBrian Somers.It Li VERSION 37146a3193a7SBrian SomersThis is replaced with the current version number of 37156a3193a7SBrian Somers.Nm . 37166a3193a7SBrian Somers.El 37176a3193a7SBrian Somers.Pp 37186a3193a7SBrian SomersThese substitutions are also done by the 37196a3193a7SBrian Somers.Dq set proctitle , 37206a3193a7SBrian Somers.Dq ident 37216a3193a7SBrian Somersand 37226a3193a7SBrian Somers.Dq log 37236a3193a7SBrian Somerscommands. 37246a3193a7SBrian Somers.Pp 37256a3193a7SBrian SomersIf you wish to pause 37266a3193a7SBrian Somers.Nm 37276a3193a7SBrian Somerswhile the command executes, use the 37286a3193a7SBrian Somers.Dq shell 37296a3193a7SBrian Somerscommand instead. 37306a3193a7SBrian Somers.It clear physical|ipcp|ipv6 Op current|overall|peak... 37316a3193a7SBrian SomersClear the specified throughput values at either the 37326a3193a7SBrian Somers.Dq physical , 37336a3193a7SBrian Somers.Dq ipcp 37346a3193a7SBrian Somersor 37356a3193a7SBrian Somers.Dq ipv6cp 37366a3193a7SBrian Somerslevel. 37376a3193a7SBrian SomersIf 37386a3193a7SBrian Somers.Dq physical 37396a3193a7SBrian Somersis specified, context must be given (see the 37406a3193a7SBrian Somers.Dq link 37416a3193a7SBrian Somerscommand below). 37426a3193a7SBrian SomersIf no second argument is given, all values are cleared. 37436a3193a7SBrian Somers.It clone Ar name Ns Xo 37446a3193a7SBrian Somers.Op \&, Ns Ar name Ns 37456a3193a7SBrian Somers.No ... 37466a3193a7SBrian Somers.Xc 37476a3193a7SBrian SomersClone the specified link, creating one or more new links according to the 37486a3193a7SBrian Somers.Ar name 37496a3193a7SBrian Somersargument(s). 37506a3193a7SBrian SomersThis command must be used from the 37516a3193a7SBrian Somers.Dq link 37526a3193a7SBrian Somerscommand below unless you have only got a single link (in which case that 37536a3193a7SBrian Somerslink becomes the default). 37546a3193a7SBrian SomersLinks may be removed using the 37556a3193a7SBrian Somers.Dq remove 37566a3193a7SBrian Somerscommand below. 37576a3193a7SBrian Somers.Pp 37586a3193a7SBrian SomersThe default link name is 37596a3193a7SBrian Somers.Dq deflink . 37606a3193a7SBrian Somers.It close Op lcp|ccp Ns Op !\& 37616a3193a7SBrian SomersIf no arguments are given, the relevant protocol layers will be brought 37626a3193a7SBrian Somersdown and the link will be closed. 37636a3193a7SBrian SomersIf 37646a3193a7SBrian Somers.Dq lcp 37656a3193a7SBrian Somersis specified, the LCP layer is brought down, but 37666a3193a7SBrian Somers.Nm 37676a3193a7SBrian Somerswill not bring the link offline. 37686a3193a7SBrian SomersIt is subsequently possible to use 37696a3193a7SBrian Somers.Dq term 37706a3193a7SBrian Somers(see below) 37716a3193a7SBrian Somersto talk to the peer machine if, for example, something like 37726a3193a7SBrian Somers.Dq slirp 37736a3193a7SBrian Somersis being used. 37746a3193a7SBrian SomersIf 37756a3193a7SBrian Somers.Dq ccp 37766a3193a7SBrian Somersis specified, only the relevant compression layer is closed. 37776a3193a7SBrian SomersIf the 37786a3193a7SBrian Somers.Dq !\& 37796a3193a7SBrian Somersis used, the compression layer will remain in the closed state, otherwise 37806a3193a7SBrian Somersit will re-enter the STOPPED state, waiting for the peer to initiate 37816a3193a7SBrian Somersfurther CCP negotiation. 37826a3193a7SBrian SomersIn any event, this command does not disconnect the user from 37836a3193a7SBrian Somers.Nm 37846a3193a7SBrian Somersor exit 37856a3193a7SBrian Somers.Nm . 37866a3193a7SBrian SomersSee the 37876a3193a7SBrian Somers.Dq quit 37886a3193a7SBrian Somerscommand below. 37896a3193a7SBrian Somers.It delete Ns Xo 37906a3193a7SBrian Somers.Op !\& 37916a3193a7SBrian Somers.Ar dest 37926a3193a7SBrian Somers.Xc 37936a3193a7SBrian SomersThis command deletes the route with the given 37946a3193a7SBrian Somers.Ar dest 37956a3193a7SBrian SomersIP address. 37966a3193a7SBrian SomersIf 37976a3193a7SBrian Somers.Ar dest 37986a3193a7SBrian Somersis specified as 37996a3193a7SBrian Somers.Sq ALL , 38006a3193a7SBrian Somersall non-direct entries in the routing table for the current interface, 38016a3193a7SBrian Somersand all 38026a3193a7SBrian Somers.Sq sticky route 38036a3193a7SBrian Somersentries are deleted. 38046a3193a7SBrian SomersIf 38056a3193a7SBrian Somers.Ar dest 38066a3193a7SBrian Somersis specified as 38076a3193a7SBrian Somers.Sq default , 38086a3193a7SBrian Somersthe default route is deleted. 38096a3193a7SBrian Somers.Pp 38106a3193a7SBrian SomersIf the 38116a3193a7SBrian Somers.Ar delete!\& 38126a3193a7SBrian Somerscommand is used 38136a3193a7SBrian Somers(note the trailing 38146a3193a7SBrian Somers.Dq !\& ) , 38156a3193a7SBrian Somers.Nm 38166a3193a7SBrian Somerswill not complain if the route does not already exist. 38176a3193a7SBrian Somers.It dial|call Oo Ar label Oc Ns Xo 38186a3193a7SBrian Somers.No ... 38196a3193a7SBrian Somers.Xc 38206a3193a7SBrian SomersThis command is the equivalent of 38216a3193a7SBrian Somers.Dq load label 38226a3193a7SBrian Somersfollowed by 38236a3193a7SBrian Somers.Dq open , 38246a3193a7SBrian Somersand is provided for backwards compatibility. 38256a3193a7SBrian Somers.It down Op Ar lcp|ccp 38266a3193a7SBrian SomersBring the relevant layer down ungracefully, as if the underlying layer 38276a3193a7SBrian Somershad become unavailable. 38286a3193a7SBrian SomersIt is not considered polite to use this command on 38296a3193a7SBrian Somersa Finite State Machine that is in the OPEN state. 38306a3193a7SBrian SomersIf no arguments are 38316a3193a7SBrian Somerssupplied, the entire link is closed (or if no context is given, all links 38326a3193a7SBrian Somersare terminated). 38336a3193a7SBrian SomersIf 38346a3193a7SBrian Somers.Sq lcp 38356a3193a7SBrian Somersis specified, the 38366a3193a7SBrian Somers.Em LCP 38376a3193a7SBrian Somerslayer is terminated but the device is not brought offline and the link 38386a3193a7SBrian Somersis not closed. 38396a3193a7SBrian SomersIf 38406a3193a7SBrian Somers.Sq ccp 38416a3193a7SBrian Somersis specified, only the relevant compression layer(s) are terminated. 38426a3193a7SBrian Somers.It help|? Op Ar command 38436a3193a7SBrian SomersShow a list of available commands. 38446a3193a7SBrian SomersIf 38456a3193a7SBrian Somers.Ar command 38466a3193a7SBrian Somersis specified, show the usage string for that command. 38476a3193a7SBrian Somers.It ident Op Ar text Ns No ... 38486a3193a7SBrian SomersIdentify the link to the peer using 38496a3193a7SBrian Somers.Ar text . 38506a3193a7SBrian SomersIf 38516a3193a7SBrian Somers.Ar text 38526a3193a7SBrian Somersis empty, link identification is disabled. 38536a3193a7SBrian SomersIt is possible to use any of the words described for the 38546a3193a7SBrian Somers.Ic bg 38556a3193a7SBrian Somerscommand above. 38566a3193a7SBrian SomersRefer to the 38576a3193a7SBrian Somers.Ic sendident 38586a3193a7SBrian Somerscommand for details of when 38596a3193a7SBrian Somers.Nm 38606a3193a7SBrian Somersidentifies itself to the peer. 38616a3193a7SBrian Somers.It iface Ar command Op args 38626a3193a7SBrian SomersThis command is used to control the interface used by 38636a3193a7SBrian Somers.Nm . 38646a3193a7SBrian Somers.Ar Command 38656a3193a7SBrian Somersmay be one of the following: 38666a3193a7SBrian Somers.Bl -tag -width 2n 38676a3193a7SBrian Somers.It iface add Ns Xo 38686a3193a7SBrian Somers.Op !\& 38696a3193a7SBrian Somers.Ar addr Ns Op / Ns Ar bits 38706a3193a7SBrian Somers.Op Ar peer 38716a3193a7SBrian Somers.Xc 38726a3193a7SBrian Somers.It iface add Ns Xo 38736a3193a7SBrian Somers.Op !\& 38746a3193a7SBrian Somers.Ar addr 38756a3193a7SBrian Somers.Ar mask 38766a3193a7SBrian Somers.Ar peer 38776a3193a7SBrian Somers.Xc 38786a3193a7SBrian SomersAdd the given 38796a3193a7SBrian Somers.Ar addr mask peer 38806a3193a7SBrian Somerscombination to the interface. 38816a3193a7SBrian SomersInstead of specifying 38826a3193a7SBrian Somers.Ar mask , 38836a3193a7SBrian Somers.Ar /bits 38846a3193a7SBrian Somerscan be used 38856a3193a7SBrian Somers(with no space between it and 38866a3193a7SBrian Somers.Ar addr ) . 38876a3193a7SBrian SomersIf the given address already exists, the command fails unless the 38886a3193a7SBrian Somers.Dq !\& 38896a3193a7SBrian Somersis used - in which case the previous interface address entry is overwritten 38906a3193a7SBrian Somerswith the new one, allowing a change of netmask or peer address. 38916a3193a7SBrian Somers.Pp 38926a3193a7SBrian SomersIf only 38936a3193a7SBrian Somers.Ar addr 38946a3193a7SBrian Somersis specified, 38956a3193a7SBrian Somers.Ar bits 38966a3193a7SBrian Somersdefaults to 38976a3193a7SBrian Somers.Dq 32 38986a3193a7SBrian Somersand 38996a3193a7SBrian Somers.Ar peer 39006a3193a7SBrian Somersdefaults to 39016a3193a7SBrian Somers.Dq 255.255.255.255 . 39026a3193a7SBrian SomersThis address (the broadcast address) is the only duplicate peer address that 39036a3193a7SBrian Somers.Nm 39046a3193a7SBrian Somersallows. 39056a3193a7SBrian Somers.It iface clear Op INET | INET6 39066a3193a7SBrian SomersIf this command is used while 39076a3193a7SBrian Somers.Nm 39086a3193a7SBrian Somersis in the OPENED state or while in 39096a3193a7SBrian Somers.Fl auto 39106a3193a7SBrian Somersmode, all addresses except for the NCP negotiated address are deleted 39116a3193a7SBrian Somersfrom the interface. 39126a3193a7SBrian SomersIf 39136a3193a7SBrian Somers.Nm 39146a3193a7SBrian Somersis not in the OPENED state and is not in 39156a3193a7SBrian Somers.Fl auto 39166a3193a7SBrian Somersmode, all interface addresses are deleted. 39176a3193a7SBrian Somers.Pp 39186a3193a7SBrian SomersIf the INET or INET6 arguments are used, only addresses for that address 39196a3193a7SBrian Somersfamily are cleared. 39206a3193a7SBrian Somers.It iface delete Ns Xo 39216a3193a7SBrian Somers.Op !\& Ns 39226a3193a7SBrian Somers.No |rm Ns Op !\& 39236a3193a7SBrian Somers.Ar addr 39246a3193a7SBrian Somers.Xc 39256a3193a7SBrian SomersThis command deletes the given 39266a3193a7SBrian Somers.Ar addr 39276a3193a7SBrian Somersfrom the interface. 39286a3193a7SBrian SomersIf the 39296a3193a7SBrian Somers.Dq !\& 39306a3193a7SBrian Somersis used, no error is given if the address is not currently assigned to 39316a3193a7SBrian Somersthe interface (and no deletion takes place). 39326a3193a7SBrian Somers.It iface name Ar name 39336a3193a7SBrian SomersRenames the interface to 39346a3193a7SBrian Somers.Ar name . 39356a3193a7SBrian Somers.It iface description Ar description 39366a3193a7SBrian SomersSets the interface description to 39376a3193a7SBrian Somers.Ar description . 39386a3193a7SBrian SomersUseful if you have many interfaces on your system. 39396a3193a7SBrian Somers.It iface show 39406a3193a7SBrian SomersShows the current state and current addresses for the interface. 39416a3193a7SBrian SomersIt is much the same as running 39426a3193a7SBrian Somers.Dq ifconfig INTERFACE . 39436a3193a7SBrian Somers.It iface help Op Ar sub-command 39446a3193a7SBrian SomersThis command, when invoked without 39456a3193a7SBrian Somers.Ar sub-command , 39466a3193a7SBrian Somerswill show a list of possible 39476a3193a7SBrian Somers.Dq iface 39486a3193a7SBrian Somerssub-commands and a brief synopsis for each. 39496a3193a7SBrian SomersWhen invoked with 39506a3193a7SBrian Somers.Ar sub-command , 39516a3193a7SBrian Somersonly the synopsis for the given sub-command is shown. 39526a3193a7SBrian Somers.El 39536a3193a7SBrian Somers.It Oo data Oc Ns Xo 39546a3193a7SBrian Somers.No link 39556a3193a7SBrian Somers.Ar name Ns Oo , Ns Ar name Oc Ns ... Ar command Op Ar args 39566a3193a7SBrian Somers.Xc 39576a3193a7SBrian SomersThis command may prefix any other command if the user wishes to 39586a3193a7SBrian Somersspecify which link the command should affect. 39596a3193a7SBrian SomersThis is only applicable after multiple links have been created in Multi-link 39606a3193a7SBrian Somersmode using the 39616a3193a7SBrian Somers.Dq clone 39626a3193a7SBrian Somerscommand. 39636a3193a7SBrian Somers.Pp 39646a3193a7SBrian Somers.Ar Name 39656a3193a7SBrian Somersspecifies the name of an existing link. 39666a3193a7SBrian SomersIf 39676a3193a7SBrian Somers.Ar name 39686a3193a7SBrian Somersis a comma separated list, 39696a3193a7SBrian Somers.Ar command 39706a3193a7SBrian Somersis executed on each link. 39716a3193a7SBrian SomersIf 39726a3193a7SBrian Somers.Ar name 39736a3193a7SBrian Somersis 39746a3193a7SBrian Somers.Dq * , 39756a3193a7SBrian Somers.Ar command 39766a3193a7SBrian Somersis executed on all links. 39776a3193a7SBrian Somers.It load Oo Ar label Oc Ns Xo 39786a3193a7SBrian Somers.No ... 39796a3193a7SBrian Somers.Xc 39806a3193a7SBrian SomersLoad the given 39816a3193a7SBrian Somers.Ar label Ns No (s) 39826a3193a7SBrian Somersfrom the 39836a3193a7SBrian Somers.Pa ppp.conf 39846a3193a7SBrian Somersfile. 39856a3193a7SBrian SomersIf 39866a3193a7SBrian Somers.Ar label 39876a3193a7SBrian Somersis not given, the 39886a3193a7SBrian Somers.Ar default 39896a3193a7SBrian Somerslabel is used. 39906a3193a7SBrian Somers.Pp 39916a3193a7SBrian SomersUnless the 39926a3193a7SBrian Somers.Ar label 39936a3193a7SBrian Somerssection uses the 39946a3193a7SBrian Somers.Dq set mode , 39956a3193a7SBrian Somers.Dq open 39966a3193a7SBrian Somersor 39976a3193a7SBrian Somers.Dq dial 39986a3193a7SBrian Somerscommands, 39996a3193a7SBrian Somers.Nm 40006a3193a7SBrian Somerswill not attempt to make an immediate connection. 40016a3193a7SBrian Somers.It log Ar word Ns No ... 40026a3193a7SBrian SomersSend the given word(s) to the log file with the prefix 40036a3193a7SBrian Somers.Dq LOG: . 40046a3193a7SBrian SomersWord substitutions are done as explained under the 40056a3193a7SBrian Somers.Dq !bg 40066a3193a7SBrian Somerscommand above. 40076a3193a7SBrian Somers.It open Op lcp|ccp|ipcp 40086a3193a7SBrian SomersThis is the opposite of the 40096a3193a7SBrian Somers.Dq close 40106a3193a7SBrian Somerscommand. 40116a3193a7SBrian SomersAll closed links are immediately brought up apart from second and subsequent 40126a3193a7SBrian Somers.Ar demand-dial 40136a3193a7SBrian Somerslinks - these will come up based on the 40146a3193a7SBrian Somers.Dq set autoload 40156a3193a7SBrian Somerscommand that has been used. 40166a3193a7SBrian Somers.Pp 40176a3193a7SBrian SomersIf the 40186a3193a7SBrian Somers.Dq lcp 40196a3193a7SBrian Somersargument is used while the LCP layer is already open, LCP will be 40206a3193a7SBrian Somersrenegotiated. 40216a3193a7SBrian SomersThis allows various LCP options to be changed, after which 40226a3193a7SBrian Somers.Dq open lcp 40236a3193a7SBrian Somerscan be used to put them into effect. 40246a3193a7SBrian SomersAfter renegotiating LCP, 40256a3193a7SBrian Somersany agreed authentication will also take place. 40266a3193a7SBrian Somers.Pp 40276a3193a7SBrian SomersIf the 40286a3193a7SBrian Somers.Dq ccp 40296a3193a7SBrian Somersargument is used, the relevant compression layer is opened. 40306a3193a7SBrian SomersAgain, if it is already open, it will be renegotiated. 40316a3193a7SBrian Somers.Pp 40326a3193a7SBrian SomersIf the 40336a3193a7SBrian Somers.Dq ipcp 40346a3193a7SBrian Somersargument is used, the link will be brought up as normal, but if 40356a3193a7SBrian SomersIPCP is already open, it will be renegotiated and the network 40366a3193a7SBrian Somersinterface will be reconfigured. 40376a3193a7SBrian Somers.Pp 40386a3193a7SBrian SomersIt is probably not good practice to re-open the PPP state machines 40396a3193a7SBrian Somerslike this as it is possible that the peer will not behave correctly. 40406a3193a7SBrian SomersIt 40416a3193a7SBrian Somers.Em is 40426a3193a7SBrian Somershowever useful as a way of forcing the CCP or VJ dictionaries to be reset. 40436a3193a7SBrian Somers.It passwd Ar pass 40446a3193a7SBrian SomersSpecify the password required for access to the full 40456a3193a7SBrian Somers.Nm 40466a3193a7SBrian Somerscommand set. 40476a3193a7SBrian SomersThis password is required when connecting to the diagnostic port (see the 40486a3193a7SBrian Somers.Dq set server 40496a3193a7SBrian Somerscommand). 40506a3193a7SBrian Somers.Ar Pass 40516a3193a7SBrian Somersis specified on the 40526a3193a7SBrian Somers.Dq set server 40536a3193a7SBrian Somerscommand line. 40546a3193a7SBrian SomersThe value of 40556a3193a7SBrian Somers.Ar pass 40566a3193a7SBrian Somersis not logged when 40576a3193a7SBrian Somers.Ar command 40586a3193a7SBrian Somerslogging is active, instead, the literal string 40596a3193a7SBrian Somers.Sq ******** 40606a3193a7SBrian Somersis logged. 40616a3193a7SBrian Somers.It quit|bye Op all 40626a3193a7SBrian SomersIf 40636a3193a7SBrian Somers.Dq quit 40646a3193a7SBrian Somersis executed from the controlling connection or from a command file, 40656a3193a7SBrian Somersppp will exit after closing all connections. 40666a3193a7SBrian SomersOtherwise, if the user 40676a3193a7SBrian Somersis connected to a diagnostic socket, the connection is simply dropped. 40686a3193a7SBrian Somers.Pp 40696a3193a7SBrian SomersIf the 40706a3193a7SBrian Somers.Ar all 40716a3193a7SBrian Somersargument is given, 40726a3193a7SBrian Somers.Nm 40736a3193a7SBrian Somerswill exit despite the source of the command after closing all existing 40746a3193a7SBrian Somersconnections. 40756a3193a7SBrian Somers.It remove|rm 40766a3193a7SBrian SomersThis command removes the given link. 40776a3193a7SBrian SomersIt is only really useful in multi-link mode. 40786a3193a7SBrian SomersA link must be in the 40796a3193a7SBrian Somers.Dv CLOSED 40806a3193a7SBrian Somersstate before it is removed. 40816a3193a7SBrian Somers.It rename|mv Ar name 40826a3193a7SBrian SomersThis command renames the given link to 40836a3193a7SBrian Somers.Ar name . 40846a3193a7SBrian SomersIt will fail if 40856a3193a7SBrian Somers.Ar name 40866a3193a7SBrian Somersis already used by another link. 40876a3193a7SBrian Somers.Pp 40886a3193a7SBrian SomersThe default link name is 40896a3193a7SBrian Somers.Sq deflink . 40906a3193a7SBrian SomersRenaming it to 40916a3193a7SBrian Somers.Sq modem , 40926a3193a7SBrian Somers.Sq cuau0 40936a3193a7SBrian Somersor 40946a3193a7SBrian Somers.Sq USR 40956a3193a7SBrian Somersmay make the log file more readable. 40966a3193a7SBrian Somers.It resolv Ar command 40976a3193a7SBrian SomersThis command controls 40986a3193a7SBrian Somers.Nm Ns No 's 40996a3193a7SBrian Somersmanipulation of the 41006a3193a7SBrian Somers.Xr resolv.conf 5 41016a3193a7SBrian Somersfile. 41026a3193a7SBrian SomersWhen 41036a3193a7SBrian Somers.Nm 41046a3193a7SBrian Somersstarts up, it loads the contents of this file into memory and retains this 41056a3193a7SBrian Somersimage for future use. 41066a3193a7SBrian Somers.Ar command 41076a3193a7SBrian Somersis one of the following: 41086a3193a7SBrian Somers.Bl -tag -width readonly 41096a3193a7SBrian Somers.It Em readonly 41106a3193a7SBrian SomersTreat 41116a3193a7SBrian Somers.Pa /etc/resolv.conf 41126a3193a7SBrian Somersas read only. 41136a3193a7SBrian SomersIf 41146a3193a7SBrian Somers.Dq dns 41156a3193a7SBrian Somersis enabled, 41166a3193a7SBrian Somers.Nm 41176a3193a7SBrian Somerswill still attempt to negotiate nameservers with the peer, making the results 41186a3193a7SBrian Somersavailable via the 41196a3193a7SBrian Somers.Dv DNS0 41206a3193a7SBrian Somersand 41216a3193a7SBrian Somers.Dv DNS1 41226a3193a7SBrian Somersmacros. 41236a3193a7SBrian SomersThis is the opposite of the 41246a3193a7SBrian Somers.Dq resolv writable 41256a3193a7SBrian Somerscommand. 41266a3193a7SBrian Somers.It Em reload 41276a3193a7SBrian SomersReload 41286a3193a7SBrian Somers.Pa /etc/resolv.conf 41296a3193a7SBrian Somersinto memory. 41306a3193a7SBrian SomersThis may be necessary if for example a DHCP client overwrote 41316a3193a7SBrian Somers.Pa /etc/resolv.conf . 41326a3193a7SBrian Somers.It Em restore 41336a3193a7SBrian SomersReplace 41346a3193a7SBrian Somers.Pa /etc/resolv.conf 41356a3193a7SBrian Somerswith the version originally read at startup or with the last 41366a3193a7SBrian Somers.Dq resolv reload 41376a3193a7SBrian Somerscommand. 41386a3193a7SBrian SomersThis is sometimes a useful command to put in the 41396a3193a7SBrian Somers.Pa /etc/ppp/ppp.linkdown 41406a3193a7SBrian Somersfile. 41416a3193a7SBrian Somers.It Em rewrite 41426a3193a7SBrian SomersRewrite the 41436a3193a7SBrian Somers.Pa /etc/resolv.conf 41446a3193a7SBrian Somersfile. 41456a3193a7SBrian SomersThis command will work even if the 41466a3193a7SBrian Somers.Dq resolv readonly 41476a3193a7SBrian Somerscommand has been used. 41486a3193a7SBrian SomersIt may be useful as a command in the 41496a3193a7SBrian Somers.Pa /etc/ppp/ppp.linkup 41506a3193a7SBrian Somersfile if you wish to defer updating 41516a3193a7SBrian Somers.Pa /etc/resolv.conf 41526a3193a7SBrian Somersuntil after other commands have finished. 41536a3193a7SBrian Somers.It Em writable 41546a3193a7SBrian SomersAllow 41556a3193a7SBrian Somers.Nm 41566a3193a7SBrian Somersto update 41576a3193a7SBrian Somers.Pa /etc/resolv.conf 41586a3193a7SBrian Somersif 41596a3193a7SBrian Somers.Dq dns 41606a3193a7SBrian Somersis enabled and 41616a3193a7SBrian Somers.Nm 41626a3193a7SBrian Somerssuccessfully negotiates a DNS. 41636a3193a7SBrian SomersThis is the opposite of the 41646a3193a7SBrian Somers.Dq resolv readonly 41656a3193a7SBrian Somerscommand. 41666a3193a7SBrian Somers.El 41676a3193a7SBrian Somers.It save 41686a3193a7SBrian SomersThis option is not (yet) implemented. 41696a3193a7SBrian Somers.It sendident 41706a3193a7SBrian SomersThis command tells 41716a3193a7SBrian Somers.Nm 41726a3193a7SBrian Somersto identify itself to the peer. 41736a3193a7SBrian SomersThe link must be in LCP state or higher. 41746a3193a7SBrian SomersIf no identity has been set (via the 41756a3193a7SBrian Somers.Ic ident 41766a3193a7SBrian Somerscommand), 41776a3193a7SBrian Somers.Ic sendident 41786a3193a7SBrian Somerswill fail. 41796a3193a7SBrian Somers.Pp 41806a3193a7SBrian SomersWhen an identity has been set, 41816a3193a7SBrian Somers.Nm 41826a3193a7SBrian Somerswill automatically identify itself when it sends or receives a configure 41836a3193a7SBrian Somersreject, when negotiation fails or when LCP reaches the opened state. 41846a3193a7SBrian Somers.Pp 41856a3193a7SBrian SomersReceived identification packets are logged to the LCP log (see 41866a3193a7SBrian Somers.Ic set log 41876a3193a7SBrian Somersfor details) and are never responded to. 41886a3193a7SBrian Somers.It set Ns Xo 41896a3193a7SBrian Somers.Op up 41906a3193a7SBrian Somers.Ar var value 41916a3193a7SBrian Somers.Xc 41926a3193a7SBrian SomersThis option allows the setting of any of the following variables: 41936a3193a7SBrian Somers.Bl -tag -width 2n 41946a3193a7SBrian Somers.It set accmap Ar hex-value 41956a3193a7SBrian SomersACCMap stands for Asynchronous Control Character Map. 41966a3193a7SBrian SomersThis is always 41976a3193a7SBrian Somersnegotiated with the peer, and defaults to a value of 00000000 in hex. 41986a3193a7SBrian SomersThis protocol is required to defeat hardware that depends on passing 41996a3193a7SBrian Somerscertain characters from end to end (such as XON/XOFF etc). 42006a3193a7SBrian Somers.Pp 42016a3193a7SBrian SomersFor the XON/XOFF scenario, use 42026a3193a7SBrian Somers.Dq set accmap 000a0000 . 42036a3193a7SBrian Somers.It set Oo auth Oc Ns Xo 42046a3193a7SBrian Somers.No key Ar value 42056a3193a7SBrian Somers.Xc 42066a3193a7SBrian SomersThis sets the authentication key (or password) used in client mode 42076a3193a7SBrian SomersPAP or CHAP negotiation to the given value. 42086a3193a7SBrian SomersIt also specifies the 42096a3193a7SBrian Somerspassword to be used in the dial or login scripts in place of the 42106a3193a7SBrian Somers.Sq \eP 42116a3193a7SBrian Somerssequence, preventing the actual password from being logged. 42126a3193a7SBrian SomersIf 42136a3193a7SBrian Somers.Ar command 42146a3193a7SBrian Somersor 42156a3193a7SBrian Somers.Ar chat 42166a3193a7SBrian Somerslogging is in effect, 42176a3193a7SBrian Somers.Ar value 42186a3193a7SBrian Somersis logged as 42196a3193a7SBrian Somers.Sq ******** 42206a3193a7SBrian Somersfor security reasons. 42216a3193a7SBrian Somers.Pp 42226a3193a7SBrian SomersIf the first character of 42236a3193a7SBrian Somers.Ar value 42246a3193a7SBrian Somersis an exclamation mark 42256a3193a7SBrian Somers.Pq Dq !\& , 42266a3193a7SBrian Somers.Nm 42276a3193a7SBrian Somerstreats the remainder of the string as a program that must be executed 42286a3193a7SBrian Somersto determine the 42296a3193a7SBrian Somers.Dq authname 42306a3193a7SBrian Somersand 42316a3193a7SBrian Somers.Dq authkey 42326a3193a7SBrian Somersvalues. 42336a3193a7SBrian Somers.Pp 42346a3193a7SBrian SomersIf the 42356a3193a7SBrian Somers.Dq !\& 42366a3193a7SBrian Somersis doubled up 42376a3193a7SBrian Somers(to 42386a3193a7SBrian Somers.Dq !! ) , 42396a3193a7SBrian Somersit is treated as a single literal 42406a3193a7SBrian Somers.Dq !\& , 42416a3193a7SBrian Somersotherwise, ignoring the 42426a3193a7SBrian Somers.Dq !\& , 42436a3193a7SBrian Somers.Ar value 42446a3193a7SBrian Somersis parsed as a program to execute in the same was as the 42456a3193a7SBrian Somers.Dq !bg 42466a3193a7SBrian Somerscommand above, substituting special names in the same manner. 42476a3193a7SBrian SomersOnce executed, 42486a3193a7SBrian Somers.Nm 42496a3193a7SBrian Somerswill feed the program three lines of input, each terminated by a newline 42506a3193a7SBrian Somerscharacter: 42516a3193a7SBrian Somers.Bl -bullet 42526a3193a7SBrian Somers.It 42536a3193a7SBrian SomersThe host name as sent in the CHAP challenge. 42546a3193a7SBrian Somers.It 42556a3193a7SBrian SomersThe challenge string as sent in the CHAP challenge. 42566a3193a7SBrian Somers.It 42576a3193a7SBrian SomersThe locally defined 42586a3193a7SBrian Somers.Dq authname . 42596a3193a7SBrian Somers.El 42606a3193a7SBrian Somers.Pp 42616a3193a7SBrian SomersTwo lines of output are expected: 42626a3193a7SBrian Somers.Bl -bullet 42636a3193a7SBrian Somers.It 42646a3193a7SBrian SomersThe 42656a3193a7SBrian Somers.Dq authname 42666a3193a7SBrian Somersto be sent with the CHAP response. 42676a3193a7SBrian Somers.It 42686a3193a7SBrian SomersThe 42696a3193a7SBrian Somers.Dq authkey , 42706a3193a7SBrian Somerswhich is encrypted with the challenge and request id, the answer being sent 42716a3193a7SBrian Somersin the CHAP response packet. 42726a3193a7SBrian Somers.El 42736a3193a7SBrian Somers.Pp 42746a3193a7SBrian SomersWhen configuring 42756a3193a7SBrian Somers.Nm 42766a3193a7SBrian Somersin this manner, it is expected that the host challenge is a series of ASCII 42776a3193a7SBrian Somersdigits or characters. 42786a3193a7SBrian SomersAn encryption device or Secure ID card is usually 42796a3193a7SBrian Somersrequired to calculate the secret appropriate for the given challenge. 42806a3193a7SBrian Somers.It set authname Ar id 42816a3193a7SBrian SomersThis sets the authentication id used in client mode PAP or CHAP negotiation. 42826a3193a7SBrian Somers.Pp 42836a3193a7SBrian SomersIf used in 42846a3193a7SBrian Somers.Fl direct 42856a3193a7SBrian Somersmode with CHAP enabled, 42866a3193a7SBrian Somers.Ar id 42876a3193a7SBrian Somersis used in the initial authentication challenge and should normally be set to 42886a3193a7SBrian Somersthe local machine name. 42896a3193a7SBrian Somers.It set autoload Xo 42906a3193a7SBrian Somers.Ar min-percent max-percent period 42916a3193a7SBrian Somers.Xc 42926a3193a7SBrian SomersThese settings apply only in multi-link mode and default to zero, zero and 42936a3193a7SBrian Somersfive respectively. 42946a3193a7SBrian SomersWhen more than one 42956a3193a7SBrian Somers.Ar demand-dial 42966a3193a7SBrian Somers(also known as 42976a3193a7SBrian Somers.Fl auto ) 42986a3193a7SBrian Somersmode link is available, only the first link is made active when 42996a3193a7SBrian Somers.Nm 43006a3193a7SBrian Somersfirst reads data from the tun device. 43016a3193a7SBrian SomersThe next 43026a3193a7SBrian Somers.Ar demand-dial 43036a3193a7SBrian Somerslink will be opened only when the current bundle throughput is at least 43046a3193a7SBrian Somers.Ar max-percent 43056a3193a7SBrian Somerspercent of the total bundle bandwidth for 43066a3193a7SBrian Somers.Ar period 43076a3193a7SBrian Somersseconds. 43086a3193a7SBrian SomersWhen the current bundle throughput decreases to 43096a3193a7SBrian Somers.Ar min-percent 43106a3193a7SBrian Somerspercent or less of the total bundle bandwidth for 43116a3193a7SBrian Somers.Ar period 43126a3193a7SBrian Somersseconds, a 43136a3193a7SBrian Somers.Ar demand-dial 43146a3193a7SBrian Somerslink will be brought down as long as it is not the last active link. 43156a3193a7SBrian Somers.Pp 43166a3193a7SBrian SomersBundle throughput is measured as the maximum of inbound and outbound 43176a3193a7SBrian Somerstraffic. 43186a3193a7SBrian Somers.Pp 43196a3193a7SBrian SomersThe default values cause 43206a3193a7SBrian Somers.Ar demand-dial 43216a3193a7SBrian Somerslinks to simply come up one at a time. 43226a3193a7SBrian Somers.Pp 43236a3193a7SBrian SomersCertain devices cannot determine their physical bandwidth, so it 43246a3193a7SBrian Somersis sometimes necessary to use the 43256a3193a7SBrian Somers.Dq set bandwidth 43266a3193a7SBrian Somerscommand (described below) to make 43276a3193a7SBrian Somers.Dq set autoload 43286a3193a7SBrian Somerswork correctly. 43296a3193a7SBrian Somers.It set bandwidth Ar value 43306a3193a7SBrian SomersThis command sets the connection bandwidth in bits per second. 43316a3193a7SBrian Somers.Ar value 43326a3193a7SBrian Somersmust be greater than zero. 43336a3193a7SBrian SomersIt is currently only used by the 43346a3193a7SBrian Somers.Dq set autoload 43356a3193a7SBrian Somerscommand above. 43366a3193a7SBrian Somers.It set callback Ar option Ns No ... 43376a3193a7SBrian SomersIf no arguments are given, callback is disabled, otherwise, 43386a3193a7SBrian Somers.Nm 43396a3193a7SBrian Somerswill request (or in 43406a3193a7SBrian Somers.Fl direct 43416a3193a7SBrian Somersmode, will accept) one of the given 43426a3193a7SBrian Somers.Ar option Ns No s . 43436a3193a7SBrian SomersIn client mode, if an 43446a3193a7SBrian Somers.Ar option 43456a3193a7SBrian Somersis NAK'd 43466a3193a7SBrian Somers.Nm 43476a3193a7SBrian Somerswill request a different 43486a3193a7SBrian Somers.Ar option , 43496a3193a7SBrian Somersuntil no options remain at which point 43506a3193a7SBrian Somers.Nm 43516a3193a7SBrian Somerswill terminate negotiations (unless 43526a3193a7SBrian Somers.Dq none 43536a3193a7SBrian Somersis one of the specified 43546a3193a7SBrian Somers.Ar option ) . 43556a3193a7SBrian SomersIn server mode, 43566a3193a7SBrian Somers.Nm 43576a3193a7SBrian Somerswill accept any of the given protocols - but the client 43586a3193a7SBrian Somers.Em must 43596a3193a7SBrian Somersrequest one of them. 43606a3193a7SBrian SomersIf you wish callback to be optional, you must {include} 43616a3193a7SBrian Somers.Ar none 43626a3193a7SBrian Somersas an option. 43636a3193a7SBrian Somers.Pp 43646a3193a7SBrian SomersThe 43656a3193a7SBrian Somers.Ar option Ns No s 43666a3193a7SBrian Somersare as follows (in this order of preference): 43676a3193a7SBrian Somers.Bl -tag -width Ds 43686a3193a7SBrian Somers.It auth 43696a3193a7SBrian SomersThe callee is expected to decide the callback number based on 43706a3193a7SBrian Somersauthentication. 43716a3193a7SBrian SomersIf 43726a3193a7SBrian Somers.Nm 43736a3193a7SBrian Somersis the callee, the number should be specified as the fifth field of 43746a3193a7SBrian Somersthe peers entry in 43756a3193a7SBrian Somers.Pa /etc/ppp/ppp.secret . 43766a3193a7SBrian Somers.It cbcp 43776a3193a7SBrian SomersMicrosoft's callback control protocol is used. 43786a3193a7SBrian SomersSee 43796a3193a7SBrian Somers.Dq set cbcp 43806a3193a7SBrian Somersbelow. 43816a3193a7SBrian Somers.Pp 43826a3193a7SBrian SomersIf you wish to negotiate 43836a3193a7SBrian Somers.Ar cbcp 43846a3193a7SBrian Somersin client mode but also wish to allow the server to request no callback at 43856a3193a7SBrian SomersCBCP negotiation time, you must specify both 43866a3193a7SBrian Somers.Ar cbcp 43876a3193a7SBrian Somersand 43886a3193a7SBrian Somers.Ar none 43896a3193a7SBrian Somersas callback options. 43906a3193a7SBrian Somers.It E.164 *| Ns Xo 43916a3193a7SBrian Somers.Ar number Ns Op , Ns Ar number Ns 43926a3193a7SBrian Somers.No ... 43936a3193a7SBrian Somers.Xc 43946a3193a7SBrian SomersThe caller specifies the 43956a3193a7SBrian Somers.Ar number . 43966a3193a7SBrian SomersIf 43976a3193a7SBrian Somers.Nm 43986a3193a7SBrian Somersis the callee, 43996a3193a7SBrian Somers.Ar number 44006a3193a7SBrian Somersshould be either a comma separated list of allowable numbers or a 44016a3193a7SBrian Somers.Dq \&* , 44026a3193a7SBrian Somersmeaning any number is permitted. 44036a3193a7SBrian SomersIf 44046a3193a7SBrian Somers.Nm 44056a3193a7SBrian Somersis the caller, only a single number should be specified. 44066a3193a7SBrian Somers.Pp 44076a3193a7SBrian SomersNote, this option is very unsafe when used with a 44086a3193a7SBrian Somers.Dq \&* 44096a3193a7SBrian Somersas a malicious caller can tell 44106a3193a7SBrian Somers.Nm 44116a3193a7SBrian Somersto call any (possibly international) number without first authenticating 44126a3193a7SBrian Somersthemselves. 44136a3193a7SBrian Somers.It none 44146a3193a7SBrian SomersIf the peer does not wish to do callback at all, 44156a3193a7SBrian Somers.Nm 44166a3193a7SBrian Somerswill accept the fact and continue without callback rather than terminating 44176a3193a7SBrian Somersthe connection. 44186a3193a7SBrian SomersThis is required (in addition to one or more other callback 44196a3193a7SBrian Somersoptions) if you wish callback to be optional. 44206a3193a7SBrian Somers.El 44216a3193a7SBrian Somers.It set cbcp Oo 442221ca690bSJose Luis Duran.No *| Ns Ar number Ns 442321ca690bSJose Luis Duran.Oo , Ns Ar number Ns ...\& Oc 44246a3193a7SBrian Somers.Op Ar delay Op Ar retry 44256a3193a7SBrian Somers.Oc 44266a3193a7SBrian SomersIf no arguments are given, CBCP (Microsoft's CallBack Control Protocol) 44276a3193a7SBrian Somersis disabled - ie, configuring CBCP in the 44286a3193a7SBrian Somers.Dq set callback 44296a3193a7SBrian Somerscommand will result in 44306a3193a7SBrian Somers.Nm 44316a3193a7SBrian Somersrequesting no callback in the CBCP phase. 44326a3193a7SBrian SomersOtherwise, 44336a3193a7SBrian Somers.Nm 44346a3193a7SBrian Somersattempts to use the given phone 44356a3193a7SBrian Somers.Ar number Ns No (s) . 44366a3193a7SBrian Somers.Pp 44376a3193a7SBrian SomersIn server mode 44386a3193a7SBrian Somers.Pq Fl direct , 44396a3193a7SBrian Somers.Nm 44406a3193a7SBrian Somerswill insist that the client uses one of these numbers, unless 44416a3193a7SBrian Somers.Dq \&* 44426a3193a7SBrian Somersis used in which case the client is expected to specify the number. 44436a3193a7SBrian Somers.Pp 44446a3193a7SBrian SomersIn client mode, 44456a3193a7SBrian Somers.Nm 44466a3193a7SBrian Somerswill attempt to use one of the given numbers (whichever it finds to 44476a3193a7SBrian Somersbe agreeable with the peer), or if 44486a3193a7SBrian Somers.Dq \&* 44496a3193a7SBrian Somersis specified, 44506a3193a7SBrian Somers.Nm 44516a3193a7SBrian Somerswill expect the peer to specify the number. 44526a3193a7SBrian Somers.It set cd Oo 445321ca690bSJose Luis Duran.No off\&| Ns Ar seconds Ns Op !\& 44546a3193a7SBrian Somers.Oc 44556a3193a7SBrian SomersNormally, 44566a3193a7SBrian Somers.Nm 44576a3193a7SBrian Somerschecks for the existence of carrier depending on the type of device 44586a3193a7SBrian Somersthat has been opened: 44596a3193a7SBrian Somers.Bl -tag -width XXX -offset XXX 44606a3193a7SBrian Somers.It Terminal Devices 44616a3193a7SBrian SomersCarrier is checked one second after the login script is complete. 44626a3193a7SBrian SomersIf it is not set, 44636a3193a7SBrian Somers.Nm 44646a3193a7SBrian Somersassumes that this is because the device does not support carrier (which 44656a3193a7SBrian Somersis true for most 44666a3193a7SBrian Somers.Dq laplink 44676a3193a7SBrian SomersNULL-modem cables), logs the fact and stops checking 44686a3193a7SBrian Somersfor carrier. 44696a3193a7SBrian Somers.Pp 44706a3193a7SBrian SomersAs ptys do not support the TIOCMGET ioctl, the tty device will switch all 44716a3193a7SBrian Somerscarrier detection off when it detects that the device is a pty. 44726a3193a7SBrian Somers.It PPPoE (netgraph) Devices 44736a3193a7SBrian SomersCarrier is checked once per second for 5 seconds. 44746a3193a7SBrian SomersIf it is not set after 44756a3193a7SBrian Somersthe fifth second, the connection attempt is considered to have failed and 44766a3193a7SBrian Somersthe device is closed. 44776a3193a7SBrian SomersCarrier is always required for PPPoE devices. 44786a3193a7SBrian Somers.El 44796a3193a7SBrian Somers.Pp 44806a3193a7SBrian SomersAll other device types do not support carrier. 44816a3193a7SBrian SomersSetting a carrier value will 44826a3193a7SBrian Somersresult in a warning when the device is opened. 44836a3193a7SBrian Somers.Pp 44846a3193a7SBrian SomersSome modems take more than one second after connecting to assert the carrier 44856a3193a7SBrian Somerssignal. 44866a3193a7SBrian SomersIf this delay is not increased, this will result in 44876a3193a7SBrian Somers.Nm Ns No 's 44886a3193a7SBrian Somersinability to detect when the link is dropped, as 44896a3193a7SBrian Somers.Nm 44906a3193a7SBrian Somersassumes that the device is not asserting carrier. 44916a3193a7SBrian Somers.Pp 44926a3193a7SBrian SomersThe 44936a3193a7SBrian Somers.Dq set cd 44946a3193a7SBrian Somerscommand overrides the default carrier behaviour. 44956a3193a7SBrian Somers.Ar seconds 44966a3193a7SBrian Somersspecifies the maximum number of seconds that 44976a3193a7SBrian Somers.Nm 44986a3193a7SBrian Somersshould wait after the dial script has finished before deciding if 44996a3193a7SBrian Somerscarrier is available or not. 45006a3193a7SBrian Somers.Pp 45016a3193a7SBrian SomersIf 45026a3193a7SBrian Somers.Dq off 45036a3193a7SBrian Somersis specified, 45046a3193a7SBrian Somers.Nm 45056a3193a7SBrian Somerswill not check for carrier on the device, otherwise 45066a3193a7SBrian Somers.Nm 45076a3193a7SBrian Somerswill not proceed to the login script until either carrier is detected 45086a3193a7SBrian Somersor until 45096a3193a7SBrian Somers.Ar seconds 45106a3193a7SBrian Somershas elapsed, at which point 45116a3193a7SBrian Somers.Nm 45126a3193a7SBrian Somersassumes that the device will not set carrier. 45136a3193a7SBrian Somers.Pp 45146a3193a7SBrian SomersIf no arguments are given, carrier settings will go back to their default 45156a3193a7SBrian Somersvalues. 45166a3193a7SBrian Somers.Pp 45176a3193a7SBrian SomersIf 45186a3193a7SBrian Somers.Ar seconds 45196a3193a7SBrian Somersis followed immediately by an exclamation mark 45206a3193a7SBrian Somers.Pq Dq !\& , 45216a3193a7SBrian Somers.Nm 45226a3193a7SBrian Somerswill 45236a3193a7SBrian Somers.Em require 45246a3193a7SBrian Somerscarrier. 45256a3193a7SBrian SomersIf carrier is not detected after 45266a3193a7SBrian Somers.Ar seconds 45276a3193a7SBrian Somersseconds, the link will be disconnected. 45286a3193a7SBrian Somers.It set choked Op Ar timeout 45296a3193a7SBrian SomersThis sets the number of seconds that 45306a3193a7SBrian Somers.Nm 45316a3193a7SBrian Somerswill keep a choked output queue before dropping all pending output packets. 45326a3193a7SBrian SomersIf 45336a3193a7SBrian Somers.Ar timeout 45346a3193a7SBrian Somersis less than or equal to zero or if 45356a3193a7SBrian Somers.Ar timeout 45366a3193a7SBrian Somersis not specified, it is set to the default value of 45376a3193a7SBrian Somers.Em 120 seconds . 45386a3193a7SBrian Somers.Pp 45396a3193a7SBrian SomersA choked output queue occurs when 45406a3193a7SBrian Somers.Nm 45416a3193a7SBrian Somershas read a certain number of packets from the local network for transmission, 45426a3193a7SBrian Somersbut cannot send the data due to link failure (the peer is busy etc.). 45436a3193a7SBrian Somers.Nm 45446a3193a7SBrian Somerswill not read packets indefinitely. 45456a3193a7SBrian SomersInstead, it reads up to 45466a3193a7SBrian Somers.Em 30 45476a3193a7SBrian Somerspackets (or 45486a3193a7SBrian Somers.Em 30 No + 45496a3193a7SBrian Somers.Em nlinks No * 45506a3193a7SBrian Somers.Em 2 45516a3193a7SBrian Somerspackets in multi-link mode), then stops reading the network interface 45526a3193a7SBrian Somersuntil either 45536a3193a7SBrian Somers.Ar timeout 45546a3193a7SBrian Somersseconds have passed or at least one packet has been sent. 45556a3193a7SBrian Somers.Pp 45566a3193a7SBrian SomersIf 45576a3193a7SBrian Somers.Ar timeout 45586a3193a7SBrian Somersseconds pass, all pending output packets are dropped. 45596a3193a7SBrian Somers.It set ctsrts|crtscts on|off 45606a3193a7SBrian SomersThis sets hardware flow control. 45616a3193a7SBrian SomersHardware flow control is 45626a3193a7SBrian Somers.Ar on 45636a3193a7SBrian Somersby default. 45646a3193a7SBrian Somers.It set deflate Ar out-winsize Op Ar in-winsize 45656a3193a7SBrian SomersThis sets the DEFLATE algorithms default outgoing and incoming window 45666a3193a7SBrian Somerssizes. 45676a3193a7SBrian SomersBoth 45686a3193a7SBrian Somers.Ar out-winsize 45696a3193a7SBrian Somersand 45706a3193a7SBrian Somers.Ar in-winsize 45716a3193a7SBrian Somersmust be values between 45726a3193a7SBrian Somers.Em 8 45736a3193a7SBrian Somersand 45746a3193a7SBrian Somers.Em 15 . 45756a3193a7SBrian SomersIf 45766a3193a7SBrian Somers.Ar in-winsize 45776a3193a7SBrian Somersis specified, 45786a3193a7SBrian Somers.Nm 45796a3193a7SBrian Somerswill insist that this window size is used and will not accept any other 45806a3193a7SBrian Somersvalues from the peer. 45816a3193a7SBrian Somers.It set dns Op Ar primary Op Ar secondary 45826a3193a7SBrian SomersThis command specifies DNS overrides for the 45836a3193a7SBrian Somers.Dq accept dns 45846a3193a7SBrian Somerscommand. 45856a3193a7SBrian SomersRefer to the 45866a3193a7SBrian Somers.Dq accept 45876a3193a7SBrian Somerscommand description above for details. 45886a3193a7SBrian SomersThis command does not affect the IP numbers requested using 45896a3193a7SBrian Somers.Dq enable dns . 45906a3193a7SBrian Somers.It set device|line Xo 45916a3193a7SBrian Somers.Ar value Ns No ... 45926a3193a7SBrian Somers.Xc 45936a3193a7SBrian SomersThis sets the device(s) to which 45946a3193a7SBrian Somers.Nm 45956a3193a7SBrian Somerswill talk to the given 45966a3193a7SBrian Somers.Dq value . 45976a3193a7SBrian Somers.Pp 45986a3193a7SBrian SomersAll serial device names are expected to begin with 45996a3193a7SBrian Somers.Pa /dev/ . 46006a3193a7SBrian SomersSerial devices are usually called 46016a3193a7SBrian Somers.Pa cuaXX . 46026a3193a7SBrian Somers.Pp 46036a3193a7SBrian SomersIf 46046a3193a7SBrian Somers.Dq value 46056a3193a7SBrian Somersdoes not begin with 46066a3193a7SBrian Somers.Pa /dev/ , 46076a3193a7SBrian Somersit must either begin with an exclamation mark 46086a3193a7SBrian Somers.Pq Dq !\& , 46096a3193a7SBrian Somersbe of the format 461021ca690bSJose Luis Duran.No PPPoE\&: Ns Ar iface Ns Xo 46116a3193a7SBrian Somers.Op \&: Ns Ar provider Ns 46126a3193a7SBrian Somers.Xc 46136a3193a7SBrian Somers(on 46146a3193a7SBrian Somers.Xr netgraph 4 46156a3193a7SBrian Somersenabled systems), or be of the format 46166a3193a7SBrian Somers.Sm off 46176a3193a7SBrian Somers.Ar host : port Op /tcp|udp . 46186a3193a7SBrian Somers.Sm on 46196a3193a7SBrian Somers.Pp 46206a3193a7SBrian SomersIf it begins with an exclamation mark, the rest of the device name is 46216a3193a7SBrian Somerstreated as a program name, and that program is executed when the device 46226a3193a7SBrian Somersis opened. 46236a3193a7SBrian SomersStandard input, output and error are fed back to 46246a3193a7SBrian Somers.Nm 46256a3193a7SBrian Somersand are read and written as if they were a regular device. 46266a3193a7SBrian Somers.Pp 46276a3193a7SBrian SomersIf a 462821ca690bSJose Luis Duran.No PPPoE\&: Ns Ar iface Ns Xo 46296a3193a7SBrian Somers.Op \&: Ns Ar provider Ns 46306a3193a7SBrian Somers.Xc 46316a3193a7SBrian Somersspecification is given, 46326a3193a7SBrian Somers.Nm 46336a3193a7SBrian Somerswill attempt to create a 46346a3193a7SBrian Somers.Em PPP 46356a3193a7SBrian Somersover Ethernet connection using the given 46366a3193a7SBrian Somers.Ar iface 46376a3193a7SBrian Somersinterface by using 46386a3193a7SBrian Somers.Xr netgraph 4 . 46396a3193a7SBrian SomersIf 46406a3193a7SBrian Somers.Xr netgraph 4 46416a3193a7SBrian Somersis not available, 46426a3193a7SBrian Somers.Nm 46436a3193a7SBrian Somerswill attempt to load it using 46446a3193a7SBrian Somers.Xr kldload 2 . 46456a3193a7SBrian SomersIf this fails, an external program must be used such as the 46466a3193a7SBrian Somers.Xr pppoed 8 46476a3193a7SBrian Somersprogram available under 46486a3193a7SBrian Somers.Ox . 46496a3193a7SBrian SomersThe given 46506a3193a7SBrian Somers.Ar provider 46516a3193a7SBrian Somersis passed as the service name in the PPPoE Discovery Initiation (PADI) 46526a3193a7SBrian Somerspacket. 46536a3193a7SBrian SomersIf no provider is given, an empty value will be used. 46546a3193a7SBrian Somers.Pp 46556a3193a7SBrian SomersWhen a PPPoE connection is established, 46566a3193a7SBrian Somers.Nm 46576a3193a7SBrian Somerswill place the name of the Access Concentrator in the environment variable 46586a3193a7SBrian Somers.Ev ACNAME . 46596a3193a7SBrian Somers.Pp 46606a3193a7SBrian SomersRefer to 46616a3193a7SBrian Somers.Xr netgraph 4 46626a3193a7SBrian Somersand 46636a3193a7SBrian Somers.Xr ng_pppoe 4 46646a3193a7SBrian Somersfor further details. 46656a3193a7SBrian Somers.Pp 46666a3193a7SBrian SomersIf a 466721ca690bSJose Luis Duran.Ar host : Ns Ar port Ns Oo 46686a3193a7SBrian Somers.No /tcp|udp 46696a3193a7SBrian Somers.Oc 46706a3193a7SBrian Somersspecification is given, 46716a3193a7SBrian Somers.Nm 46726a3193a7SBrian Somerswill attempt to connect to the given 46736a3193a7SBrian Somers.Ar host 46746a3193a7SBrian Somerson the given 46756a3193a7SBrian Somers.Ar port . 46766a3193a7SBrian SomersIf a 46776a3193a7SBrian Somers.Dq /tcp 46786a3193a7SBrian Somersor 46796a3193a7SBrian Somers.Dq /udp 46806a3193a7SBrian Somerssuffix is not provided, the default is 46816a3193a7SBrian Somers.Dq /tcp . 46826a3193a7SBrian SomersRefer to the section on 46836a3193a7SBrian Somers.Em PPP OVER TCP and UDP 46846a3193a7SBrian Somersabove for further details. 46856a3193a7SBrian Somers.Pp 46866a3193a7SBrian SomersIf multiple 46876a3193a7SBrian Somers.Dq values 46886a3193a7SBrian Somersare specified, 46896a3193a7SBrian Somers.Nm 46906a3193a7SBrian Somerswill attempt to open each one in turn until it succeeds or runs out of 46916a3193a7SBrian Somersdevices. 46926a3193a7SBrian Somers.It set dial Ar chat-script 46936a3193a7SBrian SomersThis specifies the chat script that will be used to dial the other 46946a3193a7SBrian Somersside. 46956a3193a7SBrian SomersSee also the 46966a3193a7SBrian Somers.Dq set login 46976a3193a7SBrian Somerscommand below. 46986a3193a7SBrian SomersRefer to 46996a3193a7SBrian Somers.Xr chat 8 47006a3193a7SBrian Somersand to the example configuration files for details of the chat script 47016a3193a7SBrian Somersformat. 47026a3193a7SBrian SomersIt is possible to specify some special 47036a3193a7SBrian Somers.Sq values 47046a3193a7SBrian Somersin your chat script as follows: 47056a3193a7SBrian Somers.Bl -tag -width 2n 47066a3193a7SBrian Somers.It Li \ec 47076a3193a7SBrian SomersWhen used as the last character in a 47086a3193a7SBrian Somers.Sq send 47096a3193a7SBrian Somersstring, this indicates that a newline should not be appended. 47106a3193a7SBrian Somers.It Li \ed 47116a3193a7SBrian SomersWhen the chat script encounters this sequence, it delays two seconds. 47126a3193a7SBrian Somers.It Li \ep 47136a3193a7SBrian SomersWhen the chat script encounters this sequence, it delays for one quarter of 47146a3193a7SBrian Somersa second. 47156a3193a7SBrian Somers.It Li \en 47166a3193a7SBrian SomersThis is replaced with a newline character. 47176a3193a7SBrian Somers.It Li \er 47186a3193a7SBrian SomersThis is replaced with a carriage return character. 47196a3193a7SBrian Somers.It Li \es 47206a3193a7SBrian SomersThis is replaced with a space character. 47216a3193a7SBrian Somers.It Li \et 47226a3193a7SBrian SomersThis is replaced with a tab character. 47236a3193a7SBrian Somers.It Li \eT 47246a3193a7SBrian SomersThis is replaced by the current phone number (see 47256a3193a7SBrian Somers.Dq set phone 47266a3193a7SBrian Somersbelow). 47276a3193a7SBrian Somers.It Li \eP 47286a3193a7SBrian SomersThis is replaced by the current 47296a3193a7SBrian Somers.Ar authkey 47306a3193a7SBrian Somersvalue (see 47316a3193a7SBrian Somers.Dq set authkey 47326a3193a7SBrian Somersabove). 47336a3193a7SBrian Somers.It Li \eU 47346a3193a7SBrian SomersThis is replaced by the current 47356a3193a7SBrian Somers.Ar authname 47366a3193a7SBrian Somersvalue (see 47376a3193a7SBrian Somers.Dq set authname 47386a3193a7SBrian Somersabove). 47396a3193a7SBrian Somers.El 47406a3193a7SBrian Somers.Pp 47416a3193a7SBrian SomersNote that two parsers will examine these escape sequences, so in order to 47426a3193a7SBrian Somershave the 47436a3193a7SBrian Somers.Sq chat parser 47446a3193a7SBrian Somerssee the escape character, it is necessary to escape it from the 47456a3193a7SBrian Somers.Sq command parser . 47466a3193a7SBrian SomersThis means that in practice you should use two escapes, for example: 47476a3193a7SBrian Somers.Bd -literal -offset indent 47486a3193a7SBrian Somersset dial "... ATDT\\\\T CONNECT" 47496a3193a7SBrian Somers.Ed 47506a3193a7SBrian Somers.Pp 47516a3193a7SBrian SomersIt is also possible to execute external commands from the chat script. 47526a3193a7SBrian SomersTo do this, the first character of the expect or send string is an 47536a3193a7SBrian Somersexclamation mark 47546a3193a7SBrian Somers.Pq Dq !\& . 47556a3193a7SBrian SomersIf a literal exclamation mark is required, double it up to 47566a3193a7SBrian Somers.Dq !!\& 47576a3193a7SBrian Somersand it will be treated as a single literal 47586a3193a7SBrian Somers.Dq !\& . 47596a3193a7SBrian SomersWhen the command is executed, standard input and standard output are 47606a3193a7SBrian Somersdirected to the open device (see the 47616a3193a7SBrian Somers.Dq set device 47626a3193a7SBrian Somerscommand), and standard error is read by 47636a3193a7SBrian Somers.Nm 47646a3193a7SBrian Somersand substituted as the expect or send string. 47656a3193a7SBrian SomersIf 47666a3193a7SBrian Somers.Nm 47676a3193a7SBrian Somersis running in interactive mode, file descriptor 3 is attached to 47686a3193a7SBrian Somers.Pa /dev/tty . 47696a3193a7SBrian Somers.Pp 47706a3193a7SBrian SomersFor example (wrapped for readability): 47716a3193a7SBrian Somers.Bd -literal -offset indent 47726a3193a7SBrian Somersset login "TIMEOUT 5 \\"\\" \\"\\" login:--login: ppp \e 47736a3193a7SBrian Somersword: ppp \\"!sh \\\\-c \\\\\\"echo \\\\-n label: >&2\\\\\\"\\" \e 47746a3193a7SBrian Somers\\"!/bin/echo in\\" HELLO" 47756a3193a7SBrian Somers.Ed 47766a3193a7SBrian Somers.Pp 47776a3193a7SBrian Somerswould result in the following chat sequence (output using the 47786a3193a7SBrian Somers.Sq set log local chat 47796a3193a7SBrian Somerscommand before dialing): 47806a3193a7SBrian Somers.Bd -literal -offset indent 47816a3193a7SBrian SomersDial attempt 1 of 1 47826a3193a7SBrian Somersdial OK! 47836a3193a7SBrian SomersChat: Expecting: 47846a3193a7SBrian SomersChat: Sending: 47856a3193a7SBrian SomersChat: Expecting: login:--login: 47866a3193a7SBrian SomersChat: Wait for (5): login: 47876a3193a7SBrian SomersChat: Sending: ppp 47886a3193a7SBrian SomersChat: Expecting: word: 47896a3193a7SBrian SomersChat: Wait for (5): word: 47906a3193a7SBrian SomersChat: Sending: ppp 47916a3193a7SBrian SomersChat: Expecting: !sh \\-c "echo \\-n label: >&2" 47926a3193a7SBrian SomersChat: Exec: sh -c "echo -n label: >&2" 47936a3193a7SBrian SomersChat: Wait for (5): !sh \\-c "echo \\-n label: >&2" --> label: 47946a3193a7SBrian SomersChat: Exec: /bin/echo in 47956a3193a7SBrian SomersChat: Sending: 47966a3193a7SBrian SomersChat: Expecting: HELLO 47976a3193a7SBrian SomersChat: Wait for (5): HELLO 47986a3193a7SBrian Somerslogin OK! 47996a3193a7SBrian Somers.Ed 48006a3193a7SBrian Somers.Pp 48016a3193a7SBrian SomersNote (again) the use of the escape character, allowing many levels of 48026a3193a7SBrian Somersnesting. 48036a3193a7SBrian SomersHere, there are four parsers at work. 48046a3193a7SBrian SomersThe first parses the original line, reading it as three arguments. 48056a3193a7SBrian SomersThe second parses the third argument, reading it as 11 arguments. 48066a3193a7SBrian SomersAt this point, it is 48076a3193a7SBrian Somersimportant that the 48086a3193a7SBrian Somers.Dq \&- 48096a3193a7SBrian Somerssigns are escaped, otherwise this parser will see them as constituting 48106a3193a7SBrian Somersan expect-send-expect sequence. 48116a3193a7SBrian SomersWhen the 48126a3193a7SBrian Somers.Dq !\& 48136a3193a7SBrian Somerscharacter is seen, the execution parser reads the first command as three 48146a3193a7SBrian Somersarguments, and then 48156a3193a7SBrian Somers.Xr sh 1 48166a3193a7SBrian Somersitself expands the argument after the 48176a3193a7SBrian Somers.Fl c . 48186a3193a7SBrian SomersAs we wish to send the output back to the modem, in the first example 48196a3193a7SBrian Somerswe redirect our output to file descriptor 2 (stderr) so that 48206a3193a7SBrian Somers.Nm 48216a3193a7SBrian Somersitself sends and logs it, and in the second example, we just output to stdout, 48226a3193a7SBrian Somerswhich is attached directly to the modem. 48236a3193a7SBrian Somers.Pp 48246a3193a7SBrian SomersThis, of course means that it is possible to execute an entirely external 48256a3193a7SBrian Somers.Dq chat 48266a3193a7SBrian Somerscommand rather than using the internal one. 48276a3193a7SBrian SomersSee 48286a3193a7SBrian Somers.Xr chat 8 48296a3193a7SBrian Somersfor a good alternative. 48306a3193a7SBrian Somers.Pp 48316a3193a7SBrian SomersThe external command that is executed is subjected to the same special 48326a3193a7SBrian Somersword expansions as the 48336a3193a7SBrian Somers.Dq !bg 48346a3193a7SBrian Somerscommand. 48356a3193a7SBrian Somers.It set enddisc Op label|IP|MAC|magic|psn value 48366a3193a7SBrian SomersThis command sets our local endpoint discriminator. 48376a3193a7SBrian SomersIf set prior to LCP negotiation, and if no 48386a3193a7SBrian Somers.Dq disable enddisc 48396a3193a7SBrian Somerscommand has been used, 48406a3193a7SBrian Somers.Nm 48416a3193a7SBrian Somerswill send the information to the peer using the LCP endpoint discriminator 48426a3193a7SBrian Somersoption. 48436a3193a7SBrian SomersThe following discriminators may be set: 48446a3193a7SBrian Somers.Bl -tag -width indent 48456a3193a7SBrian Somers.It Li label 48466a3193a7SBrian SomersThe current label is used. 48476a3193a7SBrian Somers.It Li IP 48486a3193a7SBrian SomersOur local IP number is used. 48496a3193a7SBrian SomersAs LCP is negotiated prior to IPCP, it is 48506a3193a7SBrian Somerspossible that the IPCP layer will subsequently change this value. 48516a3193a7SBrian SomersIf 48526a3193a7SBrian Somersit does, the endpoint discriminator stays at the old value unless manually 48536a3193a7SBrian Somersreset. 48546a3193a7SBrian Somers.It Li MAC 48556a3193a7SBrian SomersThis is similar to the 48566a3193a7SBrian Somers.Ar IP 48576a3193a7SBrian Somersoption above, except that the MAC address associated with the local IP 48586a3193a7SBrian Somersnumber is used. 48596a3193a7SBrian SomersIf the local IP number is not resident on any Ethernet 48606a3193a7SBrian Somersinterface, the command will fail. 48616a3193a7SBrian Somers.Pp 48626a3193a7SBrian SomersAs the local IP number defaults to whatever the machine host name is, 48636a3193a7SBrian Somers.Dq set enddisc mac 48646a3193a7SBrian Somersis usually done prior to any 48656a3193a7SBrian Somers.Dq set ifaddr 48666a3193a7SBrian Somerscommands. 48676a3193a7SBrian Somers.It Li magic 48686a3193a7SBrian SomersA 20 digit random number is used. 48696a3193a7SBrian SomersCare should be taken when using magic numbers as restarting 48706a3193a7SBrian Somers.Nm 48716a3193a7SBrian Somersor creating a link using a different 48726a3193a7SBrian Somers.Nm 48736a3193a7SBrian Somersinvocation will also use a different magic number and will therefore not 48746a3193a7SBrian Somersbe recognised by the peer as belonging to the same bundle. 48756a3193a7SBrian SomersThis makes it unsuitable for 48766a3193a7SBrian Somers.Fl direct 48776a3193a7SBrian Somersconnections. 48786a3193a7SBrian Somers.It Li psn Ar value 48796a3193a7SBrian SomersThe given 48806a3193a7SBrian Somers.Ar value 48816a3193a7SBrian Somersis used. 48826a3193a7SBrian Somers.Ar Value 48836a3193a7SBrian Somersshould be set to an absolute public switched network number with the 48846a3193a7SBrian Somerscountry code first. 48856a3193a7SBrian Somers.El 48866a3193a7SBrian Somers.Pp 48876a3193a7SBrian SomersIf no arguments are given, the endpoint discriminator is reset. 48886a3193a7SBrian Somers.It set escape Ar value... 48896a3193a7SBrian SomersThis option is similar to the 48906a3193a7SBrian Somers.Dq set accmap 48916a3193a7SBrian Somersoption above. 48926a3193a7SBrian SomersIt allows the user to specify a set of characters that will be 48936a3193a7SBrian Somers.Sq escaped 48946a3193a7SBrian Somersas they travel across the link. 48956a3193a7SBrian Somers.It set filter dial|alive|in|out Ar rule-no Xo 489621ca690bSJose Luis Duran.No permit|deny|clear\&| Ns Ar rule-no 48976a3193a7SBrian Somers.Op !\& 48986a3193a7SBrian Somers.Oo Op host 48996a3193a7SBrian Somers.Ar src_addr Ns Op / Ns Ar width 49006a3193a7SBrian Somers.Op Ar dst_addr Ns Op / Ns Ar width 49016a3193a7SBrian Somers.Oc [ Ns Ar proto 49026a3193a7SBrian Somers.Op src lt|eq|gt Ar port 49036a3193a7SBrian Somers.Op dst lt|eq|gt Ar port 49046a3193a7SBrian Somers.Op estab 49056a3193a7SBrian Somers.Op syn 49066a3193a7SBrian Somers.Op finrst 49076a3193a7SBrian Somers.Op timeout Ar secs ] 49086a3193a7SBrian Somers.Xc 49096a3193a7SBrian Somers.Nm 49106a3193a7SBrian Somerssupports four filter sets. 49116a3193a7SBrian SomersThe 49126a3193a7SBrian Somers.Em alive 49136a3193a7SBrian Somersfilter specifies packets that keep the connection alive - resetting the 49146a3193a7SBrian Somersidle timer. 49156a3193a7SBrian SomersThe 49166a3193a7SBrian Somers.Em dial 49176a3193a7SBrian Somersfilter specifies packets that cause 49186a3193a7SBrian Somers.Nm 49196a3193a7SBrian Somersto dial when in 49206a3193a7SBrian Somers.Fl auto 49216a3193a7SBrian Somersmode. 49226a3193a7SBrian SomersThe 49236a3193a7SBrian Somers.Em in 49246a3193a7SBrian Somersfilter specifies packets that are allowed to travel 49256a3193a7SBrian Somersinto the machine and the 49266a3193a7SBrian Somers.Em out 49276a3193a7SBrian Somersfilter specifies packets that are allowed out of the machine. 49286a3193a7SBrian Somers.Pp 49296a3193a7SBrian SomersFiltering is done prior to any IP alterations that might be done by the 49306a3193a7SBrian SomersNAT engine on outgoing packets and after any IP alterations that might 49316a3193a7SBrian Somersbe done by the NAT engine on incoming packets. 49326a3193a7SBrian SomersBy default all empty filter sets allow all packets to pass. 49336a3193a7SBrian SomersRules are processed in order according to 49346a3193a7SBrian Somers.Ar rule-no 49356a3193a7SBrian Somers(unless skipped by specifying a rule number as the 49366a3193a7SBrian Somers.Ar action ) . 49376a3193a7SBrian SomersUp to 40 rules may be given for each set. 49386a3193a7SBrian SomersIf a packet does not match 49396a3193a7SBrian Somersany of the rules in a given set, it is discarded. 49406a3193a7SBrian SomersIn the case of 49416a3193a7SBrian Somers.Em in 49426a3193a7SBrian Somersand 49436a3193a7SBrian Somers.Em out 49446a3193a7SBrian Somersfilters, this means that the packet is dropped. 49456a3193a7SBrian SomersIn the case of 49466a3193a7SBrian Somers.Em alive 49476a3193a7SBrian Somersfilters it means that the packet will not reset the idle timer (even if 49486a3193a7SBrian Somersthe 49496a3193a7SBrian Somers.Ar in Ns No / Ns Ar out 49506a3193a7SBrian Somersfilter has a 49516a3193a7SBrian Somers.Dq timeout 49526a3193a7SBrian Somersvalue) and in the case of 49536a3193a7SBrian Somers.Em dial 49546a3193a7SBrian Somersfilters it means that the packet will not trigger a dial. 49556a3193a7SBrian SomersA packet failing to trigger a dial will be dropped rather than queued. 49566a3193a7SBrian SomersRefer to the 49576a3193a7SBrian Somerssection on 49586a3193a7SBrian Somers.Sx PACKET FILTERING 49596a3193a7SBrian Somersabove for further details. 49606a3193a7SBrian Somers.It set hangup Ar chat-script 49616a3193a7SBrian SomersThis specifies the chat script that will be used to reset the device 49626a3193a7SBrian Somersbefore it is closed. 49636a3193a7SBrian SomersIt should not normally be necessary, but can 49646a3193a7SBrian Somersbe used for devices that fail to reset themselves properly on close. 49656a3193a7SBrian Somers.It set help|? Op Ar command 49666a3193a7SBrian SomersThis command gives a summary of available set commands, or if 49676a3193a7SBrian Somers.Ar command 49686a3193a7SBrian Somersis specified, the command usage is shown. 49696a3193a7SBrian Somers.It set ifaddr Oo Ar myaddr Ns 49706a3193a7SBrian Somers.Op / Ns Ar \&nn 49716a3193a7SBrian Somers.Oo Ar hisaddr Ns Op / Ns Ar \&nn 49726a3193a7SBrian Somers.Oo Ar netmask 49736a3193a7SBrian Somers.Op Ar triggeraddr 49746a3193a7SBrian Somers.Oc Oc 49756a3193a7SBrian Somers.Oc 49766a3193a7SBrian SomersThis command specifies the IP addresses that will be used during 49776a3193a7SBrian SomersIPCP negotiation. 49786a3193a7SBrian SomersAddresses are specified using the format 49796a3193a7SBrian Somers.Pp 49806a3193a7SBrian Somers.Dl a.b.c.d/nn 49816a3193a7SBrian Somers.Pp 49826a3193a7SBrian SomersWhere 49836a3193a7SBrian Somers.Dq a.b.c.d 49846a3193a7SBrian Somersis the preferred IP, but 49856a3193a7SBrian Somers.Ar nn 49866a3193a7SBrian Somersspecifies how many bits of the address we will insist on. 49876a3193a7SBrian SomersIf 49886a3193a7SBrian Somers.No / Ns Ar nn 49896a3193a7SBrian Somersis omitted, it defaults to 49906a3193a7SBrian Somers.Dq /32 49916a3193a7SBrian Somersunless the IP address is 0.0.0.0 in which case it defaults to 49926a3193a7SBrian Somers.Dq /0 . 49936a3193a7SBrian Somers.Pp 49946a3193a7SBrian SomersIf you wish to assign a dynamic IP number to the peer, 49956a3193a7SBrian Somers.Ar hisaddr 49966a3193a7SBrian Somersmay also be specified as a range of IP numbers in the format 49976a3193a7SBrian Somers.Bd -ragged -offset indent 49986a3193a7SBrian Somers.Ar \&IP Ns Oo \&- Ns Ar \&IP Ns Oc Ns Oo , Ns Ar \&IP Ns 49996a3193a7SBrian Somers.Oo \&- Ns Ar \&IP Ns Oc Oc Ns ... 50006a3193a7SBrian Somers.Ed 50016a3193a7SBrian Somers.Pp 50026a3193a7SBrian Somersfor example: 50036a3193a7SBrian Somers.Pp 50046a3193a7SBrian Somers.Dl set ifaddr 10.0.0.1 10.0.1.2-10.0.1.10,10.0.1.20 50056a3193a7SBrian Somers.Pp 50066a3193a7SBrian Somerswill only negotiate 50076a3193a7SBrian Somers.Dq 10.0.0.1 50086a3193a7SBrian Somersas the local IP number, but may assign any of the given 10 IP 50096a3193a7SBrian Somersnumbers to the peer. 50106a3193a7SBrian SomersIf the peer requests one of these numbers, 50116a3193a7SBrian Somersand that number is not already in use, 50126a3193a7SBrian Somers.Nm 50136a3193a7SBrian Somerswill grant the peers request. 50146a3193a7SBrian SomersThis is useful if the peer wants 50156a3193a7SBrian Somersto re-establish a link using the same IP number as was previously 50166a3193a7SBrian Somersallocated (thus maintaining any existing tcp or udp connections). 50176a3193a7SBrian Somers.Pp 50186a3193a7SBrian SomersIf the peer requests an IP number that is either outside 50196a3193a7SBrian Somersof this range or is already in use, 50206a3193a7SBrian Somers.Nm 50216a3193a7SBrian Somerswill suggest a random unused IP number from the range. 50226a3193a7SBrian Somers.Pp 50236a3193a7SBrian SomersIf 50246a3193a7SBrian Somers.Ar triggeraddr 50256a3193a7SBrian Somersis specified, it is used in place of 50266a3193a7SBrian Somers.Ar myaddr 50276a3193a7SBrian Somersin the initial IPCP negotiation. 50286a3193a7SBrian SomersHowever, only an address in the 50296a3193a7SBrian Somers.Ar myaddr 50306a3193a7SBrian Somersrange will be accepted. 50316a3193a7SBrian SomersThis is useful when negotiating with some 50326a3193a7SBrian Somers.Dv PPP 50336a3193a7SBrian Somersimplementations that will not assign an IP number unless their peer 50346a3193a7SBrian Somersrequests 50356a3193a7SBrian Somers.Dq 0.0.0.0 . 50366a3193a7SBrian Somers.Pp 50376a3193a7SBrian SomersIt should be noted that in 50386a3193a7SBrian Somers.Fl auto 50396a3193a7SBrian Somersmode, 50406a3193a7SBrian Somers.Nm 50416a3193a7SBrian Somerswill configure the interface immediately upon reading the 50426a3193a7SBrian Somers.Dq set ifaddr 50436a3193a7SBrian Somersline in the config file. 50446a3193a7SBrian SomersIn any other mode, these values are just 50456a3193a7SBrian Somersused for IPCP negotiations, and the interface is not configured 50466a3193a7SBrian Somersuntil the IPCP layer is up. 50476a3193a7SBrian Somers.Pp 50486a3193a7SBrian SomersNote that the 50496a3193a7SBrian Somers.Ar HISADDR 50506a3193a7SBrian Somersargument may be overridden by the third field in the 50516a3193a7SBrian Somers.Pa ppp.secret 50526a3193a7SBrian Somersfile once the client has authenticated itself 50536a3193a7SBrian Somers(if PAP or CHAP are 50546a3193a7SBrian Somers.Dq enabled ) . 50556a3193a7SBrian SomersRefer to the 50566a3193a7SBrian Somers.Sx AUTHENTICATING INCOMING CONNECTIONS 50576a3193a7SBrian Somerssection for details. 50586a3193a7SBrian Somers.Pp 50596a3193a7SBrian SomersIn all cases, if the interface is already configured, 50606a3193a7SBrian Somers.Nm 50616a3193a7SBrian Somerswill try to maintain the interface IP numbers so that any existing 50626a3193a7SBrian Somersbound sockets will remain valid. 50636a3193a7SBrian Somers.It set ifqueue Ar packets 50646a3193a7SBrian SomersSet the maximum number of packets that 50656a3193a7SBrian Somers.Nm 50666a3193a7SBrian Somerswill read from the tunnel interface while data cannot be sent to any of 50676a3193a7SBrian Somersthe available links. 50686a3193a7SBrian SomersThis queue limit is necessary to flow control outgoing data as the tunnel 50696a3193a7SBrian Somersinterface is likely to be far faster than the combined links available to 50706a3193a7SBrian Somers.Nm . 50716a3193a7SBrian Somers.Pp 50726a3193a7SBrian SomersIf 50736a3193a7SBrian Somers.Ar packets 50746a3193a7SBrian Somersis set to a value less than the number of links, 50756a3193a7SBrian Somers.Nm 50766a3193a7SBrian Somerswill read up to that value regardless. 50776a3193a7SBrian SomersThis prevents any possible latency problems. 50786a3193a7SBrian Somers.Pp 50796a3193a7SBrian SomersThe default value for 50806a3193a7SBrian Somers.Ar packets 50816a3193a7SBrian Somersis 50826a3193a7SBrian Somers.Dq 30 . 50836a3193a7SBrian Somers.It set ccpretry|ccpretries Oo Ar timeout 50846a3193a7SBrian Somers.Op Ar reqtries Op Ar trmtries 50856a3193a7SBrian Somers.Oc 50866a3193a7SBrian Somers.It set chapretry|chapretries Oo Ar timeout 50876a3193a7SBrian Somers.Op Ar reqtries 50886a3193a7SBrian Somers.Oc 50896a3193a7SBrian Somers.It set ipcpretry|ipcpretries Oo Ar timeout 50906a3193a7SBrian Somers.Op Ar reqtries Op Ar trmtries 50916a3193a7SBrian Somers.Oc 50926a3193a7SBrian Somers.It set ipv6cpretry|ipv6cpretries Oo Ar timeout 50936a3193a7SBrian Somers.Op Ar reqtries Op Ar trmtries 50946a3193a7SBrian Somers.Oc 50956a3193a7SBrian Somers.It set lcpretry|lcpretries Oo Ar timeout 50966a3193a7SBrian Somers.Op Ar reqtries Op Ar trmtries 50976a3193a7SBrian Somers.Oc 50986a3193a7SBrian Somers.It set papretry|papretries Oo Ar timeout 50996a3193a7SBrian Somers.Op Ar reqtries 51006a3193a7SBrian Somers.Oc 51016a3193a7SBrian SomersThese commands set the number of seconds that 51026a3193a7SBrian Somers.Nm 51036a3193a7SBrian Somerswill wait before resending Finite State Machine (FSM) Request packets. 51046a3193a7SBrian SomersThe default 51056a3193a7SBrian Somers.Ar timeout 51066a3193a7SBrian Somersfor all FSMs is 3 seconds (which should suffice in most cases). 51076a3193a7SBrian Somers.Pp 51086a3193a7SBrian SomersIf 51096a3193a7SBrian Somers.Ar reqtries 51106a3193a7SBrian Somersis specified, it tells 51116a3193a7SBrian Somers.Nm 51126a3193a7SBrian Somershow many configuration request attempts it should make while receiving 51136a3193a7SBrian Somersno reply from the peer before giving up. 51146a3193a7SBrian SomersThe default is 5 attempts for 51156a3193a7SBrian SomersCCP, LCP and IPCP and 3 attempts for PAP and CHAP. 51166a3193a7SBrian Somers.Pp 51176a3193a7SBrian SomersIf 51186a3193a7SBrian Somers.Ar trmtries 51196a3193a7SBrian Somersis specified, it tells 51206a3193a7SBrian Somers.Nm 51216a3193a7SBrian Somershow many terminate requests should be sent before giving up waiting for the 51226a3193a7SBrian Somerspeers response. 51236a3193a7SBrian SomersThe default is 3 attempts. 51246a3193a7SBrian SomersAuthentication protocols are 51256a3193a7SBrian Somersnot terminated and it is therefore invalid to specify 51266a3193a7SBrian Somers.Ar trmtries 51276a3193a7SBrian Somersfor PAP or CHAP. 51286a3193a7SBrian Somers.Pp 51296a3193a7SBrian SomersIn order to avoid negotiations with the peer that will never converge, 51306a3193a7SBrian Somers.Nm 51316a3193a7SBrian Somerswill only send at most 3 times the configured number of 51326a3193a7SBrian Somers.Ar reqtries 51336a3193a7SBrian Somersin any given negotiation session before giving up and closing that layer. 51346a3193a7SBrian Somers.It set log Xo 51356a3193a7SBrian Somers.Op local 51366a3193a7SBrian Somers.Op +|- Ns 51376a3193a7SBrian Somers.Ar value Ns No ... 51386a3193a7SBrian Somers.Xc 51396a3193a7SBrian SomersThis command allows the adjustment of the current log level. 51406a3193a7SBrian SomersRefer to the Logging Facility section for further details. 51416a3193a7SBrian Somers.It set login Ar chat-script 51426a3193a7SBrian SomersThis 51436a3193a7SBrian Somers.Ar chat-script 51446a3193a7SBrian Somerscompliments the dial-script. 51456a3193a7SBrian SomersIf both are specified, the login 51466a3193a7SBrian Somersscript will be executed after the dial script. 51476a3193a7SBrian SomersEscape sequences available in the dial script are also available here. 51486a3193a7SBrian Somers.It set logout Ar chat-script 51496a3193a7SBrian SomersThis specifies the chat script that will be used to logout 51506a3193a7SBrian Somersbefore the hangup script is called. 51516a3193a7SBrian SomersIt should not normally be necessary. 51526a3193a7SBrian Somers.It set lqrperiod|echoperiod Ar frequency 51536a3193a7SBrian SomersThis command sets the 51546a3193a7SBrian Somers.Ar frequency 51556a3193a7SBrian Somersin seconds at which 51566a3193a7SBrian Somers.Em LQR 51576a3193a7SBrian Somersor 51586a3193a7SBrian Somers.Em LCP ECHO 51596a3193a7SBrian Somerspackets are sent. 51606a3193a7SBrian SomersThe default is 30 seconds. 51616a3193a7SBrian SomersYou must also use the 51626a3193a7SBrian Somers.Dq enable lqr 51636a3193a7SBrian Somersand/or 51646a3193a7SBrian Somers.Dq enable echo 51656a3193a7SBrian Somerscommands if you wish to send 51666a3193a7SBrian Somers.Em LQR 51676a3193a7SBrian Somersor 51686a3193a7SBrian Somers.Em LCP ECHO 51696a3193a7SBrian Somersrequests to the peer. 51706a3193a7SBrian Somers.It set mode Ar interactive|auto|ddial|background 51716a3193a7SBrian SomersThis command allows you to change the 51726a3193a7SBrian Somers.Sq mode 51736a3193a7SBrian Somersof the specified link. 51746a3193a7SBrian SomersThis is normally only useful in multi-link mode, 51756a3193a7SBrian Somersbut may also be used in uni-link mode. 51766a3193a7SBrian Somers.Pp 51776a3193a7SBrian SomersIt is not possible to change a link that is 51786a3193a7SBrian Somers.Sq direct 51796a3193a7SBrian Somersor 51806a3193a7SBrian Somers.Sq dedicated . 51816a3193a7SBrian Somers.Pp 51826a3193a7SBrian SomersNote: If you issue the command 51836a3193a7SBrian Somers.Dq set mode auto , 51846a3193a7SBrian Somersand have network address translation enabled, it may be useful to 51856a3193a7SBrian Somers.Dq enable iface-alias 51866a3193a7SBrian Somersafterwards. 51876a3193a7SBrian SomersThis will allow 51886a3193a7SBrian Somers.Nm 51896a3193a7SBrian Somersto do the necessary address translations to enable the process that 51906a3193a7SBrian Somerstriggers the connection to connect once the link is up despite the 51916a3193a7SBrian Somerspeer assigning us a new (dynamic) IP address. 51926a3193a7SBrian Somers.It set mppe Op 40|56|128|* Op stateless|stateful|* 51936a3193a7SBrian SomersThis option selects the encryption parameters used when negotiation 51946a3193a7SBrian SomersMPPE. 51956a3193a7SBrian SomersMPPE can be disabled entirely with the 51966a3193a7SBrian Somers.Dq disable mppe 51976a3193a7SBrian Somerscommand. 51986a3193a7SBrian SomersIf no arguments are given, 51996a3193a7SBrian Somers.Nm 52006a3193a7SBrian Somerswill attempt to negotiate a stateful link with a 128 bit key, but 52016a3193a7SBrian Somerswill agree to whatever the peer requests (including no encryption 52026a3193a7SBrian Somersat all). 52036a3193a7SBrian Somers.Pp 52046a3193a7SBrian SomersIf any arguments are given, 52056a3193a7SBrian Somers.Nm 52066a3193a7SBrian Somerswill 52076a3193a7SBrian Somers.Em insist 52086a3193a7SBrian Somerson using MPPE and will close the link if it is rejected by the peer (Note; 52096a3193a7SBrian Somersthis behaviour can be overridden by a configured RADIUS server). 52106a3193a7SBrian Somers.Pp 52116a3193a7SBrian SomersThe first argument specifies the number of bits that 52126a3193a7SBrian Somers.Nm 52136a3193a7SBrian Somersshould insist on during negotiations and the second specifies whether 52146a3193a7SBrian Somers.Nm 52156a3193a7SBrian Somersshould insist on stateful or stateless mode. 52166a3193a7SBrian SomersIn stateless mode, the 52176a3193a7SBrian Somersencryption dictionary is re-initialised with every packet according to 52186a3193a7SBrian Somersan encryption key that is changed with every packet. 52196a3193a7SBrian SomersIn stateful mode, 52206a3193a7SBrian Somersthe encryption dictionary is re-initialised every 256 packets or after 52216a3193a7SBrian Somersthe loss of any data and the key is changed every 256 packets. 52226a3193a7SBrian SomersStateless mode is less efficient but is better for unreliable transport 52236a3193a7SBrian Somerslayers. 52246a3193a7SBrian Somers.It set mrru Op Ar value 52256a3193a7SBrian SomersSetting this option enables Multi-link PPP negotiations, also known as 52266a3193a7SBrian SomersMulti-link Protocol or MP. 52276a3193a7SBrian SomersThere is no default MRRU (Maximum Reconstructed Receive Unit) value. 52286a3193a7SBrian SomersIf no argument is given, multi-link mode is disabled. 52296a3193a7SBrian Somers.It set mru Xo 52306a3193a7SBrian Somers.Op max Ns Op imum 52316a3193a7SBrian Somers.Op Ar value 52326a3193a7SBrian Somers.Xc 52336a3193a7SBrian SomersThe default MRU (Maximum Receive Unit) is 1500. 52346a3193a7SBrian SomersIf it is increased, the other side *may* increase its MTU. 52356a3193a7SBrian SomersIn theory there is no point in decreasing the MRU to below the default as the 52366a3193a7SBrian Somers.Em PPP 52376a3193a7SBrian Somersprotocol says implementations *must* be able to accept packets of at 52386a3193a7SBrian Somersleast 1500 octets. 52396a3193a7SBrian Somers.Pp 52406a3193a7SBrian SomersIf the 52416a3193a7SBrian Somers.Dq maximum 52426a3193a7SBrian Somerskeyword is used, 52436a3193a7SBrian Somers.Nm 52446a3193a7SBrian Somerswill refuse to negotiate a higher value. 52456a3193a7SBrian SomersThe maximum MRU can be set to 2048 at most. 52466a3193a7SBrian SomersSetting a maximum of less than 1500 violates the 52476a3193a7SBrian Somers.Em PPP 52486a3193a7SBrian Somersrfc, but may sometimes be necessary. 52496a3193a7SBrian SomersFor example, 52506a3193a7SBrian Somers.Em PPPoE 52516a3193a7SBrian Somersimposes a maximum of 1492 due to hardware limitations. 52526a3193a7SBrian Somers.Pp 52536a3193a7SBrian SomersIf no argument is given, 1500 is assumed. 52546a3193a7SBrian SomersA value must be given when 52556a3193a7SBrian Somers.Dq maximum 52566a3193a7SBrian Somersis specified. 52576a3193a7SBrian Somers.It set mtu Xo 52586a3193a7SBrian Somers.Op max Ns Op imum 52596a3193a7SBrian Somers.Op Ar value 52606a3193a7SBrian Somers.Xc 52616a3193a7SBrian SomersThe default MTU is 1500. 52626a3193a7SBrian SomersAt negotiation time, 52636a3193a7SBrian Somers.Nm 52646a3193a7SBrian Somerswill accept whatever MRU the peer requests (assuming it is 52656a3193a7SBrian Somersnot less than 296 bytes or greater than the assigned maximum). 52666a3193a7SBrian SomersIf the MTU is set, 52676a3193a7SBrian Somers.Nm 52686a3193a7SBrian Somerswill not accept MRU values less than 52696a3193a7SBrian Somers.Ar value . 52706a3193a7SBrian SomersWhen negotiations are complete, the MTU is used when writing to the 52716a3193a7SBrian Somersinterface, even if the peer requested a higher value MRU. 52726a3193a7SBrian SomersThis can be useful for 52736a3193a7SBrian Somerslimiting your packet size (giving better bandwidth sharing at the expense 52746a3193a7SBrian Somersof more header data). 52756a3193a7SBrian Somers.Pp 52766a3193a7SBrian SomersIf the 52776a3193a7SBrian Somers.Dq maximum 52786a3193a7SBrian Somerskeyword is used, 52796a3193a7SBrian Somers.Nm 52806a3193a7SBrian Somerswill refuse to negotiate a higher value. 52816a3193a7SBrian SomersThe maximum MTU can be set to 2048 at most. 52826a3193a7SBrian SomersNote, it is necessary to use the 52836a3193a7SBrian Somers.Dq maximum 52846a3193a7SBrian Somerskeyword to limit the MTU when using PPPoE. 52856a3193a7SBrian Somers.Pp 52866a3193a7SBrian SomersIf no 52876a3193a7SBrian Somers.Ar value 52886a3193a7SBrian Somersis given, 1500, or whatever the peer asks for is used. 52896a3193a7SBrian SomersA value must be given when 52906a3193a7SBrian Somers.Dq maximum 52916a3193a7SBrian Somersis specified. 52926a3193a7SBrian Somers.It set nbns Op Ar x.x.x.x Op Ar y.y.y.y 52936a3193a7SBrian SomersThis option allows the setting of the Microsoft NetBIOS name server 52946a3193a7SBrian Somersvalues to be returned at the peers request. 52956a3193a7SBrian SomersIf no values are given, 52966a3193a7SBrian Somers.Nm 52976a3193a7SBrian Somerswill reject any such requests. 52986a3193a7SBrian Somers.It set openmode active|passive Op Ar delay 52996a3193a7SBrian SomersBy default, 53006a3193a7SBrian Somers.Ar openmode 53016a3193a7SBrian Somersis always 53026a3193a7SBrian Somers.Ar active 53036a3193a7SBrian Somerswith a one second 53046a3193a7SBrian Somers.Ar delay . 53056a3193a7SBrian SomersThat is, 53066a3193a7SBrian Somers.Nm 53076a3193a7SBrian Somerswill always initiate LCP/IPCP/CCP negotiation one second after the line 53086a3193a7SBrian Somerscomes up. 53096a3193a7SBrian SomersIf you want to wait for the peer to initiate negotiations, you 53106a3193a7SBrian Somerscan use the value 53116a3193a7SBrian Somers.Ar passive . 53126a3193a7SBrian SomersIf you want to initiate negotiations immediately or after more than one 53136a3193a7SBrian Somerssecond, the appropriate 53146a3193a7SBrian Somers.Ar delay 53156a3193a7SBrian Somersmay be specified here in seconds. 53166a3193a7SBrian Somers.It set parity odd|even|none|mark 53176a3193a7SBrian SomersThis allows the line parity to be set. 53186a3193a7SBrian SomersThe default value is 53196a3193a7SBrian Somers.Ar none . 53206a3193a7SBrian Somers.It set phone Ar telno Ns Xo 53216a3193a7SBrian Somers.Oo \&| Ns Ar backupnumber Oc Ns ... Ns Oo : Ns Ar nextnumber Oc Ns ... Xc 53226a3193a7SBrian SomersThis allows the specification of the phone number to be used in 53236a3193a7SBrian Somersplace of the \\\\T string in the dial and login chat scripts. 53246a3193a7SBrian SomersMultiple phone numbers may be given separated either by a pipe 53256a3193a7SBrian Somers.Pq Dq \&| 53266a3193a7SBrian Somersor a colon 53276a3193a7SBrian Somers.Pq Dq \&: . 53286a3193a7SBrian Somers.Pp 53296a3193a7SBrian SomersNumbers after the pipe are only dialed if the dial or login 53306a3193a7SBrian Somersscript for the previous number failed. 53316a3193a7SBrian Somers.Pp 53326a3193a7SBrian SomersNumbers after the colon are tried sequentially, irrespective of 53336a3193a7SBrian Somersthe reason the line was dropped. 53346a3193a7SBrian Somers.Pp 53356a3193a7SBrian SomersIf multiple numbers are given, 53366a3193a7SBrian Somers.Nm 53376a3193a7SBrian Somerswill dial them according to these rules until a connection is made, retrying 53386a3193a7SBrian Somersthe maximum number of times specified by 53396a3193a7SBrian Somers.Dq set redial 53406a3193a7SBrian Somersbelow. 53416a3193a7SBrian SomersIn 53426a3193a7SBrian Somers.Fl background 53436a3193a7SBrian Somersmode, each number is attempted at most once. 53446a3193a7SBrian Somers.It set pppoe Op standard|3Com 53456a3193a7SBrian SomersThis option configures the underlying 53466a3193a7SBrian Somers.Xr ng_pppoe 4 53476a3193a7SBrian Somersnode to either standard RFC2516 PPPoE or proprietary 3Com mode. 53486a3193a7SBrian SomersIf not set the system default will be used. 53496a3193a7SBrian Somers.It set Oo proc Oc Ns Xo 53506a3193a7SBrian Somers.No title Op Ar value 53516a3193a7SBrian Somers.Xc 53526a3193a7SBrian SomersThe current process title as displayed by 53536a3193a7SBrian Somers.Xr ps 1 53546a3193a7SBrian Somersis changed according to 53556a3193a7SBrian Somers.Ar value . 53566a3193a7SBrian SomersIf 53576a3193a7SBrian Somers.Ar value 53586a3193a7SBrian Somersis not specified, the original process title is restored. 53596a3193a7SBrian SomersAll the 53606a3193a7SBrian Somersword replacements done by the shell commands (see the 53616a3193a7SBrian Somers.Dq bg 53626a3193a7SBrian Somerscommand above) are done here too. 53636a3193a7SBrian Somers.Pp 53646a3193a7SBrian SomersNote, if USER is required in the process title, the 53656a3193a7SBrian Somers.Dq set proctitle 53666a3193a7SBrian Somerscommand must appear in 53676a3193a7SBrian Somers.Pa ppp.linkup , 53686a3193a7SBrian Somersas it is not known when the commands in 53696a3193a7SBrian Somers.Pa ppp.conf 53706a3193a7SBrian Somersare executed. 53716a3193a7SBrian Somers.It set radius Op Ar config-file 53726a3193a7SBrian SomersThis command enables RADIUS support (if it is compiled in). 53736a3193a7SBrian Somers.Ar config-file 53746a3193a7SBrian Somersrefers to the radius client configuration file as described in 53756a3193a7SBrian Somers.Xr radius.conf 5 . 53766a3193a7SBrian SomersIf PAP, CHAP, MSCHAP or MSCHAPv2 are 53776a3193a7SBrian Somers.Dq enable Ns No d , 53786a3193a7SBrian Somers.Nm 53796a3193a7SBrian Somersbehaves as a 53806a3193a7SBrian Somers.Em \&N Ns No etwork 53816a3193a7SBrian Somers.Em \&A Ns No ccess 53826a3193a7SBrian Somers.Em \&S Ns No erver 53836a3193a7SBrian Somersand uses the configured RADIUS server to authenticate rather than 53846a3193a7SBrian Somersauthenticating from the 53856a3193a7SBrian Somers.Pa ppp.secret 53866a3193a7SBrian Somersfile or from the passwd database. 53876a3193a7SBrian Somers.Pp 53886a3193a7SBrian SomersIf none of PAP, CHAP, MSCHAP or MSCHAPv2 are enabled, 53896a3193a7SBrian Somers.Dq set radius 53906a3193a7SBrian Somerswill do nothing. 53916a3193a7SBrian Somers.Pp 53926a3193a7SBrian Somers.Nm 53936a3193a7SBrian Somersuses the following attributes from the RADIUS reply: 53946a3193a7SBrian Somers.Bl -tag -width XXX -offset XXX 53956a3193a7SBrian Somers.It RAD_FRAMED_IP_ADDRESS 53966a3193a7SBrian SomersThe peer IP address is set to the given value. 53976a3193a7SBrian Somers.It RAD_FRAMED_IP_NETMASK 53986a3193a7SBrian SomersThe tun interface netmask is set to the given value. 53996a3193a7SBrian Somers.It RAD_FRAMED_MTU 54006a3193a7SBrian SomersIf the given MTU is less than the peers MRU as agreed during LCP 54016a3193a7SBrian Somersnegotiation, *and* it is less that any configured MTU (see the 54026a3193a7SBrian Somers.Dq set mru 54036a3193a7SBrian Somerscommand), the tun interface MTU is set to the given value. 54046a3193a7SBrian Somers.It RAD_FRAMED_COMPRESSION 54056a3193a7SBrian SomersIf the received compression type is 54066a3193a7SBrian Somers.Dq 1 , 54076a3193a7SBrian Somers.Nm 54086a3193a7SBrian Somerswill request VJ compression during IPCP negotiations despite any 54096a3193a7SBrian Somers.Dq disable vj 54106a3193a7SBrian Somersconfiguration command. 54116a3193a7SBrian Somers.It RAD_FILTER_ID 54126a3193a7SBrian SomersIf this attribute is supplied, 54136a3193a7SBrian Somers.Nm 54146a3193a7SBrian Somerswill attempt to use it as an additional label to load from the 54156a3193a7SBrian Somers.Pa ppp.linkup 54166a3193a7SBrian Somersand 54176a3193a7SBrian Somers.Pa ppp.linkdown 54186a3193a7SBrian Somersfiles. 54196a3193a7SBrian SomersThe load will be attempted before (and in addition to) the normal 54206a3193a7SBrian Somerslabel search. 54216a3193a7SBrian SomersIf the label does not exist, no action is taken and 54226a3193a7SBrian Somers.Nm 54236a3193a7SBrian Somersproceeds to the normal load using the current label. 54246a3193a7SBrian Somers.It RAD_FRAMED_ROUTE 54256a3193a7SBrian SomersThe received string is expected to be in the format 54266a3193a7SBrian Somers.Ar dest Ns Op / Ns Ar bits 54276a3193a7SBrian Somers.Ar gw 54286a3193a7SBrian Somers.Op Ar metrics . 54296a3193a7SBrian SomersAny specified metrics are ignored. 54306a3193a7SBrian Somers.Dv MYADDR 54316a3193a7SBrian Somersand 54326a3193a7SBrian Somers.Dv HISADDR 54336a3193a7SBrian Somersare understood as valid values for 54346a3193a7SBrian Somers.Ar dest 54356a3193a7SBrian Somersand 54366a3193a7SBrian Somers.Ar gw , 54376a3193a7SBrian Somers.Dq default 54386a3193a7SBrian Somerscan be used for 54396a3193a7SBrian Somers.Ar dest 5440463a577bSEitan Adlerto specify the default route, and 54416a3193a7SBrian Somers.Dq 0.0.0.0 54426a3193a7SBrian Somersis understood to be the same as 54436a3193a7SBrian Somers.Dq default 54446a3193a7SBrian Somersfor 54456a3193a7SBrian Somers.Ar dest 54466a3193a7SBrian Somersand 54476a3193a7SBrian Somers.Dv HISADDR 54486a3193a7SBrian Somersfor 54496a3193a7SBrian Somers.Ar gw . 54506a3193a7SBrian Somers.Pp 54516a3193a7SBrian SomersFor example, a returned value of 54526a3193a7SBrian Somers.Dq 1.2.3.4/24 0.0.0.0 1 2 -1 3 400 54536a3193a7SBrian Somerswould result in a routing table entry to the 1.2.3.0/24 network via 54546a3193a7SBrian Somers.Dv HISADDR 54556a3193a7SBrian Somersand a returned value of 54566a3193a7SBrian Somers.Dq 0.0.0.0 0.0.0.0 54576a3193a7SBrian Somersor 54586a3193a7SBrian Somers.Dq default HISADDR 54596a3193a7SBrian Somerswould result in a default route to 54606a3193a7SBrian Somers.Dv HISADDR . 54616a3193a7SBrian Somers.Pp 54626a3193a7SBrian SomersAll RADIUS routes are applied after any sticky routes are applied, making 54636a3193a7SBrian SomersRADIUS routes override configured routes. 54646a3193a7SBrian SomersThis also applies for RADIUS routes that do not {include} the 54656a3193a7SBrian Somers.Dv MYADDR 54666a3193a7SBrian Somersor 54676a3193a7SBrian Somers.Dv HISADDR 54686a3193a7SBrian Somerskeywords. 54696a3193a7SBrian Somers.It RAD_FRAMED_IPV6_PREFIX 54706a3193a7SBrian SomersIf this attribute is supplied, the value is substituted for IPV6PREFIX 54716a3193a7SBrian Somersin a command. 54726a3193a7SBrian SomersYou may pass it to an upper layer protocol such as DHCPv6 for delegating an 54736a3193a7SBrian SomersIPv6 prefix to a peer. 54746a3193a7SBrian Somers.It RAD_FRAMED_IPV6_ROUTE 54756a3193a7SBrian SomersThe received string is expected to be in the format 54766a3193a7SBrian Somers.Ar dest Ns Op / Ns Ar bits 54776a3193a7SBrian Somers.Ar gw 54786a3193a7SBrian Somers.Op Ar metrics . 54796a3193a7SBrian SomersAny specified metrics are ignored. 54806a3193a7SBrian Somers.Dv MYADDR6 54816a3193a7SBrian Somersand 54826a3193a7SBrian Somers.Dv HISADDR6 54836a3193a7SBrian Somersare understood as valid values for 54846a3193a7SBrian Somers.Ar dest 54856a3193a7SBrian Somersand 54866a3193a7SBrian Somers.Ar gw , 54876a3193a7SBrian Somers.Dq default 54886a3193a7SBrian Somerscan be used for 54896a3193a7SBrian Somers.Ar dest 5490463a577bSEitan Adlerto specify the default route, and 54916a3193a7SBrian Somers.Dq :: 54926a3193a7SBrian Somersis understood to be the same as 54936a3193a7SBrian Somers.Dq default 54946a3193a7SBrian Somersfor 54956a3193a7SBrian Somers.Ar dest 54966a3193a7SBrian Somersand 54976a3193a7SBrian Somers.Dv HISADDR6 54986a3193a7SBrian Somersfor 54996a3193a7SBrian Somers.Ar gw . 55006a3193a7SBrian Somers.Pp 55016a3193a7SBrian SomersFor example, a returned value of 55026a3193a7SBrian Somers.Dq 3ffe:505:abcd::/48 :: 55036a3193a7SBrian Somerswould result in a routing table entry to the 3ffe:505:abcd::/48 network via 55046a3193a7SBrian Somers.Dv HISADDR6 55056a3193a7SBrian Somersand a returned value of 55066a3193a7SBrian Somers.Dq :: :: 55076a3193a7SBrian Somersor 55086a3193a7SBrian Somers.Dq default HISADDR6 55096a3193a7SBrian Somerswould result in a default route to 55106a3193a7SBrian Somers.Dv HISADDR6 . 55116a3193a7SBrian Somers.Pp 55126a3193a7SBrian SomersAll RADIUS IPv6 routes are applied after any sticky routes are 55136a3193a7SBrian Somersapplied, making RADIUS IPv6 routes override configured routes. 55146a3193a7SBrian SomersThis 55156a3193a7SBrian Somersalso applies for RADIUS IPv6 routes that do not {include} the 55166a3193a7SBrian Somers.Dv MYADDR6 55176a3193a7SBrian Somersor 55186a3193a7SBrian Somers.Dv HISADDR6 55196a3193a7SBrian Somerskeywords. 55206a3193a7SBrian Somers.It RAD_SESSION_TIMEOUT 55216a3193a7SBrian SomersIf supplied, the client connection is closed after the given number of 55226a3193a7SBrian Somersseconds. 55236a3193a7SBrian Somers.It RAD_REPLY_MESSAGE 55246a3193a7SBrian SomersIf supplied, this message is passed back to the peer as the authentication 55256a3193a7SBrian SomersSUCCESS text. 55266a3193a7SBrian Somers.It RAD_MICROSOFT_MS_CHAP_ERROR 55276a3193a7SBrian SomersIf this 55286a3193a7SBrian Somers.Dv RAD_VENDOR_MICROSOFT 55296a3193a7SBrian Somersvendor specific attribute is supplied, it is passed back to the peer as the 55306a3193a7SBrian Somersauthentication FAILURE text. 55316a3193a7SBrian Somers.It RAD_MICROSOFT_MS_CHAP2_SUCCESS 55326a3193a7SBrian SomersIf this 55336a3193a7SBrian Somers.Dv RAD_VENDOR_MICROSOFT 55346a3193a7SBrian Somersvendor specific attribute is supplied and if MS-CHAPv2 authentication is 55356a3193a7SBrian Somersbeing used, it is passed back to the peer as the authentication SUCCESS text. 55366a3193a7SBrian Somers.It RAD_MICROSOFT_MS_MPPE_ENCRYPTION_POLICY 55376a3193a7SBrian SomersIf this 55386a3193a7SBrian Somers.Dv RAD_VENDOR_MICROSOFT 55396a3193a7SBrian Somersvendor specific attribute is supplied and has a value of 2 (Required), 55406a3193a7SBrian Somers.Nm 55416a3193a7SBrian Somerswill insist that MPPE encryption is used (even if no 55426a3193a7SBrian Somers.Dq set mppe 55436a3193a7SBrian Somersconfiguration command has been given with arguments). 55446a3193a7SBrian SomersIf it is supplied with a value of 1 (Allowed), encryption is made optional 55456a3193a7SBrian Somers(despite any 55466a3193a7SBrian Somers.Dq set mppe 55476a3193a7SBrian Somersconfiguration commands with arguments). 55486a3193a7SBrian Somers.It RAD_MICROSOFT_MS_MPPE_ENCRYPTION_TYPES 55496a3193a7SBrian SomersIf this 55506a3193a7SBrian Somers.Dv RAD_VENDOR_MICROSOFT 55516a3193a7SBrian Somersvendor specific attribute is supplied, bits 1 and 2 are examined. 55526a3193a7SBrian SomersIf either or both are set, 40 bit and/or 128 bit (respectively) encryption 55536a3193a7SBrian Somersoptions are set, overriding any given first argument to the 55546a3193a7SBrian Somers.Dq set mppe 55556a3193a7SBrian Somerscommand. 55566a3193a7SBrian SomersNote, it is not currently possible for the RADIUS server to specify 56 bit 55576a3193a7SBrian Somersencryption. 55586a3193a7SBrian Somers.It RAD_MICROSOFT_MS_MPPE_RECV_KEY 55596a3193a7SBrian SomersIf this 55606a3193a7SBrian Somers.Dv RAD_VENDOR_MICROSOFT 55616a3193a7SBrian Somersvendor specific attribute is supplied, it is value is used as the master 55626a3193a7SBrian Somerskey for decryption of incoming data. 55636a3193a7SBrian SomersWhen clients are authenticated using 55646a3193a7SBrian SomersMSCHAPv2, the RADIUS server MUST provide this attribute if inbound MPPE is 55656a3193a7SBrian Somersto function. 55666a3193a7SBrian Somers.It RAD_MICROSOFT_MS_MPPE_SEND_KEY 55676a3193a7SBrian SomersIf this 55686a3193a7SBrian Somers.Dv RAD_VENDOR_MICROSOFT 55696a3193a7SBrian Somersvendor specific attribute is supplied, it is value is used as the master 55706a3193a7SBrian Somerskey for encryption of outgoing data. 55716a3193a7SBrian SomersWhen clients are authenticated using 55726a3193a7SBrian SomersMSCHAPv2, the RADIUS server MUST provide this attribute if outbound MPPE is 55736a3193a7SBrian Somersto function. 55746a3193a7SBrian Somers.El 55756a3193a7SBrian Somers.Pp 55766a3193a7SBrian SomersValues received from the RADIUS server may be viewed using 55776a3193a7SBrian Somers.Dq show bundle . 55786a3193a7SBrian Somers.It set rad_alive Ar timeout 55796a3193a7SBrian SomersWhen RADIUS is configured, setting 55806a3193a7SBrian Somers.Dq rad_alive 55816a3193a7SBrian Somersto a non-zero 55826a3193a7SBrian Somers.Ar timeout 55836a3193a7SBrian Somersvalue will tell 55846a3193a7SBrian Somers.Nm 55856a3193a7SBrian Somersto sent RADIUS accounting information to the RADIUS server every 55866a3193a7SBrian Somers.Ar timeout 55876a3193a7SBrian Somersseconds. 55886a3193a7SBrian Somers.It set rad_port_id Ar option 55896a3193a7SBrian SomersWhen RADIUS is configured, setting the 55906a3193a7SBrian Somers.Dq rad_port_id 559156e4d8d5SSevan Janiyanvalue specifies what should be sent to the RADIUS server as 55926a3193a7SBrian SomersNAS-Port-Id. 55936a3193a7SBrian SomersThe 55946a3193a7SBrian Somers.Ar option Ns No s 55956a3193a7SBrian Somersare as follows: 55966a3193a7SBrian Somers.Bl -tag -width Ds 55976a3193a7SBrian Somers.It pid 55986a3193a7SBrian SomersPID of the corresponding tunnel. 55996a3193a7SBrian Somers.It tunnum 56006a3193a7SBrian Somers.Xr tun 4 56016a3193a7SBrian Somersinterface number. 56026a3193a7SBrian Somers.It ifnum 56036a3193a7SBrian Somersindex of the interface as returned by 56046a3193a7SBrian Somers.Xr if_nametoindex 3 . 56056a3193a7SBrian Somers.It default 56066a3193a7SBrian Somerskeeps the default behavior. 56076a3193a7SBrian Somers.El 56086a3193a7SBrian Somers.It set reconnect Ar timeout ntries 56096a3193a7SBrian SomersShould the line drop unexpectedly (due to loss of CD or LQR 56106a3193a7SBrian Somersfailure), a connection will be re-established after the given 56116a3193a7SBrian Somers.Ar timeout . 56126a3193a7SBrian SomersThe line will be re-connected at most 56136a3193a7SBrian Somers.Ar ntries 56146a3193a7SBrian Somerstimes. 56156a3193a7SBrian Somers.Ar Ntries 56166a3193a7SBrian Somersdefaults to zero. 56176a3193a7SBrian SomersA value of 56186a3193a7SBrian Somers.Ar random 56196a3193a7SBrian Somersfor 56206a3193a7SBrian Somers.Ar timeout 56216a3193a7SBrian Somerswill result in a variable pause, somewhere between 1 and 30 seconds. 56226a3193a7SBrian Somers.It set recvpipe Op Ar value 56236a3193a7SBrian SomersThis sets the routing table RECVPIPE value. 56246a3193a7SBrian SomersThe optimum value is just over twice the MTU value. 56256a3193a7SBrian SomersIf 56266a3193a7SBrian Somers.Ar value 56276a3193a7SBrian Somersis unspecified or zero, the default kernel controlled value is used. 56286a3193a7SBrian Somers.It set redial Ar secs Ns Xo 56296a3193a7SBrian Somers.Oo + Ns Ar inc Ns 56306a3193a7SBrian Somers.Oo - Ns Ar max Ns Oc Oc Ns 56316a3193a7SBrian Somers.Op . Ns Ar next 56326a3193a7SBrian Somers.Op Ar attempts 56336a3193a7SBrian Somers.Xc 56346a3193a7SBrian Somers.Nm 56356a3193a7SBrian Somerscan be instructed to attempt to redial 56366a3193a7SBrian Somers.Ar attempts 56376a3193a7SBrian Somerstimes. 56386a3193a7SBrian SomersIf more than one phone number is specified (see 56396a3193a7SBrian Somers.Dq set phone 56406a3193a7SBrian Somersabove), a pause of 56416a3193a7SBrian Somers.Ar next 56426a3193a7SBrian Somersis taken before dialing each number. 56436a3193a7SBrian SomersA pause of 56446a3193a7SBrian Somers.Ar secs 56456a3193a7SBrian Somersis taken before starting at the first number again. 56466a3193a7SBrian SomersA literal value of 56476a3193a7SBrian Somers.Dq Li random 56486a3193a7SBrian Somersmay be used here in place of 56496a3193a7SBrian Somers.Ar secs 56506a3193a7SBrian Somersand 56516a3193a7SBrian Somers.Ar next , 56526a3193a7SBrian Somerscausing a random delay of between 1 and 30 seconds. 56536a3193a7SBrian Somers.Pp 56546a3193a7SBrian SomersIf 56556a3193a7SBrian Somers.Ar inc 56566a3193a7SBrian Somersis specified, its value is added onto 56576a3193a7SBrian Somers.Ar secs 56586a3193a7SBrian Somerseach time 56596a3193a7SBrian Somers.Nm 56606a3193a7SBrian Somerstries a new number. 56616a3193a7SBrian Somers.Ar secs 56626a3193a7SBrian Somerswill only be incremented at most 56636a3193a7SBrian Somers.Ar max 56646a3193a7SBrian Somerstimes. 56656a3193a7SBrian Somers.Ar max 56666a3193a7SBrian Somersdefaults to 10. 56676a3193a7SBrian Somers.Pp 56686a3193a7SBrian SomersNote, the 56696a3193a7SBrian Somers.Ar secs 56706a3193a7SBrian Somersdelay will be effective, even after 56716a3193a7SBrian Somers.Ar attempts 56726a3193a7SBrian Somershas been exceeded, so an immediate manual dial may appear to have 56736a3193a7SBrian Somersdone nothing. 56746a3193a7SBrian SomersIf an immediate dial is required, a 56756a3193a7SBrian Somers.Dq !\& 56766a3193a7SBrian Somersshould immediately follow the 56776a3193a7SBrian Somers.Dq open 56786a3193a7SBrian Somerskeyword. 56796a3193a7SBrian SomersSee the 56806a3193a7SBrian Somers.Dq open 56816a3193a7SBrian Somersdescription above for further details. 56826a3193a7SBrian Somers.It set sendpipe Op Ar value 56836a3193a7SBrian SomersThis sets the routing table SENDPIPE value. 56846a3193a7SBrian SomersThe optimum value is just over twice the MTU value. 56856a3193a7SBrian SomersIf 56866a3193a7SBrian Somers.Ar value 56876a3193a7SBrian Somersis unspecified or zero, the default kernel controlled value is used. 56886a3193a7SBrian Somers.It "set server|socket" Ar TcpPort Ns No \&| Ns Xo 56896a3193a7SBrian Somers.Ar LocalName Ns No |none|open|closed 56906a3193a7SBrian Somers.Op password Op Ar mask 56916a3193a7SBrian Somers.Xc 56926a3193a7SBrian SomersThis command tells 56936a3193a7SBrian Somers.Nm 56946a3193a7SBrian Somersto listen on the given socket or 56956a3193a7SBrian Somers.Sq diagnostic port 56966a3193a7SBrian Somersfor incoming command connections. 56976a3193a7SBrian Somers.Pp 56986a3193a7SBrian SomersThe word 56996a3193a7SBrian Somers.Dq none 57006a3193a7SBrian Somersinstructs 57016a3193a7SBrian Somers.Nm 57026a3193a7SBrian Somersto close any existing socket and clear the socket configuration. 57036a3193a7SBrian SomersThe word 57046a3193a7SBrian Somers.Dq open 57056a3193a7SBrian Somersinstructs 57066a3193a7SBrian Somers.Nm 57076a3193a7SBrian Somersto attempt to re-open the port. 57086a3193a7SBrian SomersThe word 57096a3193a7SBrian Somers.Dq closed 57106a3193a7SBrian Somersinstructs 57116a3193a7SBrian Somers.Nm 57126a3193a7SBrian Somersto close the open port. 57136a3193a7SBrian Somers.Pp 57146a3193a7SBrian SomersIf you wish to specify a local domain socket, 57156a3193a7SBrian Somers.Ar LocalName 57166a3193a7SBrian Somersmust be specified as an absolute file name, otherwise it is assumed 57176a3193a7SBrian Somersto be the name or number of a TCP port. 57186a3193a7SBrian SomersYou may specify the octal umask to be used with a local domain socket. 57196a3193a7SBrian SomersRefer to 57206a3193a7SBrian Somers.Xr umask 2 57216a3193a7SBrian Somersfor umask details. 57226a3193a7SBrian SomersRefer to 57236a3193a7SBrian Somers.Xr services 5 57246a3193a7SBrian Somersfor details of how to translate TCP port names. 57256a3193a7SBrian Somers.Pp 57266a3193a7SBrian SomersYou must also specify the password that must be entered by the client 57276a3193a7SBrian Somers(using the 57286a3193a7SBrian Somers.Dq passwd 57296a3193a7SBrian Somersvariable above) when connecting to this socket. 57306a3193a7SBrian SomersIf the password is 57316a3193a7SBrian Somersspecified as an empty string, no password is required for connecting clients. 57326a3193a7SBrian Somers.Pp 57336a3193a7SBrian SomersWhen specifying a local domain socket, the first 57346a3193a7SBrian Somers.Dq %d 57356a3193a7SBrian Somerssequence found in the socket name will be replaced with the current 57366a3193a7SBrian Somersinterface unit number. 57376a3193a7SBrian SomersThis is useful when you wish to use the same 57386a3193a7SBrian Somersprofile for more than one connection. 57396a3193a7SBrian Somers.Pp 57406a3193a7SBrian SomersIn a similar manner TCP sockets may be prefixed with the 57416a3193a7SBrian Somers.Dq + 57426a3193a7SBrian Somerscharacter, in which case the current interface unit number is added to 57436a3193a7SBrian Somersthe port number. 57446a3193a7SBrian Somers.Pp 57456a3193a7SBrian SomersWhen using 57466a3193a7SBrian Somers.Nm 57476a3193a7SBrian Somerswith a server socket, the 57486a3193a7SBrian Somers.Xr pppctl 8 57496a3193a7SBrian Somerscommand is the preferred mechanism of communications. 57506a3193a7SBrian SomersCurrently, 57516a3193a7SBrian Somers.Xr telnet 1 57526a3193a7SBrian Somerscan also be used, but link encryption may be implemented in the future, so 57536a3193a7SBrian Somers.Xr telnet 1 57546a3193a7SBrian Somersshould be avoided. 57556a3193a7SBrian Somers.Pp 57566a3193a7SBrian SomersNote; 57576a3193a7SBrian Somers.Dv SIGUSR1 57586a3193a7SBrian Somersand 57596a3193a7SBrian Somers.Dv SIGUSR2 57606a3193a7SBrian Somersinteract with the diagnostic socket. 57616a3193a7SBrian Somers.It set speed Ar value 57626a3193a7SBrian SomersThis sets the speed of the serial device. 57636a3193a7SBrian SomersIf speed is specified as 57646a3193a7SBrian Somers.Dq sync , 57656a3193a7SBrian Somers.Nm 57666a3193a7SBrian Somerstreats the device as a synchronous device. 57676a3193a7SBrian Somers.Pp 57686a3193a7SBrian SomersCertain device types will know whether they should be specified as 57696a3193a7SBrian Somerssynchronous or asynchronous. 57706a3193a7SBrian SomersThese devices will override incorrect 57716a3193a7SBrian Somerssettings and log a warning to this effect. 57726a3193a7SBrian Somers.It set stopped Op Ar LCPseconds Op Ar CCPseconds 57736a3193a7SBrian SomersIf this option is set, 57746a3193a7SBrian Somers.Nm 57756a3193a7SBrian Somerswill time out after the given FSM (Finite State Machine) has been in 57766a3193a7SBrian Somersthe stopped state for the given number of 57776a3193a7SBrian Somers.Dq seconds . 57786a3193a7SBrian SomersThis option may be useful if the peer sends a terminate request, 57796a3193a7SBrian Somersbut never actually closes the connection despite our sending a terminate 57806a3193a7SBrian Somersacknowledgement. 57816a3193a7SBrian SomersThis is also useful if you wish to 57826a3193a7SBrian Somers.Dq set openmode passive 57836a3193a7SBrian Somersand time out if the peer does not send a Configure Request within the 57846a3193a7SBrian Somersgiven time. 57856a3193a7SBrian SomersUse 57866a3193a7SBrian Somers.Dq set log +lcp +ccp 57876a3193a7SBrian Somersto make 57886a3193a7SBrian Somers.Nm 57896a3193a7SBrian Somerslog the appropriate state transitions. 57906a3193a7SBrian Somers.Pp 57916a3193a7SBrian SomersThe default value is zero, where 57926a3193a7SBrian Somers.Nm 57936a3193a7SBrian Somersdoes not time out in the stopped state. 57946a3193a7SBrian Somers.Pp 57956a3193a7SBrian SomersThis value should not be set to less than the openmode delay (see 57966a3193a7SBrian Somers.Dq set openmode 57976a3193a7SBrian Somersabove). 57986a3193a7SBrian Somers.It set timeout Ar idleseconds Op Ar mintimeout 57996a3193a7SBrian SomersThis command allows the setting of the idle timer. 58006a3193a7SBrian SomersRefer to the section titled 58016a3193a7SBrian Somers.Sx SETTING THE IDLE TIMER 58026a3193a7SBrian Somersfor further details. 58036a3193a7SBrian Somers.Pp 58046a3193a7SBrian SomersIf 58056a3193a7SBrian Somers.Ar mintimeout 58066a3193a7SBrian Somersis specified, 58076a3193a7SBrian Somers.Nm 58086a3193a7SBrian Somerswill never idle out before the link has been up for at least that number 58096a3193a7SBrian Somersof seconds. 58106a3193a7SBrian Somers.It set urgent Xo 58116a3193a7SBrian Somers.Op tcp|udp|none 58126a3193a7SBrian Somers.Oo Op +|- Ns 58136a3193a7SBrian Somers.Ar port 58146a3193a7SBrian Somers.Oc No ... 58156a3193a7SBrian Somers.Xc 58166a3193a7SBrian SomersThis command controls the ports that 58176a3193a7SBrian Somers.Nm 58186a3193a7SBrian Somersprioritizes when transmitting data. 58196a3193a7SBrian SomersThe default priority TCP ports 58206a3193a7SBrian Somersare ports 21 (ftp control), 22 (ssh), 23 (telnet), 513 (login), 514 (shell), 58216a3193a7SBrian Somers543 (klogin) and 544 (kshell). 58226a3193a7SBrian SomersThere are no priority UDP ports by default. 58236a3193a7SBrian SomersSee 58246a3193a7SBrian Somers.Xr services 5 58256a3193a7SBrian Somersfor details. 58266a3193a7SBrian Somers.Pp 58276a3193a7SBrian SomersIf neither 58286a3193a7SBrian Somers.Dq tcp 58296a3193a7SBrian Somersor 58306a3193a7SBrian Somers.Dq udp 58316a3193a7SBrian Somersare specified, 58326a3193a7SBrian Somers.Dq tcp 58336a3193a7SBrian Somersis assumed. 58346a3193a7SBrian Somers.Pp 58356a3193a7SBrian SomersIf no 58366a3193a7SBrian Somers.Ar port Ns No s 58376a3193a7SBrian Somersare given, the priority port lists are cleared (although if 58386a3193a7SBrian Somers.Dq tcp 58396a3193a7SBrian Somersor 58406a3193a7SBrian Somers.Dq udp 58416a3193a7SBrian Somersis specified, only that list is cleared). 58426a3193a7SBrian SomersIf the first 58436a3193a7SBrian Somers.Ar port 58446a3193a7SBrian Somersargument is prefixed with a plus 58456a3193a7SBrian Somers.Pq Dq \&+ 58466a3193a7SBrian Somersor a minus 58476a3193a7SBrian Somers.Pq Dq \&- , 58486a3193a7SBrian Somersthe current list is adjusted, otherwise the list is reassigned. 58496a3193a7SBrian Somers.Ar port Ns No s 58506a3193a7SBrian Somersprefixed with a plus or not prefixed at all are added to the list and 58516a3193a7SBrian Somers.Ar port Ns No s 58526a3193a7SBrian Somersprefixed with a minus are removed from the list. 58536a3193a7SBrian Somers.Pp 58546a3193a7SBrian SomersIf 58556a3193a7SBrian Somers.Dq none 58566a3193a7SBrian Somersis specified, all priority port lists are disabled and even 58576a3193a7SBrian Somers.Dv IPTOS_LOWDELAY 58586a3193a7SBrian Somerspackets are not prioritised. 5859f80b39d1SNick Hibma.It set urgent length Ar length 5860f80b39d1SNick HibmaThis command tells ppp to prioritize small packets up to 5861f80b39d1SNick Hibma.Ar length 5862f80b39d1SNick Hibmabytes. 5863f80b39d1SNick HibmaIf 5864f80b39d1SNick Hibma.Ar length 5865f80b39d1SNick Hibmais not specified, or 0, this feature is disabled. 58666a3193a7SBrian Somers.It set vj slotcomp on|off 58676a3193a7SBrian SomersThis command tells 58686a3193a7SBrian Somers.Nm 58696a3193a7SBrian Somerswhether it should attempt to negotiate VJ slot compression. 58706a3193a7SBrian SomersBy default, slot compression is turned 58716a3193a7SBrian Somers.Ar on . 58726a3193a7SBrian Somers.It set vj slots Ar nslots 58736a3193a7SBrian SomersThis command sets the initial number of slots that 58746a3193a7SBrian Somers.Nm 58756a3193a7SBrian Somerswill try to negotiate with the peer when VJ compression is enabled (see the 58766a3193a7SBrian Somers.Sq enable 58776a3193a7SBrian Somerscommand above). 58786a3193a7SBrian SomersIt defaults to a value of 16. 58796a3193a7SBrian Somers.Ar Nslots 58806a3193a7SBrian Somersmust be between 58816a3193a7SBrian Somers.Ar 4 58826a3193a7SBrian Somersand 58836a3193a7SBrian Somers.Ar 16 58846a3193a7SBrian Somersinclusive. 58856a3193a7SBrian Somers.El 58866a3193a7SBrian Somers.It shell|! Op Ar command 58876a3193a7SBrian SomersIf 58886a3193a7SBrian Somers.Ar command 58896a3193a7SBrian Somersis not specified a shell is invoked according to the 58906a3193a7SBrian Somers.Dv SHELL 58916a3193a7SBrian Somersenvironment variable. 58926a3193a7SBrian SomersOtherwise, the given 58936a3193a7SBrian Somers.Ar command 58946a3193a7SBrian Somersis executed. 58956a3193a7SBrian SomersWord replacement is done in the same way as for the 58966a3193a7SBrian Somers.Dq !bg 58976a3193a7SBrian Somerscommand as described above. 58986a3193a7SBrian Somers.Pp 58996a3193a7SBrian SomersUse of the !\& character 59006a3193a7SBrian Somersrequires a following space as with any of the other commands. 59016a3193a7SBrian SomersYou should note that this command is executed in the foreground; 59026a3193a7SBrian Somers.Nm 59036a3193a7SBrian Somerswill not continue running until this process has exited. 59046a3193a7SBrian SomersUse the 59056a3193a7SBrian Somers.Dv bg 59066a3193a7SBrian Somerscommand if you wish processing to happen in the background. 59076a3193a7SBrian Somers.It show Ar var 59086a3193a7SBrian SomersThis command allows the user to examine the following: 59096a3193a7SBrian Somers.Bl -tag -width 2n 59106a3193a7SBrian Somers.It show bundle 59116a3193a7SBrian SomersShow the current bundle settings. 59126a3193a7SBrian Somers.It show ccp 59136a3193a7SBrian SomersShow the current CCP compression statistics. 59146a3193a7SBrian Somers.It show compress 59156a3193a7SBrian SomersShow the current VJ compression statistics. 59166a3193a7SBrian Somers.It show escape 59176a3193a7SBrian SomersShow the current escape characters. 59186a3193a7SBrian Somers.It show filter Op Ar name 59196a3193a7SBrian SomersList the current rules for the given filter. 59206a3193a7SBrian SomersIf 59216a3193a7SBrian Somers.Ar name 59226a3193a7SBrian Somersis not specified, all filters are shown. 59236a3193a7SBrian Somers.It show hdlc 59246a3193a7SBrian SomersShow the current HDLC statistics. 59256a3193a7SBrian Somers.It show help|? 59266a3193a7SBrian SomersGive a summary of available show commands. 59276a3193a7SBrian Somers.It show iface 59286a3193a7SBrian SomersShow the current interface information 59296a3193a7SBrian Somers(the same as 59306a3193a7SBrian Somers.Dq iface show ) . 59316a3193a7SBrian Somers.It show ipcp 59326a3193a7SBrian SomersShow the current IPCP statistics. 59336a3193a7SBrian Somers.It show layers 59346a3193a7SBrian SomersShow the protocol layers currently in use. 59356a3193a7SBrian Somers.It show lcp 59366a3193a7SBrian SomersShow the current LCP statistics. 59376a3193a7SBrian Somers.It show Oo data Oc Ns Xo 59386a3193a7SBrian Somers.No link 59396a3193a7SBrian Somers.Xc 59406a3193a7SBrian SomersShow high level link information. 59416a3193a7SBrian Somers.It show links 59426a3193a7SBrian SomersShow a list of available logical links. 59436a3193a7SBrian Somers.It show log 59446a3193a7SBrian SomersShow the current log values. 59456a3193a7SBrian Somers.It show mem 59466a3193a7SBrian SomersShow current memory statistics. 59476a3193a7SBrian Somers.It show ncp 59486a3193a7SBrian SomersShow the current NCP statistics. 59496a3193a7SBrian Somers.It show physical 59506a3193a7SBrian SomersShow low level link information. 59516a3193a7SBrian Somers.It show mp 59526a3193a7SBrian SomersShow Multi-link information. 59536a3193a7SBrian Somers.It show proto 59546a3193a7SBrian SomersShow current protocol totals. 59556a3193a7SBrian Somers.It show route 59566a3193a7SBrian SomersShow the current routing tables. 59576a3193a7SBrian Somers.It show stopped 59586a3193a7SBrian SomersShow the current stopped timeouts. 59596a3193a7SBrian Somers.It show timer 59606a3193a7SBrian SomersShow the active alarm timers. 59616a3193a7SBrian Somers.It show version 59626a3193a7SBrian SomersShow the current version number of 59636a3193a7SBrian Somers.Nm . 59646a3193a7SBrian Somers.El 59656a3193a7SBrian Somers.It term 59666a3193a7SBrian SomersGo into terminal mode. 59676a3193a7SBrian SomersCharacters typed at the keyboard are sent to the device. 59686a3193a7SBrian SomersCharacters read from the device are displayed on the screen. 59696a3193a7SBrian SomersWhen a remote 59706a3193a7SBrian Somers.Em PPP 59716a3193a7SBrian Somerspeer is detected, 59726a3193a7SBrian Somers.Nm 59736a3193a7SBrian Somersautomatically enables Packet Mode and goes back into command mode. 59746a3193a7SBrian Somers.El 59756a3193a7SBrian Somers.Sh MORE DETAILS 59766a3193a7SBrian Somers.Bl -bullet 59776a3193a7SBrian Somers.It 59786a3193a7SBrian SomersRead the example configuration files. 59796a3193a7SBrian SomersThey are a good source of information. 59806a3193a7SBrian Somers.It 59816a3193a7SBrian SomersUse 59826a3193a7SBrian Somers.Dq help , 59836a3193a7SBrian Somers.Dq nat \&? , 59846a3193a7SBrian Somers.Dq enable \&? , 59856a3193a7SBrian Somers.Dq set ?\& 59866a3193a7SBrian Somersand 59876a3193a7SBrian Somers.Dq show ?\& 59886a3193a7SBrian Somersto get online information about what is available. 59896a3193a7SBrian Somers.It 5990c1a14887SCeri DaviesThe following URL contains useful information: 59916a3193a7SBrian Somers.Bl -bullet -compact 59926a3193a7SBrian Somers.It 5993c1a14887SCeri Davieshttps://docs.freebsd.org/en/books/handbook/ppp-and-slip/ 59946a3193a7SBrian Somers.El 59956a3193a7SBrian Somers.El 59966a3193a7SBrian Somers.Sh FILES 59976a3193a7SBrian Somers.Nm 59986a3193a7SBrian Somersrefers to four files: 59996a3193a7SBrian Somers.Pa ppp.conf , 60006a3193a7SBrian Somers.Pa ppp.linkup , 60016a3193a7SBrian Somers.Pa ppp.linkdown 60026a3193a7SBrian Somersand 60036a3193a7SBrian Somers.Pa ppp.secret . 60046a3193a7SBrian SomersThese files are placed in the 60056a3193a7SBrian Somers.Pa /etc/ppp 60066a3193a7SBrian Somersdirectory. 60076a3193a7SBrian Somers.Bl -tag -width 2n 60086a3193a7SBrian Somers.It Pa /etc/ppp/ppp.conf 60096a3193a7SBrian SomersSystem default configuration file. 60106a3193a7SBrian Somers.It Pa /etc/ppp/ppp.secret 60116a3193a7SBrian SomersAn authorisation file for each system. 60126a3193a7SBrian Somers.It Pa /etc/ppp/ppp.linkup 60136a3193a7SBrian SomersA file to check when 60146a3193a7SBrian Somers.Nm 60156a3193a7SBrian Somersestablishes a network level connection. 60166a3193a7SBrian Somers.It Pa /etc/ppp/ppp.linkdown 60176a3193a7SBrian SomersA file to check when 60186a3193a7SBrian Somers.Nm 60196a3193a7SBrian Somerscloses a network level connection. 60206a3193a7SBrian Somers.It Pa /var/log/ppp.log 60216a3193a7SBrian SomersLogging and debugging information file. 60226a3193a7SBrian SomersNote, this name is specified in 60236a3193a7SBrian Somers.Pa /etc/syslog.conf . 60246a3193a7SBrian SomersSee 60256a3193a7SBrian Somers.Xr syslog.conf 5 60266a3193a7SBrian Somersfor further details. 60276a3193a7SBrian Somers.It Pa /var/spool/lock/LCK..* 60286a3193a7SBrian Somerstty port locking file. 60296a3193a7SBrian SomersRefer to 60306a3193a7SBrian Somers.Xr uucplock 3 60316a3193a7SBrian Somersfor further details. 60326a3193a7SBrian Somers.It Pa /var/run/tunN.pid 60336a3193a7SBrian SomersThe process id (pid) of the 60346a3193a7SBrian Somers.Nm 60356a3193a7SBrian Somersprogram connected to the tunN device, where 60366a3193a7SBrian Somers.Sq N 60376a3193a7SBrian Somersis the number of the device. 60386a3193a7SBrian Somers.It Pa /var/run/ttyXX.if 60396a3193a7SBrian SomersThe tun interface used by this port. 60406a3193a7SBrian SomersAgain, this file is only created in 60416a3193a7SBrian Somers.Fl background , 60426a3193a7SBrian Somers.Fl auto 60436a3193a7SBrian Somersand 60446a3193a7SBrian Somers.Fl ddial 60456a3193a7SBrian Somersmodes. 60466a3193a7SBrian Somers.It Pa /etc/services 60476a3193a7SBrian SomersGet port number if port number is using service name. 60486a3193a7SBrian Somers.It Pa /var/run/ppp-authname-class-value 60496a3193a7SBrian SomersIn multi-link mode, local domain sockets are created using the peer 60506a3193a7SBrian Somersauthentication name 60516a3193a7SBrian Somers.Pq Sq authname , 60526a3193a7SBrian Somersthe peer endpoint discriminator class 60536a3193a7SBrian Somers.Pq Sq class 60546a3193a7SBrian Somersand the peer endpoint discriminator value 60556a3193a7SBrian Somers.Pq Sq value . 60566a3193a7SBrian SomersAs the endpoint discriminator value may be a binary value, it is turned 60576a3193a7SBrian Somersto HEX to determine the actual file name. 60586a3193a7SBrian Somers.Pp 60596a3193a7SBrian SomersThis socket is used to pass links between different instances of 60606a3193a7SBrian Somers.Nm . 60616a3193a7SBrian Somers.El 60626a3193a7SBrian Somers.Sh SEE ALSO 60636a3193a7SBrian Somers.Xr at 1 , 60646a3193a7SBrian Somers.Xr ftp 1 , 60656a3193a7SBrian Somers.Xr gzip 1 , 60666a3193a7SBrian Somers.Xr hostname 1 , 60676a3193a7SBrian Somers.Xr login 1 , 60686a3193a7SBrian Somers.Xr tcpdump 1 , 60696a3193a7SBrian Somers.Xr telnet 1 , 60706a3193a7SBrian Somers.Xr kldload 2 , 60716a3193a7SBrian Somers.Xr pipe 2 , 60726a3193a7SBrian Somers.Xr socketpair 2 , 60736a3193a7SBrian Somers.Xr libalias 3 , 60746a3193a7SBrian Somers.Xr libradius 3 , 60756a3193a7SBrian Somers.Xr syslog 3 , 60766a3193a7SBrian Somers.Xr uucplock 3 , 60776a3193a7SBrian Somers.Xr netgraph 4 , 60786a3193a7SBrian Somers.Xr ng_pppoe 4 , 60796a3193a7SBrian Somers.Xr crontab 5 , 60806a3193a7SBrian Somers.Xr group 5 , 60816a3193a7SBrian Somers.Xr passwd 5 , 60826a3193a7SBrian Somers.Xr protocols 5 , 60836a3193a7SBrian Somers.Xr radius.conf 5 , 60846a3193a7SBrian Somers.Xr resolv.conf 5 , 60856a3193a7SBrian Somers.Xr syslog.conf 5 , 60866a3193a7SBrian Somers.Xr adduser 8 , 60876a3193a7SBrian Somers.Xr chat 8 , 60886a3193a7SBrian Somers.Xr getty 8 , 60896a3193a7SBrian Somers.Xr inetd 8 , 60906a3193a7SBrian Somers.Xr init 8 , 60916a3193a7SBrian Somers.Xr ping 8 , 60926a3193a7SBrian Somers.Xr pppctl 8 , 60936a3193a7SBrian Somers.Xr pppoed 8 , 60946a3193a7SBrian Somers.Xr route 8 , 60956a3193a7SBrian Somers.Xr sshd 8 , 60966a3193a7SBrian Somers.Xr syslogd 8 , 60976a3193a7SBrian Somers.Xr traceroute 8 , 60986a3193a7SBrian Somers.Xr vipw 8 60996a3193a7SBrian Somers.Sh HISTORY 61006a3193a7SBrian SomersThis program was originally written by 610101c2b8acSBaptiste Daroussin.An Toshiharu OHNO Aq Mt tony-o@iij.ad.jp , 61026a3193a7SBrian Somersand was submitted to 61036a3193a7SBrian Somers.Fx 2.0.5 61046a3193a7SBrian Somersby 610501c2b8acSBaptiste Daroussin.An Atsushi Murai Aq Mt amurai@spec.co.jp . 61066a3193a7SBrian Somers.Pp 61076a3193a7SBrian SomersIt was substantially modified during 1997 by 610801c2b8acSBaptiste Daroussin.An Brian Somers Aq Mt brian@Awfulhak.org , 61096a3193a7SBrian Somersand was ported to 61106a3193a7SBrian Somers.Ox 61116a3193a7SBrian Somersin November that year 61126a3193a7SBrian Somers(just after the 2.2 release). 61136a3193a7SBrian Somers.Pp 61146a3193a7SBrian SomersMost of the code was rewritten by 61156a3193a7SBrian Somers.An Brian Somers 61166a3193a7SBrian Somersin early 1998 when multi-link ppp support was added. 6117