cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
945
Views
0
Helpful
4
Replies

Intervlan routing Cisco Modeling Labs (CML)

JJ8313
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

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

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

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

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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!

ip default-gateway used only when the device acting as Layer 2 only.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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.