As per the feedback received from Engineering team, the switches that run Free BSD6 doesn’t include a setfib utility required for permitting process or commands to use a specific routing table apart from the default ones.
So the REST-API doesn't work when associated with mgmt_junos. This is a limitation with Free BSD6.
Problem State:
set system services rest routing-instance mgmt_junos
set system management-instance
root# show | compare
Nov 28 17:38:40
[edit system services rest]
+ routing-instance mgmt_junos;
[edit system]
+ management-instance;
{master:0}[edit]
root# commit
Nov 28 17:38:42
configuration check succeeds
commit complete
root# run ping 10.219.20.105
Nov 28 17:38:57
PING 10.219.20.105 (10.219.20.105): 56 data bytes
ping: sendto: No route to host
^C
--- 10.219.20.105 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
root# run ping 10.219.20.105 routing-instance mgmt_junos
Nov 28 17:39:04
64 bytes from 10.219.20.105: icmp_seq=0 ttl=64 time=0.086 ms
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.086/0.086/0.086/0.000 ms
root# run show system connections inet | match 3000
Nov 28 17:39:10
root#
Working State:
delete system services rest routing-instance mgmt_junos
delete system management-instance
- routing-instance mgmt_junos;
- management-instance;
root# commit check
64 bytes from 10.219.20.105: icmp_seq=0 ttl=64 time=1.518 ms
round-trip min/avg/max/stddev = 1.518/1.518/1.518/0.000 ms
tcp4 0 0 10.219.20.105.3000 *.* LISTEN