Configuring virtual router


I just want to talk about briefly how you can configure a simple virtual router in Junos. For this I have drawn a physical and a logical view of my simple topology. In physical view, you can see that there is only one SRX but logically there are actually one virtual router connected from interface ge-0/0/2 to ge-0/0/3. There are different ways of connecting a virtual router to the physical one but I have chosen to use the physical interfaces to inter connect. These two interfaces can be connected over a switch or back to back.

As it can be seen in the config, I have configured a virtual router instance named “custA” and assigned ge-0/0/2.0 interface to this VR but we must configure the interface under the main interfaces configuration stanza.

If you look at this config, it may surprise you first if you don’t know that one of the interfaces belongs to a VR. It is because both of them are in the same subnet which you shouldn’t have under normal circumstances but it allows us connectivity when you have a VR. Now we can ping from custA virtual router to the physical router.

As you can see we can ping from routing instance (virtual router) to our physical box. Actually my real custA config in my lab is a bit different, I just stripped down some details for the sake of simplicity. My real config is below which also establishes a BGP peering between the two boxes. I hope this helps for those who are new to virtual router concept in Junos.

PS: In my setup, SRX is in packet mode so there is no need to have any security policy.

You have a feedback?