Building configuration...Current configuration:
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
service password-encryption
no service dhcp
!
hostname ym
!
logging buffered 4096 debugging
no logging console
enable secret 5 $1$aYLE$NH7uaNI11VrMHVNnzxZcg0
enable password 7 140E1F1314557C73
!
!
!
!
!
ip subnet-zero
no ip finger
no ip domain-lookup
!
lane client flush
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 61.241.171.149 255.255.255.252
ip access-group 100 in
no ip proxy-arp
ip nat outside
no ip mroute-cache
full-duplex
no cdp enable
!
interface Serial1/0
no ip address
no ip mroute-cache
shutdown
no cdp enable
!
interface Serial1/1
no ip address
no ip mroute-cache
shutdown
no cdp enable
!
interface Serial1/2
no ip address
no ip mroute-cache
shutdown
no cdp enable
!
interface Serial1/3
no ip address
no ip mroute-cache
shutdown
no cdp enable
!
interface FastEthernet2/0
ip address 61.241.172.2 255.255.255.192
ip access-group 100 in
no ip proxy-arp
ip nat inside
no ip mroute-cache
full-duplex
no cdp enable
!
ip nat pool ymxx 61.241.172.8 61.241.172.8 netmask 255.255.255.192
ip nat inside source list 1 pool ymxx overload
ip classless
ip route 0.0.0.0 0.0.0.0 61.241.171.150
ip route 10.87.0.0 255.255.240.0 10.87.0.1
no ip http server
!
access-list 1 permit 10.87.0.0 0.0.255.255
access-list 1 deny    any
access-list 100 deny    icmp any any
access-list 100 deny    tcp any any eq 135
access-list 100 deny    tcp any any range 136 139
access-list 100 deny    udp any any eq 135
access-list 100 deny    udp any any range 136 netbios-ss
access-list 100 deny    tcp any any eq 445
access-list 100 deny    tcp any any eq 4444
access-list 100 deny    tcp any any eq 1434
access-list 100 deny    tcp any any eq 5554
access-list 100 deny    tcp any any eq 5354
access-list 100 deny    tcp any any eq 7205
access-list 100 permit ip any any
no cdp run
snmp-server engineID local 0000000902000006D6BB6C00
snmp-server community ymxx RO
snmp-server community ymxw RW
snmp-server packetsize 2048
!
!
line con 0
transport input none
line aux 0
line vty 0 4
exec-timeout 4 0
password 7 1419171F1B0B3820272D3D212701
login
!
scheduler allocate 3000 1000
end===========
要读出ip address iproute等数据

解决方案 »

  1.   

    interface FastEthernet0/0 
    ip address 61.241.171.149 255.255.255.252 
    ip access-group 100 in ip route 0.0.0.0 0.0.0.0 61.241.171.150 
    ip route 10.87.0.0 255.255.240.0 10.87.0.1 将这些语句中的数据提取出来放到一个数据库中
      

  2.   

    你说的数据仅指61.241.171.149等等这些IP地址和路由经过的地址?还是包括网卡名称FastEthernet0/0等?
      

  3.   

    open "c:\input.dat" for input as #1
    dim sTemp as string,sGet as string
    do while not eof(1)
      line input #1,sTemp
      if sTemp like "interface *" then
        sGet=mid(sTemp,len("interface ")+1,len(sTemp))
        debug.print "interface:" & sGet
        '这里添加存入数据库的代码
      elseif sTemp like "ip address *" then
        sGet=mid(sTemp,len("ip address ")+1,len(sTemp))
        debug.print "ip address:" & sGet
        '这里添加存入数据库的代码
      elseif ......... '其余的你自己写吧
        '.........
      end if
    loop
    close #1以上代码是用笨方法随手写的,哪位会正则表达式的麻烦给来个简单的。