Difference between revisions of "SWITCH-mikrotik"

From Fixme.ch
Jump to: navigation, search
(VLANs)
(SW-FIXME-MIKROTIK)
Line 105: Line 105:
 
<tr bgcolor=SlateGrey>
 
<tr bgcolor=SlateGrey>
 
   <td>19</td>
 
   <td>19</td>
   <td>FIXME-NAT</td>
+
   <td>reserved for FIXME-NAT</td>
 
   <td>DON'T USE!</td>
 
   <td>DON'T USE!</td>
 
</tr>
 
</tr>
 
<tr bgcolor=LightSlateGrey>
 
<tr bgcolor=LightSlateGrey>
 
   <td>20</td>
 
   <td>20</td>
   <td>FIXME-PUBLIC</td>
+
   <td>reserved for FIXME-PUBLIC</td>
 
   <td>DON'T USE!</td>
 
   <td>DON'T USE!</td>
 
</tr>
 
</tr>
 
<tr bgcolor=SlateGrey>
 
<tr bgcolor=SlateGrey>
 
   <td>21</td>
 
   <td>21</td>
   <td>FIXME-NAT</td>
+
   <td>reserved for FIXME-NAT</td>
 
   <td>DON'T USE!</td>
 
   <td>DON'T USE!</td>
 
</tr>
 
</tr>
 
<tr bgcolor=LightSlateGrey>
 
<tr bgcolor=LightSlateGrey>
 
   <td>22</td>
 
   <td>22</td>
   <td>FIXME-PUBLIC</td>
+
   <td>reserved for FIXME-PUBLIC</td>
 
   <td>DON'T USE!</td>
 
   <td>DON'T USE!</td>
 
</tr>
 
</tr>
Line 140: Line 140:
  
 
/interface vlan
 
/interface vlan
 +
 
add name=FIXME-NAT vlan-id=130 interface=ether23
 
add name=FIXME-NAT vlan-id=130 interface=ether23
 +
 
add name=FIXME-PUBLIC vlan-id=135 interface=ether24
 
add name=FIXME-PUBLIC vlan-id=135 interface=ether24
  
 +
(/interface vlan print)
  
/interface ethernet
+
(/interface vlan print detail)
set ether3 vlan-mode=use-tag vlan-id=130
+
  
/interface ethernet print detail
+
/interface bridge
  
 +
add name=bridge4Nat
  
https://wiki.mikrotik.com/wiki/Manual:Basic_VLAN_switching
+
add name=bridge4Public
  
https://help.mikrotik.com/docs/display/ROS/Bridging+and+Switching#BridgingandSwitching-BridgeVLANFiltering
+
interface bridge port add bridge=bridge1 interface=FIXME-NAT
 +
 
 +
interface bridge port add bridge=bridge1 interface=FIXME-PUBLIC
 +
 
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether1
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether3
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether5
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether7
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether9
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether11
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether13
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether14
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether15
 +
 
 +
interface bridge port add bridge=bridge4Nat interface=ether17
 +
 
 +
 
 +
 
 +
interface bridge port add bridge=bridge4Public interface=ether2
 +
 
 +
interface bridge port add bridge=bridge4Public interface=ether4
 +
 
 +
interface bridge port add bridge=bridge4Public interface=ether6
 +
 
 +
interface bridge port add bridge=bridge4Public interface=ether8
 +
 
 +
interface bridge port add bridge=bridge4Public interface=ether10
 +
 
 +
interface bridge port add bridge=bridge4Public interface=ether12
 +
 
 +
interface bridge port add bridge=bridge4Public interface=ether14
 +
 
 +
interface bridge port add bridge=bridge4Public interface=ether16
 +
 
 +
interface bridge port add bridge=bridge4Public interface=ether18
 +
 
 +
 
 +
Reference:
  
 
https://www.youtube.com/watch?v=4BOYqtV4MCY&list=PLJ7SGFemsLl1QUNkgAbGj9ldlWRrr8zMj&ab_channel=TheNetworkBerg
 
https://www.youtube.com/watch?v=4BOYqtV4MCY&list=PLJ7SGFemsLl1QUNkgAbGj9ldlWRrr8zMj&ab_channel=TheNetworkBerg
  
  
old:
+
https://wiki.mikrotik.com/wiki/Manual:Basic_VLAN_switching
hostname SW-FIXME-02<br>
+
 
