sexta-feira, 6 de janeiro de 2017

Mikrotik - configuração de vlans

First create three vlans
Code: Select all
/interface vlan add vlan-id=10 interface=ether2 name=vlan10-admin
/interface vlan add vlan-id=20 interface=ether2 name=vlan20-trusted
/interface vlan add vlan-id=20 interface=ether2 name=vlan30-public


then create bridge for vlans
Code: Select all
/interface bridge  add name=bridge-10
/interface bridge  add name=bridge-20
/interface bridge  add name=bridge-30

now add vlans and interfaces to bridges
Code: Select all
/in bridge port add bridge=bridge-10 interface=vlan10-admin
/in bridge port add bridge=bridge-10 interface=ether3
/in bridge port add bridge=bridge-10 interface=ether4

Code: Select all
/in bridge port add bridge=bridge-20 interface=vlan20-trusted
/in bridge port add bridge=bridge-20 interface=ether5
/in bridge port add bridge=bridge-20 interface=wlan1

Code: Select all
/in bridge port add bridge=bridge-30 interface=vlan30-public
/in bridge port add bridge=bridge-30 interface=wlan2

now assign ip address
Code: Select all
/ip address add adddress=10.0.0.1/24 interface=bridge-10
/ip address add adddress=10.0.1.1/24 interface=bridge-20
/ip address add adddress=10.0.2.1/24 interface=bridge-30

now add ip pool
Code: Select all
/ip pool add name=10 range=10.0.0.2-10.0.0.254
/ip pool add name=20 range=10.0.1.2-10.0.1.254
/ip pool add name=10 range=10.0.2.2-10.0.2.254


last dhcp server
Code: Select all
/ip dhcp-server network add address=10.0.0.0/24 gateway=10.0.0.1
/ip dhcp-server network add address=10.0.1.0/24 gateway=10.0.1.1
/ip dhcp-server network add address=10.0.2.0/24 gateway=10.0.2.1
/ip dhcp-server add name=10 interface=bridge-10 address-pool=10
/ip dhcp-server add name=20 interface=bridge-20 address-pool=20
/ip dhcp-server add name=30 interface=bridge-30 address-pool=30

fonte:http://forum.mikrotik.com/viewtopic.php?f=2&t=116430

0 comentários: