Example for Configuring MoD
Network Requirements
Figure 1. MoD Topology
To monitor whether packet loss occurs in SwitchB during the packets forwarding process, configure MoD on SwitchB. If SwitchA fails to ping SwitchC due to SwitchB cannot find the next-hop address to SwitchC, packets are dropped for matching the ingress-l3-dst-lookup-miss reason, and the collected information is reported to the collector.
Procedure
SwitchA
Step 1 Configure the routed interface xe-1/1/23.
admin@SwitchA# set interface gigabit-ethernet xe-1/1/23 routed-interface name rif-1
admin@SwitchA# set interface gigabit-ethernet xe-1/1/23 routed-interface enable true
admin@SwitchA# set l3-interface routed-interface rif-1 address 30.30.30.2 prefix-length 24Step 2 Enable the IP routing function.
admin@SwitchA# set ip routing enable trueStep 3 Enable the LLDP function.
admin@SwitchA# set protocols lldp enable trueStep 4 Commit the configuration.
admin@SwitchA# commitSwitchB
Step 1 Configure the routed interfaces xe-1/1/23, xe-1/1/24, and xe-1/1/25.
admin@SwitchB# set interface gigabit-ethernet xe-1/1/23 routed-interface name rif-1
admin@SwitchB# set interface gigabit-ethernet xe-1/1/23 routed-interface enable true
admin@SwitchB# set l3-interface routed-interface rif-1 address 30.30.30.1 prefix-length 24
admin@SwitchB# set interface gigabit-ethernet xe-1/1/24 routed-interface name rif-2
admin@SwitchB# set interface gigabit-ethernet xe-1/1/24 routed-interface enable true
admin@SwitchB# set l3-interface routed-interface rif-2 address 30.30.20.1 prefix-length 24
admin@SwitchB# set interface gigabit-ethernet xe-1/1/25 routed-interface name rif-3
admin@SwitchB# set interface gigabit-ethernet xe-1/1/25 routed-interface enable true
admin@SwitchB# set l3-interface routed-interface rif-3 address 30.30.10.1 prefix-length 24
admin@SwitchB# set vlans reserved-vlan 4000-4094Step 2 Configure the static ARP.
admin@SwitchB# set protocols arp interface rif-3 address 30.30.10.10 mac-address 44:10:10:10:10:10
admin@SwitchB# set protocols arp interface rif-1 address 30.30.30.30 mac-address 44:30:30:30:30:30
admin@SwitchB# set protocols arp interface rif-2 address 30.30.20.20 mac-address 44:20:20:20:20:20Step 3 Configure the static routing.
admin@SwitchB# set protocols static route 0.0.0.0/0 next-hop 30.30.20.100Step 4 Enable the management VRF.
admin@SwitchB# set system management-vrf enable trueStep 5 Enable the IP routing function.
admin@SwitchB# set ip routing enable trueStep 6 Configure the MoD function, including the drop group and the export information.
admin@SwitchB# set telemetry mod drop-group user-defined test drop-reason ingress-l3-dst-lookup-miss
admin@SwitchB# set telemetry mod unware-flow drop-group test
admin@SwitchB# set telemetry mod export destination-ipv4 30.30.20.2 source-ipv4 30.30.20.1
admin@SwitchB# set telemetry mod export destination-ipv4 30.30.20.2 source-port 50000Step 7 Enable the LLDP function.
admin@SwitchB# set protocols lldp enable trueStep 8 Commit the configuration
admin@SwitchB# commitSwitchC
Step 1 Configure the routed interface xe-1/1/23.
admin@SwitchC# set interface gigabit-ethernet xe-1/1/23 routed-interface name rif-1
admin@SwitchC# set interface gigabit-ethernet xe-1/1/23 routed-interface enable true
admin@SwitchC# set l3-interface routed-interface rif-1 address 30.30.10.2 prefix-length 24Step 2 Enable the IP routing function.
admin@SwitchC# set ip routing enable trueStep 3 Enable the LLDP function.
admin@SwitchC# set protocols lldp enable trueStep 4 Commit the configuration.
admin@SwitchC# commitCollector
Configure the IP address of colletor as 30.30.20.2, making sure that SwitchB can communicate with the collector.
Verifying the Configuration
On SwitchA, use the run ping 30.30.10.2 command to verify that SwitchA can communicate with SwitchC successfully. On SwitchB, use the delete l3-interface routed-interface rif-3 command to delete the interface rif-3, and use the delete protocols arp interface rif-3 command to delete the static ARP of the interface rif-3. Then, on SwitchA, use the run ping 30.30.10.2 command to ping SwitchC, and you can see that the packets are dropped.
admin@ SwitchA # run ping 30.30.10.2
PING 30.30.10.2 (30.30.10.2) 56(84) bytes of data.
From 30.30.10.2 icmp_seq=1 Destination Host Unreachable
From 30.30.10.2 icmp_seq=2 Destination Host Unreachable
From30.30.10.2 icmp_seq=3 Destination Host Unreachable
From 30.30.10.2 icmp_seq=4 Destination Host Unreachable
From 30.30.10.2 icmp_seq=5 Destination Host Unreachable
--- 30.30.10.2 ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4107msOn SwitchB, use the run show telemetry mod unware-flow drop-statistics command to view the dropped packets statistics. You can see that the packets are dropped for the reason of ingress-l3-lookup-miss.
admin@PICOS# run show telemetry mod unware-flow drop-statistics
drop packets statistics:
ingress-l3-dst-lookup-miss: 58578