Add Interface to an OSPF Area in Junos

Just a quick update showing how easy it is to add an interface to an OSPF area. We’re going to start by navigating from a root login up to the OSPF Area 0 config level. Then, we’ll add the interface to Area 0. Please note that this assumes you have already configured an interface with the appropriate settings.

After we’ve logged in as root, we’re presented with the shell prompt. We need to enter the Junos CLI in order to proceed, so enter the `cli` command, as below.
% cli

You be presented with the carrot prompt (`>`), indicating you are in operational mode. We need to enter configuration mode to continue. Do this with the `conf` command. Note that when you type this command, Junos will auto-complete the command to `configure`.
> conf

You should be presented with a pound (`#`) prompt now, indicating that you are in configuration mode. The next step we’ll take is to enter the OSPF Area 0 hierarchy. Junos configurations are hierarchical in nature. We’ll cover this later. To enter the OSPF Area 0 level, issue the command, as below.
# edit protocols ospf area 0

You’ll now be presented with a prompt similar to the following:
[ edit porotocls ospf area ]

The final step to add the interface to the OSPF Area. We do this with the `set interface [interface-name]` command. For our example, we’re going to use interface ge-0/0/0.0 (unit 0 or logical interface 0).
[ edit protocols ospf area ]
# set interface ge-0/0/0.0

And that’s it. As a final note, I’d like to mention that the above process is best when you’re adding multiple interfaces to the same area. If you need to add only one interface, you can use the following command (at the initial configure prompt):
# set protocols ospf area 0 interface ge-0/0/0.0

Once you are familiar with the various configuration hierarchies, you can use them to your advantage to quickly work through your Junos configurations.

Happy networking!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: