How to Configure Static routing on juniper router in gns3

Junos static route configuration:

In this article i will show you how to configure static routing with junier router on gns3. For configuring static routing you need to define the route as static and with a next-hop address with it. 


Please note this lab is performed only for study and practice purposes using Junos olive , which is unsupported and unsupportable platform & it is not suitable for any type of commercial use.
Lab Requirements
You have three juniper routers connected with each other, you have the following tasks to perform:
  • Configure all the interfaces with right IP address (According to figure)
  • Configure static routes between all routers so that they can communicate with each other.
Other Detail:
Junos image versionJunOS Olive image 12.1 
Gns3 version= Gns3 1.1 (you can use any version)
VM VirtualBox version=  4.2.4 (you can use any version)

you can visit how to configure junos on gns3 and Basic JunOS commands.

Set IP addresses of all interfaces of juniper router:

For setting ip address of interface you need the following commands.

JunOs2 configuration:
login: root
root@% Cli
root > configure
[edit]
root # set interfaces em0 unit 0 family inet address 172.16.1.1/24

You can also configure some loopback with these commands:

root # set interfaces lo0 unit 55 family inet address 111.0.0.1/32
root # commit

Having issue with commit command visit missing mandatory statement'root-authentication'


JunOs3 configuration:
Cli
configure
set interfaces em0 unit 0 family inet address 172.16.1.2/24
set interfaces em1 unit 0 family inet address 192.168.1.1/24
commit

JunOs4 configuration:
Cli
configure
set interfaces em0 unit 0 family inet address 192.168.1.2/24

You can also configure some loopback with these commands:

set interfaces lo0 unit 55 family inet address 222.0.0.1/32

commit

Configure static routing on Juniper routers:

For configuration of static routing you need next hope addresses:
Static routing on JunOs2 
On junos2 111.0.0.1/32 and 172.16.1.0/24 are directly connected networks whereas 192.168.1.1/24 and 222.0.0.1/32 are remote or destination networks and inaccessible from junos2 . You need to configure static routes for making these routes accessible on junos2. Nex-hop address is 172.16.1.2 for all these routes.          

Cli
configure
set routing-options static route 192.168.1.0/24 next-hop 172.16.1.2
set routing-options static route 222.0.0.0/32 next-hop 172.16.1.2

Static routing on JunOs3
111.0.0.1/32 and 222.0.0.1/32 are inaccessible networks on junos3 and need static routes. Nex-hop addresses are 172.16.1.1 for 111.0.0.1/32 and 192.168.1.2 for 222.0.0.1/32.

Cli
configure
set routing-options static route 222.0.0.0/32 next-hop 172.16.1.1
set routing-options static route 111.0.0.0/32 next-hop 192.168.1.2

Static routing on JunOs4
Nex-hop address for all routes on junos4 is 192.168.1.1.          

Cli
configure
set routing-options static route 172.16.1.0/24 next-hop 192.168.1.1
set routing-options static route 111.0.0.0/32 next-hop 192.168.1.1

Testing:
You can verify your configurations with following results:

Ping from junos2 to 222.0.0.1 should be successful.



Show route brief on JunOS 4 will have following output 





2 comments:

  1. hi...... I have tried the configuration. However, I couldn't ping 222.0.0.1, even all the configuration was same as you mentioned above.
    Do you have any idea why there is no connectivity?
    Thanks.

    ReplyDelete

UA-23728446-1