snmp-server location CH LSN FIXME SERV 1<br>
+
https://help.mikrotik.com/docs/display/ROS/Bridging+and+Switching#BridgingandSwitching-BridgeVLANFiltering
snmp-server contact FIXME<br>
+
snmp-server community FIXME ro<br>
+
<br>
+
username admin access-level 15<br>
+
username admin password 7 XXXXXXXXXXXXXXXXXXXXXXXXXX<br>
+
username guest access-level 0<br>
+
username guest password 7 XXXXXXXXXXXXXXXXXXXXXXXXXX<br>
+
enable password level 15 7 XXXXXXXXXXXXXXXXXXXXXXXXXX<br>
+
<br>
+
<br>
+
vlan database<br>
+
vlan 1 name DefaultVlan media ethernet state active<br>
+
vlan 130 name FIXME-NAT media ethernet state active<br>
+
vlan 135 name FIXME-PUBLIC media ethernet state active<br>
+
<br>
+
<br>
+
interface ethernet 1/1<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/2<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/3<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/4<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/5<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/6<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/7<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/8<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/9<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/10<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/11<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/12<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/13<br>
+
switchport allowed vlan add 130 untagged<br>
+
switchport native vlan 130<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/14<br>
+
switchport allowed vlan add 130 untagged<br>
+
switchport native vlan 130<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/15<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/16<br>
+
switchport allowed vlan add 135 untagged<br>
+
switchport native vlan 135<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/17<br>
+
switchport allowed vlan add 130,135 untagged<br>
+
switchport native vlan 130<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/18<br>
+
switchport allowed vlan add 130,135 untagged<br>
+
switchport native vlan 130<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/19<br>
+
switchport allowed vlan add 130,135 untagged<br>
+
switchport native vlan 130<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/20<br>
+
switchport allowed vlan add 130,135 untagged<br>
+
switchport native vlan 130<br>
+
switchport allowed vlan remove 1<br>
+
spanning-tree edge-port<br>
+
<br>
+
<br>
+
interface ethernet 1/21<br>
+
switchport allowed vlan add 1 untagged<br>
+
switchport native vlan 1<br>
+
switchport allowed vlan add 130,135 tagged<br>
+
<br>
+
<br>
+
interface ethernet 1/22<br>
+
switchport allowed vlan add 1 untagged<br>
+
switchport native vlan 1<br>
+
switchport allowed vlan add 130,135 tagged<br>
+
<br>
+
<br>
+
interface ethernet 1/23<br>
+
switchport allowed vlan add 1 untagged<br>
+
switchport native vlan 1<br>
+
switchport allowed vlan add 130,135 tagged<br>
+
<br>
+
<br>
+
interface ethernet 1/24<br>
+
switchport allowed vlan add 1 untagged<br>
+
switchport native vlan 1<br>
+
switchport allowed vlan add 130,135 tagged<br>
+
<br>
+
<br>
+
interface vlan 130<br>
+
ip address 192.168.130.252 255.255.255.0<br>
+
<br>
+
no ip http secure-server<br>
+
spanning-tree mode stp<br>
+
line console<br>
+
line vty<br>
+
end<br>
+
 
<br>
 
<br>

Revision as of 21:05, 11 December 2023

SW-FIXME-MIKROTIK

VLANs

  • 130: FIXME-NAT
  • 135: FIXME-PUBLIC

Ports / VLAN

Port VLAN Equipement
1 FIXME-NAT
2 FIXME-PUBLIC
3 FIXME-NAT
4 FIXME-PUBLIC
5 FIXME-NAT
6 FIXME-PUBLIC
7 FIXME-NAT
8 FIXME-PUBLIC
9 FIXME-NAT
10 FIXME-PUBLIC
11 FIXME-NAT
12 FIXME-PUBLIC
13 FIXME-NAT
14 FIXME-PUBLIC
15 FIXME-NAT
16 FIXME-PUBLIC
17 FIXME-NAT
18 FIXME-PUBLIC
19 reserved for FIXME-NAT DON'T USE!
20 reserved for FIXME-PUBLIC DON'T USE!
21 reserved for FIXME-NAT DON'T USE!
22 reserved for FIXME-PUBLIC DON'T USE!
23 TRUNK-NAT DON'T USE!
24 TRUNK-PUBLIC DON'T USE!

Config

work in progress...


/interface vlan

add name=FIXME-NAT vlan-id=130 interface=ether23

add name=FIXME-PUBLIC vlan-id=135 interface=ether24

(/interface vlan print)

(/interface vlan print detail)

/interface bridge

add name=bridge4Nat

add name=bridge4Public

interface bridge port add bridge=bridge1 interface=FIXME-NAT

interface bridge port add bridge=bridge1 interface=FIXME-PUBLIC


interface bridge port add bridge=bridge4Nat interface=ether1

interface bridge port add bridge=bridge4Nat interface=ether3

interface bridge port add bridge=bridge4Nat interface=ether5

interface bridge port add bridge=bridge4Nat interface=ether7

interface bridge port add bridge=bridge4Nat interface=ether9

interface bridge port add bridge=bridge4Nat interface=ether11

interface bridge port add bridge=bridge4Nat interface=ether13

interface bridge port add bridge=bridge4Nat interface=ether14

interface bridge port add bridge=bridge4Nat interface=ether15

interface bridge port add bridge=bridge4Nat interface=ether17


interface bridge port add bridge=bridge4Public interface=ether2

interface bridge port add bridge=bridge4Public interface=ether4

interface bridge port add bridge=bridge4Public interface=ether6

interface bridge port add bridge=bridge4Public interface=ether8

interface bridge port add bridge=bridge4Public interface=ether10

interface bridge port add bridge=bridge4Public interface=ether12

interface bridge port add bridge=bridge4Public interface=ether14

interface bridge port add bridge=bridge4Public interface=ether16

interface bridge port add bridge=bridge4Public interface=ether18


Reference:

https://www.youtube.com/watch?v=4BOYqtV4MCY&list=PLJ7SGFemsLl1QUNkgAbGj9ldlWRrr8zMj&ab_channel=TheNetworkBerg


https://wiki.mikrotik.com/wiki/Manual:Basic_VLAN_switching

https://help.mikrotik.com/docs/display/ROS/Bridging+and+Switching#BridgingandSwitching-BridgeVLANFiltering