SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
Routing Policy and Firewall Filters
© 2010 Juniper Networks, Inc. All rights reserved. | www.juniper.net
What Is Routing Policy?
Routing policy controls the flow of routing information
to and from the routing table
•Use policy to accept, reject, or modify attributes for routes:
• Received through dynamic routing protocols
• Sent to dynamic routing protocols
• Installed in the forwarding table
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 2
• Installed in the forwarding table
NeighborsNeighborsNeighborsNeighbors
ProtocolProtocolProtocolProtocol
RoutingRoutingRoutingRouting
TableTableTableTable
ForwardingForwardingForwardingForwarding
TableTableTableTable
NeighborsNeighborsNeighborsNeighbors
ProtocolProtocolProtocolProtocol
ImportImportImportImport
RoutesRoutesRoutesRoutes RoutesRoutesRoutesRoutes
PFEPFEPFEPFE
ExportExportExportExport
ExportExportExportExport
Import policies control the route
importation into the routing table.
Export policies control the route
exportation from the routing table.
Default Routing Policies
ProtocolProtocolProtocolProtocol Import PolicyImport PolicyImport PolicyImport Policy Export PolicyExport PolicyExport PolicyExport Policy
BGP Accept all BGP routes and import
into inet.0
Accept all active BGP routes
OSPF Accept all OSPF routes and import
into inet.0
Reject everything (protocol
floods by default)
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 3
into inet.0 floods by default)
IS-IS Accept all IS-IS routes and import
into inet.0
Reject everything (protocol
floods by default)
RIP Accept all RIP routes from
explicitly configured neighbors and
import into inet.0
Reject everything
Building Blocks of Routing Policy
term firstterm
match
no match
thenfrom
my-policy
A routing policy consists of zero
or more terms; the software
evaluates terms sequentially
until it reaches a terminating
action or end of policy
User-defined policy
and term names
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 4
no match
no match
term secondterm
from then
term thirdterm
from then
match
match
from statements describe
match conditions
then statements describe
the actions to take if a match
with the from statement
occurs
Note: Ordering matters! If you must reorder terms within a policy, consider using the insert CLI command.
Common Match Criteria
Common match criteria for routing policy:
•Prefix (route-filter or prefix-list)
•Protocol (OSPF, static, BGP, and so forth)
•Routing protocol attributes:
• OSPF area ID, AS path, and community
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 5
•Next hop
term firstterm
match
thenfrom
Note: If you omit the from statement, all routes match and will take the specified action
from statements describe
match conditions
Prefix Lists
Prefix lists contain a list of prefixes:
•Configured under [edit policy-options] hierarchy
•Can be referenced in firewall filters and routing policy terms
[edit policy-options]
user@host# show
prefix-list rfc1918 {
10.0.0.0/8;
172.16.0.0/12;
prefix-list matches the prefix exactly
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 6
172.16.0.0/12;
192.168.0.0/16;
}
policy-statement policy-1 {
from {
prefix-list rfc1918;
}
then reject;
}
policy-statement policy-2 {
from {
prefix-list-filter rfc1918 orlonger reject;
}
}
prefix-list-filter allows match types
and actions. Supported match types include
exact, longer, and orlonger and are
covered on subsequent slides.
Route Filters
Route filters match individual routes within a policy:
•You can specify multiple route filters within a single term
•Not reusable—term-specific
[edit policy-options]
user@host# show
policy-statement policy-1 {
term reject-rfc1918-prefixes {
from {
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 7
from {
route-filter 172.16.0.0/12 orlonger;
route-filter 192.168.0.0/16 orlonger;
route-filter 10.0.0.0/8 orlonger;
}
then reject;
}
}
Note: Various match types are supported. We
discuss the match types on subsequent slides.
Match Types (1 of 3)
exact:
•Match the specified prefix and mask exactly
orlonger:
from route-filter 192.168.0.0/16 exact;
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 8
orlonger:
•Match the specified prefix and mask exactly and all routes
that are subsets of the prefix and that have longer masks
from route-filter 192.168.0.0/16 orlonger;
Match Types (2 of 3)
longer:
•Match routes that are subsets of the prefix and that have
longer masks;
•Do not match the specified prefix and mask
from route-filter 192.168.0.0/16 longer;
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 9
upto:
•Match specified prefix and mask exactly and any routes that
are subsets of the specified prefix and that have a mask no
longer than the second value specified
from route-filter 192.168.0.0/16 upto /24;
Match Types (3 of 3)
prefix-length-range:
•Match routes that are subsets of the specified prefix and
that have a mask between the two values (inclusive match)
through:
from route-filter 192.168.0.0/16 prefix-length-range /20-/24;
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 10
through:
•Match first and second specified prefixes and masks exactly
and all prefixes directly between the two prefixes
from route-filter 192.168.0.0/16 through 192.168.16.0/20;
Match Type Summary
Given a starting prefix of 192.168/16, what matches
with each option?
…
192.168/16192.168/16192.168/16192.168/16
…
192.168/16192.168/16192.168/16192.168/16
…
192.168/16192.168/16192.168/16192.168/16
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 11
exact
…
orlonger (down to /32)
… …
longer (down to /32)
through
…
…
192.168/16192.168/16192.168/16192.168/16
…
…
192.168/16192.168/16192.168/16192.168/16
/x
/y
prefix-length-range /x-/y
…
…
192.168/16192.168/16192.168/16192.168/16
upto
Common Actions
Common actions in routing policy:
•Terminating actions:
• accept
• reject
•Flow control:
• next term
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 12
• next term
• next policy
•Modifying attributes:
• community (add, delete, and set)
• preference
term firstterm
match
thenfrom
then statements describe
the actions to take if a match with
the from statement occurs
Implementing Routing Policy (1 of 2)
Definition of routing policy is always under the
[edit policy-options] hierarchy:
[edit policy-options]
user@host# show
policy-statement my-policy {
term accept-local-route {
from {
protocol local;
interface ge-0/0/0;
term firstterm
thenfrom
my-policy
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 13
interface ge-0/0/0;
}
then accept;
}
term accept-some-static-routes {
from {
protocol static;
route-filter 172.18.1.0/24 exact;
route-filter 172.18.2.0/24 exact;
}
then accept;
}
term accept-rip-routes {
from protocol rip;
then accept;
}
}
match
no match
no match
then
term secondterm
from then
term thirdterm
from then
from
match
match
Implementing Routing Policy (2 of 2)
You can apply routing policies as import or export
policies at different levels (protocol dependent)
[edit protocols ospf]
user@host# show
export my-policy;
area 0.0.0.0 {
interface ge-0/0/1.0;
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 14
interface ge-0/0/1.0;
interface ge-0/0/2.0;
interface ge-0/0/3.0 {
passive;
}
interface lo0.0;
}
Routing Policy Flow
You can chain routing policies together
•Evaluation proceeds left to right until the software reaches a
terminating action of accept or reject
•The software supports flow-control actions such as next
policy
RouteRouteRouteRoute
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 15
AcceptAcceptAcceptAccept
or rejector rejector rejector reject
AcceptAcceptAcceptAccept
or rejector rejector rejector reject
AcceptAcceptAcceptAccept
or rejector rejector rejector reject
Policy 1Policy 1Policy 1Policy 1
AcceptAcceptAcceptAccept
or rejector rejector rejector reject
AcceptAcceptAcceptAccept
or rejector rejector rejector reject
AcceptAcceptAcceptAccept
or rejector rejector rejector reject
Policy 2Policy 2Policy 2Policy 2
AcceptAcceptAcceptAccept
or rejector rejector rejector reject
PolicyPolicyPolicyPolicy nnnn
AcceptAcceptAcceptAccept
RejectRejectRejectReject
Term CTerm CTerm CTerm C Term CTerm CTerm CTerm C
DefaultDefaultDefaultDefault
policypolicypolicypolicy
Term ATerm ATerm ATerm A
Term BTerm BTerm BTerm B
Term ATerm ATerm ATerm A
Term BTerm BTerm BTerm B
Term ATerm ATerm ATerm A
Case Study: Objective and Topology
Advertise the default static route defined on R1 into
OSPF using routing policy:
.1.2
OSPFOSPFOSPFOSPF
Area 0Area 0Area 0Area 0
R1R1R1R1
R2R2R2R2
R4R4R4R4 InternetInternetInternetInternet
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 16
user@R1> show route protocol static
inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[Static/5] 00:00:44
> to 172.30.25.1 via ge-0/0/1.0
.1.2
172.30.25.0/30172.30.25.0/30172.30.25.0/30172.30.25.0/30
R3R3R3R3
Case Study: Defining the Policy
Sample routing policy configuration used to advertise
R1’s default static route into OSPF:
[edit policy-options]
user@R1# show
policy-statement default-static {
term accept-default-static {
User-defined policy and term names
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 17
term accept-default-static {
from {
protocol static;
route-filter 0.0.0.0/0 exact;
}
then accept;
}
}
Match criteria
Action
Case Study: Applying the Policy
Sample application of routing policy used to advertise
R1’s default static route into OSPF:
[edit protocols ospf]
user@R1# show
export default-static;
area 0.0.0.0 { R1R1R1R1
R2R2R2R2
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 18
area 0.0.0.0 {
interface ge-0/0/2.0;
interface ge-0/0/3.0;
interface lo0.0;
}
Export default static route
from route table to OSPF
OSPFOSPFOSPFOSPF
Area 0Area 0Area 0Area 0
R1R1R1R1
R4R4R4R4
R3R3R3R3
Note: Once you define routing policy and apply
it, R1 floods an external LSA for the default static
route to all OSPF routers in Area 0.
Case Study: Monitoring the Results
Sample verification step to ensure the routing policy
works as expected (capture is taken from R4):
user@R4> show route protocol ospf exact 0/0
inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 19
0.0.0.0/0 *[OSPF/150] 00:03:33, metric 0, tag 0
> to 172.19.3.1 via ge-0/0/2.0
to 172.19.4.1 via ge-0/0/3.0
.1.2
172.30.25.0/30172.30.25.0/30172.30.25.0/30172.30.25.0/30
OSPFOSPFOSPFOSPF
Area 0Area 0Area 0Area 0
R1R1R1R1
R2R2R2R2
R4R4R4R4
R3R3R3R3
InternetInternetInternetInternet
R4 installs external default
OSPF route flooded by R1
What Is a Firewall Filter?
Firewall filters control the traffic entering and leaving
a networking device in a stateless fashion:
•Processes every packet independently
•Used to filter and monitor network traffic
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 20
Building Blocks of Firewall Filters
no match
term firstterm
match
thenfrom
my-filter
Firewall filters consist of one or
more terms; the software
evaluates terms sequentially until
it reaches a terminating action
User-defined filter
and term names
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 21
no match
no match
term secondterm
term Default
match
then statements describe the
actions to take if a match with
the from statement occurs
discard
Default action for packets
not explicitly allowed
Note: Ordering matters! If you must reorder terms within a filter, consider using the insert CLI command.
from statements describe
match conditions
thenfrom
Common Match Criteria
Can match based on most header fields:
Match conditions categories include:
•Numeric range
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 22
•Numeric range
•Address
•Bit field
term firstterm
match
thenfromfrom statements describe
match conditions
Firewall Filter Actions
Common actions in firewall filters:
•Terminating actions:
• accept
• discard
• Reject
•Flow control:
term firstterm
match
thenfrom
then statements describe the
actions to take if a match with the
from statement occurs
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 23
•Flow control:
• next term
•Action modifiers:
• count, log, and syslog
• forwarding-class and loss-priority
• Policer
The software discards all traffic not explicitly allowed!
Implementing Firewall Filters (1 of 2)
Define firewall filters based on protocol family under
the [edit firewall] hierarchy level:
[edit firewall family inet]
user@host# show
filter filter-in {
term block-some-packets {
from {
source-address {
The software applies
family inet filters
only to interfaces
running IPv4 term firstterm
thenfrom
my-policy
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 24
source-address {
10.10.10.0/24;
}
}
then {
count spoof-in;
discard;
}
}
term accept-others {
then accept;
}
}
…
If discard is not present
then packets are accepted
match
no match
no match
then
term secondterm
from then
term thirdterm
from then
from
match
match
Implementing Firewall Filters (2 of 2)
Apply firewall filters as input or output on an interface
•Protocol family on interface and filter must match:
The software applies firewall
[edit interfaces ge-0/0/1]
user@host# show
unit 0 {
family inet {
filter {
input filter-in;
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 25
The software applies firewall
filters using input and
output statements
input filter-in;
output filter-out;
}
address 172.30.25.2/30;
}
}
InputInputInputInput
InputInputInputInputOutputOutputOutputOutput
OutputOutputOutputOutput
Input firewall filters control
traffic entering an interface
Output firewall filters control
traffic leaving an interface
Tip: To avoid late night drives back to the office, use commit confirmed when activating filters!
Test Your Knowledge (1 of 2)
Apply a filter on R1’s ge-0/0/1.0 interface to allow
HTTP traffic to 172.27.102.100
•Should the filter be applied as an input or output filter?
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 26
.1.2
172.30.25.0/30172.30.25.0/30172.30.25.0/30172.30.25.0/30
172.27.102.0/24172.27.102.0/24172.27.102.0/24172.27.102.0/24
R1R1R1R1
ge-0/0/1.0.100.100.100.100 .1.1.1.1
MYNETMYNETMYNETMYNET
InternetInternetInternetInternet
filter web-server {
term allow-web-traffic {
from {
destination-address {
172.27.102.100/32;
}
protocol tcp;
Test Your Knowledge (2 of 2)
Which inbound traffic does the router permit?
Applied as an input filter
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 27
protocol tcp;
port http;
}
then accept;
}
term deny-other-web-traffic {
from {
protocol tcp;
port http;
}
then {
discard;
}
}
}
.2
172.27.102.0/24172.27.102.0/24172.27.102.0/24172.27.102.0/24
R1R1R1R1 ge-0/0/1.0.100.100.100.100 .1.1.1.1
MYNETMYNETMYNETMYNET
Filtering Local Traffic (1 of 2)
Apply filters to lo0 interface to filter local traffic
•Filter must account for routing and management protocols
Routing EngineRouting EngineRouting EngineRouting Engine
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 28
Frames/Packets InFrames/Packets InFrames/Packets InFrames/Packets In
Packet Forwarding EnginePacket Forwarding EnginePacket Forwarding EnginePacket Forwarding Engine
Control PlaneControl PlaneControl PlaneControl Plane
Forwarding PlaneForwarding PlaneForwarding PlaneForwarding Plane
CPUCPUCPUCPU
lo0
filter limit-ssh-access {
term ssh-accept {
from {
source-prefix-list {
trusted;
}
protocol tcp;
destination-port ssh;
}
then accept;
lo0 {
unit 0 {
family inet {
filter {
input limit-ssh-access;
}
address 10.255.71.48/32;
}
}
}
Filtering Local Traffic (2 of 2)
DefinitionDefinitionDefinitionDefinition ApplicationApplicationApplicationApplication
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 29
then accept;
}
term ssh-reject {
from {
protocol tcp;
destination-port ssh;
}
then {
discard;
}
}
term else-accept {
then accept;
}
}
}
Which problems might occur if you
omit the else-accept term?
Think About ItThink About ItThink About ItThink About It
Affects incoming traffic
destined to the routing engine!
Policing
Policing (rate-limiting) enables you to limit the amount
of traffic that passes into or out of an interface:
•Works with firewall filters to thwart DoS attacks
• Common actions include discard and setting loss-priority level
•Uses average bandwidth and maximum burst size
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 30
Bit BucketBit BucketBit BucketBit Bucket
[edit firewall]
user@host# show
policer p1 {
if-exceeding {
bandwidth-limit 400k;
burst-size-limit 100k;
}
then discard;
}
family inet {
filter rate-limit-subnet {
term match-subnet {
Configuration Example
bandwidth-limit
* In bits per second
* 30,520 bps to 4.29 Gbps
burst-size-limit
* In bytes
* Minimum should = 10
You must apply filter!
Policer defined
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 31
term match-subnet {
from {
source-address {
192.100.1.0/24;
}
}
then {
policer p1;
}
}
term else-accept {
then accept;
}
}
}
Note: Filter must account for routing
and management protocols
* Minimum should = 10
times MTU (low speed) or
bandwidth times 3–5
milliseconds (high speed)
Policer referenced
Policy and firewall_filters

Weitere ähnliche Inhalte

Was ist angesagt?

Multicasting and multicast routing protocols
Multicasting and multicast routing protocolsMulticasting and multicast routing protocols
Multicasting and multicast routing protocols
Abhishek Kesharwani
 
Chassis Cluster Configuration
Chassis Cluster ConfigurationChassis Cluster Configuration
Chassis Cluster Configuration
Kashif Latif
 
Huawei network icon database v2
Huawei network icon database v2Huawei network icon database v2
Huawei network icon database v2
Carlos Romero
 

Was ist angesagt? (20)

HSRP ccna
HSRP ccna HSRP ccna
HSRP ccna
 
JUNOS - Monitoring and Troubleshooting
JUNOS - Monitoring and TroubleshootingJUNOS - Monitoring and Troubleshooting
JUNOS - Monitoring and Troubleshooting
 
Cisco ospf
Cisco ospf Cisco ospf
Cisco ospf
 
Ospf
OspfOspf
Ospf
 
Optimizing Aruba WLANs for Roaming Devices
Optimizing Aruba WLANs for Roaming DevicesOptimizing Aruba WLANs for Roaming Devices
Optimizing Aruba WLANs for Roaming Devices
 
Introduction to nexux from zero to Hero
Introduction to nexux  from zero to HeroIntroduction to nexux  from zero to Hero
Introduction to nexux from zero to Hero
 
Multicasting and multicast routing protocols
Multicasting and multicast routing protocolsMulticasting and multicast routing protocols
Multicasting and multicast routing protocols
 
MPLS Presentation
MPLS PresentationMPLS Presentation
MPLS Presentation
 
Cisco Live! :: Cisco ASR 9000 Architecture :: BRKARC-2003 | Las Vegas 2017
Cisco Live! :: Cisco ASR 9000 Architecture :: BRKARC-2003 | Las Vegas 2017Cisco Live! :: Cisco ASR 9000 Architecture :: BRKARC-2003 | Las Vegas 2017
Cisco Live! :: Cisco ASR 9000 Architecture :: BRKARC-2003 | Las Vegas 2017
 
Chassis Cluster Configuration
Chassis Cluster ConfigurationChassis Cluster Configuration
Chassis Cluster Configuration
 
EIGRP Overview
EIGRP OverviewEIGRP Overview
EIGRP Overview
 
Deploying Carrier Ethernet features on ASR 9000
Deploying Carrier Ethernet features on ASR 9000Deploying Carrier Ethernet features on ASR 9000
Deploying Carrier Ethernet features on ASR 9000
 
OSPF On Router OS7
OSPF On Router OS7OSPF On Router OS7
OSPF On Router OS7
 
MPLS on Router OS V7 - Part 1
MPLS on Router OS V7 - Part 1MPLS on Router OS V7 - Part 1
MPLS on Router OS V7 - Part 1
 
OSPF- Multi area
OSPF- Multi area OSPF- Multi area
OSPF- Multi area
 
Huawei network icon database v2
Huawei network icon database v2Huawei network icon database v2
Huawei network icon database v2
 
Advanced Topics and Future Directions in MPLS
Advanced Topics and Future Directions in MPLS Advanced Topics and Future Directions in MPLS
Advanced Topics and Future Directions in MPLS
 
MikroTik Security
MikroTik SecurityMikroTik Security
MikroTik Security
 
Juniper SRX Quickstart 12.1R3 by Thomas Schmidt
Juniper SRX Quickstart 12.1R3 by Thomas SchmidtJuniper SRX Quickstart 12.1R3 by Thomas Schmidt
Juniper SRX Quickstart 12.1R3 by Thomas Schmidt
 
MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)
 

Ähnlich wie Policy and firewall_filters

Routing Polices And Firewall Filter
Routing Polices And Firewall FilterRouting Polices And Firewall Filter
Routing Polices And Firewall Filter
Kashif Latif
 
2008118090324 hk
2008118090324 hk2008118090324 hk
2008118090324 hk
Vivek Singh
 

Ähnlich wie Policy and firewall_filters (20)

Routing Polices And Firewall Filter
Routing Polices And Firewall FilterRouting Polices And Firewall Filter
Routing Polices And Firewall Filter
 
2008118090324 hk
2008118090324 hk2008118090324 hk
2008118090324 hk
 
Route Leak Prevension with BGP Community
Route Leak Prevension with BGP CommunityRoute Leak Prevension with BGP Community
Route Leak Prevension with BGP Community
 
NANOG 80: Measuring RPKI Effectiveness
NANOG 80: Measuring RPKI EffectivenessNANOG 80: Measuring RPKI Effectiveness
NANOG 80: Measuring RPKI Effectiveness
 
BGP Route Leaks at Ripe74
BGP Route Leaks at Ripe74BGP Route Leaks at Ripe74
BGP Route Leaks at Ripe74
 
WebRTC Standards & Implementation Q&A - WebRTC Constrains
WebRTC Standards & Implementation Q&A - WebRTC ConstrainsWebRTC Standards & Implementation Q&A - WebRTC Constrains
WebRTC Standards & Implementation Q&A - WebRTC Constrains
 
Cisco Connect Halifax 2018 Application insight and zero trust policies with...
Cisco Connect Halifax 2018   Application insight and zero trust policies with...Cisco Connect Halifax 2018   Application insight and zero trust policies with...
Cisco Connect Halifax 2018 Application insight and zero trust policies with...
 
6978047_2.ppt
6978047_2.ppt6978047_2.ppt
6978047_2.ppt
 
CCCNP ROUTE v6_ch05
CCCNP ROUTE  v6_ch05CCCNP ROUTE  v6_ch05
CCCNP ROUTE v6_ch05
 
ENCOR_Chapter_6.pptx
ENCOR_Chapter_6.pptxENCOR_Chapter_6.pptx
ENCOR_Chapter_6.pptx
 
Webinar: Incorporating New Throttling Features into Your Business
Webinar: Incorporating New Throttling Features into Your BusinessWebinar: Incorporating New Throttling Features into Your Business
Webinar: Incorporating New Throttling Features into Your Business
 
Motorola MotoTRBO Firmware 2.3A Release Notes (June 2014)
Motorola MotoTRBO Firmware 2.3A Release Notes (June 2014)Motorola MotoTRBO Firmware 2.3A Release Notes (June 2014)
Motorola MotoTRBO Firmware 2.3A Release Notes (June 2014)
 
Session 3
Session 3Session 3
Session 3
 
CCCNP ROUTE v6_ch04
CCCNP ROUTE  v6_ch04CCCNP ROUTE  v6_ch04
CCCNP ROUTE v6_ch04
 
Fully Realizing the Microservices Vision with Service Mesh (DEV312-S) - AWS r...
Fully Realizing the Microservices Vision with Service Mesh (DEV312-S) - AWS r...Fully Realizing the Microservices Vision with Service Mesh (DEV312-S) - AWS r...
Fully Realizing the Microservices Vision with Service Mesh (DEV312-S) - AWS r...
 
Network Policy Abstractions in OpenStack Neutron
Network Policy Abstractions in OpenStack NeutronNetwork Policy Abstractions in OpenStack Neutron
Network Policy Abstractions in OpenStack Neutron
 
Lesson.7: Configuring IP Routing B
Lesson.7: Configuring IP Routing BLesson.7: Configuring IP Routing B
Lesson.7: Configuring IP Routing B
 
Apricot2004 bgp00
Apricot2004 bgp00Apricot2004 bgp00
Apricot2004 bgp00
 
Rfp template
Rfp templateRfp template
Rfp template
 
Group 1
Group 1Group 1
Group 1
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Policy and firewall_filters

  • 1. Routing Policy and Firewall Filters © 2010 Juniper Networks, Inc. All rights reserved. | www.juniper.net
  • 2. What Is Routing Policy? Routing policy controls the flow of routing information to and from the routing table •Use policy to accept, reject, or modify attributes for routes: • Received through dynamic routing protocols • Sent to dynamic routing protocols • Installed in the forwarding table © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 2 • Installed in the forwarding table NeighborsNeighborsNeighborsNeighbors ProtocolProtocolProtocolProtocol RoutingRoutingRoutingRouting TableTableTableTable ForwardingForwardingForwardingForwarding TableTableTableTable NeighborsNeighborsNeighborsNeighbors ProtocolProtocolProtocolProtocol ImportImportImportImport RoutesRoutesRoutesRoutes RoutesRoutesRoutesRoutes PFEPFEPFEPFE ExportExportExportExport ExportExportExportExport Import policies control the route importation into the routing table. Export policies control the route exportation from the routing table.
  • 3. Default Routing Policies ProtocolProtocolProtocolProtocol Import PolicyImport PolicyImport PolicyImport Policy Export PolicyExport PolicyExport PolicyExport Policy BGP Accept all BGP routes and import into inet.0 Accept all active BGP routes OSPF Accept all OSPF routes and import into inet.0 Reject everything (protocol floods by default) © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 3 into inet.0 floods by default) IS-IS Accept all IS-IS routes and import into inet.0 Reject everything (protocol floods by default) RIP Accept all RIP routes from explicitly configured neighbors and import into inet.0 Reject everything
  • 4. Building Blocks of Routing Policy term firstterm match no match thenfrom my-policy A routing policy consists of zero or more terms; the software evaluates terms sequentially until it reaches a terminating action or end of policy User-defined policy and term names © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 4 no match no match term secondterm from then term thirdterm from then match match from statements describe match conditions then statements describe the actions to take if a match with the from statement occurs Note: Ordering matters! If you must reorder terms within a policy, consider using the insert CLI command.
  • 5. Common Match Criteria Common match criteria for routing policy: •Prefix (route-filter or prefix-list) •Protocol (OSPF, static, BGP, and so forth) •Routing protocol attributes: • OSPF area ID, AS path, and community © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 5 •Next hop term firstterm match thenfrom Note: If you omit the from statement, all routes match and will take the specified action from statements describe match conditions
  • 6. Prefix Lists Prefix lists contain a list of prefixes: •Configured under [edit policy-options] hierarchy •Can be referenced in firewall filters and routing policy terms [edit policy-options] user@host# show prefix-list rfc1918 { 10.0.0.0/8; 172.16.0.0/12; prefix-list matches the prefix exactly © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 6 172.16.0.0/12; 192.168.0.0/16; } policy-statement policy-1 { from { prefix-list rfc1918; } then reject; } policy-statement policy-2 { from { prefix-list-filter rfc1918 orlonger reject; } } prefix-list-filter allows match types and actions. Supported match types include exact, longer, and orlonger and are covered on subsequent slides.
  • 7. Route Filters Route filters match individual routes within a policy: •You can specify multiple route filters within a single term •Not reusable—term-specific [edit policy-options] user@host# show policy-statement policy-1 { term reject-rfc1918-prefixes { from { © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 7 from { route-filter 172.16.0.0/12 orlonger; route-filter 192.168.0.0/16 orlonger; route-filter 10.0.0.0/8 orlonger; } then reject; } } Note: Various match types are supported. We discuss the match types on subsequent slides.
  • 8. Match Types (1 of 3) exact: •Match the specified prefix and mask exactly orlonger: from route-filter 192.168.0.0/16 exact; © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 8 orlonger: •Match the specified prefix and mask exactly and all routes that are subsets of the prefix and that have longer masks from route-filter 192.168.0.0/16 orlonger;
  • 9. Match Types (2 of 3) longer: •Match routes that are subsets of the prefix and that have longer masks; •Do not match the specified prefix and mask from route-filter 192.168.0.0/16 longer; © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 9 upto: •Match specified prefix and mask exactly and any routes that are subsets of the specified prefix and that have a mask no longer than the second value specified from route-filter 192.168.0.0/16 upto /24;
  • 10. Match Types (3 of 3) prefix-length-range: •Match routes that are subsets of the specified prefix and that have a mask between the two values (inclusive match) through: from route-filter 192.168.0.0/16 prefix-length-range /20-/24; © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 10 through: •Match first and second specified prefixes and masks exactly and all prefixes directly between the two prefixes from route-filter 192.168.0.0/16 through 192.168.16.0/20;
  • 11. Match Type Summary Given a starting prefix of 192.168/16, what matches with each option? … 192.168/16192.168/16192.168/16192.168/16 … 192.168/16192.168/16192.168/16192.168/16 … 192.168/16192.168/16192.168/16192.168/16 © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 11 exact … orlonger (down to /32) … … longer (down to /32) through … … 192.168/16192.168/16192.168/16192.168/16 … … 192.168/16192.168/16192.168/16192.168/16 /x /y prefix-length-range /x-/y … … 192.168/16192.168/16192.168/16192.168/16 upto
  • 12. Common Actions Common actions in routing policy: •Terminating actions: • accept • reject •Flow control: • next term © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 12 • next term • next policy •Modifying attributes: • community (add, delete, and set) • preference term firstterm match thenfrom then statements describe the actions to take if a match with the from statement occurs
  • 13. Implementing Routing Policy (1 of 2) Definition of routing policy is always under the [edit policy-options] hierarchy: [edit policy-options] user@host# show policy-statement my-policy { term accept-local-route { from { protocol local; interface ge-0/0/0; term firstterm thenfrom my-policy © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 13 interface ge-0/0/0; } then accept; } term accept-some-static-routes { from { protocol static; route-filter 172.18.1.0/24 exact; route-filter 172.18.2.0/24 exact; } then accept; } term accept-rip-routes { from protocol rip; then accept; } } match no match no match then term secondterm from then term thirdterm from then from match match
  • 14. Implementing Routing Policy (2 of 2) You can apply routing policies as import or export policies at different levels (protocol dependent) [edit protocols ospf] user@host# show export my-policy; area 0.0.0.0 { interface ge-0/0/1.0; © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 14 interface ge-0/0/1.0; interface ge-0/0/2.0; interface ge-0/0/3.0 { passive; } interface lo0.0; }
  • 15. Routing Policy Flow You can chain routing policies together •Evaluation proceeds left to right until the software reaches a terminating action of accept or reject •The software supports flow-control actions such as next policy RouteRouteRouteRoute © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 15 AcceptAcceptAcceptAccept or rejector rejector rejector reject AcceptAcceptAcceptAccept or rejector rejector rejector reject AcceptAcceptAcceptAccept or rejector rejector rejector reject Policy 1Policy 1Policy 1Policy 1 AcceptAcceptAcceptAccept or rejector rejector rejector reject AcceptAcceptAcceptAccept or rejector rejector rejector reject AcceptAcceptAcceptAccept or rejector rejector rejector reject Policy 2Policy 2Policy 2Policy 2 AcceptAcceptAcceptAccept or rejector rejector rejector reject PolicyPolicyPolicyPolicy nnnn AcceptAcceptAcceptAccept RejectRejectRejectReject Term CTerm CTerm CTerm C Term CTerm CTerm CTerm C DefaultDefaultDefaultDefault policypolicypolicypolicy Term ATerm ATerm ATerm A Term BTerm BTerm BTerm B Term ATerm ATerm ATerm A Term BTerm BTerm BTerm B Term ATerm ATerm ATerm A
  • 16. Case Study: Objective and Topology Advertise the default static route defined on R1 into OSPF using routing policy: .1.2 OSPFOSPFOSPFOSPF Area 0Area 0Area 0Area 0 R1R1R1R1 R2R2R2R2 R4R4R4R4 InternetInternetInternetInternet © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 16 user@R1> show route protocol static inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0.0.0.0/0 *[Static/5] 00:00:44 > to 172.30.25.1 via ge-0/0/1.0 .1.2 172.30.25.0/30172.30.25.0/30172.30.25.0/30172.30.25.0/30 R3R3R3R3
  • 17. Case Study: Defining the Policy Sample routing policy configuration used to advertise R1’s default static route into OSPF: [edit policy-options] user@R1# show policy-statement default-static { term accept-default-static { User-defined policy and term names © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 17 term accept-default-static { from { protocol static; route-filter 0.0.0.0/0 exact; } then accept; } } Match criteria Action
  • 18. Case Study: Applying the Policy Sample application of routing policy used to advertise R1’s default static route into OSPF: [edit protocols ospf] user@R1# show export default-static; area 0.0.0.0 { R1R1R1R1 R2R2R2R2 © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 18 area 0.0.0.0 { interface ge-0/0/2.0; interface ge-0/0/3.0; interface lo0.0; } Export default static route from route table to OSPF OSPFOSPFOSPFOSPF Area 0Area 0Area 0Area 0 R1R1R1R1 R4R4R4R4 R3R3R3R3 Note: Once you define routing policy and apply it, R1 floods an external LSA for the default static route to all OSPF routers in Area 0.
  • 19. Case Study: Monitoring the Results Sample verification step to ensure the routing policy works as expected (capture is taken from R4): user@R4> show route protocol ospf exact 0/0 inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 19 0.0.0.0/0 *[OSPF/150] 00:03:33, metric 0, tag 0 > to 172.19.3.1 via ge-0/0/2.0 to 172.19.4.1 via ge-0/0/3.0 .1.2 172.30.25.0/30172.30.25.0/30172.30.25.0/30172.30.25.0/30 OSPFOSPFOSPFOSPF Area 0Area 0Area 0Area 0 R1R1R1R1 R2R2R2R2 R4R4R4R4 R3R3R3R3 InternetInternetInternetInternet R4 installs external default OSPF route flooded by R1
  • 20. What Is a Firewall Filter? Firewall filters control the traffic entering and leaving a networking device in a stateless fashion: •Processes every packet independently •Used to filter and monitor network traffic © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 20
  • 21. Building Blocks of Firewall Filters no match term firstterm match thenfrom my-filter Firewall filters consist of one or more terms; the software evaluates terms sequentially until it reaches a terminating action User-defined filter and term names © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 21 no match no match term secondterm term Default match then statements describe the actions to take if a match with the from statement occurs discard Default action for packets not explicitly allowed Note: Ordering matters! If you must reorder terms within a filter, consider using the insert CLI command. from statements describe match conditions thenfrom
  • 22. Common Match Criteria Can match based on most header fields: Match conditions categories include: •Numeric range © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 22 •Numeric range •Address •Bit field term firstterm match thenfromfrom statements describe match conditions
  • 23. Firewall Filter Actions Common actions in firewall filters: •Terminating actions: • accept • discard • Reject •Flow control: term firstterm match thenfrom then statements describe the actions to take if a match with the from statement occurs © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 23 •Flow control: • next term •Action modifiers: • count, log, and syslog • forwarding-class and loss-priority • Policer The software discards all traffic not explicitly allowed!
  • 24. Implementing Firewall Filters (1 of 2) Define firewall filters based on protocol family under the [edit firewall] hierarchy level: [edit firewall family inet] user@host# show filter filter-in { term block-some-packets { from { source-address { The software applies family inet filters only to interfaces running IPv4 term firstterm thenfrom my-policy © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 24 source-address { 10.10.10.0/24; } } then { count spoof-in; discard; } } term accept-others { then accept; } } … If discard is not present then packets are accepted match no match no match then term secondterm from then term thirdterm from then from match match
  • 25. Implementing Firewall Filters (2 of 2) Apply firewall filters as input or output on an interface •Protocol family on interface and filter must match: The software applies firewall [edit interfaces ge-0/0/1] user@host# show unit 0 { family inet { filter { input filter-in; © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 25 The software applies firewall filters using input and output statements input filter-in; output filter-out; } address 172.30.25.2/30; } } InputInputInputInput InputInputInputInputOutputOutputOutputOutput OutputOutputOutputOutput Input firewall filters control traffic entering an interface Output firewall filters control traffic leaving an interface Tip: To avoid late night drives back to the office, use commit confirmed when activating filters!
  • 26. Test Your Knowledge (1 of 2) Apply a filter on R1’s ge-0/0/1.0 interface to allow HTTP traffic to 172.27.102.100 •Should the filter be applied as an input or output filter? © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 26 .1.2 172.30.25.0/30172.30.25.0/30172.30.25.0/30172.30.25.0/30 172.27.102.0/24172.27.102.0/24172.27.102.0/24172.27.102.0/24 R1R1R1R1 ge-0/0/1.0.100.100.100.100 .1.1.1.1 MYNETMYNETMYNETMYNET InternetInternetInternetInternet
  • 27. filter web-server { term allow-web-traffic { from { destination-address { 172.27.102.100/32; } protocol tcp; Test Your Knowledge (2 of 2) Which inbound traffic does the router permit? Applied as an input filter © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 27 protocol tcp; port http; } then accept; } term deny-other-web-traffic { from { protocol tcp; port http; } then { discard; } } } .2 172.27.102.0/24172.27.102.0/24172.27.102.0/24172.27.102.0/24 R1R1R1R1 ge-0/0/1.0.100.100.100.100 .1.1.1.1 MYNETMYNETMYNETMYNET
  • 28. Filtering Local Traffic (1 of 2) Apply filters to lo0 interface to filter local traffic •Filter must account for routing and management protocols Routing EngineRouting EngineRouting EngineRouting Engine © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 28 Frames/Packets InFrames/Packets InFrames/Packets InFrames/Packets In Packet Forwarding EnginePacket Forwarding EnginePacket Forwarding EnginePacket Forwarding Engine Control PlaneControl PlaneControl PlaneControl Plane Forwarding PlaneForwarding PlaneForwarding PlaneForwarding Plane CPUCPUCPUCPU lo0
  • 29. filter limit-ssh-access { term ssh-accept { from { source-prefix-list { trusted; } protocol tcp; destination-port ssh; } then accept; lo0 { unit 0 { family inet { filter { input limit-ssh-access; } address 10.255.71.48/32; } } } Filtering Local Traffic (2 of 2) DefinitionDefinitionDefinitionDefinition ApplicationApplicationApplicationApplication © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 29 then accept; } term ssh-reject { from { protocol tcp; destination-port ssh; } then { discard; } } term else-accept { then accept; } } } Which problems might occur if you omit the else-accept term? Think About ItThink About ItThink About ItThink About It Affects incoming traffic destined to the routing engine!
  • 30. Policing Policing (rate-limiting) enables you to limit the amount of traffic that passes into or out of an interface: •Works with firewall filters to thwart DoS attacks • Common actions include discard and setting loss-priority level •Uses average bandwidth and maximum burst size © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 30 Bit BucketBit BucketBit BucketBit Bucket
  • 31. [edit firewall] user@host# show policer p1 { if-exceeding { bandwidth-limit 400k; burst-size-limit 100k; } then discard; } family inet { filter rate-limit-subnet { term match-subnet { Configuration Example bandwidth-limit * In bits per second * 30,520 bps to 4.29 Gbps burst-size-limit * In bytes * Minimum should = 10 You must apply filter! Policer defined © 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 31 term match-subnet { from { source-address { 192.100.1.0/24; } } then { policer p1; } } term else-accept { then accept; } } } Note: Filter must account for routing and management protocols * Minimum should = 10 times MTU (low speed) or bandwidth times 3–5 milliseconds (high speed) Policer referenced