Differences

This shows you the differences between two versions of the page.

doc:uci:network [2013/07/13 14:06]
luka12345
doc:uci:network [2014/02/24 18:35] (current)
hnyman Add he.net updatekey info for 6in4
Line 85: Line 85:
| ''3g'' | CDMA, UMTS or GPRS connection using an AT-style 3G modem |  ''comgt''  | | ''3g'' | CDMA, UMTS or GPRS connection using an AT-style 3G modem |  ''comgt''  |
| ''pptp'' | Connection via PPtP VPN |  ?  | | ''pptp'' | Connection via PPtP VPN |  ?  |
-| ''6in4'' | IPv6-in-IPv4 tunnel for use with Tunnel Brokers like HE.net |  ?  |+| ''6in4'' | IPv6-in-IPv4 tunnel forSuppresses DHCP-assigned default gateway if set to 0.0.0.0 use with Tunnel Brokers like HE.net |  ?  |
| ''6to4'' | Stateless IPv6 over IPv4 transport |  ?  | | ''6to4'' | Stateless IPv6 over IPv4 transport |  ?  |
| ''none'' | Unspecified protocol |  -  | | ''none'' | Unspecified protocol |  -  |
Line 124: Line 124:
^ Name ^ Type ^ Required ^ Default ^ Description ^ ^ Name ^ Type ^ Required ^ Default ^ Description ^
-| ''gateway'' | string | no | //(none)// | Suppresses DHCP-assigned default gateway if set to 0.0.0.0 |+| ''<del>gateway</del>'' | <del>string</del> | <del>no</del> | <del>//(none)//</del> | <del>Suppresses DHCP-assigned default gateway if set to 0.0.0.0</del> \\ (deprecated) |
| ''broadcast'' | boolean | no | ''0'' | Enable the broadcast flag in DHCP requests, required for certain ISPs, e.g. Charter with DOCSIS 3 | | ''broadcast'' | boolean | no | ''0'' | Enable the broadcast flag in DHCP requests, required for certain ISPs, e.g. Charter with DOCSIS 3 |
| ''hostname'' | string | no | //(none)// | Hostname to include in DHCP requests | | ''hostname'' | string | no | //(none)// | Hostname to include in DHCP requests |
Line 131: Line 131:
| ''dns'' | list of ip addresses | no | //(none)// | Supplement DHCP-assigned DNS server(s), or use only these if peerdns is 0 | | ''dns'' | list of ip addresses | no | //(none)// | Supplement DHCP-assigned DNS server(s), or use only these if peerdns is 0 |
| ''peerdns'' | boolean | no | ''1'' | Use DHCP-provided DNS server(s) | | ''peerdns'' | boolean | no | ''1'' | Use DHCP-provided DNS server(s) |
 +| ''defaultroute'' | boolean | no | ''1'' | Whether to create a default route via the received gateway |
| ''metric'' | integer | no | ''0'' | Specifies the default route metric to use | | ''metric'' | integer | no | ''0'' | Specifies the default route metric to use |
| ''reqopts'' | list of strings | no | //(none)// | Specifies a list of additional DHCP options to request | | ''reqopts'' | list of strings | no | //(none)// | Specifies a list of additional DHCP options to request |
Line 144: Line 145:
| ''reqaddress'' | [try,force,none] | no | try | Behaviour for requesting addresses | | ''reqaddress'' | [try,force,none] | no | try | Behaviour for requesting addresses |
| ''reqprefix'' | [auto,no,0-64] | no | auto | Behaviour for requesting prefixes (numbers denote hinted prefix length).  Use 'no' if you only want a single IPv6 address for the AP itself without a subnet for routing | | ''reqprefix'' | [auto,no,0-64] | no | auto | Behaviour for requesting prefixes (numbers denote hinted prefix length).  Use 'no' if you only want a single IPv6 address for the AP itself without a subnet for routing |
-| ''clientid'' | string | no | //system default// | Override client identifier in DHCP requests |+| ''clientid'' | hexstring | no | //system default// | Override client identifier in DHCP requests |
| ''ifaceid'' | ipv6 addr | no | //link-local identifier// | Override the interface identifier for adresses received via RA | | ''ifaceid'' | ipv6 addr | no | //link-local identifier// | Override the interface identifier for adresses received via RA |
| ''dns'' | list of ip addresses | no | //(none)// | Supplement DHCP-assigned DNS server(s), or use only these if peerdns is 0 | | ''dns'' | list of ip addresses | no | //(none)// | Supplement DHCP-assigned DNS server(s), or use only these if peerdns is 0 |
| ''peerdns'' | boolean | no | ''1'' | Use DHCP-provided DNS server(s) | | ''peerdns'' | boolean | no | ''1'' | Use DHCP-provided DNS server(s) |
 +| ''defaultroute'' | boolean | no | ''1'' | Whether to create an IPv6 default route via the received gateway |
