Differences
This shows you the differences between two versions of the page.
|
doc:uci:network6 [2012/11/30 10:12] steven |
doc:uci:network6 [2013/05/01 13:49] (current) hnyman |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== IPv6 network configuration ====== | + | ===== IPv6 configuration reference ===== |
| - | :!: The package ''ipv6-support'' must be installed to use this functionality. | + | * See [[doc/uci/network#protocol.static]] for static configuration |
| + | * See [[doc/uci/network#protocol.dhcpv6]] for DHCPv6 configuration | ||
| + | * See [[doc/uci/6relayd]] for RD & DHCPv6 server / relay configuration. | ||
| - | The IPv6 network configuration is located in ''/etc/config/network6''. | + | NOTE: This page applies only to trunk (Barrier Breaker) and later Openwrt versions. The advice is not valid for Backfire 10.03 or Attitude Adjustment 12.09. For advice regardind them please read the old [[doc/howto/ipv6]] article. |
| + | |||
| + | ==== Native IPv6 connection ==== | ||
| + | For an uplink with native IPv6-connectivity you can use the following settings. It will work both for uplinks supporting Prefix Delegation and those that don't. | ||
| + | |||
| + | /etc/config/network | ||
| <code> | <code> | ||
| config interface wan | config interface wan | ||
| - | option mode upstream | + | option ipv6 1 # only required for PPP-based protocols |
| - | option ula_prefix auto | + | ... |
| - | option request_prefix auto | + | |
| - | option prefix_fallback relay | + | |
| - | option peerdns 1 | + | |
| + | config interface wan6 | ||
| + | option ifname @wan | ||
| + | option proto dhcpv6 | ||
| config interface lan | config interface lan | ||
| - | option mode downstream | + | option proto static |
| - | option advertise_prefix 64 | + | option ip6assign 64 |
| - | option relay_master wan | + | ... |
| + | </code> | ||
| + | ==== SixXS static 6in4 tunnel ==== | ||
| - | config interface 6in4 | + | For a "static" tunnel (without aiccu) the configuration is very simple: |
| - | option mode static | + | - For /etc/config/network add the tunnel interface. To the LAN interface add the ip6assign option. |
| - | list static_prefix 2001:DB8::/48 | + | |
| + | With those settings, the LAN interface will get automatically assigned the ::1 address from the routed /64 prefix and everything will just work. | ||
| + | |||
| + | :!: For traffic to flow correctly, you need set up the firewall correctly. Add the tunnel interface ('sixxs' in this example) to the wan firewall-zone.(Additionally make sure that the ping checks from the tunnel endpoint will get through.) | ||
| + | |||
| + | /etc/config/network: | ||
| + | <code> | ||
| + | config 'interface' 'lan' | ||
| + | option 'proto' 'static' | ||
| + | option 'ip6assign' '64' | ||
| + | ... | ||
| + | config 'interface' 'sixxs' | ||
| + | option 'proto' '6in4' | ||
| + | option 'mtu' '1424' | ||
| + | option 'ttl' '64' | ||
| + | option 'peeraddr' '62.12.34.56' | ||
| + | option 'ip6addr' '2001:DB8:2345:EFGH::2/64' | ||
| + | option 'ip6prefix' '2001:DB8:1234:ABCD::/64' # Your routed prefix | ||
| </code> | </code> | ||
| - | This is an example configuration file for IPv6 which shows a good default for a wan, lan and 6in4-tunnel interface. | ||
| - | The network6 configuration file is responsible for defining the IPv6 operation of network interfaces defines in /etc/config/network. | ||
| - | **''Hint:''** After editing and saving ''/etc/config/network6'' you need to execute | + | |
| + | ==== HEnet 6in4 tunnel ==== | ||
| + | |||
| + | Also for a Hurricane Electric's tunnel the configuration is very simple: | ||
| + | - For /etc/config/network add the tunnel interface. To the LAN interface add the ip6assign option. | ||
| + | |||
| + | With those settings, the LAN interface will get automatically assigned the ::1 address from the routed /64 prefix and everything will just work. | ||
| + | |||
| + | :!: For traffic to flow correctly, you need set up the firewall correctly. Add the tunnel interface ('henet' in this example) to the wan firewall-zone. | ||
| + | |||
| + | /etc/config/network: | ||
| <code> | <code> | ||
| - | /etc/init.d/network restart | + | config 'interface' 'lan' |
| + | option 'proto' 'static' | ||
| + | option ip6assign 64 | ||
| + | ... | ||
| + | config 'interface' 'henet' | ||
| + | option 'proto' '6in4' | ||
| + | option 'mtu' '1424' | ||
| + | option 'ttl' '64' | ||
| + | option 'peeraddr' '62.12.34.56' | ||
| + | option 'ip6addr' '2001:DB8:2222:EFGH::2/64' | ||
| + | option 'ip6prefix' '2001:DB8:1234:ABCD::/64' # Your routed prefix | ||
| + | option tunnelid '123456' | ||
| + | option username 'tb1234567890.12345678' | ||
| + | option password 'password' | ||
| </code> | </code> | ||
| - | or use ifdown and ifup to stop and restart the network before any changes take effect. Rebooting the router will have the same effect but is not necessary. | ||
| - | ===== Interfaces ===== | + | ==== 6rd configuration ==== |
| - | Sections of type interfaces define the IPv6 behaviour for the logical network in /etc/config/network with the same name. Defining a section in network6 which does not have a counterpart in network will have no effect. IPv6 operation is always enabled whenever the referenced network is enabled. | + | 6rd configuration is similar to the other tunnel protocols except that the IPv6 prefixes are automatically calculated and need not be define with ''ip6prefix''. |
| + | Make sure to ask your ISP for the correct values for peeraddr, ip6prefix, ip6prefixlen and ip4prefixlen. | ||
| - | A minimal interface declaration consists of the following lines: | + | With these settings, the LAN interface will get automatically assigned the ::1 address from the routed-prefix and everything will just work. |
| - | <code>config 'interface' 'wan' | + | :!: For traffic to flow correctly, you need set up the firewall correctly. Add the tunnel interface ('6rd' in this example) to the wan firewall-zone. |
| - | option 'mode' 'upstream'</code> | + | |
| - | * ''wan'' is the //logical interface name// of the corresponding network interface | + | /etc/config/network: |
| - | * ''upstream'' specifies the //mode of operation//, upstream in this example | + | <code> |
| + | config 'interface' 'lan' | ||
| + | option 'proto' 'static' | ||
| + | option ip6assign 64 | ||
| + | ... | ||
| + | config 'interface' '6rd' | ||
| + | option 'proto' '6rd' | ||
| + | option peeraddr '192.0.2.1' | ||
| + | option ip6prefix '2123::' | ||
| + | option ip6prefixlen '16' | ||
| + | option ip4prefixlen '0' | ||
| + | </code> | ||
| - | The //mode of operation// may be one of the following: | ||
| - | ^ Mode ^ Description ^ | + | ==== 6to4 tunnel ==== |
| - | | ''static'' | Static configuration with fixed prefixes and / or ULA prefix only | | + | 6to4 configuration is similar to the other tunnel protocols except that the IPv6 prefixes are automatically calculated and need not be define with ''ip6prefix''. |
| - | | ''upstream'' | Adresses, prefixes and configuration information are acquired from an upstream router via RD and / or DHCPv6 | | + | |
| - | | ''downstream'' | Adresses and configuration information are distributed for connected devices | | + | |
| - | Depending on the used //mode of operation// several options may or may not be available. This is indicated by the column //Modes//. | + | With these settings, the LAN interface will get automatically assigned the ::1 address from the routed-prefix and everything will just work. |
| - | ^ Name ^ Type ^ Modes ^ Default ^ Description ^ | + | :!: For traffic to flow correctly, you need set up the firewall correctly. Add the tunnel interface ('6to4' in this example) to the wan firewall-zone. |
| - | | ''static_prefix'' | <list of IPv6-prefixes> | static, upstream | //<unset>// | static prefixes that are routed to this interface by an upstream router for distribution to downstream interfaces | | + | |
| - | | ''ula_prefix'' | <unset> or <IPv6-prefix> or "auto" | static, upstream | //<unset>// | <unset>: no ULA prefix \\ <IPv6-prefix>: the local ULA-prefix to distribute if set to a specific prefix \\ "auto": a new ULA prefix is generated when the interface goes up and then saved | | + | /etc/config/network: |
| - | | ''request_prefix'' | "auto" or 8-64 or "no" | upstream | ''auto'' | "auto": the prefix length is chosen by the upstream router \\ 8-64: a prefix of the given length is requested \\ "no": no prefix is requested | | + | <code> |
| - | | ''prefix_fallback'' | <unset> or "relay" | upstream | <unset> | What do when prefix acquisition is enabled and fails or is disabled (''request_prefix'' == "no") \\ <unset>: no fallback \\ "relay": an RD-, DHCPv6- and NDP-Proxy is created for all interfaces in downstream-mode which have ''relay_master'' set to the current interface | | + | config 'interface' 'lan' |
| - | | ''peerdns'' | 0 or 1 | upstream | 0 | 0: don't accept DNS options \\ 1: accept DNS options from upstream router | | + | option 'proto' 'static' |
| - | | ''advertise_prefix'' | 0 or 8-64 | downstream | ''64'' | 0: don't acquire any sub-prefixes \\ 8-64: try to acquire a sub-prefix of certain length from upstream-interfaces | | + | option ip6assign 64 |
| - | | ''relay_master'' | <unset> or <network6 interface> | downstream | ''<unset>'' | <unset>: don't relay to this interface \\ <network6 interface>: the parent network for relaying, a relay is only created under certain conditions (see description of ''prefix_fallback'' above) | | + | ... |
| + | config 'interface' '6to4' | ||
| + | option 'proto' '6to4' | ||
| + | </code> | ||
doc/uci/network6.1354266750.txt.bz2 · Last modified: 2012/11/30 10:12 by steven
