root@j72r42> show route logical-router 163 table inet.0 terse
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 0.0.0.0/0 S 5 Discard
* 1.0.0.0/16 B 170 100 >1.0.1.1 1 I
B 170 100 0 >1.0.1.1 1 I
B 170 100 0 >1.0.1.1 1 I
B 170 100 0 >163.0.2.2 4809 1 I
B 170 100 0 >163.0.1.2 65000 1 I
root@j72r42> show route logical-router 163 protocol bgp terse
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 1.0.0.0/16 B 170 100 >1.0.1.1 1 I
B 170 100 0 >1.0.1.1 1 I
B 170 100 0 >1.0.1.1 1 I
B 170 100 0 >163.0.2.2 4809 1 I
B 170 100 0 >163.0.1.2 65000 1 I
root@j72r42> show route logical-router 163 terse aspath-regex .*9808
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 211.103.0.0/17 B 170 100 0 >163.0.1.6 9808 I
B 170 100 0 >163.0.1.10 9808 I
B 170 100 0 >163.0.2.2 4809 9808 I
B 170 100 0 >163.0.1.2 65000 4809 9808 I
* 211.103.0.0/18 B 170 100 0 >163.0.1.6 9808 I
B 170 100 0 >163.0.1.10 9808 I
B 170 100 0 >163.0.2.2 4809 9808 I
B 170 100 0 >163.0.1.2 65000 4809 9808 I
root@j72r42> show route logical-router 163 terse aspath-regex "()"
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 0.0.0.0/0 S 5 Discard
* 1.0.1.0/30 D 0 >fxp2.80
* 1.0.1.2/32 L 0 Local
* 58.30.0.0/15 I 165 10 >163.0.1.6
B 170 100 0 >163.0.1.6 I
6.根据community来查看show route logical-router 163 terse community 4134:1631
root@j72r42> show route logical-router 163 terse community 4134:1631
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
58.30.0.0/15 B 170 100 0 >163.0.1.6 I
58.32.0.0/13 B 170 100 0 >163.0.1.6 I
58.40.0.0/15 B 170 100 0 >163.0.1.6 I
58.42.0.0/17 B 170 100 0 >163.0.1.6 I
58.42.128.0/17 B 170 100 0 >163.0.1.6 I
root@j72r42> show route logical-router 163 terse no-community
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 0.0.0.0/0 S 5 Discard
* 1.0.1.0/30 D 0 >fxp2.80
* 1.0.1.2/32 L 0 Local
* 58.30.0.0/15 I 165 10 >163.0.1.6
* 58.32.0.0/13 I 165 10 >163.0.1.6
* 58.40.0.0/15 I 165 10 >163.0.1.6
root@j72r42> show route logical-router 163 terse next-hop 163.0.2.2
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 58.43.192.0/18 B 170 100 0 >163.0.2.2 4809 I
* 58.49.108.0/24 B 170 100 0 >163.0.2.2 4809 I
58.154.0.0/15 B 170 100 0 >163.0.2.2 4809 4538 I
58.192.0.0/12 B 170 100 0 >163.0.2.2 4809 4538 I
58.192.0.0/14 B 170 100 0 >163.0.2.2 4809 4538 I
root@j72r42> show route logical-router 163 output interface fxp1.5
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
1.0.0.0/16 [BGP/170] 4d 01:23:29, MED 0, localpref 100
AS path: 4809 1 I
> to 163.0.2.2 via fxp1.5
1.0.1.0/30 [BGP/170] 4d 07:35:14, MED 0, localpref 100
AS path: 4809 1 I
> to 163.0.2.2 via fxp1.5
1.0.1.4/30 [BGP/170] 4d 07:35:14, MED 0, localpref 100
AS path: 4809 1 I
> to 163.0.2.2 via fxp1.5
1.0.1.8/30 [BGP/170] 4d 07:35:14, MED 0, localpref 100
AS path: 4809 1 I
> to 163.0.2.2 via fxp1.5
root@j72r42> show route logical-router 163 terse 211.139.0.0
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 211.139.0.0/20 B 170 100 0 >163.0.1.6 9808 I
B 170 100 0 >163.0.1.10 9808 I
B 170 100 0 >163.0.2.2 4809 9808 I
B 170 100 0 >163.0.1.2 65000 4809 9808 I
可以带掩码查看,不带掩码为最长匹配该地址的路由
11.使用range参数 show route logical-router 163 terse range 211.139.0.0/18
root@j72r42> show route logical-router 163 terse range 211.139.0.0/18
inet.0: 3349 destinations, 10672 routes (3348 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 211.139.0.0/20 B 170 100 0 >163.0.1.6 9808 I
B 170 100 0 >163.0.1.10 9808 I
B 170 100 0 >163.0.2.2 4809 9808 I
B 170 100 0 >163.0.1.2 65000 4809 9808 I
* 211.139.16.0/20 B 170 100 0 >163.0.1.6 9808 I
B 170 100 0 >163.0.1.10 9808 I
B 170 100 0 >163.0.2.2 4809 9808 I
B 170 100 0 >163.0.1.2 65000 4809 9808 I
* 211.139.32.0/19 B 170 100 0 >163.0.1.6 9808 I
B 170 100 0 >163.0.1.10 9808 I
B 170 100 0 >163.0.2.2 4809 9808 I
B 170 100 0 >163.0.1.2 65000 4809 9808 I