forked from freifunk-franken/firmware
bsp/wr841n8: configure switch
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
e7bebc212d
commit
c09b57cd9b
|
@ -11,31 +11,31 @@ config 'interface' 'wlanmesh'
|
|||
|
||||
config 'interface' 'mesh'
|
||||
option 'type' 'bridge'
|
||||
option 'ifname' 'eth0.1 wlan0 bat0 tap0'
|
||||
option 'ifname' 'eth1.1 wlan0 bat0 tap0'
|
||||
option 'auto' '1'
|
||||
|
||||
config 'interface' 'wan'
|
||||
option 'ifname' 'eth1'
|
||||
option 'ifname' 'eth0'
|
||||
option 'proto' 'dhcp'
|
||||
|
||||
config 'interface' 'ethmesh'
|
||||
option 'ifname' 'eth0.3'
|
||||
option 'ifname' 'eth1.3'
|
||||
option 'mtu' '1528'
|
||||
|
||||
config 'switch'
|
||||
option 'name' 'eth0'
|
||||
option 'name' 'eth1'
|
||||
option 'reset' '1'
|
||||
option 'enable_vlan' '1'
|
||||
|
||||
#1. und 2. LAN Port
|
||||
config 'switch_vlan'
|
||||
option 'device' 'eth0'
|
||||
option 'device' 'eth1'
|
||||
option 'vlan' '1'
|
||||
option 'ports' '1 2 0t'
|
||||
option 'ports' '1 4 0t'
|
||||
|
||||
#3. und 4. LAN Port
|
||||
config 'switch_vlan'
|
||||
option 'device' 'eth0'
|
||||
option 'device' 'eth1'
|
||||
option 'vlan' '3'
|
||||
option 'ports' '3 4 0t'
|
||||
option 'ports' '3 2 0t'
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
config 'script'
|
||||
option 'version' '25'
|
||||
option 'error_level' '0'
|
||||
option 'logfile' '/var/log/nodewatcher.log'
|
||||
option 'data_file' '/tmp/crawldata/node.data'
|
||||
|
||||
config 'network'
|
||||
option 'mesh_interface' 'br-mesh'
|
||||
option 'client_interfaces' 'wlan0 eth1.1'
|
|
@ -19,17 +19,17 @@ if uci get network.ethmesh.macaddr
|
|||
then
|
||||
echo "MAC for ETH-BATMAN is set already"
|
||||
else
|
||||
echo "Fixing MAC on eth0.3 (ethmesh)"
|
||||
NEW=$(awk -F: '{ printf("%02x:%02x:%02x:%02x:%02x:%02x\n", ("0x"$1)+2, "0x"$2, "0x"$3, "0x"$4, "0x"$5, "0x"$6 ) }' /sys/class/net/eth0/address)
|
||||
echo "Fixing MAC on eth1.3 (ethmesh)"
|
||||
NEW=$(awk -F: '{ printf("%02x:%02x:%02x:%02x:%02x:%02x\n", ("0x"$1)+2, "0x"$2, "0x"$3, "0x"$4, "0x"$5, "0x"$6 ) }' /sys/class/net/eth1/address)
|
||||
uci set network.ethmesh.macaddr=$NEW
|
||||
uci commit
|
||||
ifconfig eth0.3 hw ether $NEW
|
||||
ifconfig eth0.3 down
|
||||
ifconfig eth0.3 up
|
||||
ifconfig eth1.3 hw ether $NEW
|
||||
ifconfig eth1.3 down
|
||||
ifconfig eth1.3 up
|
||||
fi
|
||||
|
||||
batctl if add wlan0-1
|
||||
batctl if add eth0.3
|
||||
batctl if add eth1.3
|
||||
|
||||
# Starting NTP-Client Daemon
|
||||
ntpd -p "fe80::ff:feee:1%br-mesh"
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
kernel.panic=3
|
||||
net.ipv4.conf.default.arp_ignore=1
|
||||
net.ipv4.conf.all.arp_ignore=1
|
||||
net.ipv4.conf.all.forwarding=0
|
||||
net.ipv4.conf.all.send_redirects=0
|
||||
net.ipv4.tcp_ecn=0
|
||||
net.ipv4.tcp_fin_timeout=30
|
||||
net.ipv4.tcp_keepalive_time=120
|
||||
net.ipv4.tcp_syncookies=1
|
||||
net.ipv4.tcp_timestamps=0
|
||||
net.ipv4.netfilter.ip_conntrack_checksum=0
|
||||
net.ipv4.netfilter.ip_conntrack_max=16384
|
||||
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=3600
|
||||
net.ipv4.netfilter.ip_conntrack_udp_timeout=60
|
||||
net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=180
|
||||
net.core.netdev_max_backlog=30
|
||||
net.netfilter.nf_conntrack_checksum=0
|
||||
|
||||
#Controls source route verification
|
||||
net.ipv4.conf.default.rp_filter=1
|
||||
|
||||
#Do not accept source routing
|
||||
net.ipv4.conf.all.accept_source_route=0
|
||||
net.ipv4.conf.all.accept_redirects=0
|
||||
net.ipv4.conf.default.accept_source_route=0
|
||||
net.ipv4.conf.default.accept_redirects=0
|
||||
net.ipv4.icmp_echo_ignore_broadcasts=1
|
||||
net.ipv4.icmp_ignore_bogus_error_responses=1
|
||||
net.ipv4.ip_forward=0
|
||||
# net.ipv6.conf.all.forwarding=1
|
||||
|
||||
# disable bridge firewalling by default
|
||||
net.bridge.bridge-nf-call-arptables=0
|
||||
net.bridge.bridge-nf-call-ip6tables=0
|
||||
net.bridge.bridge-nf-call-iptables=0
|
||||
|
||||
net.ipv6.conf.default.accept_dad=0
|
||||
net.ipv6.conf.default.accept_ra=0
|
||||
net.ipv6.conf.default.accept_redirects=0
|
||||
net.ipv6.conf.all.accept_dad=0
|
||||
net.ipv6.conf.all.accept_ra=1
|
||||
net.ipv6.conf.all.accept_redirects=0
|
||||
|
||||
# Number of Router Solicitations to send until assuming no routers are present.
|
||||
# This is host and not router
|
||||
net.ipv6.conf.default.router_solicitations = 0
|
||||
net.ipv6.conf.all.router_solicitations = 0
|
||||
|
||||
# Accept Router Preference in RA?
|
||||
net.ipv6.conf.default.accept_ra_rtr_pref = 0
|
||||
net.ipv6.conf.all.accept_ra_rtr_pref = 1
|
||||
|
||||
# Learn Prefix Information in Router Advertisement
|
||||
net.ipv6.conf.default.accept_ra_pinfo = 0
|
||||
net.ipv6.conf.all.accept_ra_pinfo = 1
|
||||
|
||||
# Setting controls whether the system will accept Hop Limit settings from a router advertisement
|
||||
net.ipv6.conf.default.accept_ra_defrtr = 0
|
||||
net.ipv6.conf.all.accept_ra_defrtr = 1
|
||||
|
||||
#router advertisements can cause the system to assign a global unicast address to an interface
|
||||
net.ipv6.conf.default.autoconf = 0
|
||||
net.ipv6.conf.all.autoconf = 1
|
||||
|
||||
#how many neighbor solicitations to send out per address?
|
||||
net.ipv6.conf.default.dad_transmits = 3
|
||||
net.ipv6.conf.all.dad_transmits = 3
|
||||
|
||||
# How many global unicast IPv6 addresses can be assigned to each interface?
|
||||
net.ipv6.conf.default.max_addresses = 0
|
||||
net.ipv6.conf.all.max_addresses = 0
|
||||
|
||||
|
||||
# Allow IPv6 RAs on WAN Port
|
||||
net.ipv6.conf.eth0.accept_ra_defrtr = 1
|
||||
net.ipv6.conf.eth0.accept_ra_pinfo = 1
|
||||
net.ipv6.conf.eth0.autoconf = 1
|
||||
net.ipv6.conf.eth0.accept_ra_rtr_pref = 1
|
Loading…
Reference in New Issue