Below is sample JUNOS configuration on Static Routing between HUB Site and and STUB Site.
For ease of configuration ,1 Loopback each has been configured on both the Juniper devices ie HUB and STUB router as below –
ROUTER NAME | INTERFACE | IP ADDRESS |
---|---|---|
HUB | ge-1/2/0.0 | 192.168.1.1/24 |
HUB | Loopback0 | 172.16.1.1/32 |
STUB | ge-1/2/0.1 | 192.168.1.2/24 |
STUB | Loopback0 | 172.16.2.1/32 |
CONFIGURATION –
Step 1 –
On Hub Device, configure the interfaces.
user@HUB# set ge-1/2/0 unit 0 family inet address 192.168.1.1/24
user@HUB# set lo0 unit 57 family inet address 172.16.1.1/32
Step 2 –
On HUB Device, create a static route and set the next-hop address –
user@HUB# set static route 172.16.2.1/32 next-hop 192.168.1.2
Step 3 –
Now, we need to commit the configuration on Hub devices as below –
user@HUB# commit
Step 4 –
On Stub Device , configure the interfaces –
user@STUB# set ge-1/2/0 unit 1 description Stub->HUB
user@ STUB# set ge-1/2/0 unit 1 family inet address 192.168.1.2/24
user@ STUB# set lo0 unit 2 family inet address 172.16.2.1/32
Step 5 –
On Device STUB, create a static route and set the next-hop address –
user@STUB# set static route 0.0.0.0/0 next-hop 172.16.1.1
Step 6 –
Now, we need to commit the configuration on STUB device as below –
user@STUB# commit
VERIFICATION AND TESTING –
Below configuration to verify the configured static routes have been installed in routing table –
inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)+ = Active Route, – = Last Active, * = Both
172.16.1.1/32 *[Direct/0] 01:32:54
. > via lo0.57
192.168.1.0/24 *[Direct/0] 01:36:54
. > via ge-1/2/0.0
192.168.1.1/32 *[Local/0] 01:38:58
. Local via ge-1/2/0.0
172.16.2.1/32 *[Static/5] 01:39:46
. > to 192.168.1.2 via ge-1/2/0.0
inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, – = Last Active, * = Both0.0.0.0/0 *[Static/5] 01:36:54
. > to 192.168.1.1 via ge-1/2/0.1
192.168.1.0/24 *[Direct/0] 01:37:34
. > via ge-1/2/0.1
192.168.1.2/32 *[Local/0] 01:39:36
. Local via ge-1/2/0.1
172.16.2.1/32 *[Direct/0] 01:40:23
. > via lo0.2
Ping testing from each WAN Router ie HUB Router to Loopback of STUB Router and from STUB Router to loopback of HUb Router –
PING 172.16.2.1 (172.16.2.1): 56 data bytes
64 bytes from 172.16.2.1: icmp_seq=0 ttl=64 time=16.106 ms
64 bytes from 172.16.2.1: icmp_seq=1 ttl=64 time=14.393 ms
64 bytes from 172.16.2.1: icmp_seq=2 ttl=64 time=135.361 ms
PING 172.16.1.1 (172.16.1.1): 56 data bytes
64 bytes from 172.16.1.1: icmp_seq=0 ttl=64 time=1.415 ms
64 bytes from 172.16.1.1: icmp_seq=1 ttl=64 time=34.819 ms
64 bytes from 172.16.1.1: icmp_seq=2 ttl=64 time=12.275 ms
More detail JUNOS Routing on Routing scross Stub loications is available on below link –
https://www.juniper.net/techpubs/en_US/junos/topics/example/routing-protocol-static-security-basic-set-of-route-configuring-cli.html
ABOUT THE AUTHOR
I am here to share my knowledge and experience in the field of networking with the goal being – “The more you share, the more you learn.”
I am a biotechnologist by qualification and a Network Enthusiast by interest. I developed interest in networking being in the company of a passionate Network Professional, my husband.
I am a strong believer of the fact that “learning is a constant process of discovering yourself.”
– Rashmi Bhardwaj (Author/Editor)