راهنمایی راه اندازی VRF در میکروتیک

بپرسید

0

{{ digitTrunc(content.likes) }}

با سلام و احترام خدمت توسینسویی های عزیز

من یه سناریو دارم که میخوام ازتون کمک بگیرم. من توی دیتاسنتر دوتا سرور دارم که قرار از روی دوتا لینک ( یکی اینترنت و دیگری اینترانت ) سرویس بگیره و بده. توی این سناریو واسه اینکه محدودیت فضا توی دیتا سنتر داشتیم و نمیتونستیم روتر اضافه کنیم باید از قابلیت VRF استفاده کنیم که روتر اصلی یا Core رو ازش دوتا روتینگ تیبل بگیریم . چرا که مطلوب سازمان اینه که لینک اینترنت و اینترانت کاملا از هم جدا باشن. واسه همین به فکر راه اندازی VRF توی میکروتیک افتادیم و همچنین روی لینک اینترانت نیازی به وجود فایروال نداریم و فقط باید جلوی اینترنت فایروال قرار بگیره. واسه همین فایروال رو بین روتر و سوئیچ قرار دادیم. یه لینک بای پس هم کنار فایروال قرار دادم چون فایروال روی بعضی از پکت های برخی سرویس ها زیادی گیر میئه. واسه همین تو این سناریو پورت فایروال خاموشه و فقط به عنوان نمایشی ازش دارم استفاده میکنم و در واقع دارم از لینک بای پس بین سوئیچ و روتر استفاده میشه.

پس شد لینک بای پس واسه اینترنت و لینک دوم واسه اینترانت. طبق این سناریو من همه ی تنظیمان رو درست انجام دادم و داره کار میکنه. تنها مشکل من اینه که وقتی از یکی از سرورها تریس یک آی پی از اینترانت رو میگیرم توی تریس به من آی پی اینترفیس بای پس لینک اینترنت رو نشون میده در صورتی که داره از لینک خودش (یعنی لینک اینترانت بین سوئیچ و روتر) استفاده میکنه. چون وقتی پورت مربوط به لینک بایپس رو خاموش میکنم باز هم بسته یه مقصد میرسه. میخوام ببینم چرا این اتفاق می افته.

در ضمن این نکته رو هم بگم که وقتی پورت رو خاموش میکنم و از روی سرور تریس میگیرم هاب دوم رو تایم اوت میده.

کار میکنه ولی نمیخوام اگر به مشکل بخوره برطرف کردنش من رو به اشتباه بندازه.

VRF

تنظیمات روی میکروتیک اصلی ( Core):

  1. apr102019 12:17:05 by RouterOS 6.42.12
  2. software id =

#

#

#

/interface ethernet

set [ find default-name=ether1 ] name=ether1-INTERNET

set [ find default-name=ether2 ] name=ether2-INTERANET

set [ find default-name=ether3 ] name=ether3-BYPASS

set [ find default-name=ether4 ] disabled=yes name=ether4-FW

set [ find default-name=ether5 ] name=ether5-INTERANETLOCAL

set [ find default-name=ether6 ] disabled=yes

set [ find default-name=ether7 ] disabled=yes

set [ find default-name=ether8 ] name=ether8_MGMT

/interface wireless security-profiles

set [ find default=yes ] supplicant-identity=MikroTik

/ip address

add address=192.168.139.30/24 comment=MGMT interface=ether8_MGMT network=\

192.168.139.0

add address=10.30.66.138/23 comment=INTERANET interface=ether2-INTERANET network=\

10.30.66.0

add address=79.165.133.82/28 comment=INTERNET interface=ether1-INTERNET \

network=79.165.133.80

add address=79.165.133.85/28 interface=ether1-INTERNET network=79.165.133.80

add address=79.165.133.84/28 interface=ether1-INTERNET network=79.165.133.80

add address=79.165.133.92/28 interface=ether1-INTERNET network=79.165.133.80

add address=192.168.46.1/24 comment=FW interface=ether4-FW network=\

192.168.46.0

add address=192.168.45.2/24 comment=BYPASS interface=ether3-BYPASS network=\

192.168.45.0

add address=192.168.49.1/24 comment=INTERANETLOCAL interface=ether5-INTERANETLOCAL \

network=192.168.49.0

