Viewing Multicast Routes

Table of contents:

Problem

You want to view the multicast routes that a router has learned.

Solution

The multicast protocols create a multicast forwarding cache, which the JUNOS software stores in the inet.1 routing table:

	aviva@RouterA> show route table inet.1
	inet.1: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both
	224.1.1.1,10.0.15.1/32*[PIM/105] 00:00:08
	 Multicast (IPv4)

Another way to get information about multicast routes is with the show multicast route command:

	aviva@RouterA>  
show multicast route
	Address family INET
	Group: 224.1.1.1
	 Source: 10.0.15.1/32
	 Upstream interface: fe-0/0/1.0
	 Downstream interface list:
	 se-0/0/3.0
	Address family INET6

Discussion

When a router receives multicast traffic, it places the (S,G) route information in the JUNOS multicast cache, inet.1. This recipe shows how to display the contents of this table with a variant of the show route command that displays just the inet.1 table. The output in this recipe shows one route, which is displayed as 224.1.1.1,10.0.15.1. The first part, 224.1.1.1, is the multicast group, and the second part is the source address of the route. Looking at the network topology, you see that 10.0.15.1 is the address of the fe-0/0/1 interface on RouterA, which connects to RouterE. This tells you that RouterA learned this route from a source connected to RouterE. The second column of the show route output reports that the route was learned from PIM, has a preference of 105 ([PIM/105]), and is a multicast route.

The format of the show route output is optimized for unicast routes, and really doesn represent the details about multicast routes very well. A better command to use instead is show multicast route. The basic output is shown in this recipe. Use the extensive form to get more detailed information:

	aviva@RouterA> show multicast route extensive
	Address family INET
	Group: 224.1.1.1
	 Source: 10.0.15.1/32
	 Upstream interface: fe-0/0/1.0
	 Downstream interface list:
	 se-0/0/3.0
	Session description: ST Multicast Groups
	Statistics: 0 kBps, 0 pps, 5 packets
	Next-hop ID: 359
	Upstream protocol: PIM
	Route state: Active
	Forwarding state: Forwarding
	Cache lifetime/timeout: 356 seconds
	Wrong incoming interface notifications: 0

The first several fields are common to the regular and detailed output. The Group field reports the multicast group that sent the route, which here is 224.1.1.1. The Source and Upstream interface lines tell that this route was learned from 10.0.15.1, which is the address of the fe-0/0/1 interface to RouterE. This interface is upstream, or toward the multicast source.

The interfaces toward the multicast receivers are listed next. Here, there is only one downstream interface, se-0/0/3, which connects to RouterG.

The extensive option displays additional information about the route. The Statistics line shows that this group has transmitted 5 packets, and Upstream protocol shows that PIM is the multicast protocol in use. Use the show multicast usage command to look at just the packet transmission statistics for each group and source:

	aviva@RouterA> show multicast usage
	Group Sources Packets Bytes
	224.1.1.1 1 5 420

	Prefix /len Groups Packets Bytes
	10.0.15.1 /32 1 5 420

This output confirms that the router has received 5 packets from group 224.1.1.1, from the source 10.0.15.1 (RouterE).

If the router has not yet received any multicast traffic, the inet.1 table is empty because the routes have not learned any (S,G) state. For testing purposes, if you need to generate multicast traffic, you can issue ping commands. This is how the traffic in this recipe was generated because the test network being used is not connected to any multicast sources. To do this, first set up the Session Announcement Protocol ( SAP) on a non-RP router to listen to a multicast address:

	[edit]
	aviva@RouterG# set protocols sap listen 224.1.1.1

Then from a non-RP router on the other side of the RP from the SAP-enabled router, ping the multicast address::

	aviva@RouterE> ping 224.1.1.1 ttl 8 interface fe-0/0/1 count 5 bypass-routing
	PING 224.1.1.1 (224.1.1.1): 56 data bytes
	64 bytes from 10.0.16.2: icmp_seq=0 ttl=254 time=85.554 ms
	64 bytes from 10.0.16.2: icmp_seq=1 ttl=254 time=10.612 ms
	64 bytes from 10.0.16.2: icmp_seq=2 ttl=254 time=10.367 ms
	64 bytes from 10.0.16.2: icmp_seq=3 ttl=254 time=10.365 ms
	64 bytes from 10.0.16.2: icmp_seq=4 ttl=254 time=70.044 ms
	--- 224.1.1.1 ping statistics ---
	5 packets transmitted, 5 packets received, 0% packet loss
	round-trip min/avg/max/stddev = 10.365/37.388/85.554/33.358 ms


Router Configuration and File Management

Basic Router Security and Access Control

IPSec

SNMP

Logging

NTP

Router Interfaces

IP Routing

Routing Policy and Firewall Filters

RIP

IS-IS

OSPF

BGP

MPLS

VPNs

IP Multicast



JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net