Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:user-guide:base-system:network:basic-ipv4-configuration [2018/02/17 16:11] – bobafetthotmail | docs:guide-user:network:ipv4:start [2021/11/27 17:36] (current) – split to docs:guide-user:network:ipv4:configuration vgaetera | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== IPv4 ==== | + | ====== IPv4 ====== |
| + | {{pagequery> | ||
| - | Due to obvious reasons, IPv4 is fully supported in default firmware. | ||
| - | |||
| - | ==== Upstream configuration for WAN-Interfaces ==== | ||
| - | 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. | ||
| - | |||
| - | < | ||
| - | ... | ||
| - | network.wan=interface | ||
| - | network.wan.ifname=' | ||
| - | network.wan.proto=' | ||
| - | ...</ | ||
| - | |||
| - | < | ||
| - | ... | ||
| - | config interface ' | ||
| - | option ifname ' | ||
| - | option proto ' | ||
| - | ...</ | ||
| - | |||
| - | === Protocol " | ||
| - | ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | |||
| - | === Protocol " | ||
| - | ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ||
| - | | ''< | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | |||
| - | :!: These parameters are handled partially by netifd (in '' | ||
| - | |||
| - | 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/ | ||
| - | < | ||
| - | config interface wan | ||
| - | option ifname eth0 | ||
| - | option proto static | ||
| - | ..other options.. | ||
| - | | ||
| - | config interface wan2 | ||
| - | option ifname eth1 | ||
| - | option proto dhcp | ||
| - | ..other options.. | ||
| - | </ | ||
| - | 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 " | ||
| - | If we have: | ||
| - | < | ||
| - | config interface wan | ||
| - | option ifname eth0 | ||
| - | option proto dhcp | ||
| - | ..other options.. | ||
| - | | ||
| - | config interface wan2 | ||
| - | option ifname eth1 | ||
| - | option proto static | ||
| - | ..other options.. | ||
| - | </ | ||
| - | 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, | ||
| - | |||
| - | < | ||
| - | ... | ||
| - | network.lan=interface | ||
| - | network.lan.type=' | ||
| - | network.lan.ifname=' | ||
| - | network.lan.proto=' | ||
| - | network.lan.netmask=' | ||
| - | network.lan.ip6assign=' | ||
| - | network.lan.ipaddr=' | ||
| - | ...</ | ||
| - | |||
| - | < | ||
| - | ... | ||
| - | config interface ' | ||
| - | option type ' | ||
| - | option ifname ' | ||
| - | option proto ' | ||
| - | option netmask ' | ||
| - | option ip6assign ' | ||
| - | option ipaddr ' | ||
| - | |||
| - | ...</ | ||
| - | |||
| - | ===== Examples ===== | ||
| - | |||
| - | Below are a few examples for special, non-standard interface configurations. | ||
| - | |||
| - | ==== Bridge without IP ==== | ||
| - | |||
| - | < | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | |||
| - | ==== DHCP without default gateway ==== | ||
| - | |||
| - | < | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | </ | ||
| - | |||
| - | ==== DHCP and IPv6 ==== | ||
| - | |||
| - | < | ||
| - | option ' | ||
| - | option ' | ||
| - | |||
| - | config ' | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | |||
| - | ==== Static IP configuration with multiple dnses ==== | ||
| - | < | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | 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 ''/ | ||
| - | ==== Static IP configuration and default gateway with non-zero metric ==== | ||
| - | |||
| - | < | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | |||
| - | config ' | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | option ' | ||
| - | | ||
| - | ===== Multiple IP addresses ===== | ||
| - | Assigning multiple ip addresses to the same interface: | ||
| - | < | ||
| - | config interface foo | ||
| - | option ifname eth1 | ||
| - | list ipaddr 10.8.0.1/24 | ||
| - | list ipaddr 10.9.0.1/24 | ||
| - | list ip6addr fdca: | ||
| - | list ip6addr fdca: | ||
| - | </ | ||
| - | Specifying multiple interfaces sharing the same device: | ||
| - | < | ||
| - | config interface foo | ||
| - | option ifname eth1 | ||
| - | option ipaddr 10.8.0.1 | ||
| - | option netmask 255.255.255.0 | ||
| - | option ip6addr fdca: | ||
| - | |||
| - | config interface foo2 | ||
| - | option ifname eth1 | ||
| - | option ipaddr 10.9.0.1 | ||
| - | option netmask 255.255.255.0 | ||
| - | option ip6addr fdca: | ||
| - | </ | ||
| - | Originally posted at [[https:// | ||