Community discussions

MikroTik App
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 3:03 pm

i have 1 Router Mikrotik and two Cisco Switchs Layer 2 and 1 Access Point in IT Room
router ip address : 10.0.50.253/24
Cisco server room : 10.0.50.169/24
Cisco IT room : 10.0.50.75/24
AP IT Room : 192.168.208.54/24

Cisco Server room :
Created Vlan 208
Created Vlan Interface 208 with Ip address 192.168.208.169/24
and trunk on Cisco port to the Cisco Switch Server room
and trunk on Cisco port to the Mikrotik Router Server room
i can ping 192.168.208.0 network with no problems

Cisco IT Room
Created Vlan 208
Created Vlan Interface 208 with ip address 192.168.208.75/24
and trunk on Cisco port to the Cisco Switch IT room
i can ping 192.168.208.0 network with no problems
made the Port of Access point as Switch Mode Access for VLAN 208

Mikrotik Router
Created VLAN 208 on Interface Ether2 with ip address 192.168.208.1/24
issue : cannot ping 192.168.208.0 network at all

IT Access Point
ip address : 192.168.208.54

Cisco Switches can ping 192.168.208.54 , 192.168.208.75 with no problems
my problem with miss configuration on Mikrotik router ,so i can make my mikrotik router ping both Cisco Switchs and the Access Point

and here is the Mikrotik Configuration : -

ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 ;;; WAN
11.11.11.2/24 11.11.11.0 WAN
1 ;;; LAN
10.0.50.243/24 10.0.50.0 LAN
2 192.168.208.1/24 192.168.208.0 vlan208

interface print
0 R LAN ether 1500
1 R WAN ether 1500
2 R ether2 ether 1500
3 R vlan208 vlan 1500

ip firewall nat print

0 ;;; Masqurate NAT - Internet For All
chain=srcnat action=masquerade src-address=10.0.50.0/24 log-prefix=""

1 ;;; Masqurate NAT - Internet For All
chain=srcnat action=masquerade src-address=192.168.208.0/24
out-interface=WAN log=no log-prefix=""

ip route print

# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S ;;; Internet Through TEdata ADSL EX-253
0.0.0.0/0 11.11.11.1 1
1 ADC 10.0.50.0/24 10.0.50.243 LAN 0
2 ADC 11.11.11.0/24 11.11.11.2 WAN 0
3 ADC 192.168.208.0/24 192.168.208.1 vlan208 0

here is the diagram
VLAN Project.jpg
i just need help ,it fix my issue with mikrotik
and it's the only ip address i cannot ping but all 192.168.208.0 network can ping each others
You do not have the required permissions to view the files attached to this post.
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 3:10 pm

Post the complete configuration of the Mikrotik, except the public address(es) and serial number: /export hide-sensitive file=somename. Also post the configuration of the Cisco trunk ports - 208 may not be among allowed-vlans somewhere.

If ether2 is a member port of some bridge, you cannot attach /interface vlan vlan-id=208 directly to ether2, you have to attach it to that bridge instead.
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 3:18 pm

