cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1861
Views
0
Helpful
8
Replies

Track vlan inteface with physical interface?

davistw
Level 1
Level 1

I have a vlan trunked from a router to a layer 2 switch. What I would like to do is track the physical interface on the switch with the vlan interface on the router. For example when the vlan on the router is admin down I would like to have the interface be shutdown. When it is up I would like it to be up. I can run EEM or TCL on the switch and bring it up or down but I cant find anything on the switch that indicates the status of the vlan on the router? Is there something on the switch that indicates this?

8 Replies 8

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

I am not sure if I understand your question. You are writing about tracking the physical interface on the switch with the "VLAN interface" on the router. First of all, what is, in your understanding, a "VLAN interface" on the router? On routers, you either have per-interface subinterfaces (e.g., Fastethernet0/1.2) or, with built-in or inserted switch module, SVIs (Switched VLAN Interface), i.e., "interface Vlan1".

Second, if I understand you correctly, you want the interface on the swich to be shutdown. This is somewhat strange because I suppose that the interface on the switch is a trunk. If you switch that trunk down, none of the VLANs will be working over it.

Third, I am not sure what do you mean by saying that "VLAN on the router is admin down". On Cisco routers, we do not create VLANs the same way we do that on switches (and if we do, it is because there's a built-in switch that is being configured in reality, not the router). On a router, we only create subinterfaces.

So can you perhaps clarify your needs?

Best regards,
Peter

Yes I have a subinterface on the router like gig1/0.13 trunked to a switch and on the switch port it is assigned to vlan 13.... What I would like to do on the switch is detect when on the router I do a shut on gig1/0.13. If i could determine on the switch what the status was of gig1/0.13 on the router was I could use something like EEM or tcl and shut the switch port down on the switch.

Hi,

What you want still does not make much sense. You write:

What I would like to do on the switch is detect when on the router I do a shut on gig1/0.13. If i could determine on the switch what the status was of gig1/0.13 on the router was I could use something like EEM or tcl and shut the switch port down on the switch.

This could theoretically be done. However, if you shut down the port on the switch, you have no way of finding out that you have activated the Gi1/0.13 at some point in the future because you will not be able to query the router over a shutdown interface on the switch.

The testing of the liveliness of the Gi1/0.13 on the router could be done as an IP SLA probe (ICMP ping) and enclosing the results of the IP SLA probe into a track object - EEM should be able to react to tracking object changes. However, as I said earlier, you have a deadlock in this scenario, as once you shutdown the port on the switch, the whole Gi1/0 on the router will go down along with all subinterfaces. If you want to drive the un-shutting the switch port by seeing that Gi1/0.13 is live again, this will never happen.

Can you perhaps explain a bigger picture of what you are trying to accomplish and why do you want to do it in this particular way? Perhaps we can find a different way to do what you need.

Best regards,
Peter

Bigger picture: I have a switch interface connected to a PPPOE dial up device. I control the PPPOE on the router Gig1/0/13... I can shut the vlan down and disable the PPPOE when necessary but the interface is still up and the device that is connected is still enabled and burning money. The only way to insure that the dial up device is not burning dollars is to shut the interface down. I have tcl scripts on the router that brings up and shuts down the dialer and vlan when I need the PPOE connected but when I disable the PPPOE I need to run a script on the switch that detects when the vlan is down and shuts down the interface.

Hi,

Can you post a diagram of how the entire setup is connected and what are the individual devices?

Best regards,
Peter

I know it is kinda weird. 

I have a script that runs on a computer that setups  the PPOE dialer, turns on the vlan on the router and turns on the interface on the switch this is all done via calls to tcl. The PPOE address will vary via DHCP. After that I route traffic out the dialer interface. I can send multiple traffic types out the dialer such as HTTP, FTP etc which is done with policy based routing. I disable traffic type routing such as HTTP . When script on the router determines when the last traffic type is no longer being routed it shuts down the dialer and vlan on the router but if traffic is still being routed it will not shut it down. However, the switch has no knowledge of the status. When the disable traffic type command is run on the switch it needs to check the status of the vlan to see if it needs to shutdown the interface or keep it up because traffic is still being routed out of it...What I am trying to figure out is how to tell the script that the vlan on the router is still up and not to shut down the interface.

 

BTW thanks for your patience. I know this is not a normal case but I am stuck doing it this way.

Hi,

I apologize for getting back to you so late.

What precise type of the router and the switch are you using? Perhaps we could think of something similar to an IP SLA where the switch would be pinging a characteristic address, and if that address stopped responding, it would react in a certain way.

Best regards,
Peter

P.S.: Do you think you would be able to draw a simple diagram of your setup including the interconnections and data flows so that it is clear how your entire setup works? As you have said yourself, this is not a normal case.

it is a cisco 2811 with a 16 port switch module installed. The switch module is running 12. code and the router is running 15 dot code.... the diagram is pretty simple I have a device plugged into a port on the switch which has no ip address on it. it is simply on a vlan that is trunked to the router. The router vlan has a ppoe dialer that logs onto the device.

I have code on  a server that enables and disables  the ppoe on the router. When necessary the server shuts down the vlan on the router via a tcl script. When called the tcl acts on the request and either shuts down the vlan or leaves it up depending on whether or not it detects that the ppoe is still being used. What I want to do is the same thing on the switch. Execute the tcl code and detect whether or not the ppoe is still being used by if the code on the router has shut down the vlan on the switch. If so shut down the interface.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card