Push Pull
These scenarios show how to configure the push/pull mechanism to send configuration options from the server to the client
Push Route IP
Description
A route to a single IP address is pushed to the client to be routed through the server
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.100.1/24 set interfaces openvpn ovpn1 local-endpoint 10.0.0.0/29 set interfaces openvpn ovpn1 mode server tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://server.crt set vpn openvpn tls-profile TLS private-key running://server.priv.pem set vpn openvpn tls-profile TLS dhparam running://dh.pem set interfaces openvpn ovpn1 mode server server-profile SRV set interfaces ethernet eth1 address 192.168.200.1/24 set vpn openvpn server-profile SRV push route destination 1.2.3.4/32
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 192.168.100.2/24 set interfaces openvpn ovpn1 peer 1 address 192.168.100.1 set interfaces openvpn ovpn1 mode client tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://client.crt set vpn openvpn tls-profile TLS private-key running://client.priv.pem
Step 3: Ping IP address 192.168.100.2
from DUT0
:
admin@DUT0$ ping 192.168.100.2 count 1 size 56 timeout 1Show output
PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data. 64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=0.240 ms --- 192.168.100.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.240/0.240/0.240/0.000 ms
Step 4: Run command interfaces openvpn ovpn1 status
at DUT1
and check if output contains the following tokens:
CONNECTED
Show output
OpenVPN interface ovpn1 State: CONNECTED (SUCCESS) Local endpoint: 10.0.0.6:1194 Remote: 192.168.100.1
Step 5: Ping IP address 10.0.0.1
from DUT1
:
admin@DUT1$ ping 10.0.0.1 count 1 size 56 timeout 1Show output
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data. 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=2.82 ms --- 10.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 2.821/2.821/2.821/0.000 ms
Step 6: Run command protocols ip show route
at DUT1
and check if output contains the following tokens:
1.2.3.4/32Show output
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure S>* 1.2.3.4/32 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:01 S>* 10.0.0.1/32 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:01 C>* 10.0.0.5/32 is directly connected, ovpn1, 00:00:01 C>* 192.168.100.0/24 is directly connected, eth0, 00:00:03
Push Route Network
Description
A network route is pushed to the client to be routed through the server
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.100.1/24 set interfaces openvpn ovpn1 local-endpoint 10.0.0.0/29 set interfaces openvpn ovpn1 mode server tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://server.crt set vpn openvpn tls-profile TLS private-key running://server.priv.pem set vpn openvpn tls-profile TLS dhparam running://dh.pem set interfaces openvpn ovpn1 mode server server-profile SRV set interfaces ethernet eth1 address 192.168.200.1/24 set vpn openvpn server-profile SRV push route destination 1.0.0.0/8
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 192.168.100.2/24 set interfaces openvpn ovpn1 peer 1 address 192.168.100.1 set interfaces openvpn ovpn1 mode client tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://client.crt set vpn openvpn tls-profile TLS private-key running://client.priv.pem
Step 3: Ping IP address 192.168.100.2
from DUT0
:
admin@DUT0$ ping 192.168.100.2 count 1 size 56 timeout 1Show output
PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data. 64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=0.355 ms --- 192.168.100.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.355/0.355/0.355/0.000 ms
Step 4: Run command interfaces openvpn ovpn1 status
at DUT1
and check if output contains the following tokens:
CONNECTED
Show output
OpenVPN interface ovpn1 State: CONNECTED (SUCCESS) Local endpoint: 10.0.0.6:1194 Remote: 192.168.100.1
Step 5: Ping IP address 10.0.0.1
from DUT1
:
admin@DUT1$ ping 10.0.0.1 count 1 size 56 timeout 1Show output
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data. 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.662 ms --- 10.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.662/0.662/0.662/0.000 ms
Step 6: Run command protocols ip show route
at DUT1
and check if output contains the following tokens:
1.0.0.0/8Show output
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure S>* 1.0.0.0/8 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:02 S>* 10.0.0.1/32 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:02 C>* 10.0.0.5/32 is directly connected, ovpn1, 00:00:02 C>* 192.168.100.0/24 is directly connected, eth0, 00:00:03
Client Push Route Network
Description
A network route is pushed to a specific client based on their common name
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.100.1/24 set interfaces openvpn ovpn1 local-endpoint 10.0.0.0/29 set interfaces openvpn ovpn1 mode server tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://server.crt set vpn openvpn tls-profile TLS private-key running://server.priv.pem set vpn openvpn tls-profile TLS dhparam running://dh.pem set interfaces openvpn ovpn1 mode server server-profile SRV set interfaces ethernet eth1 address 192.168.200.1/24 set vpn openvpn server-profile SRV client Client push route destination 1.0.0.0/8
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 192.168.100.2/24 set interfaces openvpn ovpn1 peer 1 address 192.168.100.1 set interfaces openvpn ovpn1 mode client tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://client.crt set vpn openvpn tls-profile TLS private-key running://client.priv.pem
Step 3: Ping IP address 192.168.100.2
from DUT0
:
admin@DUT0$ ping 192.168.100.2 count 1 size 56 timeout 1Show output
PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data. 64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=0.716 ms --- 192.168.100.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.716/0.716/0.716/0.000 ms
Step 4: Run command interfaces openvpn ovpn1 status
at DUT1
and check if output contains the following tokens:
CONNECTED
Show output
OpenVPN interface ovpn1 State: CONNECTED (SUCCESS) Local endpoint: 10.0.0.6:1194 Remote: 192.168.100.1
Step 5: Ping IP address 10.0.0.1
from DUT1
:
admin@DUT1$ ping 10.0.0.1 count 1 size 56 timeout 1Show output
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data. 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.512 ms --- 10.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.512/0.512/0.512/0.000 ms
Step 6: Run command protocols ip show route
at DUT1
and check if output contains the following tokens:
1.0.0.0/8Show output
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure S>* 1.0.0.0/8 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:02 S>* 10.0.0.1/32 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:02 C>* 10.0.0.5/32 is directly connected, ovpn1, 00:00:02 C>* 192.168.100.0/24 is directly connected, eth0, 00:00:04
Push Route VRF
Description
A VRF-aware network route is pushed to the client
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.100.1/24 set interfaces openvpn ovpn1 local-endpoint 10.0.0.0/29 set interfaces openvpn ovpn1 mode server tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://server.crt set vpn openvpn tls-profile TLS private-key running://server.priv.pem set vpn openvpn tls-profile TLS dhparam running://dh.pem set interfaces openvpn ovpn1 mode server server-profile SRV set interfaces ethernet eth1 address 192.168.200.1/24 set vpn openvpn server-profile SRV push route destination 1.2.3.4/32
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 192.168.100.2/24 set interfaces openvpn ovpn1 peer 1 address 192.168.100.1 set interfaces openvpn ovpn1 mode client tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://client.crt set vpn openvpn tls-profile TLS private-key running://client.priv.pem set interfaces openvpn ovpn1 vrf VRF1 set system vrf VRF1
Step 3: Ping IP address 192.168.100.2
from DUT0
:
admin@DUT0$ ping 192.168.100.2 count 1 size 56 timeout 1Show output
PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data. 64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=0.437 ms --- 192.168.100.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.437/0.437/0.437/0.000 ms
Step 4: Run command interfaces openvpn ovpn1 status
at DUT1
and check if output contains the following tokens:
CONNECTED
Show output
OpenVPN interface ovpn1 State: CONNECTED (SUCCESS) Local endpoint: 10.0.0.6:1194 Remote: 192.168.100.1
Step 5: Ping IP address 10.0.0.1
from DUT1
:
admin@DUT1$ ping 10.0.0.1 vrf VRF1 count 1 size 56 timeout 1Show output
ping: Warning: source address might be selected on device other than VRF1. PING 10.0.0.1 (10.0.0.1) from 10.0.0.6 VRF1: 56(84) bytes of data. 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.560 ms --- 10.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.560/0.560/0.560/0.000 ms
Step 6: Run command protocols vrf VRF1 ip show route
at DUT1
and check if output contains the following tokens:
1.2.3.4/32Show output
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure VRF VRF1: K>* 0.0.0.0/0 [255/8192] unreachable (ICMP unreachable), 00:00:03 S>* 1.2.3.4/32 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:01 S>* 10.0.0.1/32 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:01 C>* 10.0.0.5/32 is directly connected, ovpn1, 00:00:01
Pull Filter
Description
A client configures a filter to ignore any option pushed by the server starting with the text “route 1.2.3.4” but accept all others
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 192.168.100.1/24 set interfaces openvpn ovpn1 local-endpoint 10.0.0.0/29 set interfaces openvpn ovpn1 mode server tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://server.crt set vpn openvpn tls-profile TLS private-key running://server.priv.pem set vpn openvpn tls-profile TLS dhparam running://dh.pem set interfaces openvpn ovpn1 mode server server-profile SRV set interfaces ethernet eth1 address 192.168.200.1/24 set vpn openvpn server-profile SRV push route destination 1.2.3.4/32 set vpn openvpn server-profile SRV push route destination 1.0.0.0/8
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 192.168.100.2/24 set interfaces openvpn ovpn1 peer 1 address 192.168.100.1 set interfaces openvpn ovpn1 mode client tls-profile TLS set vpn openvpn tls-profile TLS ca running://ca.crt set vpn openvpn tls-profile TLS certificate running://client.crt set vpn openvpn tls-profile TLS private-key running://client.priv.pem set interfaces openvpn ovpn1 mode client client-profile CNT set vpn openvpn client-profile CNT pull filter 1 policy ignore set vpn openvpn client-profile CNT pull filter 1 text "route 1.2.3.4"
Step 3: Ping IP address 192.168.100.2
from DUT0
:
admin@DUT0$ ping 192.168.100.2 count 1 size 56 timeout 1Show output
PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data. 64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=0.291 ms --- 192.168.100.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.291/0.291/0.291/0.000 ms
Step 4: Run command interfaces openvpn ovpn1 status
at DUT1
and check if output contains the following tokens:
CONNECTED
Show output
OpenVPN interface ovpn1 State: CONNECTED (SUCCESS) Local endpoint: 10.0.0.6:1194 Remote: 192.168.100.1
Step 5: Ping IP address 10.0.0.1
from DUT1
:
admin@DUT1$ ping 10.0.0.1 count 1 size 56 timeout 1Show output
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data. 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.574 ms --- 10.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.574/0.574/0.574/0.000 ms
Step 6: Run command protocols ip show route
at DUT1
and check if output contains the following tokens:
1.0.0.0/8Show output
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure S>* 1.0.0.0/8 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:02 S>* 10.0.0.1/32 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:02 C>* 10.0.0.5/32 is directly connected, ovpn1, 00:00:02 C>* 192.168.100.0/24 is directly connected, eth0, 00:00:03
Step 7: Run command protocols ip show route
at DUT1
and check if output does not contain the following tokens:
1.2.3.4/32Show output
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure S>* 1.0.0.0/8 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:02 S>* 10.0.0.1/32 [1/0] via 10.0.0.5, ovpn1, weight 1, 00:00:02 C>* 10.0.0.5/32 is directly connected, ovpn1, 00:00:02 C>* 192.168.100.0/24 is directly connected, eth0, 00:00:03