Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| hardware:mikrotik [2022/04/19 02:55] – [mikrotik.configure.vip sip] admin | hardware:mikrotik [2025/08/18 09:57] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Mikrotik ====== | ====== Mikrotik ====== | ||
| + | |||
| + | |||
| + | <WRAP tip 60%> | ||
| + | * ++Mikrotik script example| | ||
| + | < | ||
| + | |||
| + | [admin@MikroTik] > :global a {x=1; y=2} | ||
| + | [admin@MikroTik] > :set ($a->" | ||
| + | [admin@MikroTik] > : | ||
| + | a={x=5; y=2} | ||
| + | |||
| + | |||
| + | /interface bridge port {:put [get [find interface=ether2] ]} | ||
| + | .id=*7; | ||
| + | ... | ||
| + | |||
| + | # by id | ||
| + | /interface bridge port {:put [get *7 ]} | ||
| + | [admin@MikroTik] /interface bridge port> /interface bridge port {:put [get *7 ]} | ||
| + | .id=*7; | ||
| + | .... | ||
| + | |||
| + | print all key values of config | ||
| + | [admin@MikroTik] /interface bridge port> /interface bridge port {:foreach k,v in=[get *7 ] do={:put (" | ||
| + | .id=*7 | ||
| + | .nextid=*8 | ||
| + | auto-isolate=false | ||
| + | bpdu-guard=false | ||
| + | bridge=bridge-agp | ||
| + | broadcast-flood=true | ||
| + | debug-info= prio 0x8000 num 2 | ||
| + | role:Dis (0) learn 0 forward 0 infoIs Dis edge 0 sendRSTP 1 | ||
| + | proposing 0 agreed 0 agree 0 synced 1 isolate 0 newInfo 0 | ||
| + | migration: | ||
| + | | ||
| + | | ||
| + | 00000000 RPC: 0 BI: 8000: | ||
| + | dtimes: Msg:0 Max: 5120 FD: 3840 HT: 512 | ||
| + | | ||
| + | |||
| + | disabled=false | ||
| + | |||
| + | </ | ||
| + | ++ | ||
| + | </ | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| * https:// | * https:// | ||
| Line 16: | Line 64: | ||
| * -- mikrotik sip shaping [[https:// | * -- mikrotik sip shaping [[https:// | ||
| * -- [[https:// | * -- [[https:// | ||
| + | |||
| + | ===== mikrotik simulating симуляция обучение ===== | ||
| + | * https:// | ||
| ===== mikrotik.configure.vip sip ===== | ===== mikrotik.configure.vip sip ===== | ||
| * https:// | * https:// | ||
| + | ===== mikrotik.packet sniffer tcpdump ===== | ||
| + | * для работы torch + sniffer нужно отключить '' | ||
| + | * https:// | ||
| + | * https:// | ||
| ==== Mikrotik security ==== | ==== Mikrotik security ==== | ||
| * https:// | * https:// | ||
| Line 60: | Line 114: | ||
| ==== Microtik VLAN ==== | ==== Microtik VLAN ==== | ||
| + | <code BASH> | ||
| + | # Пример настройки VLAN с SWITCH | ||
| + | [admin@MikroTik-304] > / | ||
| + | [admin@MikroTik-304] / | ||
| + | # feb/25/2024 19:05:42 by RouterOS 7.8beta2 | ||
| + | # software id = W523-SWBT | ||
| + | # | ||
| + | # model = RBD52G-5HacD2HnD | ||
| + | # serial number = BEEB0A75E122 | ||
| + | /interface ethernet switch vlan | ||
| + | add independent-learning=yes ports=ether1, | ||
| + | add independent-learning=yes ports=ether1, | ||
| + | add independent-learning=yes ports=ether1, | ||
| + | [admin@MikroTik-304] / | ||
| + | [admin@MikroTik-304] / | ||
| + | # feb/25/2024 19:05:54 by RouterOS 7.8beta2 | ||
| + | # software id = W523-SWBT | ||
| + | # | ||
| + | # model = RBD52G-5HacD2HnD | ||
| + | # serial number = BEEB0A75E122 | ||
| + | /interface ethernet switch port | ||
| + | set 0 default-vlan-id=0 vlan-header=add-if-missing | ||
| + | set 1 default-vlan-id=0 | ||
| + | set 2 default-vlan-id=0 | ||
| + | set 3 default-vlan-id=0 | ||
| + | set 4 default-vlan-id=111 vlan-header=always-strip vlan-mode=secure | ||
| + | set 5 default-vlan-id=0 | ||
| + | [admin@MikroTik-304] / | ||
| + | # WIFI configure | ||
| + | # Under /interface ethernet switch vlan switch1-cpu passes traffic from the switch chip to the CPU, only required for VLANs connected to services provided by the CPU such as IP address, routing, DHCP server and software-based # interfaces (tunnels, wireless). | ||
| + | # Under /interface ethernet switch port use vlan-header=leave-as-is for the switch chip in the hAP ac as mentioned in the wiki and help pages. | ||
| + | # Under interface wireless use both vlan-mode=use-tag AND vlan-id= to specify which VLAN the interface should be connected to. | ||
| + | # Under /interface bridge port setting hw=yes for the wireless interfaces is pointless, the drivers are implemented in software. | ||
| + | </ | ||
| + | |||
| - https:// | - https:// | ||
| - https:// | - https:// | ||
| - https:// | - https:// | ||