Last-Modified: Sun, 23 Feb 2025 01:34:32 GMT
Expires: Wed, 21 Feb 2035 01:34:32 GMT

<!DOCTYPE html>
<html lang='en'>
<head>
<title>openwrt/upstream - upstream openwrt</title>
<meta name='generator' content='cgit v1.2.3'/>
<meta name='robots' content='index, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit.css'/>
<link rel='shortcut icon' href='/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='http://openwrt.panaceas.org/cgit/openwrt/upstream/atom/package/network/utils/uqmi?h=master' type='application/atom+xml'/>
<link rel='vcs-git' href='git://git.panaceas.org/openwrt/upstream' title='openwrt/upstream Git repository'/>
<link rel='vcs-git' href='ssh://git@git.panaceas.org/git/openwrt/upstream' title='openwrt/upstream Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/cgit/'><img src='/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/cgit/'>index</a> : <a title='openwrt/upstream' href='/cgit/openwrt/upstream/'>openwrt/upstream</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'/><select name='h' onchange='this.form.submit();'>
<option value='attitude_adjustment'>attitude_adjustment</option>
<option value='barrier_breaker'>barrier_breaker</option>
<option value='chaos_calmer'>chaos_calmer</option>
<option value='lede-17.01'>lede-17.01</option>
<option value='less-old-master'>less-old-master</option>
<option value='master' selected='selected'>master</option>
<option value='old-master'>old-master</option>
<option value='openwrt-18.06'>openwrt-18.06</option>
<option value='openwrt-19.07'>openwrt-19.07</option>
<option value='upstream'>upstream</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>upstream openwrt</td><td class='sub right'>James</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit/openwrt/upstream/about/'>about</a><a href='/cgit/openwrt/upstream/'>summary</a><a href='/cgit/openwrt/upstream/refs/?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>refs</a><a href='/cgit/openwrt/upstream/log/package/network/utils/uqmi'>log</a><a href='/cgit/openwrt/upstream/tree/package/network/utils/uqmi?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>tree</a><a class='active' href='/cgit/openwrt/upstream/commit/package/network/utils/uqmi?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>commit</a><a href='/cgit/openwrt/upstream/diff/package/network/utils/uqmi?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>diff</a><a href='/cgit/openwrt/upstream/stats/package/network/utils/uqmi'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit/openwrt/upstream/log/package/network/utils/uqmi'>
<input type='hidden' name='id' value='f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit/openwrt/upstream/commit/?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>root</a>/<a href='/cgit/openwrt/upstream/commit/package?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>package</a>/<a href='/cgit/openwrt/upstream/commit/package/network?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>network</a>/<a href='/cgit/openwrt/upstream/commit/package/network/utils?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>utils</a>/<a href='/cgit/openwrt/upstream/commit/package/network/utils/uqmi?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>uqmi</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Felix Fietkau &lt;nbd@nbd.name&gt;</td><td class='right'>2017-01-13 12:07:53 +0100</td></tr>
<tr><th>committer</th><td>Felix Fietkau &lt;nbd@nbd.name&gt;</td><td class='right'>2017-01-13 12:08:09 +0100</td></tr>
<tr><th>commit</th><td colspan='2' class='sha1'><a href='/cgit/openwrt/upstream/commit/package/network/utils/uqmi?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>f44663c673f5412ce679f3c6e0f1b6b17b6f0c22</a> (<a href='/cgit/openwrt/upstream/patch/package/network/utils/uqmi?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='sha1'><a href='/cgit/openwrt/upstream/tree/?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>85ddf4d39fc70fe084089579b5cde72d65fe47dd</a> /<a href='/cgit/openwrt/upstream/tree/package/network/utils/uqmi?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>package/network/utils/uqmi</a></td></tr>
<tr><th>parent</th><td colspan='2' class='sha1'><a href='/cgit/openwrt/upstream/commit/package/network/utils/uqmi?id=185b06f04aa4f761efa3b7cabeaafebd93a8e42d'>185b06f04aa4f761efa3b7cabeaafebd93a8e42d</a> (<a href='/cgit/openwrt/upstream/diff/package/network/utils/uqmi?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22&amp;id2=185b06f04aa4f761efa3b7cabeaafebd93a8e42d'>diff</a>)</td></tr><tr><th>download</th><td colspan='2' class='sha1'><a href='/cgit/openwrt/upstream/snapshot/upstream-f44663c673f5412ce679f3c6e0f1b6b17b6f0c22.tar.gz'>upstream-f44663c673f5412ce679f3c6e0f1b6b17b6f0c22.tar.gz</a><br/><a href='/cgit/openwrt/upstream/snapshot/upstream-f44663c673f5412ce679f3c6e0f1b6b17b6f0c22.tar.bz2'>upstream-f44663c673f5412ce679f3c6e0f1b6b17b6f0c22.tar.bz2</a><br/><a href='/cgit/openwrt/upstream/snapshot/upstream-f44663c673f5412ce679f3c6e0f1b6b17b6f0c22.zip'>upstream-f44663c673f5412ce679f3c6e0f1b6b17b6f0c22.zip</a><br/></td></tr></table>
<div class='commit-subject'>uqmi: mark as nonshared because of the usb dependencies</div><div class='commit-msg'>Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</div><div class='diffstat-header'><a href='/cgit/openwrt/upstream/diff/?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>Diffstat</a> (limited to 'package/network/utils/uqmi')</div><table summary='diffstat' class='diffstat'><tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/cgit/openwrt/upstream/diff/package/network/utils/uqmi/Makefile?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>package/network/utils/uqmi/Makefile</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='2%'><tr><td class='add' style='width: 100.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 0.0%;'/></tr></table></td></tr>
</table><div class='diffstat-summary'>1 files changed, 2 insertions, 0 deletions</div><table summary='diff' class='diff'><tr><td><div class='head'>diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile<br/>index 41db1e7671..2102490f68 100644<br/>--- a/<a href='/cgit/openwrt/upstream/tree/package/network/utils/uqmi/Makefile?id=185b06f04aa4f761efa3b7cabeaafebd93a8e42d'>package/network/utils/uqmi/Makefile</a><br/>+++ b/<a href='/cgit/openwrt/upstream/tree/package/network/utils/uqmi/Makefile?id=f44663c673f5412ce679f3c6e0f1b6b17b6f0c22'>package/network/utils/uqmi/Makefile</a></div><div class='hunk'>@@ -15,6 +15,8 @@ PKG_LICENSE_FILES:=</div><div class='ctx'> </div><div class='ctx'> PKG_BUILD_PARALLEL:=1</div><div class='ctx'> </div><div class='add'>+PKG_FLAGS:=nonshared</div><div class='add'>+</div><div class='ctx'> include $(INCLUDE_DIR)/package.mk</div><div class='ctx'> include $(INCLUDE_DIR)/cmake.mk</div><div class='ctx'> </div></td></tr></table></div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.25.1</a>) at 2025-02-23 01:34:32 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
2' href='#n162'>162</a>
<a id='n163' href='#n163'>163</a>
<a id='n164' href='#n164'>164</a>
<a id='n165' href='#n165'>165</a>
<a id='n166' href='#n166'>166</a>
<a id='n167' href='#n167'>167</a>
<a id='n168' href='#n168'>168</a>
<a id='n169' href='#n169'>169</a>
<a id='n170' href='#n170'>170</a>
<a id='n171' href='#n171'>171</a>
<a id='n172' href='#n172'>172</a>
<a id='n173' href='#n173'>173</a>
<a id='n174' href='#n174'>174</a>
<a id='n175' href='#n175'>175</a>
<a id='n176' href='#n176'>176</a>
<a id='n177' href='#n177'>177</a>
<a id='n178' href='#n178'>178</a>
<a id='n179' href='#n179'>179</a>
<a id='n180' href='#n180'>180</a>
<a id='n181' href='#n181'>181</a>
<a id='n182' href='#n182'>182</a>
<a id='n183' href='#n183'>183</a>
<a id='n184' href='#n184'>184</a>
<a id='n185' href='#n185'>185</a>
<a id='n186' href='#n186'>186</a>
<a id='n187' href='#n187'>187</a>
<a id='n188' href='#n188'>188</a>
<a id='n189' href='#n189'>189</a>
<a id='n190' href='#n190'>190</a>
<a id='n191' href='#n191'>191</a>
<a id='n192' href='#n192'>192</a>
<a id='n193' href='#n193'>193</a>
<a id='n194' href='#n194'>194</a>
<a id='n195' href='#n195'>195</a>
<a id='n196' href='#n196'>196</a>
<a id='n197' href='#n197'>197</a>
<a id='n198' href='#n198'>198</a>
<a id='n199' href='#n199'>199</a>
<a id='n200' href='#n200'>200</a>
<a id='n201' href='#n201'>201</a>
<a id='n202' href='#n202'>202</a>
<a id='n203' href='#n203'>203</a>
<a id='n204' href='#n204'>204</a>
<a id='n205' href='#n205'>205</a>
<a id='n206' href='#n206'>206</a>
<a id='n207' href='#n207'>207</a>
<a id='n208' href='#n208'>208</a>
<a id='n209' href='#n209'>209</a>
<a id='n210' href='#n210'>210</a>
<a id='n211' href='#n211'>211</a>
<a id='n212' href='#n212'>212</a>
<a id='n213' href='#n213'>213</a>
<a id='n214' href='#n214'>214</a>
<a id='n215' href='#n215'>215</a>
<a id='n216' href='#n216'>216</a>
<a id='n217' href='#n217'>217</a>
<a id='n218' href='#n218'>218</a>
<a id='n219' href='#n219'>219</a>
<a id='n220' href='#n220'>220</a>
<a id='n221' href='#n221'>221</a>
<a id='n222' href='#n222'>222</a>
<a id='n223' href='#n223'>223</a>
<a id='n224' href='#n224'>224</a>
<a id='n225' href='#n225'>225</a>
<a id='n226' href='#n226'>226</a>
<a id='n227' href='#n227'>227</a>
<a id='n228' href='#n228'>228</a>
<a id='n229' href='#n229'>229</a>
<a id='n230' href='#n230'>230</a>
<a id='n231' href='#n231'>231</a>
</pre></td>
<td class='lines'><pre><code><style>pre { line-height: 125%; margin: 0; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #ffffff; }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */</style><div class="highlight"><pre><span></span>The network configuration is stored in <span class="k">\texttt</span><span class="nb">{</span>/etc/config/network<span class="nb">}</span>
and is divided into interface configurations.
Each interface configuration either refers directly to an ethernet/wifi
interface (<span class="k">\texttt</span><span class="nb">{</span>eth0<span class="nb">}</span>, <span class="k">\texttt</span><span class="nb">{</span>wl0<span class="nb">}</span>, ..) or to a bridge containing multiple interfaces.
It looks like this:

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config interface     &quot;lan&quot;
    option ifname    &quot;eth0&quot;
    option proto     &quot;static&quot;
    option ipaddr    &quot;192.168.1.1&quot;
    option netmask   &quot;255.255.255.0&quot;
    option gateway   &quot;192.168.1.254&quot;
    option dns       &quot;192.168.1.254&quot;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

<span class="k">\texttt</span><span class="nb">{</span>ifname<span class="nb">}</span> specifies the Linux interface name.
If you want to use bridging on one or more interfaces, set <span class="k">\texttt</span><span class="nb">{</span>ifname<span class="nb">}</span> to a list
of interfaces and add:
<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
    option type     &quot;bridge&quot;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

It is possible to use VLAN tagging on an interface simply by adding the VLAN IDs
to it, e.g. <span class="k">\texttt</span><span class="nb">{</span>eth0.15<span class="nb">}</span>. These can be nested as well. See the switch section for
this.

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config interface
    option ifname    &quot;eth0.15&quot;
    option proto     &quot;none&quot;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

This sets up a simple static configuration for <span class="k">\texttt</span><span class="nb">{</span>eth0<span class="nb">}</span>. <span class="k">\texttt</span><span class="nb">{</span>proto<span class="nb">}</span> specifies the
protocol used for the interface. The default image usually provides <span class="k">\texttt</span><span class="nb">{</span>&#39;none&#39;<span class="nb">}</span>
<span class="k">\texttt</span><span class="nb">{</span>&#39;static&#39;<span class="nb">}</span>, <span class="k">\texttt</span><span class="nb">{</span>&#39;dhcp&#39;<span class="nb">}</span> and <span class="k">\texttt</span><span class="nb">{</span>&#39;pppoe&#39;<span class="nb">}</span>. Others can be added by installing additional
packages.

When using the <span class="k">\texttt</span><span class="nb">{</span>&#39;static&#39;<span class="nb">}</span> method like in the example, the  options <span class="k">\texttt</span><span class="nb">{</span>ipaddr<span class="nb">}</span> and
<span class="k">\texttt</span><span class="nb">{</span>netmask<span class="nb">}</span> are mandatory, while <span class="k">\texttt</span><span class="nb">{</span>gateway<span class="nb">}</span> and <span class="k">\texttt</span><span class="nb">{</span>dns<span class="nb">}</span> are optional.
You can specify more than one DNS server, separated with spaces:

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config interface     &quot;lan&quot;
    option ifname    &quot;eth0&quot;
    option proto     &quot;static&quot;
    ...
    option dns       &quot;192.168.1.254 192.168.1.253&quot; (optional)
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

DHCP currently only accepts <span class="k">\texttt</span><span class="nb">{</span>ipaddr<span class="nb">}</span> (IP address to request from the server)
and <span class="k">\texttt</span><span class="nb">{</span>hostname<span class="nb">}</span> (client hostname identify as) - both are optional.

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config interface     &quot;lan&quot;
    option ifname    &quot;eth0&quot;
    option proto     &quot;dhcp&quot;
    option ipaddr    &quot;192.168.1.1&quot; (optional)
    option hostname  &quot;openwrt&quot;     (optional)
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

PPP based protocols (<span class="k">\texttt</span><span class="nb">{</span>pppoe<span class="nb">}</span>, <span class="k">\texttt</span><span class="nb">{</span>pptp<span class="nb">}</span>, ...) accept these options:
<span class="k">\begin</span><span class="nb">{</span>itemize<span class="nb">}</span>
    <span class="k">\item</span><span class="nb">{</span>username<span class="nb">}</span> <span class="k">\\</span>
        The PPP username (usually with PAP authentication)
    <span class="k">\item</span><span class="nb">{</span>password<span class="nb">}</span> <span class="k">\\</span>
        The PPP password
    <span class="k">\item</span><span class="nb">{</span>keepalive<span class="nb">}</span> <span class="k">\\</span>
        Ping the PPP server (using LCP). The value of this option
        specifies the maximum number of failed pings before reconnecting.
        The ping interval defaults to 5, but can be changed by appending
        &quot;,&lt;interval&gt;&quot; to the keepalive value
    <span class="k">\item</span><span class="nb">{</span>demand<span class="nb">}</span> <span class="k">\\</span>
        Use Dial on Demand (value specifies the maximum idle time.
    <span class="k">\item</span><span class="nb">{</span>server: (pptp)<span class="nb">}</span> <span class="k">\\</span>
        The remote pptp server IP
<span class="k">\end</span><span class="nb">{</span>itemize<span class="nb">}</span>

For all protocol types, you can also specify the MTU by using the <span class="k">\texttt</span><span class="nb">{</span>mtu<span class="nb">}</span> option.
A sample PPPoE config would look like this:

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config interface     &quot;lan&quot;
    option ifname    &quot;eth0&quot;
    option proto     &quot;pppoe&quot;
    option username  &quot;username&quot;
    option password  &quot;openwrt&quot;
    option mtu       &quot;1492&quot;      (optional)
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

<span class="k">\subsubsection</span><span class="nb">{</span>Setting up static routes<span class="nb">}</span>

You can set up static routes for a specific interface that will be brought up 
after the interface is configured.

Simply add a config section like this:

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config route foo
	option interface  &quot;lan&quot;
	option target     &quot;1.1.1.0&quot;
	option netmask    &quot;255.255.255.0&quot;
	option gateway    &quot;192.168.1.1&quot;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

The name for the route section is optional, the <span class="k">\texttt</span><span class="nb">{</span>interface<span class="nb">}</span>, <span class="k">\texttt</span><span class="nb">{</span>target<span class="nb">}</span> and 
<span class="k">\texttt</span><span class="nb">{</span>gateway<span class="nb">}</span> options are mandatory.
Leaving out the <span class="k">\texttt</span><span class="nb">{</span>netmask<span class="nb">}</span> option will turn the route into a host route.

<span class="k">\subsubsection</span><span class="nb">{</span>Setting up the switch (broadcom only)<span class="nb">}</span>

The switch configuration is set by adding a <span class="k">\texttt</span><span class="nb">{</span>&#39;switch&#39;<span class="nb">}</span> config section.
Example:

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config switch       &quot;eth0&quot;
    option vlan0    &quot;1 2 3 4 5*&quot;
    option vlan1    &quot;0 5&quot;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

On Broadcom hardware the section name needs to be eth0, as the switch driver
does not detect the switch on any other physical device.
Every vlan option needs to have the name vlan&lt;n&gt; where &lt;n&gt; is the VLAN number
as used in the switch driver.
As value it takes a list of ports with these optional suffixes:

<span class="k">\begin</span><span class="nb">{</span>itemize<span class="nb">}</span>
    <span class="k">\item</span><span class="nb">{</span><span class="k">\texttt</span><span class="nb">{</span>&#39;*&#39;<span class="nb">}</span>:<span class="nb">}</span>
        Set the default VLAN (PVID) of the Port to the current VLAN
    <span class="k">\item</span><span class="nb">{</span><span class="k">\texttt</span><span class="nb">{</span>&#39;u&#39;<span class="nb">}</span>:<span class="nb">}</span>
        Force the port to be untagged
    <span class="k">\item</span><span class="nb">{</span><span class="k">\texttt</span><span class="nb">{</span>&#39;t&#39;<span class="nb">}</span>:<span class="nb">}</span>
        Force the port to be tagged
<span class="k">\end</span><span class="nb">{</span>itemize<span class="nb">}</span>

The CPU port defaults to tagged, all other ports to untagged.
On Broadcom hardware the CPU port is always 5. The other ports may vary with
different hardware.

For instance, if you wish to have 3 vlans, like one 3-port switch, 1 port in a
DMZ, and another one as your WAN interface, use the following configuration :

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config switch       &quot;eth0&quot;
    option vlan0    &quot;1 2 3 5*&quot;
    option vlan1    &quot;0 5&quot;
    option vlan2    &quot;4 5&quot;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

Three interfaces will be automatically created using this switch layout :
<span class="k">\texttt</span><span class="nb">{</span>eth0.0<span class="nb">}</span> (vlan0), <span class="k">\texttt</span><span class="nb">{</span>eth0.1<span class="nb">}</span> (vlan1) and <span class="k">\texttt</span><span class="nb">{</span>eth0.2<span class="nb">}</span> (vlan2).
You can then assign those interfaces to a custom network configuration name
like <span class="k">\texttt</span><span class="nb">{</span>lan<span class="nb">}</span>, <span class="k">\texttt</span><span class="nb">{</span>wan<span class="nb">}</span> or <span class="k">\texttt</span><span class="nb">{</span>dmz<span class="nb">}</span> for instance.

<span class="k">\subsubsection</span><span class="nb">{</span>Setting up the switch (swconfig)<span class="nb">}</span>

<span class="k">\emph</span><span class="nb">{</span>swconfig<span class="nb">}</span> based configurations have a different structure with one extra
section per vlan. The example below shows a typical configuration:

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config &#39;switch&#39; &#39;eth0&#39;
        option &#39;reset&#39; &#39;1&#39;
        option &#39;enable<span class="nb">_</span>vlan&#39; &#39;1&#39;

config &#39;switch<span class="nb">_</span>vlan&#39; &#39;eth0<span class="nb">_</span>1&#39;
        option &#39;device&#39; &#39;eth0&#39;
        option &#39;vlan&#39; &#39;1&#39;
        option &#39;ports&#39; &#39;0 1 2 3 5t&#39;

config &#39;switch<span class="nb">_</span>vlan&#39; &#39;eth0<span class="nb">_</span>2&#39;
        option &#39;device&#39; &#39;eth0&#39;
        option &#39;vlan&#39; &#39;2&#39;
        option &#39;ports&#39; &#39;4 5t&#39;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

<span class="k">\subsubsection</span><span class="nb">{</span>Setting up IPv6 connectivity<span class="nb">}</span>

OpenWrt supports IPv6 connectivity using PPP, Tunnel brokers or static
assignment.

If you use PPP, IPv6 will be setup using IP6CP and there is nothing to
configure.

To setup an IPv6 tunnel to a tunnel broker, you can install the
<span class="k">\texttt</span><span class="nb">{</span>6scripts<span class="nb">}</span> package and edit the <span class="k">\texttt</span><span class="nb">{</span>/etc/config/6tunnel<span class="nb">}</span>
file and change the settings accordingly :

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config 6tunnel
        option tnlifname     &#39;sixbone&#39;
        option remoteip4     &#39;1.0.0.1&#39;
        option localip4      &#39;1.0.0.2&#39;
        option localip6      &#39;2001::DEAD::BEEF::1&#39;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

<span class="k">\begin</span><span class="nb">{</span>itemize<span class="nb">}</span>
    <span class="k">\item</span><span class="nb">{</span><span class="k">\texttt</span><span class="nb">{</span>&#39;tnlifname&#39;<span class="nb">}</span>:<span class="nb">}</span>
        Set the interface name of the IPv6 in IPv4 tunnel
    <span class="k">\item</span><span class="nb">{</span><span class="k">\texttt</span><span class="nb">{</span>&#39;remoteip4&#39;<span class="nb">}</span>:<span class="nb">}</span>
        IP address of the remote end to establish the 6in4 tunnel.
	This address is given by the tunnel broker
    <span class="k">\item</span><span class="nb">{</span><span class="k">\texttt</span><span class="nb">{</span>&#39;localip4&#39;<span class="nb">}</span>:<span class="nb">}</span>
	IP address of your router to establish the 6in4 tunnel.
	It will usually match your WAN IP address.
    <span class="k">\item</span><span class="nb">{</span><span class="k">\texttt</span><span class="nb">{</span>&#39;localip6&#39;<span class="nb">}</span>:<span class="nb">}</span>
	IPv6 address to setup on your tunnel side
	This address is given by the tunnel broker
<span class="k">\end</span><span class="nb">{</span>itemize<span class="nb">}</span>

Using the same package you can also setup an IPv6 bridged connection:

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config 6bridge
	option bridge	&#39;br6&#39;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>

By default the script bridges the WAN interface with the LAN interface
and uses ebtables to filter anything that is not IPv6 on the bridge.
This configuration is particularly useful if your router is not
IPv6 ND proxy capable (see: http://www.rfc-archive.org/getrfc.php?rfc=4389).

IPv6 static addressing is also supported using a similar setup as
IPv4 but with the <span class="k">\texttt</span><span class="nb">{</span>ip6<span class="nb">}</span> prefixing (when applicable).

<span class="k">\begin</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
config interface     &quot;lan&quot;
    option ifname    &quot;eth0&quot;
    option proto     &quot;static&quot;
    option ip6addr   &quot;fe80::200:ff:fe00:0/64&quot;
    option ip6gw     &quot;2001::DEAF:BEE:1&quot;
<span class="k">\end</span><span class="nb">{</span>Verbatim<span class="nb">}</span>
</pre></div>
</code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.25.1</a>) at 2025-02-23 01:34:33 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