i have attached the mikrotik export file
here is the cisco IT Switch
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
interface FastEthernet0
no ip address
no ip route-cache
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
!
interface GigabitEthernet0/8
!
interface GigabitEthernet0/9
!
interface GigabitEthernet0/10
!
interface GigabitEthernet0/11
!
interface GigabitEthernet0/12
switchport mode trunk
!
interface GigabitEthernet0/13
!
interface GigabitEthernet0/14
!
interface GigabitEthernet0/15
!
interface GigabitEthernet0/16
!
interface GigabitEthernet0/17
!
interface GigabitEthernet0/18
!
interface GigabitEthernet0/19
!
interface GigabitEthernet0/20
!
interface GigabitEthernet0/21
!
interface GigabitEthernet0/22
!
interface GigabitEthernet0/23
!
interface GigabitEthernet0/24
!
interface GigabitEthernet0/25
!
interface GigabitEthernet0/26
!
interface GigabitEthernet0/27
!
interface GigabitEthernet0/28
!
interface GigabitEthernet0/29
!
interface GigabitEthernet0/30
!
interface GigabitEthernet0/31
!
interface GigabitEthernet0/32
!
interface GigabitEthernet0/33
!
interface GigabitEthernet0/34
!
interface GigabitEthernet0/35
!
interface GigabitEthernet0/36
!
interface GigabitEthernet0/37
!
interface GigabitEthernet0/38
!
interface GigabitEthernet0/39
!
interface GigabitEthernet0/40
!
interface GigabitEthernet0/41
!
interface GigabitEthernet0/42
!
interface GigabitEthernet0/43
!
interface GigabitEthernet0/44
switchport access vlan 208
switchport mode access
!
interface GigabitEthernet0/45
!
interface GigabitEthernet0/46
!
interface GigabitEthernet0/47
!
interface GigabitEthernet0/48
!
interface GigabitEthernet0/49
!
interface GigabitEthernet0/50
!
interface GigabitEthernet0/51
!
interface GigabitEthernet0/52
!
interface TenGigabitEthernet0/1
!
interface TenGigabitEthernet0/2
!
interface Vlan1
ip address 10.0.50.75 255.255.255.0
no ip route-cache
!
interface Vlan208
ip address 192.168.208.75 255.255.255.0
no ip route-cache
!
interface Vlan209
no ip address
no ip route-cache
!
ip default-gateway 10.0.50.253
ip http server
ip http secure-server
!
line con 0
login local
line vty 0
login local
line vty 1 2
login
line vty 3
login local
line vty 4
login
line vty 5 15
login
!
mac address-table static 4c3c.1659.8c52 vlan 1 drop
end
here is the Cisco Switch Server Room :-
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
interface FastEthernet0
no ip address
no ip route-cache
shutdown
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
!
interface GigabitEthernet0/8
!
interface GigabitEthernet0/9
!
interface GigabitEthernet0/10
!
interface GigabitEthernet0/11
!
interface GigabitEthernet0/12
!
interface GigabitEthernet0/13
!
interface GigabitEthernet0/14
!
interface GigabitEthernet0/15
!
interface GigabitEthernet0/16
!
interface GigabitEthernet0/17
!
interface GigabitEthernet0/18
!
interface GigabitEthernet0/19
!
interface GigabitEthernet0/20
!
interface GigabitEthernet0/21
switchport mode trunk
!
interface GigabitEthernet0/22
!
interface GigabitEthernet0/23
!
interface GigabitEthernet0/24
!
interface GigabitEthernet0/25
!
interface GigabitEthernet0/26
!
interface GigabitEthernet0/27
!
interface GigabitEthernet0/28
!
interface GigabitEthernet0/29
!
interface GigabitEthernet0/30
!
interface GigabitEthernet0/31
!
interface GigabitEthernet0/32
!
interface GigabitEthernet0/33
!
interface GigabitEthernet0/34
!
interface GigabitEthernet0/35
!
interface GigabitEthernet0/36
!
interface GigabitEthernet0/37
!
interface GigabitEthernet0/38
switchport mode trunk
!
interface GigabitEthernet0/39
!
interface GigabitEthernet0/40
!
interface GigabitEthernet0/41
!
interface GigabitEthernet0/42
!
interface GigabitEthernet0/43
!
interface GigabitEthernet0/44
!
interface GigabitEthernet0/45
!
interface GigabitEthernet0/46
!
interface GigabitEthernet0/47
!
interface GigabitEthernet0/48
!
interface GigabitEthernet0/49
!
interface GigabitEthernet0/50
!
interface GigabitEthernet0/51
!
interface GigabitEthernet0/52
!
interface TenGigabitEthernet0/1
!
interface TenGigabitEthernet0/2
!
interface Vlan1
ip address dhcp
no ip route-cache
!
interface Vlan2
ip address 192.168.209.254 255.255.255.0
no ip route-cache
!
interface Vlan208
ip address 192.168.208.169 255.255.255.0
no ip route-cache
!
ip default-gateway 10.0.50.253
ip http server
ip http secure-server
!
control-plane
!
!
line con 0
line vty 0
login local
line vty 1 4
login
line vty 5 15
login
!
end
Last edited by akram on Tue Dec 13, 2022 11:28 am, edited 1 time in total.
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 3:22 pm

Post the complete configuration of the Mikrotik, except the public address(es) and serial number: /export hide-sensitive file=somename. Also post the configuration of the Cisco trunk ports - 208 may not be among allowed-vlans somewhere.

If ether2 is a member port of some bridge, you cannot attach /interface vlan vlan-id=208 directly to ether2, you have to attach it to that bridge instead.
i upload everything u asked
for the ether2 ,i also tried to attached to the bridge but it didn't work
my Mikrotik Version is 6.49.5
wish i can find the fix with you guys
thanks in advance
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 3:43 pm

I'm a bit confused by the discrepancy between your drawing where the Cisco switch is connected to the Mikrotik using a single cable but with two subnets, 10.0.50.0/24 and 192.168.208.0/24, whereas in the configuration export, these two subnets are attached to two different physical interfaces - 10.0.50.0/24 is attached to LAN (original name ether1) whereas 192.168.208.0/24 is attached to vlan208 which is (in the Cisco vernacular) a subinterface attached to ether2 (original name ether3). What am I missing here? According to the drawing, you should change the underlying interface of vlan208 from ether2 to LAN and you should be good, but maybe the drawing is incomplete instead and you have actually connected ether2 of the Mikrotik to some trunk port on the Cisco using another cable?

