Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- echo delete interfaces ethernet eth1 vif
- echo delete interfaces ethernet eth5 vif
- set /a "viffirst=2"
- set /a "viflast=255"
- :looper1
- echo set interfaces ethernet eth6 vif %viffirst%
- echo set interfaces ethernet eth6 vif %viffirst% address 10.1.%viffirst%.1/24
- echo set interfaces ethernet eth6 vif %viffirst% firewall local name VLAN_LOCAL
- echo set interfaces ethernet eth6 vif %viffirst% firewall out name VLAN_OUT
- echo set interfaces input ifb%viffirst%
- echo set interfaces ethernet eth6 vif %viffirst% redirect ifb%viffirst%
- echo set interfaces ethernet eth6 vif %viffirst% traffic-policy out RATECONTROL-DEFAULT
- set /a "viffirst=%viffirst%+1"
- if %viffirst% leq %viflast% goto looper1
- set /a "viffirst=256"
- set /a "viflast=310"
- set /a "ipfirst=0"
- :looper2
- echo set interfaces ethernet eth6 vif %viffirst%
- echo set interfaces ethernet eth6 vif %viffirst% address 10.2.%ipfirst%.1/24
- echo set interfaces ethernet eth6 vif %viffirst% firewall local name VLAN_LOCAL
- echo set interfaces ethernet eth6 vif %viffirst% firewall out name VLAN_OUT
- echo set interfaces input ifb%viffirst%
- echo set interfaces ethernet eth6 vif %viffirst% redirect ifb%viffirst%
- echo set interfaces ethernet eth6 vif %viffirst% traffic-policy out RATECONTROL-DEFAULT
- set /a "viffirst=%viffirst%+1"
- set /a "ipfirst=%ipfirst%+1"
- if %viffirst% leq %viflast% goto looper2
- echo set interfaces ethernet eth6 vif 1701
- echo set interfaces ethernet eth6 vif 1701 address 10.10.0.1/24
- echo set interfaces ethernet eth6 vif 1702
- echo set interfaces ethernet eth6 vif 1702 address 10.0.99.1/24
- echo set interfaces ethernet eth6 vif 1703
- echo set interfaces ethernet eth6 vif 1703 address 192.168.95.1/24
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement