Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:user-guide:base-system:network:basic-ipv4-configuration [2018/02/17 16:11] – bobafetthotmail | docs:guide-user:network:ipv4:start [2019/11/21 08:44] – [Downstream configuration for LAN-Interfaces] tpyo ukleinek | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== IPv4 ==== | + | ====== IPv4 ====== |
| Due to obvious reasons, IPv4 is fully supported in default firmware. | Due to obvious reasons, IPv4 is fully supported in default firmware. | ||
| - | ==== Upstream configuration for WAN-Interfaces ==== | + | ===== Upstream configuration for WAN-Interfaces |
| The following sections describe the configuration of IPv4 connections to your ISP or an upstream router. | The following sections describe the configuration of IPv4 connections to your ISP or an upstream router. | ||
| For an uplink with native IPv4 connectivity you can just use the default configuration. | For an uplink with native IPv4 connectivity you can just use the default configuration. | ||
| - | < | + | < |
| + | # uci show network | ||
| ... | ... | ||
| network.wan=interface | network.wan=interface | ||
| network.wan.ifname=' | network.wan.ifname=' | ||
| network.wan.proto=' | network.wan.proto=' | ||
| - | ...</ | + | ... |
| + | </ | ||
| - | < | + | < |
| ... | ... | ||
| config interface ' | config interface ' | ||
| option ifname ' | option ifname ' | ||
| option proto ' | option proto ' | ||
| - | ...</ | + | ... |
| + | </ | ||
| - | === Protocol " | + | ===== Protocol " |
| ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ||
| | '' | | '' | ||
| Line 32: | Line 35: | ||
| | '' | | '' | ||
| - | === Protocol " | + | ===== Protocol " |
| ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ||
| | ''< | | ''< | ||
| Line 48: | Line 51: | ||
| | '' | | '' | ||
| | '' | | '' | ||
| + | | '' | ||
| | '' | | '' | ||
| - | :!: These parameters are handled partially by netifd (in '' | + | :!: These parameters are handled partially by netifd (in '' |
| FIXME Outdated information, | FIXME Outdated information, | ||
| :!: If an interface is configured as dhcp client, the default route received by dhcp will be the only one listed and will remove other default route/ | :!: If an interface is configured as dhcp client, the default route received by dhcp will be the only one listed and will remove other default route/ | ||
| - | < | + | |
| + | < | ||
| config interface wan | config interface wan | ||
| option ifname eth0 | option ifname eth0 | ||
| Line 66: | Line 71: | ||
| ..other options.. | ..other options.. | ||
| </ | </ | ||
| + | |||
| The interface with dhcp comes after (because eth1 comes after eth0 in a lexicografical order) | The interface with dhcp comes after (because eth1 comes after eth0 in a lexicografical order) | ||
| and will overwrite the default routes set up by the interface " | and will overwrite the default routes set up by the interface " | ||
| If we have: | If we have: | ||
| - | < | + | |
| + | < | ||
| config interface wan | config interface wan | ||
| option ifname eth0 | option ifname eth0 | ||
| Line 80: | Line 87: | ||
| ..other options.. | ..other options.. | ||
| </ | </ | ||
| + | |||
| Both default routes set up by wan and wan2 will appear in the routing table. | Both default routes set up by wan and wan2 will appear in the routing table. | ||
| + | ===== Downstream configuration for LAN-Interfaces ===== | ||
| + | For a downlink with IPv4 connectivity you can just use the default configuration, | ||
| - | ==== Downstream configuration for LAN-Interfaces ==== | + | < |
| - | For a downlink with IPv4 connectivity you can just use the default configuration, | + | |
| - | + | ||
| - | < | + | |
| ... | ... | ||
| network.lan=interface | network.lan=interface | ||
| Line 95: | Line 102: | ||
| network.lan.ip6assign=' | network.lan.ip6assign=' | ||
| network.lan.ipaddr=' | network.lan.ipaddr=' | ||
| - | ...</ | + | ... |
| + | </ | ||
| - | < | + | < |
| ... | ... | ||
| config interface ' | config interface ' | ||
| Line 106: | Line 114: | ||
| option ip6assign ' | option ip6assign ' | ||
| option ipaddr ' | option ipaddr ' | ||
| - | + | ... | |
| - | ...</ | + | </ |
| ===== Examples ===== | ===== Examples ===== | ||
| - | |||
| Below are a few examples for special, non-standard interface configurations. | Below are a few examples for special, non-standard interface configurations. | ||
| ==== Bridge without IP ==== | ==== Bridge without IP ==== | ||
| - | + | < | |
| - | < | + | config ' |
| option ' | option ' | ||
| option ' | option ' | ||
| option ' | option ' | ||
| - | option ' | + | option ' |
| + | </ | ||
| ==== DHCP without default gateway ==== | ==== DHCP without default gateway ==== | ||
| - | + | < | |
| - | < | + | config ' |
| option ' | option ' | ||
| option ' | option ' | ||
| Line 130: | Line 138: | ||
| ==== DHCP and IPv6 ==== | ==== DHCP and IPv6 ==== | ||
| - | + | < | |
| - | < | + | config ' |
| option ' | option ' | ||
| option ' | option ' | ||
| Line 138: | Line 146: | ||
| option ' | option ' | ||
| option ' | option ' | ||
| - | option ' | + | option ' |
| + | </ | ||
| - | ==== Static IP configuration with multiple | + | ==== Static IP configuration with multiple |
| - | < | + | < |
| + | config ' | ||
| option ' | option ' | ||
| option ' | option ' | ||
| Line 149: | Line 159: | ||
| list ' | list ' | ||
| </ | </ | ||
| - | :!: the last dns listed will be the first one to be chosen for the name resolution. | ||
| - | :!: LEDE will use the new dns configured only after a reboot or a ''/ | + | :!: The last DNS listed |
| - | ==== Static IP configuration and default gateway with non-zero metric ==== | + | |
| - | < | + | :!: Restart the service to apply the new DNS configuration: |
| + | |||
| + | ==== Static IP configuration and default gateway with non-zero metric ==== | ||
| + | < | ||
| + | config ' | ||
| option ' | option ' | ||
| option ' | option ' | ||
| Line 166: | Line 178: | ||
| option ' | option ' | ||
| option ' | option ' | ||
| - | option ' | + | option ' |
| + | </ | ||
| | | ||
| ===== Multiple IP addresses ===== | ===== Multiple IP addresses ===== | ||
| Assigning multiple ip addresses to the same interface: | Assigning multiple ip addresses to the same interface: | ||
| - | < | + | |
| + | < | ||
| config interface foo | config interface foo | ||
| option ifname eth1 | option ifname eth1 | ||
| Line 178: | Line 192: | ||
| list ip6addr fdca: | list ip6addr fdca: | ||
| </ | </ | ||
| + | |||
| Specifying multiple interfaces sharing the same device: | Specifying multiple interfaces sharing the same device: | ||
| - | < | + | |
| + | < | ||
| config interface foo | config interface foo | ||
| option ifname eth1 | option ifname eth1 | ||
| Line 192: | Line 208: | ||
| option ip6addr fdca: | option ip6addr fdca: | ||
| </ | </ | ||
| + | |||
| Originally posted at [[https:// | Originally posted at [[https:// | ||
| + | |||