Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## AC3200 Port Mappings
- ## port 4 physical / port 1 internal
- ## port 3 physical / port 2 internal
- ## port 2 physical / port 3 internal
- ## port 1 physical / port 4 internal
- ## LACP/LAG on AC3200
- ## nvram edits for ports 3 & 4 router side
- nvram set vlan4ports="2 5t"
- nvram set vlan5ports="1 5t"
- nvram set vlan4hwname=et0
- nvram set vlan5hwname=et0
- nvram commit
- ## services-start edits for basic lacp profile setup
- #!/bin/sh
- # Logger Services
- logger -t "($(basename $0))" $$ Bonding commencing....
- #Pre-Bonding
- robocfg vlan 1 ports "3 4 5*"
- #Bonding
- sleep 1s
- modprobe bonding mode=802.3ad miimon=50 lacp_rate=fast xmit_hash_policy=1
- sleep 1s
- ip link set bond0 up
- sleep 1s
- echo +vlan4 > /sys/class/net/bond0/bonding/slaves
- echo +vlan5 > /sys/class/net/bond0/bonding/slaves
- brctl addif br0 bond0
- #Post-Bonding
- sleep 2s
- logger -t "($(basename $0))" $$ Bonding Status....
- cat /proc/net/bonding/bond0 | sed 's/^/+++ /' | logger
- ## firewall-start edits
- #!/bin/sh
- # Bonding IPtables rules
- iptables -I INPUT -i vlan4 -j ACCEPT
- iptables -I INPUT -i vlan5 -j ACCEPT
- iptables -I INPUT -i bond0 -j ACCEPT
- # Firewall/IPtables Performance Tweak for Bond0 to be placed right after the above bonding rules and before your custom rules - if any.
- iptables -D INPUT `iptables --line-numbers -nL INPUT | grep ESTABLISHED | tail -n1 | awk '{print $1}'`
- iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement