Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring MSDP in a Routing Instance

This example shows how to configure MSDP in a VRF instance.

Requirements

Before you begin:

Overview

You can configure MSDP in the following types of instances:

  • Forwarding
  • No forwarding
  • Virtual router
  • VPLS
  • VRF

The main use of MSDP in a routing instance is to support anycast RPs in the network, which allows you to configure redundant RPs. Anycast RP addressing requires MSDP support to synchronize the active sources between RPs.

A designated router (DR) sends periodic join messages and prune messages toward a group-specific rendezvous point (RP) for each group for which it has active members. When a Protocol Independent Multicast (PIM) router learns about a source, it originates an MSDP source-address message if it is the DR on the upstream interface.

This example includes the following MSDP settings.

  • authentication-key—By default, multicast routers accept and process any properly formatted MSDP messages from the configured peer address. This default behavior might violate the security policies in many organizations because MSDP messages by definition come from another routing domain beyond the control of the security practices of the multicast router's organization.

    The router can authenticate MSDP messages using the TCP message digest 5 (MD5) signature option for MSDP peering sessions. This authentication provides protection against spoofed packets being introduced into an MSDP peering session. Two organizations implementing MSDP authentication must decide on a human-readable key on both peers. This key is included in the MD5 signature computation for each MSDP segment sent between the two peers.

    You configure an MSDP authentication key on a per-peer basis, whether the MSDP peer is defined in a group or individually. If you configure different authentication keys for the same peer one in a group and one individually, the individual key is used.

    The peer key can be a text string up to 16 letters and digits long. Strings can include any ASCII characters with the exception of (,), &, and [. If you include spaces in an MSDP authentication key, enclose all characters in quotation marks (“ ”).

    Adding, removing, or changing an MSDP authentication key in a peering session resets the existing MSDP session and establishes a new session between the affected MSDP peers. This immediate session termination prevents excessive retransmissions and eventual session timeouts due to mismatched keys.

  • import and export—All routing protocols use the routing table to store the routes that they learn and to determine which routes they advertise in their protocol packets. Routing policy allows you to control which routes the routing protocols store in, and retrieve from, the routing table.

    You can configure routing policy globally, for a group, or for an individual peer. This example shows how to configure the policy for an individual peer.

    If you configure routing policy at the group level, each peer in a group inherits the group's routing policy.

    The import statement applies policies to source-active messages being imported into the source-active cache from MSDP. The export statement applies policies to source-active messages being exported from the source-active cache into MSDP. If you specify more than one policy, they are evaluated in the order specified, from first to last, and the first matching policy is applied to the route. If no match is found for the import policy, MSDP shares with the routing table only those routes that were learned from MSDP routers. If no match is found for the export policy, the default MSDP export policy is applied to entries in the source-active cache. See Table 1 for a list of match conditions.

    Table 1: MSDP Source-Active Message Filter Match Conditions

    Match Condition

    Matches On

    interface

    Router interface or interfaces specified by name or IP address

    neighbor

    Neighbor address (the source address in the IP header of the source-active message)

    route-filter

    Multicast group address embedded in the source-active message

    source-address-filter

    Multicast source address embedded in the source-active message

  • local-address—Identifies the address of the router you are configuring as an MSDP router (the local router). When you configure MSDP, the local-address statement is required. The router must also be a Protocol Independent Multicast (PIM) sparse-mode rendezvous point (RP).
  • peer—An MSDP router must know which routers are its peers. You define the peer relationships explicitly by configuring the neighboring routers that are the MSDP peers of the local router. After peer relationships are established, the MSDP peers exchange messages to advertise active multicast sources. You must configure at least one peer for MSDP to function. When you configure MSDP, the peer statement is required. The router must also be a Protocol Independent Multicast (PIM) sparse-mode rendezvous point (RP).

    You can arrange MSDP peers into groups. Each group must contain at least one peer. Arranging peers into groups is useful if you want to block sources from some peers and accept them from others, or set tracing options on one group and not others. This example shows how to configure the MSDP peers in groups. If you configure MSDP peers in a group, each peer in a group inherits all group-level options.

Figure 1 shows the topology for this example.

Figure 1: MSDP in a VRF Instance Topology

MSDP in a VRF Instance Topology

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

set policy-options policy-statement bgp-to-ospf term 1 from protocol bgp set policy-options policy-statement bgp-to-ospf term 1 then accept set policy-options policy-statement sa-filter term bad-groups from route-filter 224.0.1.2/32 exact set policy-options policy-statement sa-filter term bad-groups from route-filter 224.77.0.0/16 orlonger set policy-options policy-statement sa-filter term bad-groups then reject set policy-options policy-statement sa-filter term bad-sources from source-address-filter 10.0.0.0/8 orlonger set policy-options policy-statement sa-filter term bad-sources from source-address-filter 127.0.0.0/8 orlonger set policy-options policy-statement sa-filter term bad-sources then reject set policy-options policy-statement sa-filter term accept-everything-else then accept set routing-instances VPN-100 instance-type vrf set routing-instances VPN-100 interface ge-0/0/0.100 set routing-instances VPN-100 interface lo0.100 set routing-instances VPN-100 route-distinguisher 10.255.120.36:100 set routing-instances VPN-100 vrf-target target:100:1 set routing-instances VPN-100 protocols ospf export bgp-to-ospf set routing-instances VPN-100 protocols ospf area 0.0.0.0 interface lo0.100 set routing-instances VPN-100 protocols ospf area 0.0.0.0 interface ge-0/0/0.100 set routing-instances VPN-100 protocols pim rp static address 11.11.47.100 set routing-instances VPN-100 protocols pim interface lo0.100 mode sparse-dense set routing-instances VPN-100 protocols pim interface lo0.100 version 2 set routing-instances VPN-100 protocols pim interface ge-0/0/0.100 mode sparse-dense set routing-instances VPN-100 protocols pim interface ge-0/0/0.100 version 2 set routing-instances VPN-100 protocols msdp export sa-filter set routing-instances VPN-100 protocols msdp import sa-filter set routing-instances VPN-100 protocols msdp group 100 local-address 10.10.47.100 set routing-instances VPN-100 protocols msdp group 100 peer 10.255.120.39 authentication-key “New York” set routing-instances VPN-100 protocols msdp group to_pe local-address 10.10.47.100 set routing-instances VPN-100 protocols msdp group to_pe peer 11.11.47.100

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure an MSDP routing instance:

  1. Configure the BGP export policy.

    [edit policy-options]user@host# set policy-statement bgp-to-ospf term 1 from protocol bgpuser@host# set policy-statement bgp-to-ospf term 1 then accept
  2. Configure a policy that filters out certain source and group addresses and accepts all other source and group addresses.
    [edit policy-options]user@host# set policy-statement sa-filter term bad-groups from route-filter 224.0.1.2/32 exact user@host# set policy-statement sa-filter term bad-groups from route-filter 224.0.1.2/32 exact user@host# set policy-statement sa-filter term bad-groups from route-filter 224.77.0.0/16 orlonger user@host# set policy-statement sa-filter term bad-groups then reject user@host# set policy-statement sa-filter term bad-sources from source-address-filter 10.0.0.0/8 orlonger user@host# set policy-statement sa-filter term bad-sources from source-address-filter 127.0.0.0/8 orlonger user@host# set policy-statement sa-filter term bad-sources then reject user@host# set policy-statement sa-filter term accept-everything-else then accept
  3. Configure the routing instance type and interfaces.
    [edit routing-instances]user@host# set VPN-100 instance-type vrf user@host# set VPN-100 interface ge-0/0/0.100 user@host# set VPN-100 interface lo0.100
  4. Configure the routing instance route distinguisher and VRF target.
    [edit routing-instances]user@host# set VPN-100 route-distinguisher 10.255.120.36:100 user@host# set VPN-100 vrf-target target:100:1
  5. Configure OSPF in the routing instance.
    [edit routing-instances]user@host# set VPN-100 protocols ospf export bgp-to-ospf user@host# set VPN-100 protocols ospf area 0.0.0.0 interface lo0.100 user@host# set VPN-100 protocols ospf area 0.0.0.0 interface ge-0/0/0.100
  6. Configure PIM in the routing instance.
    [edit routing-instances]user@host# set VPN-100 protocols pim rp static address 11.11.47.100 user@host# set VPN-100 protocols pim interface lo0.100 mode sparse-dense user@host# set VPN-100 protocols pim interface lo0.100 version 2 user@host# set VPN-100 protocols pim interface ge-0/0/0.100 mode sparse-dense user@host# set VPN-100 protocols pim interface ge-0/0/0.100 version 2
  7. Configure MSDP in the routing instance.
    [edit routing-instances]user@host# set VPN-100 protocols msdp export sa-filter user@host# set VPN-100 protocols msdp import sa-filter user@host# set VPN-100 protocols msdp group 100 local-address 10.10.47.100 user@host# set VPN-100 protocols msdp group 100 peer 10.255.120.39 authentication-key “New York”[edit routing-instances]user@host# set VPN-100 protocols msdp group to_pe local-address 10.10.47.100 [edit routing-instances]user@host# set VPN-100 protocols msdp group to_pe peer 11.11.47.100
  8. If you are done configuring the device, commit the configuration.

    [edit routing-instances]user@host# commit

Results

Confirm your configuration by entering the show policy-options command and the show routing-instances command from configuration mode. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

user@host# show policy-options
policy-statement bgp-to-ospf {term 1 {from protocol bgp;then accept;}}policy-statement sa-filter {term bad-groups {from {route-filter 224.0.1.2/32 exact;route-filter 224.77.0.0/16 orlonger;}then reject;}term bad-sources {from {source-address-filter 10.0.0.0/8 orlonger;source-address-filter 127.0.0.0/8 orlonger;}then reject;}term accept-everything-else {then accept;}}
user@host# show routing-instances
VPN-100 {instance-type vrf;interface ge-0/0/0.100; ## 'ge-0/0/0.100' is not definedinterface lo0.100; ## 'lo0.100' is not definedroute-distinguisher 10.255.120.36:100;vrf-target target:100:1;protocols {ospf {export bgp-to-ospf;area 0.0.0.0 {interface lo0.100;interface ge-0/0/0.100;}}pim {rp {static {address 11.11.47.100;}}interface lo0.100 {mode sparse-dense;version 2;}interface ge-0/0/0.100 {mode sparse-dense;version 2;}}msdp {export sa-filter;import sa-filter;group 100 {local-address 10.10.47.100;peer 10.255.120.39 {authentication-key "$9$z4l-3Ctp0B1EcF3eMW8-dDjH"; ## SECRET-DATA}}group to_pe {local-address 10.10.47.100;peer 11.11.47.100;}}}}

Verification

To verify the configuration, run the following commands:

  • show msdp instance VPN-100
  • show msdp source-active VPN-100
  • show multicast usage instance VPN-100
  • show route table VPN-100.inet.4

Published: 2013-02-12