SHARE
TWEET

Untitled

a guest May 22nd, 2016 1,004 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## AC3200 Port Mappings
  2. ## port 4 physical / port 1 internal
  3. ## port 3 physical / port 2 internal
  4. ## port 2 physical / port 3 internal
  5. ## port 1 physical / port 4 internal
  6.  
  7. ## LACP/LAG on AC3200
  8. ## nvram edits for ports 3 & 4 router side
  9. nvram set vlan4ports="2 5t"
  10. nvram set vlan5ports="1 5t"
  11. nvram set vlan4hwname=et0
  12. nvram set vlan5hwname=et0
  13. nvram commit
  14.  
  15. ## services-start edits for basic lacp profile setup
  16. #!/bin/sh
  17.  
  18. # Logger Services
  19. logger -t "($(basename $0))" $$ Bonding commencing....
  20.  
  21. #Pre-Bonding
  22. robocfg vlan 1 ports "3 4 5*"
  23.  
  24. #Bonding
  25. sleep 1s
  26. modprobe bonding mode=802.3ad miimon=50 lacp_rate=fast xmit_hash_policy=1
  27. sleep 1s
  28. ip link set bond0 up
  29. sleep 1s
  30. echo +vlan4 > /sys/class/net/bond0/bonding/slaves
  31. echo +vlan5 > /sys/class/net/bond0/bonding/slaves
  32. brctl addif br0 bond0
  33.  
  34. #Post-Bonding
  35. sleep 2s
  36. logger -t "($(basename $0))" $$ Bonding Status....
  37. cat /proc/net/bonding/bond0 | sed 's/^/+++ /' | logger
  38.  
  39. ## firewall-start edits
  40.  
  41. #!/bin/sh
  42.  
  43. # Bonding IPtables rules
  44. iptables -I INPUT -i vlan4 -j ACCEPT
  45. iptables -I INPUT -i vlan5 -j ACCEPT
  46. iptables -I INPUT -i bond0 -j ACCEPT
  47.  
  48. # Firewall/IPtables Performance Tweak for Bond0 to be placed right after the above bonding rules and before your custom rules - if any.
  49. iptables -D INPUT `iptables --line-numbers -nL INPUT | grep ESTABLISHED | tail -n1 | awk '{print $1}'`
  50. iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top