O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it…

First of all we'll set up the environment in the topology diagram using two routers, JUNOS, and OpenBSD, speaking OSPF on common subnets.

  1. Configure the JUNOS router with the appropriate network interfaces, em0, em1, and lo0.
     adamc@router> show configuration interfaces      em0 {         unit 0 {            family inet {              address 10.0.201.201/24;            }         }     }     em1 {         unit 0 {            family inet {              address 10.0.211.201/24;            }         }     }     lo0 {         unit 0 {            family inet {               address 10.255.255.201/32 {                    primary;                                   preferred;                             }                                       }                                       }                                        } 
  1. On the OpenBSD router, effect the same thing by configuring the /etc/hostname.if class of files, then running the netstart shell script to configure the interfaces.
       # cat /etc/hostname.em0                                      inet 10.0.201.220 255.255.255.0 10.0.201.255 description ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required