Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

Junos: How to list routing table IDs
https://forum.ivorde.com/junos-how-to-list-routing-table-ids-t19728.html
Page 1 of 1

Author:  admin [ Mon Jan 19, 2015 3:53 pm ]
Post subject:  Junos: How to list routing table IDs

Junos: How to list routing instance IDs

Some SRX or MX debugs may refer to routing instance as routing table ID. Example is the SRX ike debugs shown below:
Code:
[Jan 15 19:40:08][1.1.1.1 <-> 3.3.3.3]  ike_send_packet: Start, send SA = { ad30d893 8225cb50 - 414e8319 944abd60}, nego = 0, dst = 3.3.3.3:500,  routing table id = 4
[Jan 15 19:40:08][1.1.1.1 <-> 3.3.3.3]  ike_send_packet: Start, send SA = { 6885acfe 77eda4bf - ae964ea7 7c63fda6}, nego = 0, dst = 3.3.3.3:500,  routing table id = 4
[Jan 15 19:40:32][1.1.1.1 <-> 3.3.3.3]  ike_send_packet: Start, send SA = { 04dce81f ba229dec - 00000000 00000000}, nego = -1, dst = 3.3.3.3:500,  routing table id = 4
[Jan 15 19:40:32][1.1.1.1 <-> 3.3.3.3]  ike_send_packet: Start, send SA = { 04dce81f ba229dec - 7177b564 59cd00f1}, nego = -1, dst = 3.3.3.3:500,  routing table id = 4
[Jan 15 19:40:32][1.1.1.1 <-> 3.3.3.3]  ike_send_packet: Start, send SA = { 04dce81f ba229dec - 7177b564 59cd00f1}, nego = -1, dst = 3.3.3.3:500,  routing table id = 4
[Jan 15 19:40:32][1.1.1.1 <-> 3.3.3.3]  ike_send_packet: Start, send SA = { 04dce81f ba229dec - 7177b564 59cd00f1}, nego = 0, dst = 3.3.3.3:500,  routing table id = 4
[Jan 15 19:40:32][1.1.1.1 <-> 3.3.3.3]  ike_send_packet: Start, send SA = { 04dce81f ba229dec - 7177b564 59cd00f1}, nego = 0, dst = 3.3.3.3:500,  routing table id = 4


The above ipsec endpoint 3.3.3.3 is reachable via an interface residing in a routing instance. Here is the relevant SRX configuration:
Code:
user@srx> show configuration security ike gateway remotegw-gw
ike-policy remotegw;
address 3.3.3.3;
dead-peer-detection {
    interval 20;
    threshold 2;
}
no-nat-traversal;
local-identity hostname srx;
remote-identity hostname remotegw;
external-interface ge-0/0/5.10;

user@srx> show interfaces routing-instance MYVR terse
Interface               Admin Link Proto    Local                 Remote
ge-0/0/5.10                   up    up   inet     1.1.1.1/25
                                   inet6    fe80::2a02:2f0f:27/10



So to match a routing table id to a routing instance name, go to vty and issue "show route ip". On srx you can jump to vty directly from CLI:
Code:
user@srx> start shell pfe network fwdd
FLOWD_OCTEON(srx vty)# sh route ip
IPv4 Route Table 4, MYVR.4, 0x0:             <-- Route table ID 4
Destination   NH IP Addr      Type     NH ID Interface
------------  --------------- -------- ----- ---------


How to find Junos routing tables IDs from CLI in SRX branch device:
Code:
> request pfe execute command "show route ip " target fwdd | match "Route Table"
GOT: IPv4 Route Table 0, default.0, 0x0:
GOT: IPv4 Route Table 1, __juniper_private1__.1, 0x20:
GOT: IPv4 Route Table 2, __juniper_private2__.2, 0x0:
GOT: IPv4 Route Table 3, __master.anon__.3, 0x0:
GOT: IPv4 Route Table 4, MYVR.4, 0x0:              <-- Route table ID 4

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/