This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
documentation:configuration:config_files:config_network [2015/05/13 10:35] admin |
documentation:configuration:config_files:config_network [2015/05/18 10:37] admin |
||
---|---|---|---|
Line 10: | Line 10: | ||
| [[config_network#switch_vlan|switch_vlan]] | switch-vlan configuration | | | [[config_network#switch_vlan|switch_vlan]] | switch-vlan configuration | | ||
| [[config_network#interface|interface]] | logical networks | | | [[config_network#interface|interface]] | logical networks | | ||
+ | | [[config_network#route|route]] | static routing | | ||
+ | | [[config_network#rule|rule]] | policy based routing | | ||
==== globals ==== | ==== globals ==== | ||
Line 27: | Line 29: | ||
^ Name ^ Type ^ Required ^ Default ^ Description ^ | ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ||
- | | ''name'' | string | | | | | + | | ''enable'' | boolean | yes | | | |
- | | ''enable'' | boolean | | | | | + | | ''enable_vlan'' | boolean | no | | | |
- | | ''enable_vlan'' | boolean | | | | | + | | ''reset'' | boolean | no | | | |
- | | ''reset'' | boolean | | | | | + | |
==== switch_vlan ==== | ==== switch_vlan ==== | ||
Line 167: | Line 168: | ||
''forward_dhcp'' | boolean | no | ''1'' | Enables forwarding of DHCP requests and responses, ''0'' disables it | | ''forward_dhcp'' | boolean | no | ''1'' | Enables forwarding of DHCP requests and responses, ''0'' disables it | | ||
- | ===== IPv4 Routes ===== | + | ===== route ===== |
Static //IPv4 routes// can be defined on specific interfaces using ''route'' sections. As for //aliases//, multiple sections can be attached to an interface. | Static //IPv4 routes// can be defined on specific interfaces using ''route'' sections. As for //aliases//, multiple sections can be attached to an interface. | ||
Line 203: | Line 204: | ||
</file> | </file> | ||
and it will be recognized by the uci parser but not applied by the ''/etc/init.d/network'' script. | and it will be recognized by the uci parser but not applied by the ''/etc/init.d/network'' script. | ||
+ | |||
+ | ===== rule ===== | ||
+ | |||
+ | Rules are required to define policy based routing. | ||
+ | |||
+ | |||
+ | Example: | ||
+ | <code> | ||
+ | config rule | ||
+ | option mark '0xFF' | ||
+ | option in 'lan' | ||
+ | option dest '172.16.0.0/16' | ||
+ | option lookup '100' | ||
+ | </code> | ||
+ | |||
+ | |||