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:

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.

This example includes the following MSDP settings.

Figure 26 shows the topology for this example.

Figure 26: MSDP in a VRF Instance Topology

Image g040616.gif

Configuration

CLI Quick Configuration

To quickly configure MSDP in a routing instance, copy the following commands into a text file, remove any line breaks, and then paste the commands into the CLI.

[edit]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 Modification of the Junos OS Configuration in Junos OS CLI, Release 10.3.

To configure an MSDP routing instance:

  1. Configure the BGP export policy.

    [edit]user@host# edit policy-options[edit policy-options]user@host# set policy-statement bgp-to-ospf term 1 from protocol bgp[edit policy-options]user@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 [edit policy-options]user@host# set policy-statement sa-filter term bad-groups from route-filter 224.0.1.2/32 exact [edit policy-options]user@host# set policy-statement sa-filter term bad-groups from route-filter 224.77.0.0/16 orlonger [edit policy-options]user@host# set policy-statement sa-filter term bad-groups then reject [edit policy-options]user@host# set policy-statement sa-filter term bad-sources from source-address-filter 10.0.0.0/8 orlonger [edit policy-options]user@host# set policy-statement sa-filter term bad-sources from source-address-filter 127.0.0.0/8 orlonger [edit policy-options]user@host# set policy-statement sa-filter term bad-sources then reject [edit policy-options]user@host# set policy-statement sa-filter term accept-everything-else then accept [edit policy-options]user@host# exit
  3. Configure the routing instance type and interfaces.
    [edit]user@host# edit routing-instances[edit routing-instances]user@host# set VPN-100 instance-type vrf [edit routing-instances]user@host# set VPN-100 interface ge-0/0/0.100 [edit routing-instances]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 [edit routing-instances]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 [edit routing-instances]user@host# set VPN-100 protocols ospf area 0.0.0.0 interface lo0.100 [edit routing-instances]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 [edit routing-instances]user@host# set VPN-100 protocols pim interface lo0.100 mode sparse-dense [edit routing-instances]user@host# set VPN-100 protocols pim interface lo0.100 version 2 [edit routing-instances]user@host# set VPN-100 protocols pim interface ge-0/0/0.100 mode sparse-dense [edit routing-instances]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 [edit routing-instances]user@host# set VPN-100 protocols msdp import sa-filter [edit routing-instances]user@host# set VPN-100 protocols msdp group 100 local-address 10.10.47.100 [edit routing-instances]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 configuration instructions in this example to correct it.

user@host# show policy-optionspolicy-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-instancesVPN-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:

Related Topics