Monitoring Routing Policy
You can monitor the following aspects of routing policy using show commands:
show access-list
show ip as-path access-list
show ipv6 access-list
You can use the output filtering feature of the show command to include or exclude lines of output based on a text string that you specify. For details, see JUNOSe System Basics Configuration Guide, Chapter 2, Command-Line Interface.
show access-list
- Use to display information about access lists.
- The displayed information includes the instances of each access list.
- Use the detail keyword to display the automatically assigned element ID for each access list entry. Only rules that you explicitly create have element IDs.
- Example 1
host1#show access-listIP Access List 1:permit ip host 172.31.192.217 anypermit ip 12.40.0.0 0.0.0.3 anydeny ip any anyIP Access List 2:permit ip 172.19.0.0 0.0.255.255 anydeny ip 0.0.0.0 255.255.255.255 anyIP Access List 10:permit ip any anyIP Access List 11:deny ip any anyExample 2 host1#show access-list detailIP Access List 1:1: permit ip host 172.31.192.217 any2: permit ip 12.40.0.0 0.0.0.3 anydeny ip any anyshow ip as-path-access-list
host1#show ip as-path-access-listAS Path Access List 1:permit .*AS Path Access List 2:deny .*AS Path Access List 3:permit _109_deny .*AS Path Access List 4:permit _109$deny .*AS Path Access List 10:deny _109$permit ^108_deny .*show ip community-list
- Use to display community list information.
- Display varies based on whether you issued the ip bgp community new-format command.
- Example 1—If you did not issue the ip bgp community new-format command, the display appears as follows:
host1#show ip community-listCommunity List 1:permit 81200109permit 81200110permit 81200108Community List 2:deny 81200109permit 81200110permit 81200108Community List 4:permit local-asCommunity List 5:permit no-advertiseCommunity List 6:permit no-exportCommunity List 7:permit internetExample 2—If you did issue the ip bgp community new-format command, the display appears as follows: host1#show ip community-listCommunity List 1:permit 1239:1005permit 1239:1006permit 1239:1004Community List 2:deny 1239:1005permit 1239:1006permit 1239:1004Community List 4:permit local-asCommunity List 5:permit no-advertiseCommunity List 6:permit no-exportCommunity List 7:permit internetshow ip match-policy-list
host1#show ip match-policy-listmatch-policy-list list1, permitMatch clauses:match access-list addrList1match distance 100show ip prefix-list
- Use to display information about the prefix lists currently configured on the router.
- Use the summary keyword to display abbreviated information about prefix lists.
- Example 1
host1#show ip prefix-listPrefix-list with the last deletion/insertion: defip prefix-list name abc: 4 entriesseq 5 permit 192.168.0.0/16 le 24seq 10 permit 192.178.0.0/16 le 24seq 15 deny 195.178.0.0/16 le 24seq 20 deny 195.178.0.0/16 le 32ip prefix-list name def: 1 entriesseq 5 deny 192.170.0.0/16Example 2 host1#show ip prefix-list summaryTotal memory used for prefix-list: 310 bytesPrefix-list with the last deletion/insertion: defip prefix-list name abc:count: 4, range entries: 4, sequences: 5-20ip prefix-list name def:count: 1, range entries: 0, sequences: 5-5show ip prefix-tree
- Use to display information about the prefix trees currently configured on the router.
- Use the summary keyword to display abbreviated information about prefix trees.
- Example 1
host1#show ip prefix-treePrefix-tree with the last deletion/insertion: t_abc5ip prefix-tree name t_abc1: 1 entriespermit 108.243.0.0/16ip prefix-tree name t_abc2: 3 entriespermit 101.10.254.0/24permit 102.10.248.0/21permit 103.10.192.0/18permit 108.109.0.0/16permit 108.109.241.0/24ip prefix-tree name t_abc3: 1 entriesdeny 108.0.0.0/8Example 2 host1#show ip prefix-tree summaryTotal memory used for prefix-tree: 860 bytesPrefix-tree with the last deletion/insertion: t_abc5ip prefix-tree name t_abc1:count: 1ip prefix-tree name t_abc2:count: 5ip prefix-tree name t_abc3:count: 1show ip protocols
- Use to display detailed information about the protocols currently configured on the router.
- Use the summary keyword to display only a list of the configured protocols.
- For field descriptions, see the show commands for the individual routing protocols in their respective Configuration Guide chapters.
- Example
host1#show ip protocolsRouting Protocol is "bgp 1"Default local preference is 100IGP synchronization is enabledAlways compare MED is disabledRouter flap damping is disabledAdministrative Distance: external 20 internal 200 local 200Neighbor(s):No neighbors are configuredRouting for Networks:Routing Protocol is "ospf 255" with Router ID 100.100.100.1Distance is 110Address Summarization:NoneRouting for Networks:Routing Protocol is "rip"Router Administrative State: enableSystem version RIP1: send = 1, receive = 1 or 2Update interval: 30 secondsInvalid after: 180 secondshold down time: 120 secondsflushed interval: 300 secondsFilter applied to outgoing route update is not setFilter applied to incoming route update is not setNo global route mapDistance is 120Interface Tx Rx AuthRouting for Networks:10.2.1.0/255.255.255.0show ip redistribute
- To—Protocol into which routes are distributed
- From—Protocol from which routes are distributed
- status—Redistribution status
- route map number—Number of the route map
host1#show ip redistributeTo ospf, From static is enabled with route map 4To ospf, From connected is enabled with route map 3show ip route
- Use to display the current state of the routing table, including routes that are not used for forwarding.
- You can display all routes, a specific route, all routes beginning with a specified address, routes for a particular protocol (BGP, IS-IS, OSPF, or RIP), locally connected routes, internal control routes, static routes, or summary counters for the routing table.
- Field descriptions
- Prefix—IP address prefix
- Length—Prefix length
- Type—Protocol type
- Next Hop—IP address of the next hop
- Dist—Distance metric for the route
- Met—Number of hops
- Intf—Interface type and interface specifier
host1#show ip routeProtocol/Route type codes:I1- ISIS level 1, I2- ISIS level2,I- route type intra, IA- route type inter, E- route type external,i- metric type internal, e- metric type external,O- OSPF, E1- external type 1, E2- external type2,N1- NSSA external type1, N2- NSSA external type2Prefix/Length Type Next Hop Dist/Met Intf------------- ---- -------- -------- ------172.16.2.0/24 Bgp 192.168.1.102 20/1 fastEthernet0/010.10.0.112/32 Static 192.168.1.1 1/1 fastEthernet0/010.1.1.0/24 Connect 10.1.1.1 0/1 atm3/0.100Example 2 host1#show ip route staticProtocol/Route type codes:I1- ISIS level 1, I2- ISIS level2,I- route type intra, IA- route type inter, E- route type external,i- metric type internal, e- metric type external,O- OSPF, E1- external type 1, E2- external type2,N1- NSSA external type1, N2- NSSA external type2Prefix/Length Type Next Hop Dist/Met Intf------------- ---- -------- -------- ------10.10.0.112/32 Static 192.168.1.1 1/1 fastEthernet0/0Example 3 host1#show ip route summary5 total routes, 720 bytes in route entries0 isis routes0 rip routes1 static routes1 connected routes0 bgp routes0 ospf routes3 other internal routes0 access routes0 internally created access host routesLast route added/deleted: 0.0.0.0/0 by StaticLowAt THU MAR 09 2000 05:22:49 UTCshow ip route slot
- Use to display the interface and next hop for an IP address in the routing table of a line module specified by the slot it occupies.
- slotNumber—Number of the slot that contains the line module for which the information is displayed
- ipAddress—IP address to look up in the routing table
- IP address—Address that is reachable through the interface
- Interface—Interface type and specifier associated with the IP address; displays "Local Interface" if a special interface index is present in the routing table for special IP addresses, such as broadcast addresses
- Next Hop—Next hop to reach the IP address; displays "---" if no next hop is associated with the IP address
host1#show ip route slot 6 10.10.0.231IP address Interface Next Hop------------ ---------------- ------------10.10.0.231 fastEthernet 6/0 10.10.0.231Example 2 host1#show ip route slot 9 90.248.1.2IP address Interface Next Hop------------ ---------------- ------------90.248.1.2 serial9/23:2 ---Example 3 host1#show ip route slot 9 90.249.255.255IP address Interface Next Hop------------ ---------------- ------------90.249.255.255 Local Interface ---show ip static
- Use to display the status of static routes in the routing table.
- You can specify an optional IP mask that filters specific routes.
- Field descriptions
- Prefix—IP address prefix
- Length—Prefix length
- Next Hop—IP address of the next hop
- Met—Number of hops
- Dist—Administrative distance or weight assigned to the route
- Tag—Tag value assigned to the route
- Intf—Interface type and interface specifier
host1#show ip staticPrefix/Length Next Hop: Met: Dist: Tag: Intf:10.2.0.0/24 192.168.1.1 1 1 0 ethernet6/010.2.1.0/24 192.168.1.1 1 1 1 ethernet6/0172.31.1.48/32 172.18.2.2 1 1 0 atm5/1.1show ip traffic
- Router Id—Router ID number
- total—Number of frames received
- local destination—Frames with this router as their destination
- hdr errors—Number of packets received that contain header errors
- addr errors—Number of packets received that contain addressing errors
- unkn proto—Number of packets received that contain unknown protocols
- discards—Number of discarded packets
- reassembled—Number of reassembled packets
- reasm timed out—Number of reassembled packets that timed out
- reasm req—Number of requests for reassembly
- reasm fails—Number of reassembly failures
- frag ok—Number of fragmented packets reassembled successfully
- frag fail—Number of fragmented packets reassembled unsuccessfully
- frag creates—Number of packets created by fragmentation
- forwarded—Number of packets forwarded
- generated—Number of packets generated
- out disc—Number of outbound packets discarded
- no routes—Number of packets that could not be routed
- routing discards—Number of packets that could not be routed that were discarded
- routes in table—Number of routes in the routing table
- timestamp req—Number of requests for a timestamp
- timestamp rpy—Number of replies to timestamp requests
- addr mask req—Number of address mask requests
- addr mask rpy—Number of address mask replies
- total—Total number of ICMP packets received
- errors—Number of error packets received
- dst unreach—Number of packets received with destination unreachable
- time exceed—Number of packets received with time-to-live exceeded
- param probs—Number of packets received with parameter errors
- src quench—Number of source quench packets received
- redirects—Number of receive packet redirects received
- echo req—Number of echo request (ping) packets received
- echo rpy—Number of echo replies received
- timestamp req—Number of requests for a timestamp received
- timestamp rpy—Number of replies of timestamp requests received
- addr mask req—Number of mask requests received
- addr mask rpy—Number of mask replies received
- total—Total number of ICMP packets sent
- errors—Number of error packets sent
- dest unreach—Number of packets sent with destination unreachable
- time excd—Number of packets sent with time-to-live exceeded
- param prob—Number of packets sent with parameter errors
- src quench—Number of source quench packets sent
- redirects—Number of send packet redirects sent
- echo req—Number of echo request (ping) packets sent
- echo rpy—Number of echo replies sent
- timestamp req—Number of requests for a timestamp sent
- timestamp rpy—Number of replies to timestamp requests sent
- addr mask req—Number of address mask requests sent
- addr mask rpy—Number of address mask replies sent
- total—Total number of UDP packets received
- checksum—Number of checksum error packets received
- no port—Number of packets received for which no application listener was listening on the destination port
- attempted—Number of outgoing TCP connections attempted
- accepted—Number of incoming TCP connections accepted
- established—Number of TCP connections established
- dropped—Number of TCP connections dropped
- closed—Number of TCP connections closed
- total pkts—Total number of TCP packets received
- in-sequence pkts—Number of packets received in sequence
- bytes—Number of bytes received
- chksum err pkts—Number of checksum error packets received
- authentication err pkts—Number of authentication error packets received
- bad offset pkts—Number of packets received with bad offsets
- short pkts—Number of short packets received
- duplicate pkts—Number of duplicate packets received
- out of order pkts—Number of packets received out of order
- total pkts—Total number of TCP packets sent
- data pkts—Number of data packets sent
- bytes—Number of bytes sent
- retransmitted pkts—Number of packets retransmitted
- retransmitted bytes—Number of retransmitted bytes
- OSPF Statistics—Not supported for this version of the router
- IGMP Statistics—Not supported for this version of the router
- ARP Statistics—Not supported for this version of the router
host1#show ip trafficIP statistics: Router Id: 172.31.192.217Rcvd: 97833 total, 171059 local destination0 hdr errors, 0 addr errors167 unkn proto, 0 discardsFrags: 4 reassembled, 30 reasm timed out, 8 reasm req0 reasm fails, 145 frag ok, 0 frag fail290 frag createsSent: 15 forwarded, 25144 generated, 0 out disc0 no routes,0 routing discardsRoute: 57680 routes in table0 timestamp req, 0 timestamp rpy0 addr mask req, 0 addr mask rpyICMP statistics:Rcvd: 561 total, 0 errors, 15 dst unreach0 time exceed, 0 param probs, 0 src quench0 redirects, 0 echo req, 0 echo rpy0 timestamp req, 0 timestamp rpy0 addr mask req, 0 addr mask rpySent: 0 total, 0 errors, 0 dest unreach0 time excd, 0 param prob, 0 src quench0 redirects, 0 echo req, 0 echo rpyUDP Statistics:Rcvd: 93326 total, 0 checksum errors, 90610 no portSent: 0 total, 0 errorsTCP Global Statistics:Connections: 7358 attempted, 4 accepted, 7362 established0 dropped, 14718 closedRcvd: 75889 total pkts, 53591 in-sequence pkts, 3120283 bytes0 chksum err pkts, 0 authentication err pkts, 0 bad offset0 short pkts, 0 duplicate pkts, 0 out of order pktsSent: 82318 total pkts, 44381 data pkts, 656321 bytes34 retransmitted pkts, 487 retransmitted bytesOSPF Statistics:IGMP Statistics:ARP Statistics:show route-map
- Use to display the configured route maps.
- The displayed information includes the instances of each access list such as match and set commands.
- Example
host1(config)#route-map 1 permit 10host1(config-route-map)#match community 44host1(config-route-map)#set local-pref 400host1(config-route-map)#exithost1(config)#exithost1#show route-map 1route-map 1, permit, sequence 10Match clauses:match community 44Set clauses:set local-pref 400