OsmoSTP> enable
OsmoSTP# configure terminal
OsmoSTP(config)# cs7 instance 0

OsmoSTP(config-cs7)# ! CREATE 3 AS with 1 ASP EACH:
OsmoSTP(config-cs7)# asp asp1 2905 54321 m3ua
OsmoSTP(config-cs7-asp)# remote-ip 127.0.0.110
OsmoSTP(config-cs7-asp)# local-ip 27.0.0.1
OsmoSTP(config-cs7-asp)# exit
OsmoSTP(config-cs7)# asp asp2 2905 54321 m3ua
OsmoSTP(config-cs7-asp)# remote-ip 127.0.0.120
OsmoSTP(config-cs7-asp)# local-ip 27.0.0.1
OsmoSTP(config-cs7-asp)# exit
OsmoSTP(config-cs7)# asp asp3 2905 54321 m3ua
OsmoSTP(config-cs7-asp)# remote-ip 127.0.0.130
OsmoSTP(config-cs7-asp)# local-ip 27.0.0.1
OsmoSTP(config-cs7-asp)# exit
OsmoSTP(config-cs7)# as as1 m3ua
OsmoSTP(config-cs7-as)# asp asp1
OsmoSTP(config-cs7-as)# routing-key 56 0.1.2
OsmoSTP(config-cs7-as)# exit
OsmoSTP(config-cs7)# as as2 m3ua
OsmoSTP(config-cs7-as)# asp asp2
OsmoSTP(config-cs7-as)# routing-key 57 0.1.3
OsmoSTP(config-cs7-as)# exit
OsmoSTP(config-cs7)# as as3 m3ua
OsmoSTP(config-cs7-as)# asp asp3
OsmoSTP(config-cs7-as)# routing-key 57 0.1.4
OsmoSTP(config-cs7-as)# exit
OsmoSTP(config-cs7)# show running-config
...
cs7 instance 0
 xua rkm routing-key-allocation dynamic-permitted
 asp asp1 2905 54321 m3ua
  local-ip 27.0.0.1
  remote-ip 127.0.0.110
  role sg
  sctp-role server
 asp asp2 2905 54321 m3ua
  local-ip 27.0.0.1
  remote-ip 127.0.0.120
  role sg
  sctp-role server
 asp asp3 2905 54321 m3ua
  local-ip 27.0.0.1
  remote-ip 127.0.0.130
  role sg
  sctp-role server
 as as1 m3ua
  asp asp1
  routing-key 56 0.1.2
 as as2 m3ua
  asp asp2
  routing-key 57 0.1.3
 as as3 m3ua
  asp asp3
  routing-key 57 0.1.4
 route-table system
 listen m3ua 2905
  local-ip 127.0.0.2
  local-ip 127.0.0.1
  local-ip ::1
  accept-asp-connections dynamic-permitted
end

OsmoSTP(config-cs7)# ! ADD 2 ROUTES WITH DECREASING PRIORITIES. THEY SHOULD END UP REORDERED BY PRIORITY:
OsmoSTP(config-cs7)# route-table system
OsmoSTP(config-cs7-rt)# update route 3.2.1 7.255.7 linkset as1 priority 6 qos-class 7
OsmoSTP(config-cs7-rt)# update route 3.2.1 7.255.7 linkset as2
OsmoSTP(config-cs7-rt)# update route 3.2.1 7.255.7 linkset as3 priority 2
OsmoSTP(config-cs7-rt)# show running-config
...
cs7 instance 0
...
 route-table system
  update route 3.2.1 7.255.7 linkset as3 priority 2
  update route 3.2.1 7.255.7 linkset as2
  update route 3.2.1 7.255.7 linkset as1 priority 6 qos-class 7
...
OsmoSTP(config-cs7-rt)# do show cs7 instance 0 route
Routing table = system
C=Cong Q=QoS P=Prio

Destination            C Q P Linkset Name        Linkset Non-adj Route
---------------------- - - - ------------------- ------- ------- -------
3.2.1/14         INACC   0 2 as3                 UNAVAIL ?       UNAVAIL
3.2.1/14         INACC   0 5 as2                 UNAVAIL ?       UNAVAIL
3.2.1/14         INACC   7 6 as1                 UNAVAIL ?       UNAVAIL

OsmoSTP(config-cs7-rt)# do show cs7 instance 0 route binding-table 3.2.1

