simple two vrf's:
- existing default 'main' for production without services/management
- 'mgmt' for in band management
Code: Select all
/ip vrf
add interfaces=mgmt name=mgmt
give the box two ip addresses - one for production, the other one for management:
Code: Select all
/ip address
add address=47.11.8.15/24 interface=v777-production
add address=192.168.8.15/24 interface=v999-mgmt
make two default routes - one for production and the other one for the management:
Code: Select all
/ip route
add dst-address=0.0.0.0/0 gateway=47.11.8.1
add dst-address=0.0.0.0/0 gateway=192.168.8.1@mgmt routing-table=mgmt
bind the services used for vrf (other services are disabled):
Code: Select all
/ip service
set ssh vrf=mgmt
set winbox vrf=mgmt
associate the management vlan '999' to the interface list 'mgmt' to activate the management vrf:
Code: Select all
/interface list
add name=mgmt
/interface list member
add interface=v999-mgmt list=mgmt
set the dns server to the private management dns server (eg. for sending notification emails etc):
Code: Select all
/ip dns
set servers=192.168.8.2
when we try, to check if dns works, following thing happens:
Code: Select all
put [:resolve mail.mgmt.lan]
failure: dns server failure
check, if we can ping the dns-server by it's ip via our management vrf:
Code: Select all
ping 192.168.8.2 count=1 vrf=mgmt
Columns: SEQ, HOST, SIZE, TTL, TIME
SEQ HOST SIZE TTL TIME
0 192.168.8.2 56 64 575us
without vrf it's not reachable, as it should be, because that's the reason why you make a management vrf (the production gateway doesn't know anything about the isolated management network):
Code: Select all
tool traceroute 192.168.8.2 count=3
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
# ADDRESS LOSS SENT LAST AVG BEST WORST STD-DEV
1 47.11.8.1 0% 1 0.4ms 0.4 0.4 0.4 0
2 100% 1 timeout
when you use a public reachable dns server, dns suddenly works, but unfortunate only for 'public' addresses:
Code: Select all
/ip dns
set servers=192.168.8.2,192.168.8.3
put [:resolve mt.lv]
159.148.147.205
so clearly dns ALWAYS goes via 'default' main vrf and i found no solution how to force it to go via the mgmt vrf (dns server fields don't accept @mgmt suffix).