JUNOS CONFIGURATION – STATIC ROUTING FOR CONNECTING TO STUB LOCATION CE ROUTER

Rashmi Bhardwaj | Blog,Config & Troubleshoot,Routing & Switching
Advertisements

Below is sample JUNOS configuration on Static Routing between HUB Site and and STUB Site.

junos-configuration-static-routing-for-connecting-to-stub-location-ce-router

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.

Advertisements

[edit interfaces]user@HUB# set ge-1/2/0 unit 0 description HUB->STUB
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 –

[edit routing-options]
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 –

[edit interfaces]
user@HUB# commit

Step 4 –
On Stub Device , configure the interfaces –

[edit 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 –

[edit routing-options]
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 –

[edit]
user@STUB# commit

 

VERIFICATION AND TESTING –

Below configuration to verify the configured static routes have been installed in routing table –

user@HUB> show route
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

 

user@STUB> show route
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 –

user@HUB> ping 172.16.2.1
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
user@STUB> ping 172.16.1.1
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

Advertisements

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Select your currency
USD United States (US) dollar
Scroll to Top