Combined Linkset: dpc=6161=3.2.1, mask=0x3fff=7.255.7, prio=2
Loadshare Seed  Normal Route           Available  Alternative Route      Available
--------------  ---------------------  ---------  ---------------------  ---------
0               -                      -          -                      -         
1               -                      -          -                      -         
2               -                      -          -                      -         
3               -                      -          -                      -         
4               -                      -          -                      -         
5               -                      -          -                      -         
6               -                      -          -                      -         
7               -                      -          -                      -         
8               -                      -          -                      -         
9               -                      -          -                      -         
10              -                      -          -                      -         
11              -                      -          -                      -         
12              -                      -          -                      -         
13              -                      -          -                      -         
14              -                      -          -                      -         
15              -                      -          -                      -         
16              -                      -          -                      -         
17              -                      -          -                      -         
18              -                      -          -                      -         
19              -                      -          -                      -         
20              -                      -          -                      -         
21              -                      -          -                      -         
22              -                      -          -                      -         
23              -                      -          -                      -         
24              -                      -          -                      -         
25              -                      -          -                      -         
26              -                      -          -                      -         
27              -                      -          -                      -         
28              -                      -          -                      -         
29              -                      -          -                      -         
30              -                      -          -                      -         
31              -                      -          -                      -         
32              -                      -          -                      -         
33              -                      -          -                      -         
34              -                      -          -                      -         
35              -                      -          -                      -         
36              -                      -          -                      -         
37              -                      -          -                      -         
38              -                      -          -                      -         
39              -                      -          -                      -         
40              -                      -          -                      -         
41              -                      -          -                      -         
42              -                      -          -                      -         
43              -                      -          -                      -         
44              -                      -          -                      -         
45              -                      -          -                      -         
46              -                      -          -                      -         
47              -                      -          -                      -         
48              -                      -          -                      -         
49              -                      -          -                      -         
50              -                      -          -                      -         
51              -                      -          -                      -         
52              -                      -          -                      -         
53              -                      -          -                      -         
54              -                      -          -                      -         
55              -                      -          -                      -         
56              -                      -          -                      -         
57              -                      -          -                      -         
58              -                      -          -                      -         
59              -                      -          -                      -         
60              -                      -          -                      -         
61              -                      -          -                      -         
62              -                      -          -                      -         
63              -                      -          -                      -         
64              -                      -          -                      -         
65              -                      -          -                      -         
66              -                      -          -                      -         
67              -                      -          -                      -         
68              -                      -          -                      -         
69              -                      -          -                      -         
70              -                      -          -                      -         
71              -                      -          -                      -         
72              -                      -          -                      -         
73              -                      -          -                      -         
74              -                      -          -                      -         
75              -                      -          -                      -         
76              -                      -          -                      -         
77              -                      -          -                      -         
78              -                      -          -                      -         
79              -                      -          -                      -         
80              -                      -          -                      -         
81              -                      -          -                      -         
82              -                      -          -                      -         
83              -                      -          -                      -         
84              -                      -          -                      -         
85              -                      -          -                      -         
86              -                      -          -                      -         
87              -                      -          -                      -         
88              -                      -          -                      -         
89              -                      -          -                      -         
90              -                      -          -                      -         
91              -                      -          -                      -         
92              -                      -          -                      -         
93              -                      -          -                      -         
94              -                      -          -                      -         
95              -                      -          -                      -         
96              -                      -          -                      -         
97              -                      -          -                      -         
98              -                      -          -                      -         
99              -                      -          -                      -         
100             -                      -          -                      -         
101             -                      -          -                      -         
102             -                      -          -                      -         
103             -                      -          -                      -         
104             -                      -          -                      -         
105             -                      -          -                      -         
106             -                      -          -                      -         
107             -                      -          -                      -         
108             -                      -          -                      -         
109             -                      -          -                      -         
110             -                      -          -                      -         
111             -                      -          -                      -         
112             -                      -          -                      -         
113             -                      -          -                      -         
114             -                      -          -                      -         
115             -                      -          -                      -         
116             -                      -          -                      -         
117             -                      -          -                      -         
118             -                      -          -                      -         
119             -                      -          -                      -         
120             -                      -          -                      -         
121             -                      -          -                      -         
122             -                      -          -                      -         
123             -                      -          -                      -         
124             -                      -          -                      -         
125             -                      -          -                      -         
126             -                      -          -                      -         
127             -                      -          -                      -         

OsmoSTP(config-cs7-rt)# ! NOW TEST LOOKUP FAILS AS EXPECTED (all route links are down):
OsmoSTP(config-cs7-rt)# do show cs7 instance 0 route-lookup 3.2.1 from 0.0.1 sls 0
No route found for label 'OPC=1=0.0.1,DPC=6161=3.2.1,SLS=0'