| ''reqopts'' | list of numbers | no | //(none)// | Specifies a list of additional DHCP options to request | | ''reqopts'' | list of numbers | no | //(none)// | Specifies a list of additional DHCP options to request |
| ''noslaaconly'' | boolean | no | ''0'' | Don't allow configuration via SLAAC (RAs) only (implied by reqprefix != no) | | ''noslaaconly'' | boolean | no | ''0'' | Don't allow configuration via SLAAC (RAs) only (implied by reqprefix != no) |
Line 262: Line 264:
| ''username'' | string | no | //(none)// | HE.net user ID (used for endpoint update) | | ''username'' | string | no | //(none)// | HE.net user ID (used for endpoint update) |
| ''password'' | string | no | //(none)// | md5sum of HE.net password (used for endpoint update) | | ''password'' | string | no | //(none)// | md5sum of HE.net password (used for endpoint update) |
 +| ''updatekey'' | string | no | //(none)// | HE.net updatekey, overrides password (used for endpoint update) |
| ''metric'' | integer | no | ''0'' | Specifies the default route metric to use | | ''metric'' | integer | no | ''0'' | Specifies the default route metric to use |
**Note:** This protocol type does not need an ''ifname'' option set in the interface section. The interface name is derived from the section name, e.g. ''config interface sixbone'' would result in an interface named ''6in4-sixbone''. **Note:** This protocol type does not need an ''ifname'' option set in the interface section. The interface name is derived from the section name, e.g. ''config interface sixbone'' would result in an interface named ''6in4-sixbone''.
 +
 +**Note:** HE.net has introduced updatekey as default for new tunnels in February 2014. Support added to Openwrt trunk by r39646.
Line 301: Line 306:
**Note:** This protocol type does not need an ''ifname'' option set in the interface section. The interface name is derived from the section name, e.g. ''config interface wan6'' would result in an interface named ''6rd-wan6''. **Note:** This protocol type does not need an ''ifname'' option set in the interface section. The interface name is derived from the section name, e.g. ''config interface wan6'' would result in an interface named ''6rd-wan6''.
 +
 +**Note:** Some ISP's give you the number of bytes you should use from your WAN IP to calculate your IPv6 address. ip4prefixlen expects the //prefix// bytes of your WAN IP to calculate the IPv6 address. So if your ISP gives you 14 bytes to calculate, enter 18 (32 - 14).
Line 387: Line 394:
| {{:meta:icons:tango:48px-outdated.svg.png?nolink}} | The "config alias" approach is //deprecated//. it used to be needed when multiple interfaces sharing the same device where not supported. [[https://forum.openwrt.org/viewtopic.php?pid=203943#p203943|JoW]] | | {{:meta:icons:tango:48px-outdated.svg.png?nolink}} | The "config alias" approach is //deprecated//. it used to be needed when multiple interfaces sharing the same device where not supported. [[https://forum.openwrt.org/viewtopic.php?pid=203943#p203943|JoW]] |
 +===== Aliases: the old way =====
//Alias// sections can be used to define further IPv4 and IPv6 addresses for interfaces. //Alias// sections can be used to define further IPv4 and IPv6 addresses for interfaces.
They also allow combinations like DHCP on the main interface and a static IPv6 address in the alias, They also allow combinations like DHCP on the main interface and a static IPv6 address in the alias,
Line 423: Line 431:
  ip addr   ip addr
 +===== Aliases: the new way =====
 +
 +Basically create an 'interface' section per IP, but alias interfaces may NOT be of type bridge
 +
 +  * For non-bridged interfaces (physdev) the ''ifname'' is the <interface-of-network-for-same-phydev>
 +  * For cases where the interface is bridged the ''ifname'' is br-''base-interface'', where ''base-interface'' is the name of the primary IP's config section (e.g. for a the default lan interface config, the first alias would use ifname br-lan).
 +
 +A minimal alias definition for a bridged interface might be (for a scenario without vlans):
 +<code>config interface lan
 +        option 'ifname' 'eth0'
 +        option 'type' 'bridge'
 +        option 'proto' 'static'
 +        option 'ipaddr' '192.168.1.1'
 +        option 'netmask' '255.255.255.0'</code>
 +
 +<code>config interface lan2
 +      option 'ifname' 'br-lan'
 +      option 'proto' 'static'
 +      option 'ipaddr' '10.0.0.1'
 +      option 'netmask' '255.255.255.0'</code>
 +
 +or for a non-bridge interface
 +<code>config interface lan
 +        option 'ifname' 'eth0'
 +        option 'proto' 'static'
 +        option 'ipaddr' '192.168.1.1'
 +        option 'netmask' '255.255.255.0'</code>
 +
 +<code>config interface lan2
 +      option 'ifname' 'eth0'
 +      option 'proto' 'static'
 +      option 'ipaddr' '10.0.0.1'
 +      option 'netmask' '255.255.255.0'</code>
 +
 +To see a list of interfaces you can do ''ubus list network.interface.*'' and to view the ip of a particular interface (the UCI name not the physical interface), do ''ifstatus <interface>'' (e.g. ''ifstatus lan2'')
==== IPv4 Routes ==== ==== IPv4 Routes ====
Line 503: Line 546:
  * ''vpn'' is the incoming //logical interface name//   * ''vpn'' is the incoming //logical interface name//
  * ''fdca:1234::/64'' is the destination subnet to match   * ''fdca:1234::/64'' is the destination subnet to match
-  * ''prohibit'' is a routign action to take+  * ''prohibit'' is a routing action to take
The options below are defined for //IP rule// (''rule'' and ''rule6'') sections: The options below are defined for //IP rule// (''rule'' and ''rule6'') sections:

Back to top

doc/uci/network.1373717216.txt.bz2 · Last modified: 2013/07/13 14:06 by luka12345