cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2921
Views
20
Helpful
19
Replies

DHCP on syslog server

sergei-bilan
Level 1
Level 1

Hi Team, 

Whether there is such function what to send from cisco C1111-4P information on DHCP MAC=IP on syslog server which clients receive?
19 Replies 19

Hello,

what you probably want is an EEM script such as the one below. You can install this script:

switch(config)#

then run it manually by typing:

switch#event manager run IP

The output is still rather unformatted, I am working on the correct output format. This output then can be sent to your Splunk.

event manager applet IP
event none
action 010 cli command "enable"
action 011 set var 0
action 012 cli command "show ip dhcp binding | include Automatic"
action 013 foreach line "$_cli_result"
action 014 regexp "([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)" "$line" ip
action 015 if $_regexp_result eq "1"
action 016 increment var
action 017 puts "IP/MAC$var $ip"
action 018 end
action 019 end

 

I will run lab and share with you how we can use debug with logging.

Is it possible to see hostname PC in the logs?

debug ip dhcp server events 
I can see the client mac address Screenshot (336).png

Hello,

glad you got it resolved. I could not really get the regexp to work correctly. Can you post the final script and/or procedure you are using to get the desired output ?