How to create a vlan in Juniper Router | Junos OS

Today we will know an important thing about the Juniper router. That is, how to create VLANs on Juniper router, and also see how to set Point to Point IP address against any VLAN.

I searched online and found most of the articles on the Juniper switch configuration topic. Juniper routers and Juniper switches have very different OS versions. Today we will learn VLAN creation and Point-to-point IP address assigning of Juniper router. So let's get started.

Today we will learn the configuration of the Juniper router. The router model is MX80 and the OS version is Junos: 17.3R3.10.

Juniper VLAN configuration example

We will divide it into 2 sectors separately. First, let's know about the VLAN segment. Then I will know this IP Address segment. First, you need to log in to the router. So let's see the Juniper router's VLAN creation script.


login: afnan
Password:

--- JUNOS 17.3R3.10 built 2018-09-06 23:15:56 UTC

afnan@NIS-Core> configure

Entering configuration mode

Users currently editing the configuration:
afnan terminal u0 (pid 31768) on since 2023-10-16 12:54:47 UTC, idle 3w4d 20:38

[edit]
afnan@NIS-Core# set interfaces ae2 unit 321 vlan-id 321
[edit]
afnan@NIS-Core#commit check
configuration check succeeds

[edit]
afnan@NIS-Core#commit
commit complete

Note: interface ae2 is my lacp port channel.

How to set up a VLAN description?

You can create any VLAN interface and set up its description if you want. So let's get started.

[edit]
afnan@NIS-Core#set interfaces ae2 unit 321 description --Your Description--
[edit]
afnan@NIS-Core#commit check
configuration check succeeds

[edit]
afnan@NIS-Core#commit
commit complete

Note: interface ae2 is my lacp port channel.

How do I assign an IP address to a VLAN in Juniper?

In this step, we will know how to assign IP addresses to VLAN in the Juniper router. Juniper routers do not assign VALN-based IP addresses. Yes, that is true. The IP address is assigned for each unit. Juniper router unit system has been prepared for each VLAN interface by preparing a separate segment.

We can think of it as a partition of a room, whatever is inside one room cannot go into another room. So we can consider a unit as a room. Inside this room, there will be VLAN, IP, and interface descriptions. So let's see How to assign an IP address to a VLAN in Juniper.

[edit]
afnan@NIS-Core# set interfaces ae2 unit 321 family inet address 10.100.100.49/30

edit]
afnan@NIS-Core#commit check
configuration check succeeds

[edit]
afnan@NIS-Core#commit
commit complete

Note: interface ae2 is my lacp port channel.

How do I show the configuration in Juniper?

This step is very important. How to match your previous configurations and check? It is also very easy. You just match which configuration you want to see on the Juniper router.

Let's say now we have configured to create a Unit, VLAN & IP address in Juniper Router. We will print this configuration. So let's see. If you don't understand the commands then see the picture below, I hope you will understand.

afnan@NIS-Core>

afnan@NIS-Core> show configuration | display set | match 321
set interfaces ae2 unit 321 description NIS-Erricssion2-IIG
set interfaces ae2 unit 321 vlan-id 321
set interfaces ae2 unit 321 family inet address 10.100.100.49/30

afnan@NIS-Core>


Conclusion:

From this article, we have understood How to create a VLAN in a Juniper Router. Each step configuration of Juniper is very easy. Every step is easily understood by those who understand it no matter how difficult it is. Hope you understand. Comment if you have any curiosity. thank you


Post a Comment

Previous Post Next Post

Contact Form