intervlan and default gateway

Posted on 2012-08-28
Last Modified: 2012-09-14
Below is my setup:

R <--trunk-->3560<--trunk-->Wireless controller (

1. Router cannot ping when controller's gateway is set to
2. Router can ping when controller's gateway is set to

How do I make 1. to work? Below is a simplified version of the configs:

Router config:
int fa0/0.20
encapsulation dot1q 20 native
ip address

3560 config:
ip routing
int gig0/0
description TO ROUTER
switchport trunk native vlan 20
switchport mode trunk

int vlan 20
ip address

ip default-gateway

Wireless controller:
management IP address: (vlan untag)

Question by:biggynet
    LVL 39

    Accepted Solution

    A router is equipment to direct IP level packets between networks. [ LAN's]

    A switch is a more efficient form of a plain connector, a switch mostly acts on layer 2, mac addresses. [ A layer 3 switch combines routing & switching to a certain extent ].

    A switch has an IP address to make it managable, nothing else.
    A router cannot function without (multiple) ip addresses as that is the core business of a router.  So you need to specify the ip address of a router as the [ default ] gateway for equipment.

    The default router is picked when no better [ defined in configuration ] alternatives exist.
    On some equipment only a default gateway can be specified.

    Author Comment

    So how do I make the router ping when controller's gateway is set to
    LVL 41

    Assisted Solution

    The 3560 is a layer 3 switch, which means that it is a switch and a router. We don't know if the 3560 is actually setup for routing. You might just have assigned an IP address to it, in which case setting as a gateway is just as useful as setting your PC as the gateway - it doesn't work because it isn't routing. We are going to need more complete configuration on the switch.

    From a topology standpoint, I don't know if you are intending to use the 3560 as a L3 switch. How many VLANs do you have? If you have only 1, then you are just using the 3560 as a layer 2 switch, and the address on the switch is only really useful for management.

    Your topology is confusing to me. If you want to use the 3560 as L3 switch, then I don't understand why you are trunking between the 3560 and the router. Trunking makes sense for L2 traffic, but I don't see why you would trunk between two L3 devices. If you want to use the 3560 as an L3 device, then I suggest converting the trunk interface between the router and switch to a plain Ethernet interface assigned to a different VLAN on the switch. If you want to use the 3560 as a L2 switch, keeping the trunking interface, and realize that the IP address on the switch is for management only, and the gateway for anything connected to your switch, on any VLAN, is the IP address of the router assigned to that VLAN.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
    #Citrix #Citrix Netscaler #HTTP Compression #Load Balance
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now