11.2.3.2. Static-route setting

Operation Confirmed Version:
 vSRX Version15.1X49-D105.1
For vSRX , a static route can be set. For a static route, routing setting is made for direct configuration regarding specification of a router or host (in connection) as a packet forwarding destination, in terms of a destination network. This setting allows forwarding through routing when receiving packets addressed to a not-belonging network or host.

Setting a static route in which a host (IP address) is specified as a destination

Set a static route in which a host (IP address) is specified as a destination.

Presumed case for sample setting

  • To set a static route and enable communications between vSRX01 (192.168.1.101) and virtual server (192.168.3.13)

Note

Assume that routing settings have been properly made on device (vSRX02) on the way and the destination host (virtual server).

Configuration diagram

Setting flow in a presumed case

1.As Next-hop, set the address (192.168.1.102) of vSRX-02 adjacent to vSRX-01, which sets destination host address (192.168.3.13/32) and static route.

Command to be entered with CLI

[edit]
user01@vSRX-01# set routing-options static route 192.168.3.13/32 next-hop 192.168.1.102

The configuration after completion of appropriate settings is as follows.

user01@vSRX-01> show configuration routing-options
static {
    route 192.168.3.13/32 next-hop 192.168.1.102;
}

Operation check result

The verification result log below allowed to confirm that the setting of the static route has been made properly because of success of communications from vSRX-01 in the verification configuration diagram to virtual server (192.168.3.13).

Checking the route from vSRX-01 (192.168.1.101) to virtual server (192.168.3.13)

user01@vSRX-01> show route

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.0/24        *[Direct/0] 04:20:32
                    > via fxp0.0
10.0.0.101/32      *[Local/0] 04:20:32
                      Local via fxp0.0
192.168.1.0/24     *[Direct/0] 04:20:13
                    > via ge-0/0/0.0
192.168.1.101/32   *[Local/0] 04:20:15
                      Local via ge-0/0/0.0
192.168.2.0/24     *[Direct/0] 04:20:13
                    > via ge-0/0/1.0
192.168.2.101/32   *[Local/0] 04:20:15
                      Local via ge-0/0/1.0
192.168.3.13/32    *[Static/5] 00:02:41
                    > to 192.168.1.102 via ge-0/0/0.0

user01@vSRX-01>

Checking communications from vSRX-01 (192.168.1.101) to virtual server (192.168.3.13)

user01@vSRX-01> ping 192.168.3.13 count 5
PING 192.168.3.13 (192.168.3.13): 56 data bytes
64 bytes from 192.168.3.13: icmp_seq=0 ttl=63 time=5.066 ms
64 bytes from 192.168.3.13: icmp_seq=1 ttl=63 time=1.963 ms
64 bytes from 192.168.3.13: icmp_seq=2 ttl=63 time=1.945 ms
64 bytes from 192.168.3.13: icmp_seq=3 ttl=63 time=2.001 ms
64 bytes from 192.168.3.13: icmp_seq=4 ttl=63 time=2.249 ms

--- 192.168.3.13 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.945/2.645/5.066/1.216 ms

user01@vSRX-01>

Setting a static route in which a network address is specified as a destination

Set a static route in which a network address is specified as a destination.

Presumed case for sample setting

  • To enable communications with server (192.168.3.13) on the network of 192.168.3.0/24

  • To make settings which allow communications also after future addition of a server to the network of “192.168.3.0/24”

Note

Assume that routing settings have been properly made on device (vSRX-02) on the way and the destination host (virtual server).

Configuration diagram

Setting flow in a presumed case

1.As Next-hop, set the address (192.168.1.102) of vSRX-02 adjacent to vSRX-01, which sets destination network address (192.168.3.0/24) and static route.

Command to be entered with CLI

[edit]
user01@vSRX-01# set routing-options static route 192.168.3.0/24 next-hop 192.168.1.102

The configuration after completion of appropriate settings is as follows.

user01@vSRX-01> show configuration routing-options
static {
    route 192.168.3.0/24 next-hop 192.168.1.102;
}

Operation check result

The verification result log below allowed to confirm that the setting of the static route has been made properly because of success of communications from vSRX-01 in the verification configuration diagram to virtual server (192.168.3.13).

Checking the route from vSRX-01 (192.168.1.101) to virtual server (192.168.3.13)

user01@vSRX-01> show route

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.0/24        *[Direct/0] 04:13:40
                    > via fxp0.0
10.0.0.101/32      *[Local/0] 04:13:40
                      Local via fxp0.0
192.168.1.0/24     *[Direct/0] 04:13:21
                    > via ge-0/0/0.0
