Page 1 of 1

Cisco Trunk port

Posted: Fri Jun 02, 2017 4:21 pm
by VeeDub
Hello,

I need to configure an interface on the Mikrotik to match this Cisco configuration
interface FastEthernet0
switchport trunk native vlan 50
switchport trunk allowed vlan 1,49-51,61,90,1002-1005
switchport mode trunk
no ip address
duplex full
speed 100
Tried configuring an interface with all vlans assigned to it, but was unable to ping the Cisco.

Would appreciate suggestions

Thank you
VW

Re: Cisco Trunk port

Posted: Fri Jun 02, 2017 4:29 pm
by paulct
Post the Mikrotik model number (config differs from switch to router). Then post your config.

Re: Cisco Trunk port

Posted: Fri Jun 02, 2017 8:33 pm
by idlemind
Like the previous poster said a lot of it depends on the model. A generic example using common software based bridging for port ether4 could look something like this:
interface bridge add name=eth4-br1 protocol-mode=rstp disabled=no
interface vlan add name=eth4-vlan1 vlan-id=1 interface=br1
interface vlan add name=eth4-vlan49 vlan-id=49 interface=br1
interface vlan add name=eth4-vlan51 vlan-id=51 interface=br1
interface vlan add name=eth4-vlan61 vlan-id=61 interface=br1
interface vlan add name=eth4-vlan90 vlan-id=90 interface=br1

interface bridge port add bridge=eth4-br1 interface=ether4

ip address add interface=eth4-vlan1 address=10.1.1.1/24
ip address add interface=eth4-vlan49 address=10.1.49.1/24
ip address add interface=eth4-br1 address=10.1.50.1/24
ip address add interface=eth4-vlan51 address=10.1.51.1/24
ip address add interface=eth4-vlan61 address=10.1.61.1/24
ip address add interface=eth4-vlan90 address=10.1.90.1/24
An alternative approach, one that I prefer is to use a bridge for each VLAN, this is handy if you have multiple ports you'll need to service tagged or un-tagged:
interface bridge add disabled=no protocol-mode=rstp name=br1
interface bridge add disabled=no protocol-mode=rstp name=br49
interface bridge add disabled=no protocol-mode=rstp name=br50
interface bridge add disabled=no protocol-mode=rstp name=br51
interface bridge add disabled=no protocol-mode=rstp name=br61
interface bridge add disabled=no protocol-mode=rstp name=br90

interface vlan add name=eth4-vlan1 vlan-id=1 interface=ether4
interface vlan add name=eth4-vlan49 vlan-id=49 interface=ether4
interface vlan add name=eth4-vlan51 vlan-id=51 interface=ether4
interface vlan add name=eth4-vlan61 vlan-id=61 interface=ether4
interface vlan add name=eth4-vlan90 vlan-id=90 interface=ether4

interface bridge port add bridge=br1 interface=eth4-vlan1
interface bridge port add bridge=br49 interface=eth4-vlan49
interface bridge port add bridge=br50 interface=ether4
interface bridge port add bridge=br51 interface=eth4-vlan51
interface bridge port add bridge=br61 interface=eth4-vlan61
interface bridge port add bridge=br90 interface=eth4-vlan90

ip address add interface=br1 address=10.1.1.1/24
ip address add interface=br49 address=10.1.49.1/24
ip address add interface=br50 address=10.1.50.1/24
ip address add interface=br51 address=10.1.51.1/24
ip address add interface=br61 address=10.1.61.1/24
ip address add interface=br90 address=10.1.90.1/24
For either to set an Ethernet port to 100/Full do:
interface ethernet set ether4 speed=100Mbps full-duplex=yes
Personally I would not hard code speed and duplex. It's not recommended with gigabit for sure. I know a lot of Cisco guys used to be hardcore about setting speed and duplex in the 10 and 100 Mb days. I'm just not one of them. I've personally hit at least 10 times as many issues with ports set to a static speed and duplex and then being mis-configured on the other side by server or PC techs because they simply don't look for that during device replace than with actual auto detect failing to set speed or duplex correctly.

Naturally if you have an absolutely ancient device that simply won't play nice then do what you have to do and set speed and duplex.