28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

configured on interfaces that the default route uses, so it may not be a good fit in<br />

your network for this reason.<br />

To verify the configuration, look at the statistics on the logical interface:<br />

aviva@router1> show interfaces so-0/0/0.0 statistics<br />

Logical interface so-0/0/0.0 (Index 67) (SNMP ifIndex 41)<br />

Flags: Point-To-Point SNMP-Traps Encapsulation: PPP<br />

Protocol inet, MTU: 4470<br />

Flags: uRPF<br />

RPF Failures: Packets: 23, Bytes: 2492<br />

Addresses, Flags: Is-Preferred Is-Primary<br />

Destination: 10.1.12.0/30, Local: 10.1.12.1, Broadcast: 10.1.12.3<br />

Protocol iso, MTU: 4470<br />

Flags: Is-Primary<br />

Protocol mpls, MTU: 4458<br />

Flags: Is-Primary<br />

The Flags field shows that unicast RPF is enabled, and the next line shows the number<br />

of packets and bytes dropped because of unicast RPF checks.<br />

When you think the router is experiencing a DoS attack, set up a firewall filter to<br />

count the packets dropped by the interface. Create a separate filter to count the unicast<br />

RPF traffic:<br />

[edit firewall]<br />

aviva@router1# set filter rpf-filter term default then count rpf-failed-count<br />

aviva@router1# set filter rpf-filter term default then reject<br />

aviva@router1# show<br />

filter rpf-filter {<br />

term default {<br />

then {<br />

count rpf-failed-count;<br />

reject;<br />

}<br />

}<br />

}<br />

This filter has no from clause, so it applies to all incoming packets. The then clause<br />

creates a file named rpf-failed-count and rejects all packets. Then apply the filter to<br />

the interface:<br />

[edit interfaces so-0/0/0]<br />

aviva@router1# set unit 0 family inet rpf-check fail-filter rpf-filter<br />

Reference the filter you created in the fail-filter option of the rpf-check statement.<br />

Unicast RPF filters are not part of the normal firewall filter on an interface but<br />

are handled separately. They are evaluated after input filters and before output filters.<br />

Unicast RPF looks only in the inet.0 routing table for IPv4 packets and the<br />

inet6.0 table for IPv6 packets, so if an interface’s input filter forwards packets to a<br />

different routing table, the unicast RPF check is not performed.<br />

268 | Chapter 8: IP Routing<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!