1、配置交換機
方法一:
配置交換機日誌推送到日誌主機: eg:日誌主機IP地址:
system-view
info-center channel 6 name loghost1
info-center source default channel loghost1 log state on
info-center loghost source *******
info-center loghost channel loghost1
commit
方法二:
#進入用户視圖
system-view
#指定發送消息基本,表示從0-7都發送
info-center source default channel 2 log level debugging
#指定從哪個接口發送
info-center loghost source *******
#指定遠程syslog服務器ip
info-center loghost
備註:******查詢方法:dis cu 查詢結果如下
eg:IP對應的三層網絡接口為loopback 0,用查詢到的數據替換*******
#
interface LoopBack0
description Network_Mgmt
ip address
#
2、配置日誌主機
eg:centos server
vim /etc/
#啟用udp 514端口監聽。
$ModLoad imudp
$UDPServerRun 514
#配置交換機日誌保存文件 説明:x.x.x.x為交換機ip
:fromhost-ip,isequal, "x.x.x.x" /var/log/
重啟日誌配置文件
/bin/systemctl start ice
查看配置結果:
display info-center channel 6
display logbuffer
display logfile file-name