# WAN interface protocols ## Protocol "ppp" (PPP over Modem) ![:!:](https://openwrt.org/lib/images/smileys/icon_exclaim.gif) The package `ppp` must be installed to use PPP.
NameTypeRequiredDefaultDescription
`device`file pathyes*(none)*Modem device node
`username`stringno(?)*(none)*Username for PAP/CHAP authentication
`password`stringno(?)*(none)*Password for PAP/CHAP authentication
`connect`file pathno*(none)*Path to custom PPP connect script
`disconnect`file pathno*(none)*Path to custom PPP disconnect script
`keepalive`numberno*(none)*Number of unanswered echo requests before considering the peer dead. The interval between echo requests is 5 seconds.
`demand`numberno*(none)*Number of seconds to wait before closing the connection due to inactivity
`defaultroute`booleanno`1`Replace existing default route on PPP connect
`peerdns`booleanno`1`Use peer-assigned DNS server(s)
`dns`list of ip addressesno*(none)*Override peer-assigned DNS server(s)
`ipv6`\[0,1,auto\]no`auto`Enable IPv6 on the PPP link 0: IPv6 disabled 1: IPv6 enabled auto: IPv6 enabled. DHCPv6 client enabled.
`pppd_options`stringno*(none)*Additional command line arguments to pass to the pppd daemon
PPP-based protocols negotiate IPv4 and IPv6 support when the link is established. These protocols require `option ipv6` to be specified in the parent `config interface wan` section if IPv6 support is required. Further configuration can be given in the alias `config interface wan6` section – see [ipv6](https://openwrt.org/docs/guide-user/network/ipv6/start "docs:guide-user:network:ipv6:start"). ## Protocol "pppoe" (PPP over Ethernet) ![:!:](https://openwrt.org/lib/images/smileys/icon_exclaim.gif) The packages `ppp`, `kmod-pppoe` and `ppp-mod-pppoe` must be installed to use PPPoE.
``` opkg update opkg install ppp kmod-pppoe ppp-mod-pppoe ```
NameTypeRequiredDefaultDescriptionExample
`username`stringno(?)*(none)*Username for PAP/CHAP authentication
`password`stringno(?)*(none)*Password for PAP/CHAP authentication
`ac`stringno*(none)*Specifies the Access Concentrator to connect to. If unset, `pppd` uses the first discovered one
`service`stringno*(none)*Specifies the Service Name to connect to, If unset, `pppd` uses the first discovered one
`connect`file pathno*(none)*Path to custom PPP connect script
`disconnect`file pathno*(none)*Path to custom PPP disconnect script
`keepalive`2 numbersno*(none)*The numbers must be separated by a space. First number is “we assume the connection is down after this number of pings failed” (**ppp**'s **lcp-echo-failure** option). Second number is for “seconds between each ping” (**ppp**'s **lcp-echo-interval** option).option keepalive '5 5'
`demand`numberno*(none)*Number of seconds to wait before closing the connection due to inactivity
`defaultroute`booleanno`1`Replace existing default route on PPP connect
`peerdns`booleanno`1`Use peer-assigned DNS server(s)
`dns`list of ip addressesno*(none)*Override peer-assigned DNS server(s)
`ipv6`\[0,1,auto\]no`auto`Enable IPv6 on the PPP link. See Protocol “ppp” above
`pppd_options`stringno*(none)*Additional command line arguments to pass to the pppd daemon, e.g. **debug**
## Protocol "pppoa" (PPP over ATM AAL5) ![:!:](https://openwrt.org/lib/images/smileys/icon_exclaim.gif) The package `ppp-mod-pppoa` must be installed to use PPPoA.
NameTypeRequiredDefaultDescription
`vci`numberno`35`PPPoA VCI
`vpi`numberno`8`PPPoA VPI
`atmdev`numberno`0`Specifies the ATM adapter number starting with 0. Most systems only have one ATM device and do not need this option
`encaps`stringno`llc`PPPoA encapsulation mode: 'llc' (LLC) or 'vc' (VC)
`username`stringno(?)*(none)*Username for PAP/CHAP authentication
`password`stringno(?)*(none)*Password for PAP/CHAP authentication
`connect`file pathno*(none)*Path to custom PPP connect script
`disconnect`file pathno*(none)*Path to custom PPP disconnect script
`keepalive`numberno*(none)*Number of connection failures before reconnect
`demand`numberno*(none)*Number of seconds to wait before closing the connection due to inactivity
`defaultroute`booleanno`1`Replace existing default route on PPP connect
`peerdns`booleanno`1`Use peer-assigned DNS server(s)
`dns`list of ip addressesno*(none)*Override peer-assigned DNS server(s)
`ipv6`\[0,1,auto\]no`auto`Enable IPv6 on the PPP link. See Protocol “ppp” above.
`pppd_options`stringno*(none)*Additional command line arguments to pass to the pppd daemon
## Protocol "3g" (PPP over EV-DO, CDMA, UMTS or GPRS) ![:!:](https://openwrt.org/lib/images/smileys/icon_exclaim.gif) The package `comgt` must be installed to use 3G.
NameTypeRequiredDefaultDescription
`device`file pathyes*(none)*Modem device node
`service`stringyes`umts`3G service type: `cdma`/`evdo`, `umts`/`umts_only`/`gprs_only` (….\_only options limited to Novatel & Option cards and dongles)
`apn`stringyes*(none)*Used APN
`pincode`numberno*(none)*PIN code to unlock SIM card
`dialnumber`stringno\*99\*\*\*1#Modem dial string e.g. \*99#
`maxwait`numberno`0`Number of seconds to wait for modem to become ready
`username`stringno(?)*(none)*Username for PAP/CHAP authentication
`password`stringno(?)*(none)*Password for PAP/CHAP authentication
`keepalive`numberno*(none)*Number of connection failures before reconnect
`demand`numberno*(none)*Number of seconds to wait before closing the connection due to inactivity
`defaultroute`booleanno`1`Replace existing default route on PPP connect
`peerdns`booleanno`1`Use peer-assigned DNS server(s)
`dns`list of ip addressesno*(none)*Override peer-assigned DNS server(s)
`ipv6`\[0,1,auto\]no`auto`Enable IPv6 on the PPP link. See Protocol “ppp” above.
`delay`numberno0Seconds to wait before trying to interact with the modem (some ZTE modems require up to 30 s.)
## Protocol "qmi" (USB modems using QMI protocol) ![:!:](https://openwrt.org/lib/images/smileys/icon_exclaim.gif) The package `uqmi` must be installed to use QMI.
NameTypeRequiredDefaultDescription
`device`file pathyes*(none)*QMI device node, typically /dev/cdc-wdm0
`apn`stringyes*(none)*Used APN
`pincode`numberno*(none)*PIN code to unlock SIM card
`username`stringno*(none)*Username for PAP/CHAP authentication
`password`stringno*(none)*Password for PAP/CHAP authentication
`auth`stringno*(none)*Authentication type: pap, chap, both, none
`modes`stringno*(modem default)*Allowed network modes, comma separated list of: all, lte, umts, gsm, cdma, td-scdma
`delay`numberno0Seconds to wait before trying to interact with the modem (some ZTE modems require up to 30 s.)
## Protocol "ncm" (USB modems using NCM protocol) ![:!:](https://openwrt.org/lib/images/smileys/icon_exclaim.gif) The package `comgt-ncm` + modem specific driver must be installed to use NCM.
NameTypeRequiredDefaultDescription
`device`file pathyes*(none)*NCM device node, typically /dev/cdc-wdm0 or /dev/ttyUSB#
`apn`stringyes*(none)*Used APN
`pincode`numberno*(none)*PIN code to unlock SIM card
`username`stringno*(none)*Username for PAP/CHAP authentication
`password`stringno*(none)*Password for PAP/CHAP authentication
`auth`stringno*(none)*Authentication type: pap, chap, both, none
`mode`stringno*(modem default)*Used network mode, not every device support every mode: preferlte, preferumts, lte, umts, gsm, auto
`pdptype`stringno`IPV4V6`Used IP-stack mode, `IP` (for IPv4), `IPV6` (for IPv6) or `IPV4V6` (for dual-stack) (Designated Driver #46844 and later)
`delay`numberno0Seconds to wait before trying to interact with the modem (some modems require up to 30 s.)
## Protocol "wwan" (USB modems autodetecting above protocols) ![:!:](https://openwrt.org/lib/images/smileys/icon_exclaim.gif) The package `wwan` must be installed to use this feature. The “wwan” protocol detects the right protocol (3G/QMI/NCM/MBIM) for the USB Modem model and passes the configuration to the protocol.
NameTypeRequiredDefaultDescription
`apn`stringyes*(none)*Used APN
`auth`stringno*(none)*Authentication type: pap, chap, both, none
`username`stringno*(none)*Username for PAP/CHAP authentication
`password`stringno*(none)*Password for PAP/CHAP authentication
`pincode`numberno*(none)*PIN code to unlock SIM card
`modes`stringno*(modem default)*Allowed network modes, comma separated list of: all, lte, umts, gsm, cdma, td-scdma
`delay`numberno0Seconds to wait before trying to interact with the modem (some ZTE modems require up to 30 s.)
## Examples Below are a few examples for special, non-standard interface configurations. ### PPPoE internet connection
``` config 'interface' 'wan' option 'proto' 'pppoe' option 'ifname' 'eth1' option 'username' 'user' option 'password' 'pass' option 'timeout' '10' ```
### PPPoA ADSL internet connection
``` config adsl-device 'adsl' option fwannex 'a' option annex 'a'   config interface 'wan' option proto 'pppoa' option username 'jbloggs@plusdsl.net' option password 'XXXXXXXXX' option vpi '0' option vci '38' option encaps 'vc' ```