取消
显示结果 
搜索替代 
您的意思是: 
cancel
9392
查看次数
0
有帮助
6
回复

NEXUS交换机配置logging source-interface 是不是只能用lookback?

shanghaiyunji
Level 1
Level 1
NEXUS交换机配置logging source-interface 是不是只能用lookback?能不能改用其它接口?
现有一台N5K,没有买三层license,只有二层功能,如果只能用lookbace,那log就传不出来了
1 个已接受解答

已接受的解答

Lei Zhang
Cisco Employee
Cisco Employee
shanghaiyunji 发表于 2016-4-22 22:01 back.gif
架构是两台7K当核心,下面挂5台5K(纯二层),在下面是N台2K,现在估计也不会在5K上买三层功能了,意义不大 ...

您好!
如果仅仅是希望N5K做纯2层转发,同时配置log server的话,请参考以下步骤:
To configure a syslog server on a UNIX or Linux system, follow these steps:
Step 1 Log debug messages with the local7 facility in the file /var/log/myfile.log by adding the following line to the /etc/syslog.conf file:
debug.local7 /var/log/myfile.log

Step 2 Create the log file by entering these commands at the shell prompt:
$ touch /var/log/myfile.log
$ chmod 666 /var/log/myfile.log

Step 3 Make sure the system message logging daemon reads the new changes by checking myfile.log after entering this command:
$ kill -HUP ~cat /etc/syslog.pid~

To configure syslog servers, perform this task:

Command

Purpose
Step 1

switch# configure terminal


Enters configuration mode.
Step 2

switch(config)# logging server host [ severity-level [ facility ]]


Configures a syslog server at the specified host name or IPv4 or IPv6 address. You can limit logging of messages with a minimum severity level and for a specific facility. Severity levels, which range from 0 to 7, are listed in Table 1-1 . The default outgoing facility is local7.
switch(config)# no logging server host


Removes the logging server for the specified host.
Step 3

Repeat Step 2 for up to three syslog servers.


Step 4

switch(config)# show logging server


(Optional) Displays the syslog server configuration.
Step 5

switch(config)# copy running-config startup-config


(Optional) Copies the running configuration to the startup configuration.
The following example shows how to configure a syslog server:
switch# configure terminal
switch(config)# logging server 172.28.254.254 5 local3
switch(config)# show logging server
switch(config)# copy running-config startup-config
文档链接:http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli/CLIConfigurationGuide/sm_syslog.html
谢谢!
希望可以帮到你!

在原帖中查看解决方案

6 条回复6

Lei Zhang
Cisco Employee
Cisco Employee
shanghaiyunji 发表于 2016-4-22 22:01 back.gif
架构是两台7K当核心,下面挂5台5K(纯二层),在下面是N台2K,现在估计也不会在5K上买三层功能了,意义不大 ...

您好!
如果仅仅是希望N5K做纯2层转发,同时配置log server的话,请参考以下步骤:
To configure a syslog server on a UNIX or Linux system, follow these steps:
Step 1 Log debug messages with the local7 facility in the file /var/log/myfile.log by adding the following line to the /etc/syslog.conf file:
debug.local7 /var/log/myfile.log

Step 2 Create the log file by entering these commands at the shell prompt:
$ touch /var/log/myfile.log
$ chmod 666 /var/log/myfile.log

Step 3 Make sure the system message logging daemon reads the new changes by checking myfile.log after entering this command:
$ kill -HUP ~cat /etc/syslog.pid~

To configure syslog servers, perform this task:

Command

Purpose
Step 1

switch# configure terminal


Enters configuration mode.
Step 2

switch(config)# logging server host [ severity-level [ facility ]]


Configures a syslog server at the specified host name or IPv4 or IPv6 address. You can limit logging of messages with a minimum severity level and for a specific facility. Severity levels, which range from 0 to 7, are listed in Table 1-1 . The default outgoing facility is local7.
switch(config)# no logging server host


Removes the logging server for the specified host.
Step 3

Repeat Step 2 for up to three syslog servers.


Step 4

switch(config)# show logging server


(Optional) Displays the syslog server configuration.
Step 5

switch(config)# copy running-config startup-config


(Optional) Copies the running configuration to the startup configuration.
The following example shows how to configure a syslog server:
switch# configure terminal
switch(config)# logging server 172.28.254.254 5 local3
switch(config)# show logging server
switch(config)# copy running-config startup-config
文档链接:http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli/CLIConfigurationGuide/sm_syslog.html
谢谢!
希望可以帮到你!

Lei Zhang
Cisco Employee
Cisco Employee
您好!
是的,n5k上logging source-interface后面只能是loopback接口。
lab输出:
magi-Gatos1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
magi-Gatos1(config)# interface loopback 1
magi-Gatos1(config-if)# ip address ?
A.B.C.D IP address in format i.i.i.i
A.B.C.D/LEN IP prefix and network mask length in format x.x.x.x/m
magi-Gatos1(config-if)# ip address 10.65.121.111/32
magi-Gatos1(config-if)# logging source-interface loopback 1
Configuring logging source-interface will open UDP/syslog socket(514).
magi-Gatos1(config-if)# end
magi-Gatos1# sh interface loopback 1
loopback1 is up
Hardware: Loopback
Internet Address is 10.65.121.111/32
MTU 1500 bytes, BW 8000000 Kbit, DLY 5000 usec
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation LOOPBACK
0 packets input 0 bytes
0 multicast frames 0 compressed
0 input errors 0 frame 0 overrun 0 fifo
0 packets output 0 bytes 0 underruns
0 output errors 0 collisions 0 fifo
magi-Gatos1# show logging loopback
Logging loopback : enabled (Loopback Interface: 1)
magi-Gatos1#
另外,我觉得你都应该庆幸。。。
在5.1(3)N1(1)这个版本之前,连“logging source-interface”这个命令都没有。。。在bug CSCtq87196之后,研发在5.1(3)N1(1)版本之后,引入“logging source-interface”功能呢个。。。
CSCtq87196 implement logging source-interface
顺便说一句,不知道你的网络设计是怎么样的,尽量还是购买并安装layer 3子卡,layer 3 license。因为,没有这两个,很多3层功能都没有,vpc都起不来。
谢谢!

shanghaiyunji
Level 1
Level 1
leiz2 发表于 2016-4-21 14:48 back.gif
您好!
是的,n5k上logging source-interface后面只能是loopback接口。

架构是两台7K当核心,下面挂5台5K(纯二层),在下面是N台2K,现在估计也不会在5K上买三层功能了,意义不大。就是这个日志不能传出来比较麻烦。

shanghaiyunji
Level 1
Level 1
leiz2 发表于 2016-4-25 13:39 back.gif
您好!
如果仅仅是希望N5K做纯2层转发,同时配置log server的话,请参考以下步骤:
To configure a sys ...

非常感谢,居然要这样操作

fortune
VIP Alumni
VIP Alumni
lol:lol 学习了!

alan_huang
Level 1
Level 1
學習了,下次遇到就知道怎麼設定了
快捷链接