A. 思科交换机如何开启同步日志与域名解析
1,同步日志,你是指把日志则州保存到一个服务器上吗,下例为使得交换机的所有日志都保存到192.168.25.17的/tol/logs/cisco/cisco.log日志中.
cisco#conf t
cisco(config)#logging on -->打开日志显示
cisco(config)#logging 192.168.25.17
cisco(config)#logging facility local2
cisco(config)#logging source-interface vlan 1
cisco(config)#service timestamps debug uptime
cisco(config)#logging buffered 8192 debugging
2,cisco#conf t
cisco(config)#ip name-server 192.168.1.18 设置域名服务器<---DNS 服务器
3,VLAN描述孙洞蔽字符与端口描述是否有区别
VLAN 描述字符是指给VLAN取的名字,因为VLAN 都有一个数字式的ID的。
端口描述,是给指定颤团端口设定描述。是在进行端口配置之后用 “DESCRIPTION 描述字符”设定的。
B. 思科交换机路由器日志问题
应该先在命令行中开启日志!
set logging server enable
set logging server 192.168.2.3
后面的地址就是你的服务器也就是PC的地址。
你在网络上查下具体的配置。
反正要设置一大堆的参数。
CISCO交换机基本配置:Console端口连接
用户模式hostname# ;
特权模式hostname(config)# ;
全局配置模式hostname(config-if)# ;
交换机口令设置:
switch>enable ;进入特权模式
switch#config terminal ;进入全局配置模式
switch(config)#hostname csico ;设置交清裂换机的主机名
switch(config)#enable secret csico1 ;设置特权加密口令
switch(config)#enable password csico8 ;设置特权非密口令
switch(config)#line console 0 ;进入控制台口
switch(config-line)#line vty 0 4 ;进入虚拟终端
switch(config-line)#login ;虚拟终端允许登录
switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6
switch#exit ;返回命令
交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:
switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config)#speed ? 查看speed命令的子命令
switch(config)#speed 100 设置该端口速率为100mb/s (10/auto)
switch(config)#plex ? 查看plex的子命令
switch(config)#plex full 设置该端口为全双工(auto/half)
switch(config)#description TO_PC1 这是该端口描述为TO_PC1
switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2
switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允备判许的vlan
switch(config-if)#switchport trunk encap dot1q ;设仿正改置vlan 中继
switch(config)#vtp domain vtpserver ;设置vtp域名相同
switch(config)#vtp password ;设置发vtp密码
switch(config)#vtp server ;设置vtp服务器模式
switch(config)#vtp client ;设置vtp客户机模式
交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:
switch(config)#interface vlan 1 ;进入vlan 1
switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址
switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关
switch(config)#ip domain-name cisco.com 设置域名
switch(config)#ip name-server 192.168.1.18 设置域名服务器
switch(config)#mac-address-table? 查看mac-address-table的子命令
switch(config)#mac-address-table aging-time 100 设置超时时间为100ms
switch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口
switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7
switch(config)#end
switch#show mac-address-table 查看整个MAC地址表
switch#clear mac-address-table restricted static 清除限制性静态地址
交换机显示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看当前配置信息
switch#show vlan ;查看vlan配置信息
switch#show interface ;查看端口信息
switch#show int f0/0 ;查看指定端口信息
switch#show int f0/0 status;查看指定端口状态
switch#dir flash: ;查看闪存
http://www.netexpert.cn/thread-2000-1-1.html
C. 中兴交换机日志配置
我们可以使用以下命令来启用日志,本地日志记录500行,并循环覆盖。
首先登录管理模式,然后输入以下命令。
#logging on 开启日志
#logging buffer 500 设置本地日志500条
#lofging mode fullcycle 设置日志清理方式
#logging level notifications 设置日志缓存中保存的日志级别。