Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 915
  • Last Modified:

intervlan and default gateway

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)

2 Solutions
nociSoftware EngineerCommented:
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.
biggynetAuthor Commented:
So how do I make the router ping when controller's gateway is set to
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now