User Tools

Site Tools


doc:uci:network

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:uci:network [2014/08/18 11:44]
steven
doc:uci:network [2014/12/18 16:43] (current)
pier4r [Aliases: the new way]
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'' ​ |
 | ''​qmi''​ | USB modems using QMI protocol |  ''​uqmi'' ​ | | ''​qmi''​ | USB modems using QMI protocol |  ''​uqmi'' ​ |
-| ''​hnet''​ | Self-managing home network (HNCP) | ''​hnet-full''​ |+| ''​hnet''​ | Self-managing home network (HNCP) |  ''​hnet-full'' ​ |
 | ''​pptp''​ | Connection via PPtP VPN |  ?  | | ''​pptp''​ | Connection via PPtP VPN |  ?  |
 | ''​6in4''​ | IPv6-in-IPv4 tunnel forSuppresses DHCP-assigned default gateway if set to 0.0.0.0 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 |  ?  |
Line 94: Line 94:
 | ''​l2tp''​ | PPP over L2TP Pseudowire Tunnel |  ''​xl2tpd'' ​ | | ''​l2tp''​ | PPP over L2TP Pseudowire Tunnel |  ''​xl2tpd'' ​ |
 | ''​relay''​ | relayd pseudo-bridge |  ''​relayd'' ​ | | ''​relay''​ | relayd pseudo-bridge |  ''​relayd'' ​ |
 +| ''​gre'',​ ''​gretap''​ | GRE over IPv4 |  ''​gre''​ + ''​kmod-gre'' ​ |
 +| ''​grev6'',​ ''​grev6tap''​ | GRE over IPv6 |  ''​gre''​ + ''​kmod-gre6'' ​ |
 | ''​none''​ | Unspecified protocol |  -  | | ''​none''​ | Unspecified protocol |  -  |
  
Line 106: Line 108:
 | ''​stp''​ | boolean | no | ''​0''​ | Only valid for type "​bridge",​ enables the Spanning Tree Protocol | | ''​stp''​ | boolean | no | ''​0''​ | Only valid for type "​bridge",​ enables the Spanning Tree Protocol |
 | ''​bridge_empty''​ | boolean | no | ''​0''​ | Only valid for type "​bridge",​ enables creating empty bridges | | ''​bridge_empty''​ | boolean | no | ''​0''​ | Only valid for type "​bridge",​ enables creating empty bridges |
 +| ''​igmp_snooping''​ | boolean | no | ''​1''​ | Only valid for type "​bridge",​ sets the multicast_snooping kernel setting for a bridge |
 | ''​macaddr''​ | mac address | no | //(none)// | Override MAC address of this interface | | ''​macaddr''​ | mac address | no | //(none)// | Override MAC address of this interface |
 | ''​mtu''​ | number | no | //(none)// | Override the default MTU on this interface | | ''​mtu''​ | number | no | //(none)// | Override the default MTU on this interface |
 | ''​auto''​ | boolean | no | ''​0''​ for proto ''​none'',​ else ''​1''​ | Specifies whether to bring up interface on boot | | ''​auto''​ | boolean | no | ''​0''​ for proto ''​none'',​ else ''​1''​ | Specifies whether to bring up interface on boot |
 +| ''​ipv6''​ | boolean | no | ''​1''​ | Specifies whether to enable (1) or disable (0) IPv6 on this interface (Barrier Braker and later only) |
 | ''​accept_ra''​ | boolean | no | ''​1''​ for protocol ''​dhcp'',​ else ''​0''​ | **deprecated:​** Specifies whether to accept IPv6 Router Advertisements on this interface (On Attitude Adjustment 12.09 and earlier versions) | | ''​accept_ra''​ | boolean | no | ''​1''​ for protocol ''​dhcp'',​ else ''​0''​ | **deprecated:​** Specifies whether to accept IPv6 Router Advertisements on this interface (On Attitude Adjustment 12.09 and earlier versions) |
 | ''​send_rs''​ | boolean | no | ''​1''​ for protocol ''​static'',​ else ''​0''​ | **deprecated:​** Specifies whether to send Router Solicitations on this interface (On Attitude Adjustment 12.09 and earlier versions) | | ''​send_rs''​ | boolean | no | ''​1''​ for protocol ''​static'',​ else ''​0''​ | **deprecated:​** Specifies whether to send Router Solicitations on this interface (On Attitude Adjustment 12.09 and earlier versions) |
