Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. @echo off
  2.  
  3. echo delete interfaces ethernet eth1 vif
  4. echo delete interfaces ethernet eth5 vif
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14. set /a "viffirst=2"
  15. set /a "viflast=255"
  16.  
  17.  
  18. :looper1
  19.  
  20.  
  21. echo set interfaces ethernet eth6 vif %viffirst%
  22. echo set interfaces ethernet eth6 vif %viffirst% address 10.1.%viffirst%.1/24
  23.  
  24. echo set interfaces ethernet eth6 vif %viffirst% firewall local name VLAN_LOCAL
  25. echo set interfaces ethernet eth6 vif %viffirst% firewall out name VLAN_OUT
  26.  
  27. echo set interfaces input ifb%viffirst%
  28. echo set interfaces ethernet eth6 vif %viffirst% redirect ifb%viffirst%
  29. echo set interfaces ethernet eth6 vif %viffirst% traffic-policy out RATECONTROL-DEFAULT
  30.  
  31.  
  32.  
  33. set /a "viffirst=%viffirst%+1"
  34. if %viffirst% leq %viflast% goto looper1
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. set /a "viffirst=256"
  45. set /a "viflast=310"
  46. set /a "ipfirst=0"
  47.  
  48.  
  49. :looper2
  50.  
  51.  
  52. echo set interfaces ethernet eth6 vif %viffirst%
  53. echo set interfaces ethernet eth6 vif %viffirst% address 10.2.%ipfirst%.1/24
  54.  
  55. echo set interfaces ethernet eth6 vif %viffirst% firewall local name VLAN_LOCAL
  56. echo set interfaces ethernet eth6 vif %viffirst% firewall out name VLAN_OUT
  57.  
  58. echo set interfaces input ifb%viffirst%
  59. echo set interfaces ethernet eth6 vif %viffirst% redirect ifb%viffirst%
  60. echo set interfaces ethernet eth6 vif %viffirst% traffic-policy out RATECONTROL-DEFAULT
  61.  
  62.  
  63.  
  64.  
  65. set /a "viffirst=%viffirst%+1"
  66. set /a "ipfirst=%ipfirst%+1"
  67. if %viffirst% leq %viflast% goto looper2
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. echo set interfaces ethernet eth6 vif 1701
  76. echo set interfaces ethernet eth6 vif 1701 address 10.10.0.1/24
  77.  
  78. echo set interfaces ethernet eth6 vif 1702
  79. echo set interfaces ethernet eth6 vif 1702 address 10.0.99.1/24
  80.  
  81. echo set interfaces ethernet eth6 vif 1703
  82. echo set interfaces ethernet eth6 vif 1703 address 192.168.95.1/24
  83.  
  84. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement