0% found this document useful (0 votes)
16 views6 pages

Mikrotik

Uploaded by

lucashelal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views6 pages

Mikrotik

Uploaded by

lucashelal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

MMM MMM KKK TTTTTTTTTTT KKK

MMMM MMMM KKK TTTTTTTTTTT KKK


MMM MMMM MMM III KKK KKK RRRRRR OOOOOO TTT III KKK KKK
MMM MM MMM III KKKKK RRR RRR OOO OOO TTT III KKKKK
MMM MMM III KKK KKK RRRRRR OOO OOO TTT III KKK KKK
MMM MMM III KKK KKK RRR RRR OOOOOO TTT III KKK KKK

MikroTik RouterOS 6.48.6 (c) 1999-2021 http://www.mikrotik.com/

[?] Gives the list of available commands


command [?] Gives help on the command and list of arguments

[Tab] Completes the command/word. If the input is ambiguous,


a second [Tab] gives possible options

/ Move up to base level


.. Move up one level
/command Use command at the base level
jan/02/1970 00:00:17 system,error,critical router rebooted without proper shutdown
, probably power outage
jan/02/1970 00:00:57 system,error,critical,,packet, error while running default co
nfiguration script: interrupted
jan/02/1970 00:00:57 system,error,critical,,packet,
[admin@RouterOS] > /interface vlan
[admin@RouterOS] /interface vlan> add name="VLAN_Lucas" vlan-id=10 interface=bridg
e
[admin@RouterOS] /interface vlan> add name="VLAN_Carol" vlan-id=30 interface=brid
ge
[admin@RouterOS] /interface vlan> add name="VLAN_Personal" vlan-id=20 interface=b
ridge
[admin@RouterOS] /interface vlan> add name="VLAN_Visitors" vlan-id=40 interface=b
ridge
[admin@RouterOS] /interface vlan> /ip address
[admin@RouterOS] /ip address> add address=192.168.10.1/24 interface=VLAN_Lucas
[admin@RouterOS] /ip address> add address=192.168.30.1/24 interface=VLAN_Carol
[admin@RouterOS] /ip address> add address=192.168.20.1/24 interface=VLAN_Personal
[admin@RouterOS] /ip address> add address=192.168.40.1/24 interface=VLAN_Visitors
[admin@RouterOS] /ip address> /ip firewall filter
[admin@RouterOS] /ip firewall filter> add action=drop chain=forward in-interface=V
LAN_Lucas out-interface=VLAN_Carol
[admin@RouterOS] /ip firewall filter> add action=drop chain=forward in-interface=V
LAN_Carol out-interface=VLAN_Lucas
[admin@RouterOS] /ip firewall filter> /ip pool
[admin@RouterOS] /ip pool> /ip pool
[admin@RouterOS] /ip pool> add name="pool_Lucas" ranges=192.168.10.2-192.168.10.25
4
[admin@RouterOS] /ip pool> add name="pool_Carol" ranges=192.168.30.2-192.168.30.25
4
[admin@RouterOS] /ip pool> add name="pool_Personal" ranges=192.168.20.2-192.168.20
.254
[admin@RouterOS] /ip pool> add name="pool_Visitantes" ranges=192.168.40.2-192.168.
40.254
[admin@RouterOS] /ip pool> add name="pool_Visitors" ranges=192.168.40.2-192.168.40
.254
[admin@RouterOS] /ip pool> /ip dhcp-server
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server
[admin@RouterOS] /ip dhcp-server> add address-pool=pool_Lucas disabled=no interfac
e=VLAN_Lucas name=dhcp_Lucas
[admin@RouterOS] /ip dhcp-server> add address-pool=pool_Carol disabled=no interfac
e=VLAN_Carol name=dhcp_Carol
[admin@RouterOS] /ip dhcp-server> add address-pool=pool_Personal disabled=no inter
face=VLAN_Personal name=dhcp_Personal
[admin@RouterOS] /ip dhcp-server> add address-pool=pool_Visitors disabled=no inter
face=VLAN_Visitors name=dhcp_Visitors
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server network
[admin@RouterOS] /ip dhcp-server network> /ip dhcp-server network
[admin@RouterOS] /ip dhcp-server network> add address=192.168.10.0/24 gateway=192.
168.10.1 dns-server=192.168.10.1
[admin@RouterOS] /ip dhcp-server network> add address=192.168.30.0/24 gateway=192.
168.30.1 dns-server=192.168.30.1
[admin@RouterOS] /ip dhcp-server network> add address=192.168.20.0/24 gateway=192.
168.20.1 dns-server=192.168.20.1
[admin@RouterOS] /ip dhcp-server network> add address=192.168.40.0/24 gateway=192.
168.40.1 dns-server=192.168.40.1
[admin@RouterOS] /ip dhcp-server network> /ip firewall filter
[admin@RouterOS] /ip firewall filter> /ip firewall filter
[admin@RouterOS] /ip firewall filter> add action=accept chain=forward in-interface
=VLAN_Carol out-interface=VLAN_Lucas comment="Permitir trfego de Carol para Lucas"

[admin@RouterOS] /ip firewall filter> add action=accept chain=forward in-interface


=VLAN_Lucas out-interface=VLAN_Carol comment="Permitir trfego de Lucas para Carol"

[admin@RouterOS] /ip firewall filter> /ip firewall filter


[admin@RouterOS] /ip firewall filter> add action=accept chain=forward in-interface
=VLAN_Personal out-interface=VLAN_Carol dst-port=80,443 protocol=tcp comment="Perm
itir web de Personal para Carol"
[admin@RouterOS] /ip firewall filter> add action=accept chain=forward in-interface
=VLAN_Personal out-interface=VLAN_Lucas dst-port=80,443 protocol=tcp comment="Perm
itir web de Personal para Lucas"
[admin@RouterOS] /ip firewall filter> /interface bridge port
[admin@RouterOS] /interface bridge port> /interface bridge port
[admin@RouterOS] /interface bridge port> remove [find interface=VLAN_Lucas]
[admin@RouterOS] /interface bridge port> remove [find interface=VLAN_Carol]
[admin@RouterOS] /interface bridge port> /interface vlan
[admin@RouterOS] /interface vlan> /interface vlan
[admin@RouterOS] /interface vlan> add name="VLAN_Lucas" vlan-id=10 interface=en5
input does not match any value of interface
[admin@RouterOS] /interface vlan> add name="VLAN_Carol" vlan-id=20 interface=en4
input does not match any value of interface
[admin@RouterOS] /interface vlan> /interface print
Flags: D - dynamic, X - disabled, R - running, S - slave
# NAME TYPE ACTUAL-MTU L2MTU MAX-L2MTU
0 RS ether1 ether 1500 1596 2026
1 RS ether2 ether 1500 1596 2026
2 S ether3 ether 1500 1596 2026
3 S ether4 ether 1500 1596 2026
4 RS ether5 ether 1500 1596 2026
5 R VLAN_Carol vlan 1500 1592
6 R VLAN_Lucas vlan 1500 1592
7 R VLAN_Personal vlan 1500 1592
8 R VLAN_Visitors vlan 1500 1592
9 R ;;; defconf
bridgeLocal bridge 1500 1596
[admin@RouterOS] /interface vlan> /interface vlan print detail
Flags: X - disabled, R - running
0 R name="VLAN_Carol" mtu=1500 l2mtu=1592 mac-address=48:A9:8A:46:A6:EF
arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off
loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=30
interface=bridgeLocal use-service-tag=no

1 R name="VLAN_Lucas" mtu=1500 l2mtu=1592 mac-address=48:A9:8A:46:A6:EF


arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off
loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=10
interface=bridgeLocal use-service-tag=no

2 R name="VLAN_Personal" mtu=1500 l2mtu=1592 mac-address=48:A9:8A:46:A6:EF


arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off
loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=20
interface=bridgeLocal use-service-tag=no

3 R name="VLAN_Visitors" mtu=1500 l2mtu=1592 mac-address=48:A9:8A:46:A6:EF


arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off
loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=40
interface=bridgeLocal use-service-tag=no
[admin@RouterOS] /interface vlan> /interface vlan
[admin@RouterOS] /interface vlan> add name="VLAN_Lucas" vlan-id=10 interface=ether
5
failure: already have interface with such name
[admin@RouterOS] /interface vlan> /interface vlan
[admin@RouterOS] /interface vlan> add name="VLAN_LucasX" vlan-id=10 interface=ethe
r5
[admin@RouterOS] /interface vlan> add name="VLAN_CarolX" vlan-id=20 interface=ethe
r4
[admin@RouterOS] /interface vlan> add name="VLAN_PersonalX" vlan-id=30 interface=e
ther3
[admin@RouterOS] /interface vlan> add name="VLAN_VisitorsX" vlan-id=40 interface=e
ther2
[admin@RouterOS] /interface vlan> /ip address
[admin@RouterOS] /ip address> add address=192.168.10.1/24 interface=VLAN_LucasX
[admin@RouterOS] /ip address> add address=192.168.20.1/24 interface=VLAN_CarolX
[admin@RouterOS] /ip address> add address=192.168.30.1/24 interface=VLAN_PersonalX

[admin@RouterOS] /ip address> add address=192.168.40.1/24 interface=VLAN_VisitorsX

[admin@RouterOS] /ip address> /ip pool


[admin@RouterOS] /ip pool> add name=pool_LucasX ranges=192.168.10.2-192.168.10.254

[admin@RouterOS] /ip pool> add name=pool_CarolX ranges=192.168.20.2-192.168.20.254

[admin@RouterOS] /ip pool> add name=pool_PersonalX ranges=192.168.30.2-192.168.30.


254
[admin@RouterOS] /ip pool> add name=pool_VisitorsX ranges=192.168.40.2-192.168.40.
254
[admin@RouterOS] /ip pool> /ip dhcp-server
[admin@RouterOS] /ip dhcp-server> add address-pool=pool_LucasX disabled=no interfa
ce=VLAN_LucasX name=dhcp_LucasX
[admin@RouterOS] /ip dhcp-server> add address-pool=pool_CarolX disabled=no interfa
ce=VLAN_CarolX name=dhcp_CarolX
[admin@RouterOS] /ip dhcp-server> add address-pool=pool_PersonalX disabled=no inte
rface=VLAN_PersonalX name=dhcp_PersonalX
[admin@RouterOS] /ip dhcp-server> add address-pool=pool_VisitorsX disabled=no inte
rface=VLAN_VisitorsX name=dhcp_VisitorsX
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server network
[admin@RouterOS] /ip dhcp-server network> add address=192.168.10.0/24 gateway=192.
168.10.1 dns-server=8.8.8.8
failure: such network already exists
[admin@RouterOS] /ip dhcp-server network> add address=192.168.20.0/24 gateway=192.
168.20.1 dns-server=8.8.8.8
failure: such network already exists
[admin@RouterOS] /ip dhcp-server network> add address=192.168.30.0/24 gateway=192.
168.30.1 dns-server=8.8.8.8
failure: such network already exists
[admin@RouterOS] /ip dhcp-server network> add address=192.168.40.0/24 gateway=192.
168.40.1 dns-server=8.8.8.8
failure: such network already exists
[admin@RouterOS] /ip dhcp-server network> /ip dhcp-server network remove [find add
ress="192.168.10.0/24"]
[admin@RouterOS] /ip dhcp-server network> /ip dhcp-server network remove [find add
ress="192.168.20.0/24"]
[admin@RouterOS] /ip dhcp-server network> /ip dhcp-server network remove [find add
ress="192.168.30.0/24"]
[admin@RouterOS] /ip dhcp-server network> /ip dhcp-server network remove [find add
ress="192.168.40.0/24"]
[admin@RouterOS] /ip dhcp-server network> /ip pool
[admin@RouterOS] /ip pool> add name=pool_LucasX ranges=192.168.10.2-192.168.10.254

failure: pool with such name exists