192.168.1.101/32   *[Local/0] 04:13:23
                      Local via ge-0/0/0.0
192.168.2.0/24     *[Direct/0] 04:13:21
                    > via ge-0/0/1.0
192.168.2.101/32   *[Local/0] 04:13:23
                      Local via ge-0/0/1.0
192.168.3.0/24     *[Static/5] 00:05:24
                    > to 192.168.1.102 via ge-0/0/0.0

user01@vSRX-01>

Checking communications from vSRX-01 (192.168.1.101) to virtual server (192.168.3.13)

user01@vSRX-01> ping 192.168.3.13 count 5
PING 192.168.3.13 (192.168.3.13): 56 data bytes
64 bytes from 192.168.3.13: icmp_seq=0 ttl=63 time=4.857 ms
64 bytes from 192.168.3.13: icmp_seq=1 ttl=63 time=1.958 ms
64 bytes from 192.168.3.13: icmp_seq=2 ttl=63 time=2.785 ms
64 bytes from 192.168.3.13: icmp_seq=3 ttl=63 time=1.903 ms
64 bytes from 192.168.3.13: icmp_seq=4 ttl=63 time=2.183 ms

--- 192.168.3.13 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.903/2.737/4.857/1.105 ms

Setting a static route for packet transmission and reception through a specific interface

Set a static route for the case where vSRX-01 (192.168.1.101) which is the default gateway of the host uses the same interface (ge-0/0/0) in terms of incoming and outgoing packets.

Presumed case for sample setting

  • To set a static route in which the same interface (ge-0/0/0) is used in terms of incoming and outgoing packets

Configuration diagram

Setting flow in a presumed case

1.Set the address (192.168.1.102) of vSRX-02 adjacent to destination IP address (192.168.3.0/24), as Next-hop.

Command to be entered with CLI

[edit]
user01@vSRX-01# set routing-options static route 192.168.3.0/24 next-hop 192.168.1.102

The configuration after completion of appropriate settings is as follows.

user01@vSRX-01> show configuration routing-options
static {
    route 192.168.3.0/24 next-hop 192.168.1.102;
}

Operation check result

The verification result log below allowed to confirm success of communications from virtual server (192.168.1.11) in the verification configuration diagram to virtual server (192.168.3.13). Also, success of packet transmission and reception through the same interface (ge-0/0/0) was confirmed with respect to the routing table of vSRX-01, and thus appropriate settings of the static route were confirmed.

Checking the route from virtual server (192.168.1.11) to virtual server (192.168.3.13)

[user01@centsv01 ~]$ traceroute 192.168.3.13
traceroute to 192.168.3.13 (192.168.3.13), 30 hops max, 60 byte packets
 1  192.168.1.101 (192.168.1.101)  3.665 ms  3.662 ms  3.656 ms
 2  192.168.1.102 (192.168.1.102)  6.951 ms  6.953 ms  6.947 ms
 3  192.168.3.13 (192.168.3.13)  7.759 ms  7.762 ms  9.049 ms

Checking communications from virtual server (192.168.1.11) to virtual server (192.168.3.13)

[user01@centsv01 ~]$ ping 192.168.3.13 count 5
PING 192.168.3.13 (192.168.3.13) 56(84) bytes of data.
64 bytes from 192.168.3.13: icmp_seq=1 ttl=63 time=4.46 ms
64 bytes from 192.168.3.13: icmp_seq=2 ttl=63 time=1.10 ms
64 bytes from 192.168.3.13: icmp_seq=3 ttl=63 time=1.04 ms
64 bytes from 192.168.3.13: icmp_seq=4 ttl=63 time=0.953 ms
64 bytes from 192.168.3.13: icmp_seq=5 ttl=63 time=1.09 ms

--- 192.168.3.13 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4002ms
rtt min/avg/max/mdev = 0.953/1.732/4.466/1.368 ms

Route check with vSRX-01

user01@vSRX-01> show route

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.0/24        *[Direct/0] 06:06:05
                    > via fxp0.0
10.0.0.101/32      *[Local/0] 06:06:05
                      Local via fxp0.0
192.168.1.0/24     *[Direct/0] 06:05:46
                    > via ge-0/0/0.0
192.168.1.101/32   *[Local/0] 06:05:48
                      Local via ge-0/0/0.0
192.168.2.0/24     *[Direct/0] 06:05:46
                    > via ge-0/0/1.0
192.168.2.101/32   *[Local/0] 06:05:48
                      Local via ge-0/0/1.0
192.168.3.0/24     *[Static/5] 01:20:20
                    > to 192.168.1.102 via ge-0/0/0.0

user01@vSRX-01>