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 1If 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 2If 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
- ToProtocol into which routes are distributed
- FromProtocol from which routes are distributed
- statusRedistribution status
- route map numberNumber 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
- PrefixIP address prefix
- LengthPrefix length
- TypeProtocol type
- Next HopIP address of the next hop
- DistDistance metric for the route
- MetNumber of hops
- IntfInterface 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 summaryUnicast routes:8 total routes, 576 bytes in route entries0 isis routes0 rip routes3 static routes2 connected routes1 bgp routes0 ospf routes2 other internal routes0 access routes0 internally created access host routesLast route added/deleted: 2::4/128 by BGPAt MON FEB 04 2008 14:18:25 UTCUnicast routes used only for Multicast RPF check:0 total routes, 0 bytes in route entries0 isis routes0 rip routes0 static routes0 connected routes0 bgp routes0 ospf routes0 other internal routes0 access routes0 internally created access host routes0 mbgp routes0 dvmrp routesLast route added/deleted: null by InvalidAt MON FEB 04 2008 14:18:04 UTCMPLS tunnel routes (not used for forwarding):3 total routes, 216 bytes in route entries1 bgp tunnel routes1 ldp tunnel routes1 rsvp tunnel routesLast route added/deleted: 2::4/128 by BGP TunnelAt MON FEB 04 2008 14:18:26 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.
- slotNumberNumber of the slot that contains the line module for which the information is displayed
- ipAddressIP address to look up in the routing table
- IP addressAddress that is reachable through the interface
- InterfaceInterface 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 HopNext 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
- PrefixIP address prefix
- LengthPrefix length
- Next HopIP address of the next hop
- MetNumber of hops
- DistAdministrative distance or weight assigned to the route
- TagTag value assigned to the route
- IntfInterface 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 IdRouter ID number
- totalNumber of frames received
- local destinationFrames with this router as their destination
- hdr errorsNumber of packets received that contain header errors
- addr errorsNumber of packets received that contain addressing errors
- unkn protoNumber of packets received that contain unknown protocols
- discardsNumber of discarded packets
- reassembledNumber of reassembled packets
- reasm timed outNumber of reassembled packets that timed out
- reasm reqNumber of requests for reassembly
- reasm failsNumber of reassembly failures
- frag okNumber of fragmented packets reassembled successfully
- frag failNumber of fragmented packets reassembled unsuccessfully
- frag createsNumber of packets created by fragmentation
- forwardedNumber of packets forwarded
- generatedNumber of packets generated
- out discNumber of outbound packets discarded
- no routesNumber of packets that could not be routed
- routing discardsNumber of packets that could not be routed that were discarded
- routes in tableNumber of routes in the routing table
- timestamp reqNumber of requests for a timestamp
- timestamp rpyNumber of replies to timestamp requests
- addr mask reqNumber of address mask requests
- addr mask rpyNumber of address mask replies
- totalTotal number of ICMP packets received
- errorsNumber of error packets received
- dst unreachNumber of packets received with destination unreachable
- time exceedNumber of packets received with time-to-live exceeded
- param probsNumber of packets received with parameter errors
- src quenchNumber of source quench packets received
- redirectsNumber of receive packet redirects received
- echo reqNumber of echo request (ping) packets received
- echo rpyNumber of echo replies received
- timestamp reqNumber of requests for a timestamp received
- timestamp rpyNumber of replies of timestamp requests received
- addr mask reqNumber of mask requests received
- addr mask rpyNumber of mask replies received
- totalTotal number of ICMP packets sent
- errorsNumber of error packets sent
- dest unreachNumber of packets sent with destination unreachable
- time excdNumber of packets sent with time-to-live exceeded
- param probNumber of packets sent with parameter errors
- src quenchNumber of source quench packets sent
- redirectsNumber of send packet redirects sent
- echo reqNumber of echo request (ping) packets sent
- echo rpyNumber of echo replies sent
- timestamp reqNumber of requests for a timestamp sent
- timestamp rpyNumber of replies to timestamp requests sent
- addr mask reqNumber of address mask requests sent
- addr mask rpyNumber of address mask replies sent
- totalTotal number of UDP packets received
- checksumNumber of checksum error packets received
- no portNumber of packets received for which no application listener was listening on the destination port
- attemptedNumber of outgoing TCP connections attempted
- acceptedNumber of incoming TCP connections accepted
- establishedNumber of TCP connections established
- droppedNumber of TCP connections dropped
- closedNumber of TCP connections closed
- total pktsTotal number of TCP packets received
- in-sequence pktsNumber of packets received in sequence
- bytesNumber of bytes received
- chksum err pktsNumber of checksum error packets received
- authentication err pktsNumber of authentication error packets received
- bad offset pktsNumber of packets received with bad offsets
- short pktsNumber of short packets received
- duplicate pktsNumber of duplicate packets received
- out of order pktsNumber of packets received out of order
- total pktsTotal number of TCP packets sent
- data pktsNumber of data packets sent
- bytesNumber of bytes sent
- retransmitted pktsNumber of packets retransmitted
- retransmitted bytesNumber of retransmitted bytes
- OSPF StatisticsNot supported for this version of the router
- IGMP StatisticsNot supported for this version of the router
- ARP StatisticsNot 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