cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1229
Views
0
Helpful
2
Replies
brian.plue
Beginner

Using Kron to Automate VLAN changes.

Hello,

I am looking to automate the process of changing a vlan for an employee who requires access to an outside line seperate from our corporate network. This employee only works Mondays from specific hours and I am trying to use Kron to change the vlan back and forth on his port during those hours.

The corporate network is vlan 1, the outside network is vlan 30.

Here is what I have for configuration:

kron policy-list AccessStart

cli interface gig 1/0/35

cli switchport access vlan 30

!

kron policy-list Access End

cli int gig 1/0/35

cli switchport access vlan 1

I have tried with "config t" and without (Obviously I am scheduling with the Kron occurance command) I have back-ups working using Kron but can't make this work. Is there anything I am missing?

2 REPLIES 2
srereddy
Beginner

There are some limitations with 'Kron'. What is your IOS release? Some versions dosent support interface mode commands (yeah i know, unfrtunately sometimes unsupported commands still be parsed in IOS).

Assuming it supports......lets take a look complete config....can u paste it here including the Kron occurence?

It should look like -

kron policy-list AccessStart
cli interface gig1/0/35
cli switchport access vlan 30

!
kron occurrence AccessStart at 9:00 Mon recurring
policy-list AccessStart

version 12.2

no service pad

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname B1

!

boot-start-marker

boot-end-marker

!

enable password XXXXXXXXXXXXX

!

!

!

no aaa new-model

switch 1 provision ws-c2960s-48lps-l

!

!

!

!

crypto pki trustpoint TP-self-signed-2524761216

enrollment selfsigned

subject-name cn=IOS-Self-Signed-Certificate-2524761216

revocation-check none

rsakeypair TP-self-signed-2524761216

!

!

spanning-tree mode pvst

spanning-tree portfast default

spanning-tree extend system-id

!

!

!

!

vlan internal allocation policy ascending

!

!

!

interface FastEthernet0

no ip address

shutdown

!

interface GigabitEthernet1/0/1

!

interface GigabitEthernet1/0/2

!

interface GigabitEthernet1/0/3

!

interface GigabitEthernet1/0/4

switchport access vlan 121

switchport mode access

!

interface GigabitEthernet1/0/5

switchport access vlan 121

switchport mode access

!

interface GigabitEthernet1/0/6

switchport access vlan 121

switchport mode access

!

interface GigabitEthernet1/0/7

!

interface GigabitEthernet1/0/8

!

interface GigabitEthernet1/0/9

!

interface GigabitEthernet1/0/10

!

interface GigabitEthernet1/0/11

!

interface GigabitEthernet1/0/12

!

interface GigabitEthernet1/0/13

!

interface GigabitEthernet1/0/14

!

interface GigabitEthernet1/0/15

!

interface GigabitEthernet1/0/16

!

interface GigabitEthernet1/0/17

!

interface GigabitEthernet1/0/18

!

interface GigabitEthernet1/0/19

!

interface GigabitEthernet1/0/20

!

interface GigabitEthernet1/0/21

!

interface GigabitEthernet1/0/22

!

interface GigabitEthernet1/0/23

!

interface GigabitEthernet1/0/24

!

interface GigabitEthernet1/0/25

!

interface GigabitEthernet1/0/26

!

interface GigabitEthernet1/0/27

!

interface GigabitEthernet1/0/28

!

interface GigabitEthernet1/0/29

!

interface GigabitEthernet1/0/30

!

interface GigabitEthernet1/0/31

!

interface GigabitEthernet1/0/32

!

interface GigabitEthernet1/0/33

!

interface GigabitEthernet1/0/34

!

interface GigabitEthernet1/0/35

switchport mode access

!

interface GigabitEthernet1/0/36

!

interface GigabitEthernet1/0/37

switchport access vlan 30

switchport mode access

!

interface GigabitEthernet1/0/38

!

interface GigabitEthernet1/0/39

!

interface GigabitEthernet1/0/40

!

interface GigabitEthernet1/0/41

!

interface GigabitEthernet1/0/42

!

interface GigabitEthernet1/0/43

!

interface GigabitEthernet1/0/44

!

interface GigabitEthernet1/0/45

!

interface GigabitEthernet1/0/46

!

interface GigabitEthernet1/0/47

!

interface GigabitEthernet1/0/48

!

interface GigabitEthernet1/0/49

!

interface GigabitEthernet1/0/50

!

interface GigabitEthernet1/0/51

!

interface GigabitEthernet1/0/52

!

interface Vlan1

ip address x.x.x.x x.x.x.x

!

interface Vlan30

no ip address

!

interface Vlan121

description OSS

no ip address

!

ip default-gateway x.x.x.x

ip http server

ip http secure-server

kron occurrence backupSchdule at 23:00 Sun recurring

policy-list backup

!

kron occurrence AccessStart at 8:30 Mon recurring

policy-list AccessStart

!

kron occurrence AccessEnd at 17:30 Mon recurring

policy-list AccessEnd

!

kron policy-list backup

cli write

cli show run | redirect tftp://x.x.x.x/b4.cfg

!

kron policy-list Acess Start

cli config t

cli interface gig 1/0/35

cli switchport access vlan 30

!

kron policy-list AccessEnd

cli int gig 1/0/35

cli switchport access vlan 1

!

logging trap critical

logging x.x.x.x

snmp-server community xxxxx RW

snmp-server community xxxxx RO

!

line con 0

line vty 0 4

password xxxxxxxxx

login

line vty 5 15

password xxxxxxxxx

login

!

end

Cisco Catalyst 2960S using the 12.2 software