| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| docs:guide-user:network:wan:wan_interface_protocols [2019/06/27 07:35] – Section heading levels corrected tmomas | docs:guide-user:network:wan:wan_interface_protocols [2024/01/07 19:06] – [Protocol "pppoe" (PPP over Ethernet)] fix questioned fields charles_harris |
|---|
| ====== WAN interface protocols ====== | ====== WAN interface protocols ====== |
| |
| ===== Protocol "ppp" (PPP over Modem) ===== | ===== Protocol "ppp" (PPP over Modem) ===== |
| |
| :!: The package ''ppp'' must be installed to use PPP. | :!: The package ''ppp'' must be installed to use PPP. |
| |
| |
| ===== Protocol "pppoe" (PPP over Ethernet) ===== | ===== Protocol "pppoe" (PPP over Ethernet) ===== |
| |
| :!: The packages ''ppp'', ''kmod-pppoe'' and ''ppp-mod-pppoe'' must be installed to use PPPoE. | :!: The packages ''ppp'', ''kmod-pppoe'' and ''ppp-mod-pppoe'' must be installed to use PPPoE. |
| |
| <code> | <code bash> |
| opkg update | opkg update |
| opkg install ppp kmod-pppoe ppp-mod-pppoe | opkg install ppp kmod-pppoe ppp-mod-pppoe |
| </code> | </code> |
| |
| ^ Name ^ Type ^ Required ^ Default ^ Description ^ Example ^ | ^ Name ^ Type ^ Required ^ Default ^ Description |
| | ''username'' | string | no(?) | //(none)// | Username for PAP/CHAP authentication | | | | ''username'' | string | no | //(none)// | Username for PAP/CHAP authentication | |
| | ''password'' | string | no(?) | //(none)// | Password for PAP/CHAP authentication | | | | ''password'' | string | no | //(none)// | Password for PAP/CHAP authentication | |
| | ''ac'' | string | no | //(none)// | Specifies the Access Concentrator to connect to. If unset, ''pppd'' uses the first discovered one | | | | ''ac'' | string | no | //(none)// | Specifies the Access Concentrator to connect to. If unset, ''pppd'' uses the first discovered one | |
| | ''service'' | string | no | //(none)// | Specifies the Service Name to connect to, If unset, ''pppd'' uses the first discovered one | | | | ''service'' | string | no | //(none)// | Specifies the Service Name to connect to, If unset, ''pppd'' uses the first discovered one | |
| | ''connect'' | file path | no | //(none)// | Path to custom PPP connect script | | | | ''host_uniq'' | string | no | //(none)// | Specifies the PPPoE Host-Uniq tag (hexstring) to connect with. If unset, it uses the ''pppd'' process ID | |
| | ''disconnect'' | file path | no | //(none)// | Path to custom PPP disconnect script | | | | ''connect'' | file path | no | //(none)// | Path to custom PPP connect script | |
| | ''keepalive'' | 2 numbers | no | //(none)// | The numbers must be separated by a space. First number is for "seconds between each ping" (**ppp**'s **lcp-echo-interval** option). Second number is "we assume the connection is down after this number of pings failed" (**ppp**'s **lcp-echo-failure** option). | option keepalive '5 5' | | | ''disconnect'' | file path | no | //(none)// | Path to custom PPP disconnect script | |
| | ''demand'' | number | no | //(none)// | Number of seconds to wait before closing the connection due to inactivity | | | | ''keepalive'' | 2 numbers | no | ''5 1'' | 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). | |
| | ''defaultroute'' | boolean | no | ''1'' | Replace existing default route on PPP connect | | | | ''demand'' | number | no | //(none)// | Number of seconds to wait before closing the connection due to inactivity | |
| | ''peerdns'' | boolean | no | ''1'' | Use peer-assigned DNS server(s) | | | | ''defaultroute'' | boolean | no | ''1'' | Replace existing default route on PPP connect | |
| | ''dns'' | list of ip addresses | no | //(none)// | Override peer-assigned DNS server(s) | | | | ''peerdns'' | boolean | no | ''1'' | Use peer-assigned DNS server(s) | |
| | ''ipv6'' | [0,1,auto] | no | ''auto'' | Enable IPv6 on the PPP link. See Protocol "ppp" above | | | | ''dns'' | list of ip addresses | no | //(none)// | Override peer-assigned DNS server(s) | |
| | ''pppd_options'' | string | no | //(none)// | Additional command line arguments to pass to the pppd daemon, e.g. **debug** | | | | ''ipv6'' | [0,1,auto] | no | ''auto'' | Enable IPv6 on the PPP link. See Protocol "ppp" above | |
| | | ''pppd_options'' | string | no | //(none)// | Additional command line arguments to pass to the pppd daemon e.g ''debug'' | |
| |
| ===== Protocol "pppoa" (PPP over ATM AAL5) ===== | ===== Protocol "pppoa" (PPP over ATM AAL5) ===== |
| |
| :!: The package ''ppp-mod-pppoa'' must be installed to use PPPoA. | :!: The package ''ppp-mod-pppoa'' must be installed to use PPPoA. |
| |
| | ''ipv6'' | [0,1,auto] | no | ''auto'' | Enable IPv6 on the PPP link. See Protocol “ppp” above. | | | ''ipv6'' | [0,1,auto] | no | ''auto'' | Enable IPv6 on the PPP link. See Protocol “ppp” above. | |
| | ''pppd_options'' | string | no | //(none)// | Additional command line arguments to pass to the pppd daemon | | | ''pppd_options'' | string | no | //(none)// | Additional command line arguments to pass to the pppd daemon | |
| |
| |
| ===== Protocol "3g" (PPP over EV-DO, CDMA, UMTS or GPRS) ===== | ===== Protocol "3g" (PPP over EV-DO, CDMA, UMTS or GPRS) ===== |
| |
| :!: The package ''comgt'' must be installed to use 3G. | :!: The package ''comgt'' must be installed to use 3G. |
| |
| |
| ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ^ Name ^ Type ^ Required ^ Default ^ Description ^ |
| | ''dns'' | list of ip addresses | no | //(none)// | Override peer-assigned DNS server(s) | | | ''dns'' | list of ip addresses | no | //(none)// | Override peer-assigned DNS server(s) | |
| | ''ipv6'' | [0,1,auto] | no | ''auto'' | Enable IPv6 on the PPP link. See Protocol “ppp” above. | | | ''ipv6'' | [0,1,auto] | no | ''auto'' | Enable IPv6 on the PPP link. See Protocol “ppp” above. | |
| | | ''delay'' | number | no | 0 | Seconds to wait before trying to interact with the modem (some ZTE modems require up to 30 s.)| |
| |
| ===== Protocol "qmi" (USB modems using QMI protocol) ===== | ===== Protocol "qmi" (USB modems using QMI protocol) ===== |
| |
| :!: The package ''uqmi'' must be installed to use QMI. | :!: The package ''uqmi'' must be installed to use QMI. |
| |
| |
| ===== Protocol "ncm" (USB modems using NCM protocol) ===== | ===== Protocol "ncm" (USB modems using NCM protocol) ===== |
| |
| :!: The package ''comgt-ncm'' + modem specific driver must be installed to use NCM. | :!: The package ''comgt-ncm'' + modem specific driver must be installed to use NCM. |
| |
| |
| ===== Protocol "wwan" (USB modems autodetecting above protocols) ===== | ===== Protocol "wwan" (USB modems autodetecting above protocols) ===== |
| |
| :!: 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. | :!: 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. |
| |
| |
| ===== Examples ===== | ===== Examples ===== |
| |
| Below are a few examples for special, non-standard interface configurations. | Below are a few examples for special, non-standard interface configurations. |
| |
| ==== PPtP-over-PPPoE internet connection ==== | ==== PPPoE internet connection ==== |
| | <code bash> |
| <code>config 'interface' 'wan' | config interface 'wan' |
| option 'proto' 'pppoe' | option proto 'pppoe' |
| option 'ifname' 'eth1' | option device 'eth0' |
| option 'username' 'user' | option username 'user' |
| option 'password' 'pass' | option password 'pass' |
| option 'timeout' '10' | option keepalive '4 5' |
| | </code> |
| config 'interface' 'vpn' | |
| option 'proto' 'pptp' | |
| option 'ifname' 'vpn' | |
| option 'username' 'vpnuser' | |
| option 'password' 'vpnpass' | |
| option 'server' 'vpn.example.org'</code> | |
| | |
| :!: Additionally the "wan" firewall zone must include both interfaces in ''/etc/config/firewall'': | |
| | |
| <code>config 'zone' | |
| option 'name' 'wan' | |
| option 'network' 'wan vpn' # Important | |
| option 'input' 'REJECT' | |
| option 'forward' 'REJECT' | |
| option 'output' 'ACCEPT' | |
| option 'masq' '1'</code> | |
| |
| ==== PPPoA ADSL internet connection ==== | ==== PPPoA ADSL internet connection ==== |
| | <code bash> |
| <code>config adsl-device 'adsl' | config adsl-device 'adsl' |
| option fwannex 'a' | option fwannex 'a' |
| option annex 'a' | option annex 'a' |
| option vpi '0' | option vpi '0' |
| option vci '38' | option vci '38' |
| option encaps 'vc'</code> | option encaps 'vc' |
| | </code> |
| {{tag>UCI UCI.Network}} | |
| |