Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
FabioLima1
Contributor
Jump to solution

List routes from a vsx gateway by cli

Guys, does anyone know a way to list the routes of a vsx gateway by cli?

0 Kudos
1 Solution

Accepted Solutions
Bob_Zimmerman
Authority
Authority

It depends on the version of VSX. Versions of VSX up to R80.30 (I think) are based on some VRF extensions to the Linux kernel. R80.40 and later are based on Linux network namespaces.

For R80.40 and up, you can get a list of the namespace names using 'ip netns list', then you can run a command in a particular namespace by using 'ip netns exec <namespace name> <command>', like this:

[Expert@MyVsxCluster:0 STANDBY]# fw ver
This is Check Point's software version R80.40 - Build 135

[Expert@MyVsxCluster:0 STANDBY]# ip netns list
CTX00000 (id: 0)
CTX00001 (id: 1)
CTX00002 (id: 2)
...

[Expert@ MyVsxCluster:0 STANDBY]# ip netns exec CTX00002 netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.2.3.1        0.0.0.0         UG        0 0          0 wrp128
10.1.0.0        10.2.3.5        255.255.0.0     UG        0 0          0 bond1.234
10.2.0.0        10.2.3.5        255.255.255.0   UG        0 0          0 bond1.234
...

This ultimately allows you to run any command in any namespace you want from any namespace you want.

View solution in original post

0 Kudos
1 Reply
Bob_Zimmerman
Authority
Authority

It depends on the version of VSX. Versions of VSX up to R80.30 (I think) are based on some VRF extensions to the Linux kernel. R80.40 and later are based on Linux network namespaces.

For R80.40 and up, you can get a list of the namespace names using 'ip netns list', then you can run a command in a particular namespace by using 'ip netns exec <namespace name> <command>', like this:

[Expert@MyVsxCluster:0 STANDBY]# fw ver
This is Check Point's software version R80.40 - Build 135

[Expert@MyVsxCluster:0 STANDBY]# ip netns list
CTX00000 (id: 0)
CTX00001 (id: 1)
CTX00002 (id: 2)
...

[Expert@ MyVsxCluster:0 STANDBY]# ip netns exec CTX00002 netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.2.3.1        0.0.0.0         UG        0 0          0 wrp128
10.1.0.0        10.2.3.5        255.255.0.0     UG        0 0          0 bond1.234
10.2.0.0        10.2.3.5        255.255.255.0   UG        0 0          0 bond1.234
...

This ultimately allows you to run any command in any namespace you want from any namespace you want.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events