[admin@RouterOS] /ip pool> /ip dhcp-server
[admin@RouterOS] /ip dhcp-server> add address-pool=pool_LucasX disabled=no interfa
ce=VLAN_LucasX name=dhcp_LucasX
failure: server with such name already exists
[admin@RouterOS] /ip dhcp-server> /ip pool print
# NAME RANGES
0 pool_Lucas 192.168.10.2-192.168.10.254
1 pool_Carol 192.168.30.2-192.168.30.254
2 pool_Personal 192.168.20.2-192.168.20.254
3 pool_Visitantes 192.168.40.2-192.168.40.254
4 pool_Visitors 192.168.40.2-192.168.40.254
5 pool_LucasX 192.168.10.2-192.168.10.254
6 pool_CarolX 192.168.20.2-192.168.20.254
7 pool_PersonalX 192.168.30.2-192.168.30.254
8 pool_VisitorsX 192.168.40.2-192.168.40.254
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server network print
Flags: D - dynamic
# ADDRESS GATEWAY DNS-SERVER WINS-SERVER DO..
[admin@RouterOS] /ip dhcp-server> /ip pool remove [find name="pool_Lucas"]
[admin@RouterOS] /ip dhcp-server> /ip pool remove [find name="pool_Carol"]
[admin@RouterOS] /ip dhcp-server> /ip pool remove [find name="pool_Personal"]
[admin@RouterOS] /ip dhcp-server> /ip pool remove [find name="pool_Visitantes"]
[admin@RouterOS] /ip dhcp-server> /ip pool set [find name="pool_CarolX"] ranges=19
2.168.20.2-192.168.20.254
[admin@RouterOS] /ip dhcp-server> /ip pool set [find name="pool_PersonalX"] ranges
=192.168.30.2-192.168.30.254
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server print
Flags: D - dynamic, X - disabled, I - invalid
# NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP
0 dhcp_L... VLAN_Lucas *1 10m
1 dhcp_C... VLAN_Carol *2 10m
2 dhcp_P... VLAN_Personal *3 10m
3 dhcp_V... VLAN_Visitors pool_Visitors 10m
4 dhcp_L... VLAN_LucasX pool_LucasX 10m
5 I dhcp_C... VLAN_CarolX pool_CarolX 10m
6 I dhcp_P... VLAN_Perso... pool_PersonalX 10m
7 dhcp_V... VLAN_Visit... pool_VisitorsX 10m
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server remove [find where name="dhcp_Ca
rolX"]
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server remove [find where name="dhcp_Pe
rsonalX"]
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server remove [find where name="dhcp_Lu
cas"]
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server remove [find where name="dhcp_Ca
rol"]
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server remove [find where name="dhcp_Pe
rsonal"]
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server remove [find where name="dhcp_Vi
sitors"]
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server network print
Flags: D - dynamic
# ADDRESS GATEWAY DNS-SERVER WINS-SERVER DO..
[admin@RouterOS] /ip dhcp-server> /ip dhcp-server network
[admin@RouterOS] /ip dhcp-server network> add address=192.168.10.0/24 gateway=192.
168.10.1 dns-server=8.8.8.8
[admin@RouterOS] /ip dhcp-server network> /ip dhcp-server network
[admin@RouterOS] /ip dhcp-server network> add address=192.168.20.0/24 gateway=192.
168.20.1 dns-server=8.8.8.8
[admin@RouterOS] /ip dhcp-server network> /ip dhcp-server network
[admin@RouterOS] /ip dhcp-server network> add address=192.168.30.0/24 gateway=192.
168.30.1 dns-server=8.8.8.8
[admin@RouterOS] /ip dhcp-server network> /ip dhcp-server network
[admin@RouterOS] /ip dhcp-server network> add address=192.168.40.0/24 gateway=192.
168.40.1 dns-server=8.8.8.8
[admin@RouterOS] /ip dhcp-server network> /interface bridge
[admin@RouterOS] /interface bridge> add name=bridge_TimeCapsule
[admin@RouterOS] /interface bridge>
[admin@RouterOS] /interface bridge> /interface vlan
[admin@RouterOS] /interface vlan> add name=VLAN_TimeCapsule vlan-id=50 interface=b
ridge_TimeCapsule
[admin@RouterOS] /interface vlan>
[admin@RouterOS] /interface vlan> /ip address
[admin@RouterOS] /ip address> add address=192.168.50.1/24 interface=VLAN_TimeCapsu
le
[admin@RouterOS] /ip address>
[admin@RouterOS] /ip address> /ip dhcp-server network
[admin@RouterOS] /ip dhcp-server network> add address=192.168.50.0/24 gateway=192.
168.50.1 dns-server=8.8.8.8
[admin@RouterOS] /ip dhcp-server network>
[admin@RouterOS] /ip dhcp-server network> /ip dhcp-server
[admin@RouterOS] /ip dhcp-server> add name=dhcp_TimeCapsule interface=VLAN_TimeCap
sule address-pool=pool_TimeCapsule
input does not match any value of address-pool
[admin@RouterOS] /ip dhcp-server> /ip pool
[admin@RouterOS] /ip pool> add name=pool_TimeCapsule ranges=192.168.50.2-192.168.5
0.254
[admin@RouterOS] /ip pool> /ip pool
[admin@RouterOS] /ip pool> add name=pool_TimeCapsule ranges=192.168.50.2-192.168.5
0.254
failure: pool with such name exists
[admin@RouterOS] /ip pool> /ip pool
[admin@RouterOS] /ip pool> set [find name=pool_TimeCapsule] ranges=192.168.50.2-19
2.168.50.254
[admin@RouterOS] /ip pool> /ip dhcp-server
[admin@RouterOS] /ip dhcp-server> add name=dhcp_TimeCapsule interface=VLAN_TimeCap
sule address-pool=pool_TimeCapsule
[admin@RouterOS] /ip dhcp-server> /ip firewall filter
[admin@RouterOS] /ip firewall filter> add chain=forward action=accept in-interface
=ether5 comment="Allow all traffic on ether5"
[admin@RouterOS] /ip firewall filter> /ip firewall filter
[admin@RouterOS] /ip firewall filter> add chain=forward action=accept protocol=tcp
dst-port=548,5353 in-interface=!ether5 comment="Allow TimeCapsule access on Finde
r with authentication"
[admin@RouterOS] /ip firewall filter> /ip dhcp-server network print
Flags: D - dynamic
# ADDRESS GATEWAY DNS-SERVER WINS-SERVER DO..
0 192.168.10.0/24 192.168.10.1 8.8.8.8
1 192.168.20.0/24 192.168.20.1 8.8.8.8
2 192.168.30.0/24 192.168.30.1 8.8.8.8
3 192.168.40.0/24 192.168.40.1 8.8.8.8
4 192.168.50.0/24 192.168.50.1 8.8.8.8
[admin@RouterOS] /ip firewall filter>

You might also like