SNMP:Simple Network Management Protocol简单网络管理协议
拓扑图如下: 勾上桥接到PC
计算桥接参数为:\Device\NPF_{90E3A748-7F8C-4FEB-9F47-50A8AC66C8B1}
接口连接:2600系列路由器
Router1 F0/0 <----> Router2 F0/0
Router3 F0/1 <----> Router2 F0/1
Router3 F0/0 <----> XPC P0/0
路由器参考配置如下:
路由器R1的配置:
Router> //用户模式
Router>enable //从用户模式进入到特权模式
Router#configure terminal //从特权模式进入到全局模式
Router(config)#no ip domain-lookup //关闭域名查找
Router (config)#line console 0 //进入控制口
Router (config-line)#logging synchronous //光标跟随
Router (config-line)#exec-timeout 0 0 //关闭延迟
Router(config-line)#hostname R1 //给路由器重命名为R1
R1(config)#interface loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config-if)#interface f0/0
R1(config-if)#ip address 202.101.224.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 1.1.1.0
R1(config-router)#network 202.101.224.0
R1(config-router)#end
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
C 202.101.224.0/24 is directly connected, FastEthernet0/0
R 202.101.225.0/24 [120/1] via 202.101.224.2, 00:00:03, FastEthernet0/0
R1#configure terminal
R1(config)#snmp-server enable informs //启用snmp服务的信息
R1(config)#snmp-server enable traps //启用snmp服务的陷阱
R1(config)#snmp-server community xinghua rw //配置共同体并设置读写权限
R1(config)#snmp-server host 192.16.1.2 xinghua //设置工作站IP及版本和共同体
R1(config)#end
R1#show running-config
Building configuration...
Current configuration : 988 bytes
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R1
!
!
!
memory-size iomem 15
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 202.101.224.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router rip
version 2
network 1.0.0.0
network 202.101.224.0
no auto-summary
!
ip classless
ip http server
!
snmp-server community xinghua RW
snmp-server enable traps snmp
snmp-server enable traps isdn call-information
snmp-server enable traps isdn layer2
snmp-server enable traps hsrp
snmp-server enable traps config
snmp-server enable traps entity
snmp-server enable traps envmon
snmp-server enable traps frame-relay
snmp-server host 192.16.1.2 xinghua
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
no scheduler allocate
end
R1#
路由器R2的配置:
Router> //用户模式
Router>enable //从用户模式进入到特权模式
Router#configure terminal //从特权模式进入到全局模式
Router(config)#no ip domain-lookup //关闭域名查找
Router (config)#line console 0 //进入控制口
Router (config-line)#logging synchronous //光标跟随
Router (config-line)#exec-timeout 0 0 //关闭延迟
Router(config-line)#hostname R2 //给路由器重命名为R2
R2(config)#interface f0/0
R2(config-if)#ip address 202.101.224.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface f0/1
R2(config-if)#ip address 202.101.225.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 202.101.224.0
R2(config-router)#network 202.101.225.0
R2(config-router)#end
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
R 1.1.1.0 [120/1] via 202.101.224.1, 00:00:06, FastEthernet0/0
C 202.101.224.0/24 is directly connected, FastEthernet0/0
C 202.101.225.0/24 is directly connected, FastEthernet0/1
R2#configure terminal
R2(config)#snmp-server enable informs
R2(config)#snmp-server enable traps
R2(config)#snmp-server community xinghua rw
R2(config)#snmp-server host 192.16.1.2 xinghua
R2(config)#end
R2#show running-config
Building configuration...
Current configuration : 953 bytes
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
!
!
memory-size iomem 15
ip subnet-zero
no ip domain-lookup
!
!
interface FastEthernet0/0
ip address 202.101.224.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 202.101.225.2 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
network 202.101.224.0
network 202.101.225.0
no auto-summary
!
ip classless
ip http server
!
snmp-server community xinghua RW
snmp-server enable traps snmp
snmp-server enable traps isdn call-information
snmp-server enable traps isdn layer2
snmp-server enable traps hsrp
snmp-server enable traps config
snmp-server enable traps entity
snmp-server enable traps envmon
snmp-server enable traps frame-relay
snmp-server host 192.16.1.2 xinghua
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
no scheduler allocate
end
R2#
路由器R3的配置:
Router> //用户模式
Router>enable //从用户模式进入到特权模式
Router#configure terminal //从特权模式进入到全局模式
Router(config)#no ip domain-lookup //关闭域名查找
Router (config)#line console 0 //进入控制口
Router (config-line)#logging synchronous //光标跟随
Router (config-line)#exec-timeout 0 0 //关闭延迟
Router(config-line)#hostname R3 //给路由器重命名为R3
R3(config)#interface f0/0
R3(config-if)#ip address 192.16.1.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface f0/1
R3(config-if)#ip address 202.101.225.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 202.101.225.0
R3(config-router)#end
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
R 1.1.1.0 [120/2] via 202.101.225.2, 00:00:06, FastEthernet0/1
C 202.101.225.0/24 is directly connected, FastEthernet0/1
C 192.16.1.0/24 is directly connected, FastEthernet0/0
R3#configure terminal
R3(config)#snmp-server enable informs
R3(config)#snmp-server enable traps
R3(config)#snmp-server community xinghua rw
R3(config)#snmp-server host 192.16.1.2 xinghua
R3(config)#end
R3#show running-config
Building configuration...
Current configuration : 927 bytes
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R3
!
!
!
memory-size iomem 15
ip subnet-zero
no ip domain-lookup
!
!
!
interface FastEthernet0/0
ip address 192.16.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 202.101.225.1 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
network 202.101.225.0
no auto-summary
!
ip classless
ip http server
!
snmp-server community xinghua RW
snmp-server enable traps snmp
snmp-server enable traps isdn call-information
snmp-server enable traps isdn layer2
snmp-server enable traps hsrp
snmp-server enable traps config
snmp-server enable traps entity
snmp-server enable traps envmon
snmp-server enable traps frame-relay
snmp-server host 192.16.1.2 xinghua
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
no scheduler allocate
end
R3#
PC1真机的配置:
配置IP地址并ping通网关
启动SQL服务
安装SNMP服务组件
开始---程序---控制面板---添加或删除程序---添加/删除windows组件
管理和监视工具---详细信息----勾上SNMP---确定---下一步---完成
开始---运行---services.msc---确定---SNMP Service
代理:联系人:xinghua 位置:本机IP 服务:全部勾上
陷阱:团体名称:xinghua 陷阱目标:本机IP
安全:添加 团体 xinghua 权限 读创建
应用----确定
安装游龙软件
打开压缩包----打开exe文件
选择中文----下一步
下一步
我接受----下一步
下一步
下一步
Windows验证----下一步
下一步
正在安装
是
下一步
我接受----安装
正在安装
完成
是
完成
打开软件图标----登录
拓扑图管理----扫描全网
下一步----下一步
添加允许的地址范围----下一步----下一步
GET:xinghua----下一步
添加允许的地址范围的初始IP地址----完成
开始扫描