মাসের ১০ তারিখের মধ্যে আপনার ইন্টারনেট বিল জমা দেওয়ার জন্য অনুরুদ করা হলো অন্যথায় আপনার ইন্টারনেট সংযুক্ত বিছিন্ন করা হবে
Home 10 Mikrotik router 10 Mikrotik Router Policy-based Routing Using VLAN Configuration

Mikrotik Router Policy-based Routing Using VLAN Configuration

IP address Configuration:

/ip address

add address=59.152.105.14/30 network=59.152.105.13 broadcast=59.152.105.15 interface=WAN1

add address=59.152.103.214/30 network=59.152.103.213 broadcast=59.152.103.215 interface=WAN2

VLAN Configuration on  Mikrotik Router:

/interface vlan

add name=VLAN-100 interface=LOCAL vlan-id=100

add name=VLAN-200 interface=LOCAL vlan-id=200

/ip address

add address=192.168.10.1/24 interface=VLAN-100

add address=172.16.10.1/24 interface=VLAN-200

 DNS Configuration:

/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=4.4.4.4,8,8.8.8.8

NAT Configuration:

/ip firewall nat

add chain=srcnat action=masquerade src-address=192.168.10.0/24 out-interface=WAN1

add chain=srcnat action=masquerade src-address=172.16.10.0/24 out-interface=WAN2

NAT Configuration:

/ip firewall nat

add chain=srcnat action=masquerade src-address=192.168.10.0/24 out-interface=WAN1

add chain=srcnat action=masquerade src-address=172.16.10.0/24 out-interface=WAN2

Mangle Configuration for 192.168.10.0/24 forward interface WAN1 and 172.16.10.0/24 forward WAN2 

/ip firewall mangle
chain=prerouting action=mark-routing new-routing-mark=WAN1
passthrough=yes src-address=192.168.10.0/24

chain=prerouting action=mark-routing new-routing-mark=WAN2
passthrough=yes src-address=172.16.10.0/24

/ip route
add dst-address=0.0.0.0/0 routing-mark=WAN1 gateway=59.152.105.13
add dst-address=0.0.0.0/0 routing-mark=WAN2 gateway=59.152.103.213

Simple Queue Configuration For Client 192.168.10.2:

/queue simple

Add name=”Test1″ target-addresses=192.168.10.2/32 interface=VLAN-100 parent=none

      packet-marks=”” direction=both priority=8

      queue=default-small/default-small limit-at=0/0 max-limit=1M/1M

      burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s

      total-queue=default-small

Simple Queue Configuration For Client 172.16.10.2:

/queue simple

Add name=”Test2″ target-addresses=172.16.10.2/32 interface=VLAN-200 parent=none

      packet-marks=”” direction=both priority=8

      queue=default-small/default-small limit-at=0/0 max-limit=1M/1M

      burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s

      total-queue=default-small

AccessSwitch Configuration:

AccessSwitch>enable

AccessSwitch#configuration terminal

AccessSwitch(config)#interface fastethernet 0/0

AccessSwitch(config-if)#switchport mode trunk

AccessSwitch(config-if)#switchport trunk allowed vlan all

AccessSwitch(config-if)#switchport nonegotiate

AccessSwitch(config)#vlan 100

AccessSwitch(config)#vlan 200

AccessSwitch(config)#interface fastethernet 0/1

AccessSwitch(config-if)#switchport mode access

AccessSwitch(config-if)#switchport access vlan 100

AccessSwitch(config)#interface fastethernet 0/2

AccessSwitch(config-if)#switchport mode access

AccessSwitch(config-if)#switchport access vlan 200

AccessSwitch#wr

One comment

Leave a Reply

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

*

x

Check Also

PPPoE Users For Limit Different Bandwidth In Day and Night

  There are lot many ways to limit bandwidth for day and Night. If we ...