/ip dhcp-client

add disabled=no interface=ether1-INTERNET

/ip firewall mangle

add action=mark-routing chain=prerouting in-interface=ether2-INTERANET \

new-routing-mark=VFR-INTERANET passthrough=yes

add action=mark-routing chain=prerouting in-interface=ether5-INTERANETLOCAL \

new-routing-mark=VFR-INTERANET passthrough=yes

/ip firewall nat

add action=src-nat chain=srcnat dst-address=10.0.0.0/8 out-interface=\

ether2-INTERANET routing-mark=VFR-INTERANET to-addresses=10.20.96.194

add action=src-nat chain=srcnat dst-address=172.17.251.0/24 out-interface=\

ether2-INTERANET to-addresses=10.20.96.194

add action=src-nat chain=srcnat dst-address=172.17.252.0/24 out-interface=\

ether2-INTERANET to-addresses=10.20.96.194

add action=src-nat chain=srcnat dst-address=4.2.2.4 out-interface=\

ether1-INTERNET to-addresses=79.175.155.92

add action=src-nat chain=srcnat out-interface=ether1-INTERNET to-addresses=\

79.175.155.82

add action=dst-nat chain=dstnat dst-address=10.20.96.194 dst-port=8090 \

protocol=tcp to-addresses=192.168.4.7 to-ports=23

/ip route

add distance=1 dst-address=10.0.0.0/8 gateway=10.30.66.3 routing-mark=\

VFR-INTERANET

add distance=1 dst-address=10.20.22.13/32 gateway=10.30.66.3 routing-mark=\

VFR-INTERANET

add distance=1 dst-address=172.17.251.0/24 gateway=10.30.66.3 routing-mark=\

VFR-INTERANET

add distance=1 dst-address=172.17.252.0/24 gateway=10.30.66.3 routing-mark=\

VFR-INTERANET

add disabled=yes distance=1 dst-address=192.168.0.0/16 gateway=192.168.49.2 \

routing-mark=VFR-INTERANET

add distance=1 dst-address=192.168.4.0/24 gateway=192.168.49.2 routing-mark=\

VFR-INTERANET

add distance=1 dst-address=192.168.5.0/24 gateway=192.168.49.2 routing-mark=\

VFR-INTERANET

add distance=1 gateway=79.165.133.81

add disabled=yes distance=1 dst-address=192.168.0.0/16 gateway=192.168.45.1

add disabled=yes distance=10 dst-address=192.168.0.0/16 gateway=192.168.46.2

add distance=1 dst-address=192.168.4.0/24 gateway=192.168.45.1

add distance=1 dst-address=192.168.5.0/24 gateway=192.168.45.1

/ip route vrf

add interfaces=ether2-INTERANET,ether5-INTERANETLOCAL routing-mark=VFR-INTERANET

تنظیمات روی سوئیچ :

Switch#show running-config

Building configuration...

Current configuration : 4193 bytes

Last configuration change at 10:17:13 UTC Wed Apr 10 2019

version 15.2

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

service compress-config

hostname Switch

boot-start-marker

boot-end-marker

no aaa new-model

ip cef

no ipv6 cef

spanning-tree mode rapid-pvst

spanning-tree extend system-id

vlan internal allocation policy ascending

track 100 ip route 0.0.0.0 0.0.0.0 reachability

interface GigabitEthernet0/1

switchport access vlan 400

media-type rj45

negotiation auto

interface GigabitEthernet0/2

switchport access vlan 300

media-type rj45

negotiation auto

interface GigabitEthernet0/0

no switchport

ip address 192.168.45.1 255.255.255.0

negotiation auto

interface GigabitEthernet0/3

no switchport

ip address 192.168.139.40 255.255.255.0

negotiation auto

interface GigabitEthernet1/2

media-type rj45

negotiation auto

interface GigabitEthernet1/3

media-type rj45

negotiation auto

interface GigabitEthernet1/1

no switchport

ip address 192.168.47.2 255.255.255.0

negotiation auto

interface GigabitEthernet1/0

no switchport

ip address 192.168.49.2 255.255.255.0

negotiation auto

interface GigabitEthernet2/0

media-type rj45

negotiation auto

interface GigabitEthernet2/1

media-type rj45

negotiation auto

interface GigabitEthernet2/2