Line 296: Line 300:
 | ''​defaultroute''​ | boolean | no | ''​1''​ | Whether to create an IPv6 default route over the tunnel | | ''​defaultroute''​ | boolean | no | ''​1''​ | Whether to create an IPv6 default route over the tunnel |
 | ''​ttl''​ | integer | no | ''​64''​ | TTL used for the tunnel interface | | ''​ttl''​ | integer | no | ''​64''​ | TTL used for the tunnel interface |
 +| ''​tos''​ | string | no | //(none)// | Type Of Service : either "​inherit"​ (the outer header inherits the value of the inner header) or an hexadecimal value (Chaos Calmer and later only) |
 | ''​mtu''​ | integer | no | ''​1280''​ | MTU used for the tunnel interface | | ''​mtu''​ | integer | no | ''​1280''​ | MTU used for the tunnel interface |
 | ''​tunnelid''​ | integer | no | //(none)// | HE.net global tunnel ID (used for endpoint update) | | ''​tunnelid''​ | integer | no | //(none)// | HE.net global tunnel ID (used for endpoint update) |
Line 323: Line 328:
 | ''​server''​ | string | no | ''​tic.sixxs.net''​ | Tunnel setup server to use | | ''​server''​ | string | no | ''​tic.sixxs.net''​ | Tunnel setup server to use |
 | ''​ip6addr''​ | IPv6 address (CIDR) | no | //(none)// | Local IPv6 address delegated to the tunnel endpoint (not necessary) | | ''​ip6addr''​ | IPv6 address (CIDR) | no | //(none)// | Local IPv6 address delegated to the tunnel endpoint (not necessary) |
 +| ''​ntpsynctimeout''​ | integer | no | ''​90''​ | Wait for NTP sync that many seconds ([[https://​github.com/​openwrt/​packages/​pull/​579|available since aiccu 20070115-12]]) ​ |
 +| ''​tunnelid''​ | integer | no | //(none)// | TIC server tunnel ID |
 | ''​ip6prefix''​ | IPv6 prefix | no | //(none)// | Routed IPv6 prefix for downstream interfaces | | ''​ip6prefix''​ | IPv6 prefix | no | //(none)// | Routed IPv6 prefix for downstream interfaces |
 | ''​defaultroute''​ | boolean | no | ''​1''​ | Whether to create an IPv6 default route over the tunnel | | ''​defaultroute''​ | boolean | no | ''​1''​ | Whether to create an IPv6 default route over the tunnel |
Line 342: Line 349:
 | ''​defaultroute''​ | boolean | no | ''​1''​ | Whether to create an IPv6 default route over the tunnel | | ''​defaultroute''​ | boolean | no | ''​1''​ | Whether to create an IPv6 default route over the tunnel |
 | ''​ttl''​ | integer | no | ''​64''​ | TTL used for the tunnel interface | | ''​ttl''​ | integer | no | ''​64''​ | TTL used for the tunnel interface |
 +| ''​tos''​ | string | no | //(none)// | Type Of Service : either "​inherit"​ (the outer header inherits the value of the inner header) or an hexadecimal value (Chaos Calmer and later only) |
 | ''​mtu''​ | integer | no | ''​1280''​ | MTU used for the tunnel interface | | ''​mtu''​ | integer | no | ''​1280''​ | MTU used for the tunnel interface |
 | ''​metric''​ | integer | no | ''​0''​ | Specifies the default route metric to use | | ''​metric''​ | integer | no | ''​0''​ | Specifies the default route metric to use |
Line 365: Line 373:
 | ''​defaultroute''​ | boolean | no | ''​1''​ | Whether to create an IPv6 default route over the tunnel | | ''​defaultroute''​ | boolean | no | ''​1''​ | Whether to create an IPv6 default route over the tunnel |
 | ''​ttl''​ | integer | no | ''​64''​ | TTL used for the tunnel interface | | ''​ttl''​ | integer | no | ''​64''​ | TTL used for the tunnel interface |
 +| ''​tos''​ | string | no | //(none)// | Type Of Service : either "​inherit"​ (the outer header inherits the value of the inner header) or an hexadecimal value (Chaos Calmer and later only) |
 | ''​mtu''​ | integer | no | ''​1280''​ | MTU used for the tunnel interface | | ''​mtu''​ | integer | no | ''​1280''​ | MTU used for the tunnel interface |
  
Line 422: Line 431:
 === Common options for GRE protocols === === Common options for GRE protocols ===
  
-:!: The package ''​gre''​ must be installed to use GRE.+:!: The package ''​gre''​ must be installed to use GRE. Additionally,​ you need ''​kmod-gre''​ and/or ''​kmod-gre6''​.
  
 GRE support has been introduced in Barrier Breaker. ​ Four protocols are defined: "​gre",​ "​gretap",​ "​grev6",​ and "​grev6tap"​. GRE support has been introduced in Barrier Breaker. ​ Four protocols are defined: "​gre",​ "​gretap",​ "​grev6",​ and "​grev6tap"​.
Line 434: Line 443:
 | ''​tunlink''​ | logical interface name | no | //(none)// | Bind the tunnel to this interface (''​dev''​ option of "ip tunnel"​) | | ''​tunlink''​ | logical interface name | no | //(none)// | Bind the tunnel to this interface (''​dev''​ option of "ip tunnel"​) |
 | ''​zone''​ | zone name | no | "​wan"​ | Firewall zone to which the interface will be added | | ''​zone''​ | zone name | no | "​wan"​ | Firewall zone to which the interface will be added |
 +| ''​tos''​ | string | no | //(none)// | Type of Service (IPv4), Traffic Class (IPv6): either "​inherit"​ (the outer header inherits the value of the inner header) or an hexadecimal value (Chaos Calmer and later only) | 
 | ''​ikey''​ | integer | no | 0 | key for incoming packets | | ''​ikey''​ | integer | no | 0 | key for incoming packets |
 | ''​okey''​ | integer | no | 0 | key for outgoing packets | | ''​okey''​ | integer | no | 0 | key for outgoing packets |
Line 465: Line 475:
  
 ^ Name ^ Type ^ Required ^ Default ^ Description ^ ^ Name ^ Type ^ Required ^ Default ^ Description ^
-| ''​ip6addr''​ |     +| ''​ip6addr''​ | IPv6 address ​no WAN IP Local endpoint ​
-| ''​peer6addr''​ |     +| ''​peer6addr''​ | IPv6 address ​yes //​(none)// ​Remote endpoint ​
-| ''​weakif''​ |     |+| ''​weakif''​ | logical interface name no ''​lan'' ​Logical network from which to select the local endpoint if ip6addr parameter is empty and no WAN IP is available ​|
  
 === Protocol "​grev6tap"​ (Ethernet GRE tunnel over IPv6) === === Protocol "​grev6tap"​ (Ethernet GRE tunnel over IPv6) ===
Line 474: Line 484:
  
 ^ Name ^ Type ^ Required ^ Default ^ Description ^ ^ Name ^ Type ^ Required ^ Default ^ Description ^
-| ''​ip6addr''​ |     +| ''​ip6addr''​ | IPv6 address ​no WAN IP Local endpoint ​
-| ''​peer6addr''​ |     +| ''​peer6addr''​ | IPv6 address ​yes //​(none)// ​Remote endpoint ​
-| ''​weakif''​ |     +| ''​weakif''​ | logical interface name no ''​lan'' ​Logical network from which to select the local endpoint if ip6addr is empty and no WAN IP is available ​
-| ''​network''​ |     |+| ''​network''​ | logical interface name no //​(none)// ​Logical network to which the tunnel will be added (bridged) ​|
  
 ==== ATM Bridges (Ethernet over ATM AAL5) ==== ==== ATM Bridges (Ethernet over ATM AAL5) ====
Line 550: Line 560:
 Basically create an '​interface'​ section per IP, but alias interfaces may NOT be of type bridge 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 non-bridged interfaces (physdev ​, that is physical interfaces) 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).   * 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).
  
Line 608: Line 618:
 | ''​mtu''​ | number | no | //interface MTU// | Defines a specific MTU for this route | | ''​mtu''​ | number | no | //interface MTU// | Defines a specific MTU for this route |
 | ''​table''​ | routing table | no | //(none)// | Defines the table ID to use for the route. The ID can be either a numeric table index ranging from 0 to 65535 or a symbolic alias declared in /​etc/​iproute2/​rt_tables. The special aliases local (255), main (254) and default (253) are recognized as well | | ''​table''​ | routing table | no | //(none)// | Defines the table ID to use for the route. The ID can be either a numeric table index ranging from 0 to 65535 or a symbolic alias declared in /​etc/​iproute2/​rt_tables. The special aliases local (255), main (254) and default (253) are recognized as well |
 +| ''​source''​ | ip address | no | //(none)// | The preferred source address when sending to destinations covered by the target |
 +| ''​onlink''​ | boolean | no | ''​0''​ | When enabled gateway is on link even if the gateway does not match any interface prefix (Barrier Braker and later only) |
 +| ''​type''​ | string | no | ''​unicast''​ | One of the types outlined in the Routing Types table below (Barrier Braker and later only) |
  
 ==== IPv6 Routes ==== ==== IPv6 Routes ====
Line 633: Line 646:
 | ''​mtu''​ | number | no | //interface MTU// | Defines a specific MTU for this route | | ''​mtu''​ | number | no | //interface MTU// | Defines a specific MTU for this route |
 | ''​table''​ | routing table | no | //(none)// | Defines the table ID to use for the route. The ID can be either a numeric table index ranging from 0 to 65535 or a symbolic alias declared in /​etc/​iproute2/​rt_tables. The special aliases local (255), main (254) and default (253) are recognized as well | | ''​table''​ | routing table | no | //(none)// | Defines the table ID to use for the route. The ID can be either a numeric table index ranging from 0 to 65535 or a symbolic alias declared in /​etc/​iproute2/​rt_tables. The special aliases local (255), main (254) and default (253) are recognized as well |
 +| ''​source''​ | ip address | no | //(none)// | The preferred source address when sending to destinations covered by the target |
 +| ''​onlink''​ | boolean | no | ''​0''​ | When enabled gateway is on link even if the gateway does not match any interface prefix (Barrier Braker and later only) |
 +| ''​type''​ | string | no | ''​unicast''​ | One of the types outlined in the Routing Types table below (Barrier Braker and later only) |
 +
 +=== Routing Types ===
 +
 +^ Type ^ Description ^
 +| ''​local''​ |  |
 +| ''​broadcast''​ |  |
 +| ''​anycast''​ |  |
 +| ''​multicast''​ |  |
 +| ''​unicast''​ |  |
  
 ==== IP rules ==== ==== IP rules ====
Line 887: Line 912:
         option '​forward' ​    '​ACCEPT' ​   # Important         option '​forward' ​    '​ACCEPT' ​   # Important
         option '​output' ​     '​ACCEPT'</​code>​         option '​output' ​     '​ACCEPT'</​code>​
 +
 +==== Static addressing of a GRE tunnel ====
 +
 +Create a GRE tunnel with static address 10.42.0.253/​30,​ adding it to an existing firewall zone called ''​tunnels'':​
 +
 +<​code>​
 +config interface mytunnel ​                
 +        option proto    gre            ​
 +        option zone     ​tunnels ​                               ​
 +        option peeraddr 198.51.100.42 ​          
 +                                                            ​
 +config interface mytunnel_addr ​                                                     ​
 +        option proto    static ​                                    
 +        option ifname ​  ​@mytunnel ​                            
 +        option ipaddr ​  ​10.42.0.253 ​                      
 +        option netmask ​ 255.255.255.252 ​                    
 +        # Fixes IPv6 multicast (long-standing bug in kernel).
 +        # Useful if you run Babel or OSPFv3.
 +        option ip6addr ​ '​fe80::​42/​64'​
 +</​code>​
  
 ===== Network management ===== ===== Network management =====
Line 936: Line 981:
   option ip6addr fdca:​cdef::​1/​64   option ip6addr fdca:​cdef::​1/​64
 </​code>​ </​code>​
-More info at [[https://​dev.openwrt.org/​ticket/​2829#​comment:​7]] ​http://​pracandajr.blogspot.co.uk/​.+More info at [[https://​dev.openwrt.org/​ticket/​2829#​comment:​7]].
doc/uci/network.1408355083.txt.bz2 · Last modified: 2014/08/18 11:44 by steven