05-18-2021 03:06 PM
I have a C3850 and I am trying to route network 192.168.98.0 to the next hop of 192.168.98.2. I can ping across and back with no issues. Any suggestions?
ip routing ip route 0.0.0.0 0.0.0.0 192.168.10.1 ip route 192.168.98.0 255.255.255.0 192.168.98.2 ----------------------------------------------------- Gateway of last resort is 192.168.10.1 to network 0.0.0.0 S* 0.0.0.0/0 [1/0] via 192.168.10.1 192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.10.0/24 is directly connected, Vlan10 L 192.168.10.2/32 is directly connected, Vlan10 192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.20.0/24 is directly connected, Vlan20 L 192.168.20.1/32 is directly connected, Vlan20 192.168.30.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.30.0/24 is directly connected, Vlan30 L 192.168.30.1/32 is directly connected, Vlan30 192.168.40.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.40.0/24 is directly connected, Vlan40 L 192.168.40.1/32 is directly connected, Vlan40 192.168.98.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.98.0/24 is directly connected, Vlan98 L 192.168.98.1/32 is directly connected, Vlan98 192.168.99.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.99.0/24 is directly connected, Vlan1 L 192.168.99.1/32 is directly connected, Vlan1 192.168.100.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.100.0/24 is directly connected, Vlan100 L 192.168.100.1/32 is directly connected, Vlan100
Solved! Go to Solution.
05-19-2021 12:01 AM
Hello
@TXITGUY9000 wrote:
Hi,
Thanks for the response. Yes it is routing currently to 192.168.10.1, but I want to force traffic on the 98 network to route to 192.168.98.2 and all other traffic to the 192.168.10.1
access-list 10 permit 192.168.98.0 0.0.0.255
route-map PBR
match ip address 10
set ip next-hop 192.168.10.1
int vlan 98
ip polcy route-map PBR
05-18-2021 05:16 PM
Hi,
i can see 192.168.98.1 is already configured as SVI in your VLAN 98 interface so it is already appearing as connected subnet in your Routing table:
192.168.98.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.98.0/24 is directly connected, Vlan98 L 192.168.98.1/32 is directly connected, Vlan98
There is no need to add below static Route. Even if you add it, it will not appear as static route as it is already a connected subnet
ip route 192.168.98.0 255.255.255.0 192.168.98.2
If your VLAN98 interface is up, you will be able to reach any IP in 92.168.98.0/24 network
05-18-2021 11:23 PM
Hi,
Thanks for the response. Yes it is routing currently to 192.168.10.1, but I want to force traffic on the 98 network to route to 192.168.98.2 and all other traffic to the 192.168.10.1
Any idea what I am doing wrong?
05-18-2021 11:59 PM
Hello,
what source IP addresses do you want to route ? Probably the only way to (maybe) do this is to use policy based routing, and the 'set ip next-hop' command (which causes the system to first use policy routing and then use the routing table).
Post the full configuration of your 3850 and indicate which source networks you want to be routed towards that next hop (192.168.98.2).
05-19-2021 12:01 AM
Hello
@TXITGUY9000 wrote:
Hi,
Thanks for the response. Yes it is routing currently to 192.168.10.1, but I want to force traffic on the 98 network to route to 192.168.98.2 and all other traffic to the 192.168.10.1
access-list 10 permit 192.168.98.0 0.0.0.255
route-map PBR
match ip address 10
set ip next-hop 192.168.10.1
int vlan 98
ip polcy route-map PBR
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