media-type rj45

negotiation auto

interface GigabitEthernet2/3

media-type rj45

negotiation auto

interface GigabitEthernet3/0

media-type rj45

negotiation auto

interface GigabitEthernet3/1

media-type rj45

negotiation auto

interface GigabitEthernet3/2

media-type rj45

negotiation auto

interface GigabitEthernet3/3

media-type rj45

negotiation auto

interface Vlan300

ip address 192.168.5.1 255.255.255.0

interface Vlan400

ip address 192.168.4.1 255.255.255.0

ip forward-protocol nd

no ip http server

no ip http secure-server

ip route 0.0.0.0 0.0.0.0 192.168.45.2 track 100

ip route 10.0.0.0 255.0.0.0 192.168.49.1

ip route 172.17.251.0 255.255.255.0 192.168.49.1

ip route 172.17.252.0 255.255.255.0 192.168.49.1

ip sla 100

icmp-echo 192.168.45.2 source-ip 192.168.45.1

frequency 5

ip sla schedule 100 life forever start-time now

control-plane

banner exec ^C

**************************************************************************

  • IOSv is strictly limited to use for evaluation, demonstration and IOS *
  • education. IOSv is provided as-is and is not supported by Cisco's *
  • Technical Advisory Center. Any use or disclosure, in whole or in part, *
  • of the IOSv Software or Documentation to any third party for any *
  • purposes is expressly prohibited except as otherwise authorized by *
  • Cisco in writing. *

**************************************************************************^C

banner incoming ^C

**************************************************************************

  • IOSv is strictly limited to use for evaluation, demonstration and IOS *
  • education. IOSv is provided as-is and is not supported by Cisco's *
  • Technical Advisory Center. Any use or disclosure, in whole or in part, *
  • of the IOSv Software or Documentation to any third party for any *
  • purposes is expressly prohibited except as otherwise authorized by *
  • Cisco in writing. *

**************************************************************************^C

banner login ^C

**************************************************************************

  • IOSv is strictly limited to use for evaluation, demonstration and IOS *
  • education. IOSv is provided as-is and is not supported by Cisco's *
  • Technical Advisory Center. Any use or disclosure, in whole or in part, *
  • of the IOSv Software or Documentation to any third party for any *
  • purposes is expressly prohibited except as otherwise authorized by *
  • Cisco in writing. *

**************************************************************************^C

line con 0

line aux 0

line vty 0 4

login

End

تنظیمات روی سرور که جاش میکروتیک گذاشتم:

  1. apr102019 10:10:15 by RouterOS 6.42.12
  2. software id =

#

#

#

/interface ethernet

set [ find default-name=ether1 ] name=ether1-LAN

set [ find default-name=ether8 ] name=ether8-MGMT

/interface wireless security-profiles

set [ find default=yes ] supplicant-identity=MikroTik

/ip address

add address=192.168.139.60/24 interface=ether8-MGMT network=192.168.139.0

add address=192.168.4.7/24 interface=ether1-LAN network=192.168.4.0

/ip dhcp-client

add disabled=no interface=ether1-LAN

/ip route

add distance=1 gateway=192.168.4.1

/system identity

set name=SRV04

VRF
#vrf #قابلیت_vrf_در_روتر_سیسکو #vrf_چیست #cisco #میکروتیک #vlan
دوره های شبکه، برنامه نویسی، مجازی سازی، امنیت، نفوذ و ... با برترین های ایران

پاسخ ها به این سوال

پاسخ ها به این سوال

{{ digitTrunc(post.likes) }}

این پست در تاریخ {{ dateString(new Date(post.deleteDate)) }} توسط {{ post.deletedByUser }} حذف شده است.

دلیل حذف: {{ post.deleteReason ?? 'نامشخص' }}

{{ err }}
{{ post.userAchivements.rhodiumAchievements }}
{{ post.userAchivements.platinumAchievements }}
{{ post.userAchivements.goldAchievements }}
{{ post.userAchivements.silverAchievements }}
{{ post.userAchivements.bronzeAchievements }}
{{ timeSince(new Date(post.date)) }} قبل

برای ثبت پاسخ خود در وب سایت وارد حساب کاربری خود شوید
قابلیت ارسال مطلب توسط مدیریت سایت غیر فعال شده است