How it works…

In step 1, we're simply configuring the BSD host as we would do for any normal host or gateway device. The em1 interface on the BSD host acts as intermediate transport address. The address itself isn't relevant to the actual end-application. The important address, for which we'll manage the routing, is the lo0 address on the BSD host.

In step 2, we tell the JUNOS device about the lo0 interface on the BSD box. We use an unusual static route configuration on JUNOS that you might not be used to.

Typical static route configuration

Our static route configuration

static {  route 10.255.255.220/32 {    next-hop 10.255.211.220;  }}
static {  route 10.255.255.220/32 {    next-hop 10.255.255.220;    qualified-next-hop 10.0.211.220 { preference ...

Get JUNOS Automation Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.