Oslo Paris experiment setup with Juniper routers

Alternative setup with Juniper routers. The purpose of this document is to explain how to set up OSPF using the juniper routers and the JunOS command line interface CLI.

The Juniper operating system is based on a FreeBSD Unix kernel, with a special shell called the CLI (Command Line Interface).

The OSPF network consists in this example of three areas, Area 0 (the backbone), and area 1 and 2 (stubby areas). This document will explain how to setup the router located between area 0 and area 1. See picture.

When connected to the router you first need to type "cli" to access the command line interface (shell):

root@Jun2300_2% cli
cli> configure

When connected to cli you can start configuring the router. To see the available options type a question mark '?'. CLI also supports completion of commands using tab. Similar to Cisco IOS, the Junos CLI also has a hierarchy of configuration menus. To go one step up in the hierarchy use the up command, to go to the top simply use the top command.

Before we begin configuring OSPF we should check the existing configuration on the router. This can be done using the show command:

root@Jun2300_2# show interfaces
fe-0/0/0 {
    unit 0 {
        family inet {
            address 192.168.1.1/24;
        }
    }
}
fe-0/0/1 {
    description "fast ether 2";
    unit 1 {
        family inet {
            address 10.10.10.2/24 {
                broadcast 10.10.10.255;
            }
        }
    }
}

root@Jun2300_2# show protocols
ospf {
    area 0.0.0.0 {
        interface fe-0/0/1.0 {
            hello-interval 5;
        }
    }
}

As we can see the router is configured with one OSPF area and both of the Fast Ethernet interfaces are configured.

To delete the settings for the fastethernet interfaces we use the commands:

root@Jun2300_2# delete interfaces fe-0/0/0
root@Jun2300_2# delete interfaces fe-0/0/1

We only need to specify enough information to identify the interface we want to delete. To add new settings for the fastethernet interfaces we type:

root@Jun2300_2# set interfaces fe-0/0/0 unit 0 family inet address 222.45.3.1/24 broadcast 222.45.3.255
root@Jun2300_2# set interfaces fe-0/0/1 unit 0 family inet address 10.10.43.2/24 broadcast 10.10.43.255

Now all that remains is to reconfigure OSPF. We start by deleting the existing settings:

root@Jun2300_2# delete protocols ospf area 0

Then we add area0 and area 1:

root@Jun2300_2# set protocols ospf area 0 interface fe-0/0/1 hello-interval 5
root@Jun2300_2# set protocols ospf area 1 stub interface fe-0/0/0 hello-interval 5
root@Jun2300_2# set protocols ospf area 1 stub

The configuration of the router should now be complete, to control that everything is configured correctly we can use the show command to get a listing of the current config:

root@Jun2300_2# show

system {
    host-name Jun2300_2;
    time-zone Europe/Oslo;
    root-authentication {
        encrypted-password "$1$hcoYBHux$0B8pb9Uy/Ugg28PnEFJTq0"; ## SECRET-DATA
    }
    services {
        ssh;
        web-management {
            http;
        }
    }
    syslog {
        file messages {
            any any;
        }
    }
}
interfaces {
    fe-0/0/0 {
        unit 0 {
            family inet {
                address 222.45.3.1/24;
            }
        }
    }
    fe-0/0/1 {
        description "fast ether 2";
 	unit 0 {
            family inet {
                address 10.10.43.2/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 127.0.0.1/32;
            }
        }
    }
}
protocols {
    ospf {
        area 0.0.0.0 {
            interface fe-0/0/1.0 {
                hello-interval 5;
            }
        }
        area 0.0.0.1 {
            stub;
            interface fe-0/0/0.0 {
                hello-interval 5;
            }
        }
    }
}

If the configuration seems correct you can activate you changes by typing:

root@Jun2300_2# commit

If you don't commit, none of your changes will take effect. Now you need to configure the other juniper router as well.

HINT! When you look at the listing of your settings it is important to notice the structure, the menus in Junos CLI is similar to this structure. All the commands used in this example has been from the top of the hierarchy, by using the edit command it is possible to enter submenus (i.e. edit interfaces fe-0/0/0). Press enter to see where you are in the hierarchy.

root@Jun2300_2#

[edit interfaces fe-0/0/0]
root@Jun2300_2#

Gard Undheim