I'm having troubles routing from two VLANs on Cisco Router here is the config:

interface FastEthernet0/1.13
 encapsulation dot1Q 13
 ip address
 ip nat inside
 no ip virtual-reassembly
interface FastEthernet0/1.21
 encapsulation dot1Q 21
 ip address
 ip nat outside
 no ip virtual-reassembly

And the routing part:

ip forward-protocol nd
ip route <ISP GW IP>
ip route

There are other things going one on the router, specially a big access list and also a lot of NAT's but nothing related with this VLANs.

If I'm on a VLAN 13 host and try to ping for instance a VLAN21 Address shouldn't it work?


Result of sh ip route

Gateway of last resort is <ISP GW> to network

C is directly connected, FastEthernet0/1.12
C is directly connected, FastEthernet0/1.13
     <ISP subnet> is subnetted, 2 subnets
C       <ISP IP> is directly connected, FastEthernet0/0.120
C       <ISP IP> is directly connected, FastEthernet0/1.16
C is directly connected, FastEthernet0/1.11 is variably subnetted, 3 subnets, 3 masks
S [1/0] via
C is directly connected, FastEthernet0/1.21
C is directly connected, FastEthernet0/1.10
S* [1/0] via <ISP GW>
  • it really depends on what your nat config, and host setup is. What's the output of show run | s nat? Do the hosts you are trying to ping between have the and configured as their default gateway addresses? what is the purpose of setting the nat statements on your interfaces? – HostBits Jan 10 '17 at 23:47
  • The output for that reveals a lot of public IPs and it's a lot of lines but if it's needed I will hide them and post. The interfaces have nat cause they do NAT some IPs. The VLAN 13 hosts do have as the GW but the VLAN 21 hosts have as the gateway. – rgomez Jan 10 '17 at 23:54
  • 1
    It's probably because I don't do this stuff on a regular enough basis, but your interface config and your routing statements look funny to me. 1. The routing statement: ip route would presume that is another router or possibly an SVI on a Layer 3 switch. What device is at 2. The routing statement: ip route makes no sense to me at all. How is the router supposed to route traffic to in the first place? What's the output of sh ip route look like? – joeqwerty Jan 11 '17 at 0:55
  • At it's a Layer 3 device which routes traffic for all network. Look at edit please – rgomez Jan 11 '17 at 1:01
  • OK, now it's making more sense. You shouldn't need this statement: ip route as the router is directly connected to the network. Is your switch configured correctly with an SVI for each VLAN that corresponds to each subnet? Are the hosts in each VLAN/subnet configured with the correct DG? Is the switch port that uplinks to the router configured as a trunk port and has the correct VLAN's allowed? – joeqwerty Jan 11 '17 at 1:18

You have a problem with this command:

ip route

You do not have a route to the next hop: is variably subnetted, 3 subnets, 3 masks
S [1/0] via

If the router doesn't know how to get to the next hop, then it cannot route to the network, and the traffic will be dropped. The router needs to know how to get to the next hop address for any route, but the router has the ip address directly connected network that only goes up to, and it is not up for some reason. There is no interface that directly connects to the network of the next hop address.

You really should not have an outside (WAN) interface as a VLAN interface. Normally, you want to use a physical address as an outside (WAN) interface.

Also, you show the directly connected route:

C is directly connected, FastEthernet0/1.21

Unfortunately, that doesn't match what you show for the configuration of that interface.

Never, ever include a static route for directly connected networks.

  • but the router has the ip address - I missed the subnet mask on that. – joeqwerty Jan 11 '17 at 5:36
  • The router does not have that network on that interface. The routing table tells you otherwise: C is directly connected, FastEthernet0/1.21. – Ron Maupin Jan 11 '17 at 5:39
  • I was just referring to the fact that I didn't pay close enough attention to the subnet masks on the interfaces or in the routing table. – joeqwerty Jan 11 '17 at 6:04
  • Your configuration, routing table, and static routes do not match in a way that works. You need to fix that to have a chance of things working. – Ron Maupin Jan 11 '17 at 6:07
  • I'm not the OP. I was just commenting that I misread the details in the question and that you had read the question more carefully than I did. – joeqwerty Jan 11 '17 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.