SlideShare una empresa de Scribd logo
1 de 36
IPv6 mrtg 流量監測 中央大學 電算中心  楊素秋 民國  100 年  11 月
OUTLINE ,[object Object],[object Object],[object Object],[object Object],[object Object]
1.  建構  IPv6 Network ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.  建構  IPv6 Network (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
1.  建構  IPv6 Network (cont.)
1.  建構  IPv6 Network (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.  建構  IPv6 Network (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.  建構  IPv6 Network (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.  建構  IPv6 Network (cont.)
1.  建構  IPv6 Network (cont.)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],   2.  SNMP/MIBs and IPv6
2.  SNMP/MIBs and IPv6 (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.  Cisco router  之 IPv6 MIB Get some ipv6 traffic param. # show interface accounting ”    GigabitEthernet2/8 ###  國立中央大學   ###          Protocol    Pkts In   Chars In   Pkts Out  Chars Out                   IP 1654364275530 1003146055719738 885231569418 590190241240774                   DEC MOP          0          0      48709    6283461                    ARP     305354   18321240     739678   82843936                     IPv6   17637976 9652740892 3709526564 4112091137764 GigabitEthernet2/9 TYC-to-CYCU (140.135.0.0)                  Protocol    Pkts In   Chars In   Pkts Out  Chars Out                   IP 772909362921 366967798769448 580600995235 312548112347136                   DEC MOP          0          0      48711    6283719                   ARP      24395    1463700      69849    7823088                   IPv6         57       5554     154624   26273960
3.  Cisco router  之 IPv6 MIB (cont.) IP-MIB.oid .  iso (1)  .  org (3)  .  dod (6)  .  internet (1)  .  mgmt (2)  .  mib-2 (1)  .  ip (4)  .  ipTrafficStats (31)  (6509 router : Not implement) "ipIfStatsEntry"  "1.3.6.1.2.1.4.31.3.1" “ ipIfStatsIPVersion"  "1.3.6.1.2.1.4.31.3.1.1" “ ipIfStatsIfIndex"  "1.3.6.1.2.1.4.31.3.1.2" … "ipIfStatsInOctets"  "1.3.6.1.2.1.4.31.3.1.5" "ipIfStatsHCInOctets"  "1.3.6.1.2.1.4.31.3.1.6" … "ipIfStatsOutOctets"  "1.3.6.1.2.1.4.31.3.1.32" "ipIfStatsHCOutOctets"  "1.3.6.1.2.1.4.31.3.1.33"
   3. Cisco router  之 IPv6 MIB (cont.) IPV6-MIB.oid (6509 router : Not implement) "ipv6IfEntry"   "1.3.6.1.2.1.55.1.5.1" "ipv6IfIndex"   "1.3.6.1.2.1.55.1.5.1.1" "ipv6IfDescr"   "1.3.6.1.2.1.55.1.5.1.2" "ipv6IfIdentifier"  "1.3.6.1.2.1.55.1.5.1.6" … . "ipv6IfStatsEntry"  "1.3.6.1.2.1.55.1.6.1" "ipv6IfStatsInReceives"  "1.3.6.1.2.1.55.1.6.1.1“ … "ipv6IfStatsOutForwDatagrams"  "1.3.6.1.2.1.55.1.6.1.10" "ipv6IfStatsOutRequests"   "1.3.6.1.2.1.55.1.6.1.11“ …
3. Cisco router  之 IPv6 MIB (cont.) RFC4293  (   rfc-2011) (6509 router : Not implement) IpIfStatsEntry ::= { ipIfStatsIPVersion InetVersion ,  ipIfStatsIfIndex InterfaceIndex,  ipIfStatsInReceives Counter32, ipIfStatsHCInReceives Counter64, ipIfStatsInOctets Counter32, ipIfStatsHCInOctets Counter64, ipIfStatsInHdrErrors Counter32, ipIfStatsInNoRoutes Counter32, ipIfStatsInAddrErrors Counter32, … . ipIfStatsOutOctets Counter32, ipIfStatsHCOutOctets Counter64, … . ,  ipIfStatsRefreshRate Unsigned32 }
3. Cisco router  之 IPv6 MIB (cont.) OLD-CISCO-INTERFACES-MIB.oid  (Cisco-SMI or SNMPV2-SMI) "locIfipInPkts"  "1.3.6.1.4.1.9.2.2.1.1.42" "locIfipOutPkts"  "1.3.6.1.4.1.9.2.2.1.1.43" "locIfipInOctets"  "1.3.6.1.4.1.9.2.2.1.1.44" "locIfipOutOctets"  "1.3.6.1.4.1.9.2.2.1.1.45 " ------------------------------------------ SNMPv2-SMI::enterprises.9.2.2.1.1.45.82 = Counter32: 2223932009 SNMPv2-SMI::enterprises.9.2.2.1.1.45.83 = Counter32: 2411945666 SNMPv2-SMI::enterprises.9.2.2.1.1.45.84 = Counter32: 0 SNMPv2-SMI::enterprises.9.2.2.1.1.45.85 = Counter32: 2121510125 SNMPv2-SMI::enterprises.9.2.2.1.1.45.86 = Counter32: 3949812438 SNMPv2-SMI::enterprises.9.2.2.1.1.45.87 = Counter32: 497226196 SNMPv2-SMI::enterprises.9.2.2.1.1.45.88 = Counter32: 0 SNMPv2-SMI::enterprises.9.2.2.1.1.45.89 = Counter32: 2595499782 SNMPv2-SMI::enterprises.9.2.2.1.1.45.90 = Counter32: 1402998647 SNMPv2-SMI::enterprises.9.2.2.1.1.45.110 = Counter32: 0 SNMPv2-SMI::enterprises.9.2.2.1.1.45.111 = Counter32: 83559617 SNMPv2-SMI::enterprises.9.2.2.1.1.45.112 = Counter32: 2700879959
3. Cisco router  之 IPv6 MIB (cont.) CISCO-SWITCH-ENGINE-MIB .   iso (1)  .  org (3)  .  dod (6)  .  internet (1)  .  private (4)  .  enterprises (1)  .  cisco (9)  .  ciscoMgmt (9)  .  ciscoSwitchEngineMIB (97)  .  cseMIBObjects (1)  .  cseL3Objects (4)    -- cseL3Objects (4) +  -- cseL3StatsTable (1) -  -- cseL3VlanStatsTable (2) |  -  -- cseL3VlanStatsEntry (1)  object Details | | --  cseL3VlanIndex (1) | | --  cseL3VlanInPkts (2) | | --  cseL3VlanInOctets (3) | | --  cseL3VlanOutPkts (4) | | --  cseL3VlanOutOctets (5) | | --  cseL3VlanInUnicastPkts (6) | | --  cseL3VlanInUnicastOctets (7) | | --  cseL3VlanOutUnicastPkts (8) | | --  cseL3VlanOutUnicastOctets (9) |
SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.1006 = Counter32: 3540473092 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.2006 = Counter32: 1649206378 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.3021 = Counter32: 3278444802 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.4008 = Counter32: 2865104007 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.5006 = Counter32: 1692158510 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.1006 = Counter64: 7828674924853378 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.2006 = Counter64: 5894807785811313 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.3021 = Counter64: 109506806884008 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.4008 = Counter64: 5713000850624076 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.5006 = Counter64: 1415152122007054 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.1006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.2006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.3021 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.4008 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.5006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.1006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.2006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.3021 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.4008 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.5006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.1006 = Gauge32: 130943 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.2006 = Gauge32: 76630 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.3021 = Gauge32: 106838 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.4008 = Gauge32: 130944 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.5006 = Gauge32: 2 3. Cisco router  之 IPv6 MIB (cont.)
4.  區網  IPv6 mrtg  流量監看 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.  區網  IPv6 mrtg  流量監看 (cont.) ,[object Object],#!/bin/bash RSYNC=/usr/bin/rsync LOCALPATH=/home/yang VAR=$(expect -c" spawn telnet 203.72.x.x expect Username send test123amp;quot; expect Password send test123ncuamp;quot; expect amp;quot;$amp;quot; send amp;quot; show interface account amp;quot; send   send   Expect –timeout 1 “ ) Echo “$VAR”
4.  區網  IPv6 mrtg  流量監看 (cont.) ,[object Object],Giga 2/8  ( 中央大學 ) NCU Giga 2/9  ( 中原大學 ) CYCU Giga 2/15  ( 萬能科大 ) VNU Giga 3/1  ( 開南大學 )  KNU Giga 3/2  ( 索尼電信 )  Sonet   (IPv6 addr: 2404:80:400:102::2/64) Giga 3/6  ( 清雲科大 ) CYU Vlan 10  區網主幹 Vlan 11  縣網中心 ( 中華電信 ) Vlan 12  高中職主幹 Vlan 16  TANET_IPv6 Vlan 21  縣網中心 ( 亞太 ) Vlan 31  縣網中心 ( 中華電信 ) Vlan 350  ISP 電信業界 Vlan 227  區網測試網
4.  區網  IPv6 mrtg  流量監看 (cont.) FileReader fileReader = new FileReader("Data/10211200"); String patternStr = "Tunnel|FastEthernet|GigabitEthernet|Vlan"; String patternStr_ipv6 = " IPv6"; Scanner scan = new Scanner(fileReader);//get user input while (scan.hasNext()) { String passwordStr = scan.nextLine(); Pattern p = Pattern.compile(patternStr); Pattern p6 = Pattern.compile(patternStr_ipv6); Matcher m = p.matcher(passwordStr); Matcher m6 = p6.matcher(passwordStr); if ( m.find()) { if_index=passwordStr; stat_if = true; } if ( m6.find())  { ip_traffic=passwordStr; stat_ipv6=true; } if ( stat_if  && stat_ipv6 )  { temp_if = if_index.split("s+"); temp_ipv6 = ip_traffic.split("s+"); System.out.println( temp_if[0] + " :: " + temp_ipv6[3] + "  " + temp_ipv6[5]); stat_if = false ; stat_ipv6 = false ; } }
4.  區網  IPv6 mrtg  流量監看 (cont.) ,[object Object],Interface_ID  InputOctets  OutOctets ----------------------------------------------------------------- Vlan10 ::  20509776220  829193654452 Vlan11 ::  4266841630  371246825404 Vlan12 ::  169620231  25007101534 Vlan16 ::  184232151670  1405461604259 Vlan21 ::  235144926  29029034 Vlan31 ::  44247533065  1681292557522 Vlan227 ::  274562953  48790185465 Vlan350 ::  255545589  770282374 Vlan1412 ::  6032228  38751256 Gigabitt2/8 ::  9653687956  4316870814743 Gigabit2/9 ::  5554  26619570 Gigabit2/11 ::  1323101265  1105750541193 Gigabitt2/15 ::  31513818  4299670725 Gigabitt3/1 ::  105892439  38049219071 Gigabit3/2 ::  33287808  69682180 Gigabit3/6 ::  293889430  440506626293 Gigabitt7/7 ::  132738532  27774817831 Fast9/48 ::  12864  29033660 Tunnel2002 ::  1848864657481  1250252945233
4.  區網  IPv6 mrtg  流量監看 (cont.) if ( stat_if  && stat_ipv6 ) { temp_if = if_index.split("s+"); // System.out.println( if_index); // System.out.println( temp_if); temp_ipv6 = ip_traffic.split("s+"); // System.out.println( ip_traffic); //  System.out.println( temp_if); out.write( temp_if[0] + " :: " + temp_ipv6[3] + "  " + temp_ipv6[5] + ""); //  System.out.println( temp_if[0] + " :: " + temp_ipv6[2] + "  " + temp_ipv6[3]); stat_if = false ; stat_ipv6 = false ; query1 = " insert into counter (ip, in_counter, out_counter,time) values (?,?,?,?)"; preparedStatement1 = connection.prepareStatement(query1); preparedStatement1.setString(1,temp_if[0]); preparedStatement1.setString(2,temp_ipv6[3]); preparedStatement1.setString(3, temp_ipv6[5]); // java.sql.Date sqlDate = new java.sql.Date(new java.util.Date().getTime()); preparedStatement1.setString(4,cur_time); preparedStatement1.executeUpdate(); } //end_if_ipv6 } // end_while scan.close(); out.close();
4.  區網  IPv6 mrtg  流量監看 (cont.) ,[object Object],ID  Interface  Input  Output  Date ---------------------------------------------------------------------- | 741 | Vlan10  | 20571164866  | 829200762932  | 10241850 | | 742 | Vlan11  | 4272996247  | 377461803123  | 10241850 | | 743 | Vlan12  | 183440033  | 25548984550  | 10241850 | | 744 | Vlan16  | 184913813451  | 1414980825672 | 10241850 | | 745 | Vlan21  | 237832956  | 29306814  | 10241850 | | 746 | Vlan31  | 44251484788  | 1732140191214 | 10241850 | | 747 | Vlan227  | 276781227  | 49016205422  | 10241850 | | 748 | Vlan350  | 258482708  | 774947781  | 10241850 | | 749 | Vlan1412  | 6108980  | 39152930  | 10241850 | | 750 | GigabitEthernet2/8  | 9654431653  | 4413250509581 | 10241850 | | 751 | GigabitEthernet2/9  | 5554  | 26896840  | 10241850 | | 752 | GigabitEthernet2/11 | 1327541852  | 1128645499515 | 10241850 | | 753 | GigabitEthernet2/15 | 31830084  | 4501406597  | 10241850 | | 754 | GigabitEthernet3/1  | 256466203  | 39515807937  | 10241850 | | 755 | GigabitEthernet3/2  | 33287808  | 69682180  | 10241850 | | 756 | GigabitEthernet3/6  | 301228108  | 464918940437  | 10241850 | | 757 | GigabitEthernet3/16 | TANet  | IPv6  | 10241850 | | 758 | GigabitEthernet7/7  | 132925744  | 27775934890  | 10241850 | | 759 | FastEthernet9/48  | 12864  | 29311100  | 10241850 | | 760 | Tunnel2002  | 1848864657481 | 1250252945233 | 10241850 | | 761 | Vlan10  | 20571286162  | 829200776832  | 10241900 | | 762 | Vlan11  | 4273009579  | 377475816328  | 10241900 | | 763 | Vlan12  | 183472973  | 25549085768  | 10241900 | | 764 | Vlan16  | 184915135286  | 1415000279212 | 10241900 | |
4.  區網  IPv6 mrtg  流量監看 (cont.) ,[object Object]
4.  區網  IPv6 mrtg  流量監看 (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.  區網  IPv6 mrtg  流量監看 (cont.) ## FileName:  smurf.conf # Created by … WorkDir: /opt/apache-tomcat-6.0.32/webapps/ROOT/smurf Options[_]: growright, nopercent Language: UTF-8 Target[smurf_km]:.1.3.6.1.2.1.2.2.1.11. 65 &.1.3.6.1.2.1.2.2.1.17. 65 :publicxx@203.72.x.x: SetEnv[smurf_km]:  MRTG_INT_DESCR=&quot; 金門縣網  &quot; MaxBytes[smurf_km]: 125000000 Title[smurf_km]: IP Packets : TANET_Km PageTop[smurf_km]: <H3>IP Packets : TANET-  金門縣網  GE 3/7</H3> YLegend[smurf_km]: IP Packet Count Target[smurf_mts]:.1.3.6.1.2.1.2.2.1.11. 66 &.1.3.6.1.2.1.2.2.1.17. 6 6:publicxx@203.72.x.x: SetEnv[smurf_mts]:  MRTG_INT_DESCR=&quot;  連江縣網  &quot; MaxBytes[smurf_mts]: 125000000 Title[smurf_mts]: IP Packets : TANET_MTS PageTop[smurf_mts]: <H3>IP Packets : TANet--  連江縣網  GE 3/8</H3> YLegend[smurf_mts]: IP Packet Count Mrtg.conf  例
4.  區網  IPv6 mrtg  流量監看 (cont.) # Multi Router Traffic Grapher -- Sample Configuration File # Global configuration WorkDir: /opt/apache-tomcat-6.0.20/webapps/ROOT/mrtg WriteExpires: Yes Language: utf8 Title[^]: Traffic Analysis for IPv6 links Target[giga28]: `/home/mrtg-2.17.2/bin/mrtg.ipv6_28.sh` MaxBytes[giga28]: 10000000000 Options[giga28]:  growright, nopercent YLegend[giga28]: Bits per second ShortLegend[giga28]: LegendO[giga28]: &nbsp; IPv6 Output LegendI[giga28]: &nbsp; IPv6 Input Title[giga28]:  IPv6 Traffic for GigabitEther 2/8 link PageTop[giga28]: <H1> GigabitEther 2/8</H1> <TABLE>  <TR><TD>System:</TD> <TD>TYRC GigabitEther 2/8</TD></TR> </TABLE> Target[giga29]: `/home/mrtg-2.17.2/bin/mrtg.ipv6_29.sh` MaxBytes[giga29]: 10000000000 Options[giga29]: growright, nopercent YLegend[giga29]: Bits per second ShortLegend[giga29]: LegendO[giga29]: &nbsp; IPv6 Output LegendI[giga29]: &nbsp; IPv6 Input Title[giga29]:  IPv6 Traffic for GigabitEther 2/9 link PageTop[giga29]: <H1> GigabitEther 2/9</H1> <TABLE>  <TR><TD>System:</TD>  <TD>TYRC GigabitEther 2/9</TD></TR> </TABLE> ,[object Object]
4.  區網  IPv6 mrtg  流量監看 (cont.) mrtg.ipv6_28.sh #!/bin/bash #  提供 ipv6 inoctet/outoctet to mrtg configure y=`date +%Y` d=`date +%m%d%H` m=`date +%M` m=`expr $m / 10` d=&quot;$d&quot;&quot;$m&quot;&quot;0&quot; # 1. ipv6 inoctet/outoct echo `cat /home/Expect/IPv6/$d | grep GigabitEthernet2/8 |awk '{print $3}'` echo `cat /home/Expect/IPv6/$d | grep GigabitEthernet2/8 |awk '{print $4}'` # 2. UpTime & interface name UPtime=`/usr/bin/uptime | awk '{print $3 &quot; &quot; $4 &quot; &quot; $5}'` echo $UPtime echo &quot;GigabitEthernet2/8&quot;
4.  區網  IPv6 mrtg  流量監看 (cont.) ## # m h  dom mon dow  command ## 0  12 * * *  /usr/sbin/ntpdate -s ntp2.usno.navy.mil > /dev/null & ## # Probe IPv6 Traffic from TYRC router  */10 * * * * /home/Expect/expect.sh >> /home/Expect/log_ ## #  Extract IPv6 inOctet/outOctet counter for each interfaces */10 * * * * /home/Expect/run.sh >> /home/Expect/logs/expect ##  # Cron execute mrtg  8-58/10 * * * *  env LANG=C /home/mrtg-2.17.2/bin/mrtg  /home/mrtg-2.17.2/bin/mrtg.cfg ## crontab
4.  區網  IPv6 mrtg  流量監看 (cont.) http://ayang.tyc.edu.tw/mrtg/
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],5.  結語
5.  結語 (cont.)  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
感謝你的耐心聆聽 ! Q&A

Más contenido relacionado

La actualidad más candente

Configuring Ip Sec Between A Router And A Pix
Configuring Ip Sec Between A Router And A PixConfiguring Ip Sec Between A Router And A Pix
Configuring Ip Sec Between A Router And A Pix
angelitoh11
 
How to configure Dynamic nat
How to configure Dynamic natHow to configure Dynamic nat
How to configure Dynamic nat
tcpipguru
 
Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01
Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01
Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01
Duane Bodle
 
" Breaking Extreme Networks WingOS: How to own millions of devices running on...
" Breaking Extreme Networks WingOS: How to own millions of devices running on..." Breaking Extreme Networks WingOS: How to own millions of devices running on...
" Breaking Extreme Networks WingOS: How to own millions of devices running on...
PROIDEA
 
FlexVPNLabHandbook-SAMPLE
FlexVPNLabHandbook-SAMPLEFlexVPNLabHandbook-SAMPLE
FlexVPNLabHandbook-SAMPLE
Tariq Sheikh
 

La actualidad más candente (20)

2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...
2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...
2015.7.17 JANOG36 BGP Flowspec Interoperability Test @ Interop Tokyo 2015 Sho...
 
NexusでAnsibleやってみた
NexusでAnsibleやってみたNexusでAnsibleやってみた
NexusでAnsibleやってみた
 
Breaking wifi-faster
Breaking wifi-fasterBreaking wifi-faster
Breaking wifi-faster
 
Cisco ios order of operation
Cisco ios order of operationCisco ios order of operation
Cisco ios order of operation
 
[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack Firmware[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack Firmware
 
Configuring Ip Sec Between A Router And A Pix
Configuring Ip Sec Between A Router And A PixConfiguring Ip Sec Between A Router And A Pix
Configuring Ip Sec Between A Router And A Pix
 
Cisco ASA Firewall Lab WorkBook
Cisco ASA Firewall Lab WorkBookCisco ASA Firewall Lab WorkBook
Cisco ASA Firewall Lab WorkBook
 
nftables - the evolution of Linux Firewall
nftables - the evolution of Linux Firewallnftables - the evolution of Linux Firewall
nftables - the evolution of Linux Firewall
 
How to configure Dynamic nat
How to configure Dynamic natHow to configure Dynamic nat
How to configure Dynamic nat
 
Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01
Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01
Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01
 
Tech f42
Tech f42Tech f42
Tech f42
 
AMOOCON 2009 - Asterisk Project Update
AMOOCON 2009 - Asterisk Project UpdateAMOOCON 2009 - Asterisk Project Update
AMOOCON 2009 - Asterisk Project Update
 
IETF 104 Hackathon VPP Prototyping Stateless SRv6/GTP-U Translation
IETF 104 Hackathon VPP Prototyping Stateless SRv6/GTP-U TranslationIETF 104 Hackathon VPP Prototyping Stateless SRv6/GTP-U Translation
IETF 104 Hackathon VPP Prototyping Stateless SRv6/GTP-U Translation
 
MUM Europe 2017 - Traffic Generator Case Study
MUM Europe 2017 - Traffic Generator Case StudyMUM Europe 2017 - Traffic Generator Case Study
MUM Europe 2017 - Traffic Generator Case Study
 
" Breaking Extreme Networks WingOS: How to own millions of devices running on...
" Breaking Extreme Networks WingOS: How to own millions of devices running on..." Breaking Extreme Networks WingOS: How to own millions of devices running on...
" Breaking Extreme Networks WingOS: How to own millions of devices running on...
 
FlexVPNLabHandbook-SAMPLE
FlexVPNLabHandbook-SAMPLEFlexVPNLabHandbook-SAMPLE
FlexVPNLabHandbook-SAMPLE
 
Развитие платформ Cisco для MPLS доступа и пре-агрегации
Развитие платформ Cisco для MPLS доступа и пре-агрегацииРазвитие платформ Cisco для MPLS доступа и пре-агрегации
Развитие платформ Cisco для MPLS доступа и пре-агрегации
 
用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver
 
Day 11 eigrp
Day 11 eigrpDay 11 eigrp
Day 11 eigrp
 
Software Networking and Interfaces on Linux
Software Networking and Interfaces on LinuxSoftware Networking and Interfaces on Linux
Software Networking and Interfaces on Linux
 

Similar a I pv6 mrtg_20111025

26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
Freddy Buenaño
 
IPv6 Test Methodology
IPv6 Test MethodologyIPv6 Test Methodology
IPv6 Test Methodology
Ixia
 
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdfLaporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
IGedeArieYogantaraSu
 

Similar a I pv6 mrtg_20111025 (20)

Model driven telemetry
Model driven telemetryModel driven telemetry
Model driven telemetry
 
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SPKrzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
 
Cisco Connect Toronto 2017 - Model-driven Telemetry
Cisco Connect Toronto 2017 - Model-driven TelemetryCisco Connect Toronto 2017 - Model-driven Telemetry
Cisco Connect Toronto 2017 - Model-driven Telemetry
 
How to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routersHow to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routers
 
ARIN 34 IPv6 IAB/IETF Activities Report
ARIN 34 IPv6 IAB/IETF Activities ReportARIN 34 IPv6 IAB/IETF Activities Report
ARIN 34 IPv6 IAB/IETF Activities Report
 
Model-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsModel-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data Analytics
 
NetFlow Monitoring for Cyber Threat Defense
NetFlow Monitoring for Cyber Threat DefenseNetFlow Monitoring for Cyber Threat Defense
NetFlow Monitoring for Cyber Threat Defense
 
How to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco RoutersHow to Configure NetFlow v5 & v9 on Cisco Routers
How to Configure NetFlow v5 & v9 on Cisco Routers
 
ASCC Network Experience in IPv6
ASCC Network Experience in IPv6ASCC Network Experience in IPv6
ASCC Network Experience in IPv6
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
 
Detecting Spoofing at IXPs
Detecting Spoofing at IXPsDetecting Spoofing at IXPs
Detecting Spoofing at IXPs
 
Detecting spoofing at IxP's
Detecting spoofing at IxP'sDetecting spoofing at IxP's
Detecting spoofing at IxP's
 
AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...
AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...
AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...
 
IPv6 Test Methodology
IPv6 Test MethodologyIPv6 Test Methodology
IPv6 Test Methodology
 
Troubleshooting basic networks
Troubleshooting basic networksTroubleshooting basic networks
Troubleshooting basic networks
 
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdfLaporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
 
Getting started with IPv6
Getting started with IPv6Getting started with IPv6
Getting started with IPv6
 
Stun turn poc_pilot
Stun turn poc_pilotStun turn poc_pilot
Stun turn poc_pilot
 
Kamailio Updates - VUC 588
Kamailio Updates - VUC 588Kamailio Updates - VUC 588
Kamailio Updates - VUC 588
 
Cisco connect winnipeg 2018 stealthwatch whiteboard session and cisco secur...
Cisco connect winnipeg 2018   stealthwatch whiteboard session and cisco secur...Cisco connect winnipeg 2018   stealthwatch whiteboard session and cisco secur...
Cisco connect winnipeg 2018 stealthwatch whiteboard session and cisco secur...
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

I pv6 mrtg_20111025

  • 1. IPv6 mrtg 流量監測 中央大學 電算中心 楊素秋 民國 100 年 11 月
  • 2.
  • 3.
  • 4.
  • 5. 1. 建構 IPv6 Network (cont.)
  • 6.
  • 7.
  • 8.
  • 9. 1. 建構 IPv6 Network (cont.)
  • 10. 1. 建構 IPv6 Network (cont.)
  • 11.
  • 12.
  • 13. 3. Cisco router 之 IPv6 MIB Get some ipv6 traffic param. # show interface accounting ”   GigabitEthernet2/8 ### 國立中央大學 ###         Protocol    Pkts In   Chars In   Pkts Out  Chars Out                  IP 1654364275530 1003146055719738 885231569418 590190241240774                  DEC MOP          0          0      48709    6283461                   ARP     305354   18321240     739678   82843936                     IPv6   17637976 9652740892 3709526564 4112091137764 GigabitEthernet2/9 TYC-to-CYCU (140.135.0.0)                 Protocol    Pkts In   Chars In   Pkts Out  Chars Out                  IP 772909362921 366967798769448 580600995235 312548112347136                  DEC MOP          0          0      48711    6283719                  ARP      24395    1463700      69849    7823088                  IPv6         57       5554     154624   26273960
  • 14. 3. Cisco router 之 IPv6 MIB (cont.) IP-MIB.oid . iso (1) . org (3) . dod (6) . internet (1) . mgmt (2) . mib-2 (1) . ip (4) . ipTrafficStats (31) (6509 router : Not implement) &quot;ipIfStatsEntry&quot; &quot;1.3.6.1.2.1.4.31.3.1&quot; “ ipIfStatsIPVersion&quot; &quot;1.3.6.1.2.1.4.31.3.1.1&quot; “ ipIfStatsIfIndex&quot; &quot;1.3.6.1.2.1.4.31.3.1.2&quot; … &quot;ipIfStatsInOctets&quot; &quot;1.3.6.1.2.1.4.31.3.1.5&quot; &quot;ipIfStatsHCInOctets&quot; &quot;1.3.6.1.2.1.4.31.3.1.6&quot; … &quot;ipIfStatsOutOctets&quot; &quot;1.3.6.1.2.1.4.31.3.1.32&quot; &quot;ipIfStatsHCOutOctets&quot; &quot;1.3.6.1.2.1.4.31.3.1.33&quot;
  • 15.    3. Cisco router 之 IPv6 MIB (cont.) IPV6-MIB.oid (6509 router : Not implement) &quot;ipv6IfEntry&quot; &quot;1.3.6.1.2.1.55.1.5.1&quot; &quot;ipv6IfIndex&quot; &quot;1.3.6.1.2.1.55.1.5.1.1&quot; &quot;ipv6IfDescr&quot; &quot;1.3.6.1.2.1.55.1.5.1.2&quot; &quot;ipv6IfIdentifier&quot; &quot;1.3.6.1.2.1.55.1.5.1.6&quot; … . &quot;ipv6IfStatsEntry&quot; &quot;1.3.6.1.2.1.55.1.6.1&quot; &quot;ipv6IfStatsInReceives&quot; &quot;1.3.6.1.2.1.55.1.6.1.1“ … &quot;ipv6IfStatsOutForwDatagrams&quot; &quot;1.3.6.1.2.1.55.1.6.1.10&quot; &quot;ipv6IfStatsOutRequests&quot; &quot;1.3.6.1.2.1.55.1.6.1.11“ …
  • 16. 3. Cisco router 之 IPv6 MIB (cont.) RFC4293 (  rfc-2011) (6509 router : Not implement) IpIfStatsEntry ::= { ipIfStatsIPVersion InetVersion , ipIfStatsIfIndex InterfaceIndex, ipIfStatsInReceives Counter32, ipIfStatsHCInReceives Counter64, ipIfStatsInOctets Counter32, ipIfStatsHCInOctets Counter64, ipIfStatsInHdrErrors Counter32, ipIfStatsInNoRoutes Counter32, ipIfStatsInAddrErrors Counter32, … . ipIfStatsOutOctets Counter32, ipIfStatsHCOutOctets Counter64, … . , ipIfStatsRefreshRate Unsigned32 }
  • 17. 3. Cisco router 之 IPv6 MIB (cont.) OLD-CISCO-INTERFACES-MIB.oid (Cisco-SMI or SNMPV2-SMI) &quot;locIfipInPkts&quot; &quot;1.3.6.1.4.1.9.2.2.1.1.42&quot; &quot;locIfipOutPkts&quot; &quot;1.3.6.1.4.1.9.2.2.1.1.43&quot; &quot;locIfipInOctets&quot; &quot;1.3.6.1.4.1.9.2.2.1.1.44&quot; &quot;locIfipOutOctets&quot; &quot;1.3.6.1.4.1.9.2.2.1.1.45 &quot; ------------------------------------------ SNMPv2-SMI::enterprises.9.2.2.1.1.45.82 = Counter32: 2223932009 SNMPv2-SMI::enterprises.9.2.2.1.1.45.83 = Counter32: 2411945666 SNMPv2-SMI::enterprises.9.2.2.1.1.45.84 = Counter32: 0 SNMPv2-SMI::enterprises.9.2.2.1.1.45.85 = Counter32: 2121510125 SNMPv2-SMI::enterprises.9.2.2.1.1.45.86 = Counter32: 3949812438 SNMPv2-SMI::enterprises.9.2.2.1.1.45.87 = Counter32: 497226196 SNMPv2-SMI::enterprises.9.2.2.1.1.45.88 = Counter32: 0 SNMPv2-SMI::enterprises.9.2.2.1.1.45.89 = Counter32: 2595499782 SNMPv2-SMI::enterprises.9.2.2.1.1.45.90 = Counter32: 1402998647 SNMPv2-SMI::enterprises.9.2.2.1.1.45.110 = Counter32: 0 SNMPv2-SMI::enterprises.9.2.2.1.1.45.111 = Counter32: 83559617 SNMPv2-SMI::enterprises.9.2.2.1.1.45.112 = Counter32: 2700879959
  • 18. 3. Cisco router 之 IPv6 MIB (cont.) CISCO-SWITCH-ENGINE-MIB . iso (1) . org (3) . dod (6) . internet (1) . private (4) . enterprises (1) . cisco (9) . ciscoMgmt (9) . ciscoSwitchEngineMIB (97) . cseMIBObjects (1) . cseL3Objects (4) -- cseL3Objects (4) + -- cseL3StatsTable (1) - -- cseL3VlanStatsTable (2) | - -- cseL3VlanStatsEntry (1) object Details | | -- cseL3VlanIndex (1) | | -- cseL3VlanInPkts (2) | | -- cseL3VlanInOctets (3) | | -- cseL3VlanOutPkts (4) | | -- cseL3VlanOutOctets (5) | | -- cseL3VlanInUnicastPkts (6) | | -- cseL3VlanInUnicastOctets (7) | | -- cseL3VlanOutUnicastPkts (8) | | -- cseL3VlanOutUnicastOctets (9) |
  • 19. SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.1006 = Counter32: 3540473092 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.2006 = Counter32: 1649206378 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.3021 = Counter32: 3278444802 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.4008 = Counter32: 2865104007 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.1.5006 = Counter32: 1692158510 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.1006 = Counter64: 7828674924853378 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.2006 = Counter64: 5894807785811313 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.3021 = Counter64: 109506806884008 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.4008 = Counter64: 5713000850624076 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.2.5006 = Counter64: 1415152122007054 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.1006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.2006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.3021 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.4008 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.3.5006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.1006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.2006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.3021 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.4008 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.4.5006 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.1006 = Gauge32: 130943 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.2006 = Gauge32: 76630 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.3021 = Gauge32: 106838 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.4008 = Gauge32: 130944 SNMPv2-SMI::enterprises.9.9.97.1.4.1.1.5.5006 = Gauge32: 2 3. Cisco router 之 IPv6 MIB (cont.)
  • 20.
  • 21.
  • 22.
  • 23. 4. 區網 IPv6 mrtg 流量監看 (cont.) FileReader fileReader = new FileReader(&quot;Data/10211200&quot;); String patternStr = &quot;Tunnel|FastEthernet|GigabitEthernet|Vlan&quot;; String patternStr_ipv6 = &quot; IPv6&quot;; Scanner scan = new Scanner(fileReader);//get user input while (scan.hasNext()) { String passwordStr = scan.nextLine(); Pattern p = Pattern.compile(patternStr); Pattern p6 = Pattern.compile(patternStr_ipv6); Matcher m = p.matcher(passwordStr); Matcher m6 = p6.matcher(passwordStr); if ( m.find()) { if_index=passwordStr; stat_if = true; } if ( m6.find()) { ip_traffic=passwordStr; stat_ipv6=true; } if ( stat_if && stat_ipv6 ) { temp_if = if_index.split(&quot;s+&quot;); temp_ipv6 = ip_traffic.split(&quot;s+&quot;); System.out.println( temp_if[0] + &quot; :: &quot; + temp_ipv6[3] + &quot; &quot; + temp_ipv6[5]); stat_if = false ; stat_ipv6 = false ; } }
  • 24.
  • 25. 4. 區網 IPv6 mrtg 流量監看 (cont.) if ( stat_if && stat_ipv6 ) { temp_if = if_index.split(&quot;s+&quot;); // System.out.println( if_index); // System.out.println( temp_if); temp_ipv6 = ip_traffic.split(&quot;s+&quot;); // System.out.println( ip_traffic); // System.out.println( temp_if); out.write( temp_if[0] + &quot; :: &quot; + temp_ipv6[3] + &quot; &quot; + temp_ipv6[5] + &quot;&quot;); // System.out.println( temp_if[0] + &quot; :: &quot; + temp_ipv6[2] + &quot; &quot; + temp_ipv6[3]); stat_if = false ; stat_ipv6 = false ; query1 = &quot; insert into counter (ip, in_counter, out_counter,time) values (?,?,?,?)&quot;; preparedStatement1 = connection.prepareStatement(query1); preparedStatement1.setString(1,temp_if[0]); preparedStatement1.setString(2,temp_ipv6[3]); preparedStatement1.setString(3, temp_ipv6[5]); // java.sql.Date sqlDate = new java.sql.Date(new java.util.Date().getTime()); preparedStatement1.setString(4,cur_time); preparedStatement1.executeUpdate(); } //end_if_ipv6 } // end_while scan.close(); out.close();
  • 26.
  • 27.
  • 28.
  • 29. 4. 區網 IPv6 mrtg 流量監看 (cont.) ## FileName: smurf.conf # Created by … WorkDir: /opt/apache-tomcat-6.0.32/webapps/ROOT/smurf Options[_]: growright, nopercent Language: UTF-8 Target[smurf_km]:.1.3.6.1.2.1.2.2.1.11. 65 &.1.3.6.1.2.1.2.2.1.17. 65 :publicxx@203.72.x.x: SetEnv[smurf_km]: MRTG_INT_DESCR=&quot; 金門縣網 &quot; MaxBytes[smurf_km]: 125000000 Title[smurf_km]: IP Packets : TANET_Km PageTop[smurf_km]: <H3>IP Packets : TANET- 金門縣網 GE 3/7</H3> YLegend[smurf_km]: IP Packet Count Target[smurf_mts]:.1.3.6.1.2.1.2.2.1.11. 66 &.1.3.6.1.2.1.2.2.1.17. 6 6:publicxx@203.72.x.x: SetEnv[smurf_mts]: MRTG_INT_DESCR=&quot; 連江縣網 &quot; MaxBytes[smurf_mts]: 125000000 Title[smurf_mts]: IP Packets : TANET_MTS PageTop[smurf_mts]: <H3>IP Packets : TANet-- 連江縣網 GE 3/8</H3> YLegend[smurf_mts]: IP Packet Count Mrtg.conf 例
  • 30.
  • 31. 4. 區網 IPv6 mrtg 流量監看 (cont.) mrtg.ipv6_28.sh #!/bin/bash # 提供 ipv6 inoctet/outoctet to mrtg configure y=`date +%Y` d=`date +%m%d%H` m=`date +%M` m=`expr $m / 10` d=&quot;$d&quot;&quot;$m&quot;&quot;0&quot; # 1. ipv6 inoctet/outoct echo `cat /home/Expect/IPv6/$d | grep GigabitEthernet2/8 |awk '{print $3}'` echo `cat /home/Expect/IPv6/$d | grep GigabitEthernet2/8 |awk '{print $4}'` # 2. UpTime & interface name UPtime=`/usr/bin/uptime | awk '{print $3 &quot; &quot; $4 &quot; &quot; $5}'` echo $UPtime echo &quot;GigabitEthernet2/8&quot;
  • 32. 4. 區網 IPv6 mrtg 流量監看 (cont.) ## # m h dom mon dow command ## 0 12 * * * /usr/sbin/ntpdate -s ntp2.usno.navy.mil > /dev/null & ## # Probe IPv6 Traffic from TYRC router */10 * * * * /home/Expect/expect.sh >> /home/Expect/log_ ## # Extract IPv6 inOctet/outOctet counter for each interfaces */10 * * * * /home/Expect/run.sh >> /home/Expect/logs/expect ## # Cron execute mrtg 8-58/10 * * * * env LANG=C /home/mrtg-2.17.2/bin/mrtg /home/mrtg-2.17.2/bin/mrtg.cfg ## crontab
  • 33. 4. 區網 IPv6 mrtg 流量監看 (cont.) http://ayang.tyc.edu.tw/mrtg/
  • 34.
  • 35.