more portability fixes and a prereq check for gnu tar
[openwrt.git] / docs / network.txt
1 Network configuration in buildroot-ng
2
3
4 The network configuration in buildroot-ng is stored in /etc/config/network
5 and is divided into interface configurations.
6 Each interface configuration either refers directly to an ethernet/wifi
7 interface (eth0, wl0, ..) or to a bridge containing multiple interfaces.
8 It looks like this:
9
10 config interface "lan"
11 option ifname "eth0"
12 option proto "static"
13 option ipaddr "192.168.1.1"
14 option netmask "255.255.255.0"
15 option gateway "192.168.1.254"
16 option dns "192.168.1.254"
17
18 "ifname" specifies the Linux interface name.
19 If you want to use bridging on one or more interfaces, set "ifname" to a list
20 of interfaces and add:
21 option type "bridge"
22
23 It is possible to use VLAN tagging on an interface simply by adding the VLAN IDs
24 to it, e.g. "eth0.1". These can be nested as well.
25
26 This sets up a simple static configuration for eth0. "proto" specifies the
27 'protocol' used for the interface. The default image usually provides 'none'
28 'static', 'dhcp' and 'pppoe'. Others can be added by installing additional
29 packages.
30
31 When using the 'static' method like in the example, the options "ipaddr" and
32 "netmask" are mandatory, while "gateway" and "dns" are optional.
33 DHCP currently only accepts "ipaddr" (IP address to request from the server)
34 and "hostname" (client hostname identify as) - both are optional.
35
36 PPP based protocols (pppoe, pptp, ...) accept these options:
37 username:
38 The PPP username (usually with PAP authentication)
39 password:
40 The PPP password
41 keepalive:
42 Ping the PPP server (using LCP). The value of this option
43 specifies the maximum number of failed pings before reconnecting.
44 The ping interval defaults to 5, but can be changed by appending
45 ",<interval>" to the keepalive value
46 demand:
47 Use Dial on Demand (value specifies the maximum idle time)
48
49 (pptp)
50 server: The remote pptp server IP
51
52 For all protocol types, you can also specify the MTU by using the "mtu" option.
53
54
55
56
57 Setting up the switch (currently broadcom only)
58
59
60 The switch configuration is set by adding a 'switch' config section.
61 Example:
62
63 config switch eth0
64 option vlan0 "1 2 3 4 5*"
65 option vlan1 "0 5"
66
67 On Broadcom hardware the section name needs to be eth0, as the switch driver
68 does not detect the switch on any other physical device.
69 Every vlan option needs to have the name vlan<n> where <n> is the VLAN number
70 as used in the switch driver.
71 As value it takes a list of ports with these optional suffixes:
72
73 '*': Set the default VLAN (PVID) of the Port to the current VLAN
74 'u': Force the port to be untagged
75 't': Force the port to be tagged
76
77 The CPU port defaults to tagged, all other ports to untagged.
78 On Broadcom hardware the CPU port is always 5. The other ports may vary with
79 different hardware.
This page took 0.050208 seconds and 5 git commands to generate.