12-09-2024 11:51 PM
Hi all,
I'm having an issue getting cisco packet tracer to send packets from switch 1 to router 2 to router 1's gateway ip address. I've narrowed the problem down to ip routing within R2. From SW1, I can ping router 2 but cannot pass through R2 and ping R1. From R2, I can ping the gateway on R1 and ping SW1. I'm setting all ports up with static addresses.
My current config is SW1 interface g1/1/4 on vlan 10, Vlan 10 IP address is 192.159.0.2, routing to R2 interface g1/0 IP address 192.159.0.1, routing to R2 interface g0/0 IP address 192.100.0.2, routing to R1 interface g0/0 IP address 192.100.0.1, routing to R1 interface g9/0 IP address 192.168.0.1.
SW1 running config:
interface GigabitEthernet1/0/1
switchport access vlan 10
!
interface GigabitEthernet1/0/2
switchport access vlan 10
interface GigabitEthernet1/1/4
switchport access vlan 10
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
mac-address 0009.7ca2.9701
ip address 192.159.0.2 255.255.0.0
!
ip classless
ip route 192.168.0.0 255.255.0.0 Vlan10
ip route 192.100.0.0 255.255.0.0 Vlan10
R2 running config:
interface GigabitEthernet0/0
ip address 192.100.0.2 255.255.0.0
ip access-group 5 in
ip access-group 5 out
!
interface GigabitEthernet1/0
ip address 192.159.0.1 255.255.0.0
ip access-group 5 in
ip access-group 5 out
!
ip classless
ip route 192.168.0.0 255.255.0.0 GigabitEthernet0/0
ip route 192.100.0.0 255.255.0.0 GigabitEthernet1/0
ip route 192.100.0.0 255.255.0.0 192.100.0.0
!
ip flow-export version 9
!
!
access-list 5 permit any
!
R1 running config:
!
interface GigabitEthernet0/0
ip address 192.100.0.1 255.255.0.0
!
interface GigabitEthernet9/0
ip address 192.168.0.1 255.255.0.0
!
ip classless
ip route 192.168.0.0 255.255.0.0 GigabitEthernet0/0
ip route 192.168.0.0 255.255.0.0 192.159.0.0
ip route 192.100.0.0 255.255.0.0 192.168.0.0
Thanks for any help/insights
12-10-2024 12:11 AM - edited 12-10-2024 12:13 AM
If your set up simply Only R1 R2 and SW, then they connected as below :
R1--R2--SW
then R2 is here for routing; enable ip routing (on all the devices)
R1 - remove all the routes and add below one route :
ip route 0.0.0.0 0.0.0.0 192.100.0.2
SW1 - same as above, remove all routes
ip route 0.0.0.0 0.0.0.0 192.159.0.1
R2.
ip routing enable
ip route 192.168.0.1 255.255.0.0 192.100.0.1
try and let us know; still issue post below output again
show run
Show IP interface brief
show ip route
show cdp neigh
Note: I have not looked at your access group applied on the interface, so until routing is fixed, remove that, test, and apply again once routing is working.
12-10-2024 02:01 AM - edited 12-10-2024 02:02 AM
Your ACL looks weird. Remove the ACL and test. Or change to
Access-list 5 permit ip any any
You can also ZIP the file and attach here for further support
12-10-2024 06:34 AM
Hello @CyNiche
On R2, the static route ip route 192.100.0.0 255.255.0.0 192.100.0.0 is problematic. The next-hop value (192.100.0.0) is a network address, not a valid next-hop IP or interface, which causes confusion in the routing process... This needs to be removed and replaced with a correct route pointing to R1's GigabitEthernet0/0 interface IP (192.100.0.1).
Additionally, the access list applied to both interfaces on R2 (ip access-group 5) is redundant since it permits all traffic (permit any) by default. These should be removed to avoid unnecessary processing or confusion.
On R1, there is a static route misconfiguration. The route ip route 192.100.0.0 255.255.0.0 192.168.0.0 points traffic for the 192.100.0.0/16 network to an incorrect next-hop network (192.168.0.0). This route needs to be corrected so that traffic destined for 192.159.0.0/16 is sent towards R2's GigabitEthernet0/0 interface (192.100.0.2).
Also; verify that SW1 is configured properly with VLAN 10 active and its IP address correctly set as 192.159.0.2/16. Once routing is fixed, ensure connectivity by pinging R2's interface (192.159.0.1), R1's interface (192.100.0.1), and finally R1's gateway (192.168.0.1) from SW1.
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