03-13-2022 12:18 PM
Hello, I am setting up an easy lab for inter-vlan routing using a router on a stick in CML. pretty straight forward, right? not able to ping across sub-interfaces from the root switch. can ping 192.168.0.17 from switch, cannot ping 192.168.129 from switch.
!Configuration on the switch (Gi3/3 is connected to router on G0/1)
!
interface GigabitEthernet3/3
description uplink
switchport trunk allowed vlan 2-4091
switchport trunk encapsulation dot1q
switchport trunk native vlan 8
switchport mode trunk
switchport nonegotiate
negotiation auto
!
interface Vlan70
ip address 192.168.0.18 255.255.255.240
!
ip default-gateway 192.168.0.17
!
!This is the router configuration
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1.8
encapsulation dot1Q 8 native
!
interface GigabitEthernet0/1.70
encapsulation dot1Q 70
ip address 192.168.0.17 255.255.255.240
!
interface GigabitEthernet0/1.177
encapsulation dot1Q 177
ip address 192.168.0.129 255.255.255.128
!
This should be easy, right? all interfaces are up/up, I have an Linux workstation on at least one switch-port on the switch that can ping 192.168.0.129 on the router. however, cannot ping 192.168.0.129 from switch itself. because I have the default-gateway set to 192.168.0.17 on the switch, the router should take over the routing to 192.168.0.129 subnet, but it fails.
Solved! Go to Solution.
03-13-2022 01:25 PM
If you had setup on switch VLAN and all the interface up and running.
check below information Switch ;
show ip interface brief
show interface status
show vlan (make sure vlan created ?)
change as below on switch
ip routing (both the side)
no ip default-gateway 192.168.0.17
ip route 0.0.0.0 0.0.0.0 192.168.0.17
03-13-2022 01:25 PM
If you had setup on switch VLAN and all the interface up and running.
check below information Switch ;
show ip interface brief
show interface status
show vlan (make sure vlan created ?)
change as below on switch
ip routing (both the side)
no ip default-gateway 192.168.0.17
ip route 0.0.0.0 0.0.0.0 192.168.0.17
03-14-2022 09:53 AM
yep, that solved it. Interesting that CML doesnt support "ip default-gateway <address>" but have to configure: "ip routing" on the switch. appreciate the help!
03-14-2022 09:55 AM
ip default-gateway used only when the device acting as Layer 2 only.
03-14-2022 10:03 AM
yes, of course. That is what I had configured, a L2 Switch with a Router on a Stick to do the inter-vlan routing for the LAN. But, as we have found out, that is not supported in CML because we had to make the L2 Switch a L3 switch. Also, I made no changes on the router itself. The only changes were on the L2 switch that is now a L3 Switch. Thanks for the help.
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