Besides, I'm not sure about the configuration defaults on Cisco, but whereas you can use the (Cisco proprietary, so not understood by Mikrotik) VTP to distribute the list of supported VLANs across the whole L2 network and this is probably the default behaviour, you still have to explicitly define VLAN 208 on at least one Cisco switch (enable -> conf t -> vlan 208 -> exit -> exit) so that it would become available on all. If VTP is off, you have to configure ech VLAN manually on all switches.
Last edited by sindy on Sat Dec 10, 2022 3:44 pm, edited 1 time in total.
 
vaka
just joined
Posts: 22
Joined: Fri Dec 04, 2020 4:08 pm
Location: Ukraine

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 3:44 pm

Create vlans on Mikrotik in bridge section, enable vlan filtering on bridge and attach ports (tagged, untagged) to this vlans.
Add interface bridge as tagged to every vlan you created if you want to share vlan between ports are in bridge.
Also If you attached untagged (access) port, go to bridge-ports and set PVID=vlan-id on this port.
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 3:51 pm

Create vlans on Mikrotik in bridge section
@anav is popular for this approach of asking the OP to redo the configuration completely just to make it match the "perfect" one, regardless the actual needs. The OP has no bridge in his configuration, and there is no need to add it since he's got plenty of multi-port switches and uses just three ports on the router, and one of them maybe just by mistake.

It would be different if he wanted to use ether2 as an access port to a VLAN that would pass in trunk mode through ether1, but that doesn't seem to be the case.
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 3:57 pm

Create vlans on Mikrotik in bridge section, enable vlan filtering on bridge and attach ports (tagged, untagged) to this vlans.
Add interface bridge as tagged to every vlan you created if you want to share vlan between ports are in bridge.
Also If you attached untagged (access) port, go to bridge-ports and set PVID=vlan-id on this port.
i tried that but didn't work ,if u want to access my desktop in application "anydesk" ,it will be helpful
is it ok for u?
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 3:59 pm

Create vlans on Mikrotik in bridge section
@anav is popular for this approach of asking the OP to redo the configuration completely just to make it match the "perfect" one, regardless the actual needs. The OP has no bridge in his configuration, and there is no need to add it since he's got plenty of multi-port switches and uses just three ports on the router, and one of them maybe just by mistake.

It would be different if he wanted to use ether2 as an access port to a VLAN that would pass in trunk mode through ether1, but that doesn't seem to be the case.
if u want to access my desktop with application "anydesk" ,is it ok for u?
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 4:01 pm

if u want to access my desktop with application "anydesk" ,is it ok for u?
Before eventually doing that, I'd prefer to get the answers to my doubts regarding what you actually want to do as stated in post #5.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19323
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sat Dec 10, 2022 4:38 pm

I am not averse to assigning multiple vlans to a single port.............. AKA bridging is not necessary.
It just makes sense if multiple vlans are going over multiple ports.

Sindy, you should use port vlans more often ;-) Vlan tagging is overrated.......
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sun Dec 11, 2022 9:20 am

I am not averse to assigning multiple vlans to a single port.............. AKA bridging is not necessary.
It just makes sense if multiple vlans are going over multiple ports.

Sindy, you should use port vlans more often ;-) Vlan tagging is overrated.......
is it ok for you to anydesk my router and see it by urself ,if u don't mind?
i am really tried everything but still failed
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sun Dec 11, 2022 9:44 am

I am not averse to assigning multiple vlans to a single port.............. AKA bridging is not necessary.
It just makes sense if multiple vlans are going over multiple ports.

Sindy, you should use port vlans more often ;-) Vlan tagging is overrated.......
is it ok for you to anydesk my router and see it by urself ,if u don't mind?
i am really tried everything but still failed
OK, give me the number.
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sun Dec 11, 2022 10:05 am



is it ok for you to anydesk my router and see it by urself ,if u don't mind?
i am really tried everything but still failed
OK, give me the number.
thanks you
here is anydesk id
899287472
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration  [SOLVED]

Sun Dec 11, 2022 11:42 am

For others brought here by searching for similar issues, the Mikrotik is a virtual one and the virtualization environment strips VLAN tags on reception.
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: Mikrotik Router & Cisco Switch VLAN Configuration

Sun Dec 11, 2022 2:25 pm

For others brought here by searching for similar issues, the Mikrotik is a virtual one and the virtualization environment strips VLAN tags on reception.
it was the issue with my vmware workstation that have mikrotik on it
and after the help of my friend sindy ,i used Vmware esxi instead and the vlan works perfect with tagged and you have to configure the vlan virtual card on VLAN ID: 4095
here is a screen shot for the configuration
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: Google [Bot], MarkusT and 37 guests