06-23-2016 04:54 PM - edited 03-08-2019 06:21 AM
Hi All,
I have a doubt on static route in Catalyst switch 4506E. Details are follows,
Source - 10.72.XX.XX/23
Destination - YY.YY.YY.YY
Gateway - 10.0.XX.XX
I want to write static route that which ever the traffic from source subnet to the destination IP should be routed via gateway IP address.
Please help me to do it. If you have any questions do let me know. Thanks!
Regards,
Chandru
Solved! Go to Solution.
06-23-2016 05:49 PM
You will need to use Policy-Based Routing if I understand you correctly.
http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst4500/12-2/25ew/configuration/guide/conf/pbroute.html
(Untested) An example is:
!
access-list 10 permit ip 10.72.XX.XX 0.0.1.255 YY.YY.YY.YY <wildcard bits>
!
interface GigabitEthernet2/2
ip policy route-map MyRoute
!
route-map MyRoute permit 10
match ip address 10
set ip next-hop 10.0.xx.xx
!
I've never done PBR using both Source and Destination matching but I can only assume this would work. Good luck.
06-23-2016 05:49 PM
You will need to use Policy-Based Routing if I understand you correctly.
http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst4500/12-2/25ew/configuration/guide/conf/pbroute.html
(Untested) An example is:
!
access-list 10 permit ip 10.72.XX.XX 0.0.1.255 YY.YY.YY.YY <wildcard bits>
!
interface GigabitEthernet2/2
ip policy route-map MyRoute
!
route-map MyRoute permit 10
match ip address 10
set ip next-hop 10.0.xx.xx
!
I've never done PBR using both Source and Destination matching but I can only assume this would work. Good luck.
06-23-2016 06:54 PM
Hi
Static routes is based on destination only. If you want base the forwarding decision on the source you need to use pbr.
The config will looks like:
access-list 100 permit ip 10.72.XX.XX 0.0.1.255 yy.yy.yy.yy 0.0.0.255
Route-map PBR permit 10
Match ip address 100
Set ip next-hop 10.0.xx.xx
Interface x/y
Ip policy route-map PBR
Hope this clear.
Thanks
PS: Please don't forget to rate and mark as correct answer if this solved your issue
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide