Sharing Ilmu

Sharing for useful things

Configuration VLAN on Mikrotik Router and Cisco Switch

In this tutorial I’ll discuss about configuration vlan with different device vendors.  Is it Can ? Is it Work ?? let’s discuss it.  Here I’ll use Mikrotik Router Device and Cisco Switch and for configure the lab I use PNETLab that has been installed the mikrotik chr and cisco IOS L2 images.  You can also use GNS3 or EVE-ng.

The following is the topologi are used :

Do basic configuration on mikrotik router so that the router can be distribute internet connection to clients.

Configure DHCP Client to get ip for internet connection automatically.

Set Allow Remote Request for DNS Settings.

Configure Firewall NAT Masquerade.

Make Sure the router can be connected to internet.

 

Then, Create two VLAN interfaces for VLAN10 and VLAN20 on ether2.

Add ip address for VLAN10 and VLAN20.

Configure DHCP Server for VLAN10 and VLAN20.

 

Configure Cisco Switch

Configure vlan interface for vlan10 and vlan20.

MySW(config)#vlan 10
MySW(config-vlan)#name VLAN-10
MySW(config-vlan)#exit
MySW(config)#vlan 20
MySW(config-vlan)#name VLAN-20
MySW(config-vlan)#exit
MySW(config)#

Check interface status on switch :

MySW#show ip interface brief
Interface              IP-Address              OK?  Method       Status               Protocol
Ethernet0/0            unassigned              YES    unset        up                        up
Ethernet0/1            unassigned              YES    unset        up                        up
Ethernet0/2            unassigned              YES    unset        up                        up
Ethernet0/3            unassigned              YES    unset        up                        up
MySW#

Look at the status. Interfaces name for this switch is Ethernet0/0-3 or eth0/0 until eth0/3.

Then configure trunk port. Change trunk encapsulation with dot1q (802.1q)

MySW(config)#int eth0/0
MySW(config-if)#switchport trunk encapsulation dot1q
MySW(config-if)#switchport mode trunk
MySW(config-if)#exit

 

Configure access port on eth0/1 and assign to vlan10

MySW(config)#int eth0/1
MySW(config-if)#switchport mode access
MySW(config-if)#switchport access vlan 10
MySW(config-if)#exit

Configure access port on eth0/2 and assign to vlan20

MySW(config)#int eth0/2
MySW(config-if)#switchport mode access
MySW(config-if)#switchport access vlan 20
MySW(config-if)#exit

Test configuration on PC1 (network vlan10) and PC2  (network vlan20) :

Test internet connection from PC

Configuration is successfull.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>