12-28-2022 05:20 AM
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?
Solved! Go to Solution.
12-29-2022 07:29 AM
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
12-29-2022 09:56 AM
I will run lab and share with you how we can use debug with logging.
12-30-2022 07:39 AM
Is it possible to see hostname PC in the logs?
01-03-2023 07:07 AM
debug ip dhcp server events
I can see the client mac address
01-03-2023 07:57 AM
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 ?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide