source: trunk/debian/packages/debwrt-net/trunk/etc/network/interfaces.octeon.erlite @ 914

Last change on this file since 914 was 914, checked in by amain, 6 years ago

debwrt-net: various changes and new example configuration files

File size: 2.7 KB
Line 
1# DebWrt octeon interfaces file
2#
3# Tweaking may be required to match your hardware. This file is
4# provided as an example. Use ifup/down -va (--no-scripts) to
5# debug.
6#
7# * ifup   runs the commands/sections top-down
8# * ifdown runs the commands/sections bottom-up
9#
10# Johan van Zoomeren <amain@debwrt.net>, January 2017
11
12auto lo
13iface lo inet loopback
14
15# Rename interfaces to wan/lan*
16auto pre
17iface pre inet manual
18    pre-up    /etc/firewall/firewall.sh start
19    pre-up    /sbin/ip link set dev eth0 down
20    pre-up    /sbin/ip link set dev eth1 down
21    pre-up    /sbin/ip link set dev eth2 down
22    pre-up    /sbin/ip link set dev eth0 name wan
23    pre-up    /sbin/ip link set dev eth1 name lan1
24    pre-up    /sbin/ip link set dev eth2 name lan2
25    post-down /sbin/ip link set dev lan2 name eth2
26    post-down /sbin/ip link set dev lan1 name eth1
27    post-down /sbin/ip link set dev wan  name eth0
28    post-down /etc/firewall/firewall.sh stop
29
30# Starting DHCP daemon manually to prevent long delays
31# during boot in case an unplugged networkd cable or non
32# responsive DHCP server.
33auto wan
34iface wan inet manual
35    pre-up    /sbin/ifconfig wan up
36    pre-up    start-stop-daemon --start  \
37                                --oknodo \
38                                --quiet  \
39                                --pidfile /var/run/dhclient.wan.pid \
40                                --exec /sbin/dhclient \
41                                  -- -v -pf /var/run/dhclient.wan.pid -lf /var/lib/dhcp/dhclient.wan.leases -nw wan
42    post-down /sbin/ifconfig wan down
43    post-down start-stop-daemon --stop \
44                                --signal HUP \
45                                --pidfile /var/run/dhclient.wan.pid \
46                                --exec /sbin/dhclient
47
48
49auto lan1
50iface lan1 inet manual
51    pre-up    /sbin/ifconfig lan1 up
52    post-down /sbin/ifconfig lan1 down
53
54auto lan2
55iface lan2 inet manual
56    pre-up    /sbin/ifconfig lan2 up
57    post-down /sbin/ifconfig lan2 down
58
59
60auto br-lan
61iface br-lan inet static
62    bridge-ports   lan1 lan2
63    bridge-stp     off
64    bridge-maxwait 0
65    address        192.168.1.1
66    netmask        255.255.255.0
67    post-up   start-stop-daemon --start  \
68                                --oknodo \
69                                --quiet  \
70                                --pidfile /var/run/dnsmasq.br-lan.pid \
71                                --exec /usr/sbin/dnsmasq \
72                                  -- --pid-file=/var/run/dnsmasq.br-lan.pid \
73                                     --conf-file=/etc/dnsmasq-debwrt.conf
74    pre-down  start-stop-daemon --stop \
75                                --pidfile /var/run/dnsmasq.br-lan.pid \
76                                --exec /usr/sbin/dnsmasq
77
Note: See TracBrowser for help on using the repository browser.