FAQ-Upstream and Downstream Devices Are Connected Through the AR. How Do I Determine That Communication Packets Between Upstream and Downstream Devices Are Received and Sent by the AR

Publication Date:  2015-05-06 Views:  301 Downloads:  0
Issue Description
Upstream and Downstream Devices Are Connected Through the AR. How Do I Determine That Communication Packets Between Upstream and Downstream Devices Are Received and Sent by the AR?
Solution
Configure a traffic policy on the Router. Configure rules for the specified type of packets in a traffic classifier and enable traffic statistics in the traffic behavior.

Apply the traffic policy to the Router interface connected to upstream and downstream devices in the inbound and outbound directions, and check whether traffic statistics on the interface increase. If the traffic statistics increase, packets are sent and received.

As shown in Figure 1, ServerA connects to ServerB through the Router. Ping ServerA and ServerB and check whether ping packets are received and sent by the Router.

Figure 1 Connecting upstream and downstream devices through the AR



The configuration is as follows:
...
#
acl number 3000  //Configure an ACL to match ICMP packets with the destination address as ServerB address
                   and source address as ServerA address.
rule 5 permit icmp source 192.168.4.0 0.0.0.255 destination 192.168.3.0 0.0.0.255
#
acl number 3001  //Configure an ACL to match ICMP packets with the destination address as ServerA address
                   and source address as ServerB address.
rule 5 permit icmp source 192.168.3.0 0.0.0.255 destination 192.168.4.0 0.0.0.255
#
traffic classifier atob operator or
if-match acl 3000
traffic classifier btoa operator or
if-match acl 3001
#
traffic behavior statistic  //Enable traffic statistics in the traffic behavior.
statistic enable
#
traffic policy atob
classifier atob behavior statistic
traffic policy btoa
classifier btoa behavior statistic
#
interface GigabitEthernet1/0/0
ip address 192.168.4.2 255.255.255.0
traffic-policy atob inbound  //Collect traffic statistics on ping packets sent from ServerA to ServerB in
                                the inbound direction.
traffic-policy btoa outbound  //Collect traffic statistics on ping packets sent from ServerB to ServerA in
                                 the outbound direction.
#
interface GigabitEthernet2/0/0
ip address 192.168.3.2 255.255.255.0
traffic-policy btoa inbound  //Collect traffic statistics on ping packets sent from ServerB to ServerA in
                                the inbound direction.
traffic-policy atob outbound  //Collect traffic statistics on ping packets sent from ServerA to ServerB in
                                 the outbound direction.
#
...
  • Run the display traffic policy statistics interface gigabitethernet 1/0/0 inbound verbose rule-base command to check ping packets sent from ServerA to ServerB on GE1/0/0.
  • Run the display traffic policy statistics interface gigabitethernet 1/0/0 outbound verbose rule-base command to check ping packets sent from ServerB to ServerA on GE1/0/0.
  • Run the display traffic policy statistics interface gigabitethernet 2/0/0 inbound verbose rule-base command to check ping packets sent from ServerB to ServerA on GE2/0/0.
  • Run the display traffic policy statistics interface gigabitethernet 2/0/0 outbound verbose rule-base command to check ping packets sent from ServerA to ServerB on GE2/0/0.
If statistics of a flow exist in the inbound direction but there are no statistics of the flow in the outbound direction, packets are discarded by the Router. If there are statistics of the flow in both inbound and outbound direction, packets are forwarded by the Router.

The following information shows that ping packets sent from ServerA to ServerB are received by GE1/0/0 and sent out by GE2/0/0.

[Huawei] display traffic policy statistics interface gigabitethernet 1/0/0 inbound verbose rule-base
Interface: GigabitEthernet1/0/0                                               
Traffic policy inbound: atob                                                  
Rule number: 1                                                                
Current status: OK!                                                           
Classifier: atob operator or                                                  
Behavior: statistic                                                           
Board : 0                                                                     
rule 5 permit icmp source 192.168.4.0 0.0.0.255 destination 192.168.3.0 0.0.0.255
Passed Packet                         5,Passed Bytes                       490 
Dropped Packet                         0,Dropped Bytes                         0

[Huawei] display traffic policy statistics interface gigabitethernet 2/0/0 outbound verbose rule-base
Interface: GigabitEthernet2/0/0                                               
Traffic policy outbound: atob                                                  
Rule number: 1                                                                
Current status: OK!                                                           
Classifier: atob operator or                                                  
Behavior: statistic                                                           
Board : 0                                                                     
rule 5 permit icmp source 192.168.4.0 0.0.0.255 destination 192.168.3.0 0.0.0.255
Passed Packet                         5,Passed Bytes                       490 
Dropped Packet                         0,Dropped Bytes                         0

END