SRX Services Gateway
Reply
Contributor
Piccolo
Posts: 22
Registered: ‎07-24-2009
0
Accepted Solution

Source Based Routing

[ Edited ]

Hi,

 

how can i configure source based routing under the srx210 ?

 

thanks.

 

edit by myself :

##############

found the solution :

my network is 192.168.49.0/24 and i want that client 192.168.49.5 is routed thrue 192.168.10.1 instead of my default route.

 

set routing-instances REDIRECT-100-0 instance-type forwarding
set routing-instances REDIRECT-100-0 routing-options static route 0.0.0.0/0 next-hop 192.168.10.1

 

set routing-options interface-routes rib-group inet all-ribs
set routing-options rib-groups all-ribs import rib [ inet.0 REDIRECT-100-0.inet.0 ]

set firewall family inet filter ROUTE-MAP-NET-100-0 term 1 from source-address 192.168.49.5/32

set firewall family inet filter ROUTE-MAP-NET-100-0 term 1 then then routing-instance REDIRECT-100-0
set firewall family inet filter ROUTE-MAP-NET-100-0 term 2 then accept

set interfaces ge-0/0/1 unit 0 family inet filter input ROUTE-MAP-NET-100-0

 

Message Edited by Piccolo on 09-20-2009 01:14 PM
Message Edited by Piccolo on 09-20-2009 01:16 PM
Distinguished Expert
aarseniev
Posts: 1,677
Registered: ‎08-21-2009
0

Re: Source Based Routing

If you want your client to be able to ping its default gateway, it is better to exclude packets, addressed to own SRX address, from FBF:

set firewall family inet filter ROUTE-MAP-NET-100-0 term exclude-to-own from address <SRX interface address>/32

set firewall family inet filter ROUTE-MAP-NET-100-0 term exclude-to-own then accept

insert firewall family inet filter ROUTE-MAP-NET-100-0 term exclude-to-own before term 1

___________________________________
Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.