SlideShare a Scribd company logo
IPv6 mrtg 流量監測 中央大學 電算中心  楊素秋 民國  100 年  11 月
OUTLINE 1. IPv6 Network 2.  SNMP/MIBs and IPv6 3.  Cisco router  之 IPv6 MIB OID 4.  區網  IPv6 mrtg  流量監看 5.  結語
1.  建構  IPv6 Network Different types of networks Dual stack IPv6 & IPv4 networks IPv6 only networks (few of them) Important to keep in mind Dual stack is not for ever One IP stack should be removed… one day No reasons for network admins to face twice the amount of work􀂄
1.  建構  IPv6 Network (cont.) 桃園區網  IPv6  建置實做 啟動 IPv6 routing 設定 DNSv6 設定 DHCPv6 啟動 6to4 tunneling
1.  建構  IPv6 Network (cont.)
1.  建構  IPv6 Network (cont.) Is IPv6 ready ? Hardware Router/Switch Firewall Wireless AP End system Application httpd, SMTP, DNS , ssh, ftp, news, whois, ntp VoIP, multimedia streaming,  Printing, Chat, Mysql
1.  建構  IPv6 Network (cont.) IPv6 address Linux Defaut enable IPv4/IPv6 Can configure tun6to4 /etc/sysconfig/network-scripts/ifup-ipv6 Windows 7 Defaut enable IPv4/IPv6 Defaut enable  Teredo  tunneling Configure  tun6to4  automatically Windows XP Ipv6 install  (tun6to4) Configure IPv6 Manually  ( netsh  >)
1.  建構  IPv6 Network (cont.) IPv6  測試網站 (www server) audp.tyc.edu.tw, showroom.twnic.net.tw Show the remote/client ipv6 address IPv4/IPv6 enable Tun6to4 enable mrtgv6.tanet.edu.tw MRTG traffic monitoring for TANET backbone IPv6 enable  Media Server Ipv6.pku6.edu.cn & other mms links
1.  建構  IPv6 Network (cont.)
1.  建構  IPv6 Network (cont.)
SNMP and IPv6 Cisco: SNMP over IPv6 is available in 12.0(27)S More features available from 12.0(30)S Will become available in 12.3(14)T Juniper, Hitachi, 6wind: SNMP over IPv6 is available    2.  SNMP/MIBs and IPv6
2.  SNMP/MIBs and IPv6 (cont.) IPv6 MIBs status MIBs are essential for the network management SNMP-based applications are widely used but others exist too (NetFlow, XML…) SNMP rely upon MIBs … Need to have MIBs to collect IPv6information Cisco router MIB IP-MIB, IPv6-MIB RFC4293, …
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  流量監看 Extract interface traffic (with Expect) Connect to router CLI command Show interface accounting Extract IPv4/IPv6 traffic Appfuse Display/Record  the traffic Mrtg traffic monitoring
4.  區網  IPv6 mrtg  流量監看 (cont.) A. Extract traffic (through expect) #!/bin/bash RSYNC=/usr/bin/rsync LOCALPATH=/home/yang VAR=$(expect -c" spawn telnet 203.72.x.x expect Username send \“test123\r\" expect Password send \“test123ncu\r\" expect \"\\\\$\" send \" show interface account \r\" send \” \r\” send \” \r\” Expect –timeout 1 “ ) Echo “$VAR”
4.  區網  IPv6 mrtg  流量監看 (cont.) TYRC IPv6 traffic 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.) a) Extract Traffic Counters (2011-10-21 11:00 ) 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] + "\n"); //  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.) b)  Extract Traffic Counters to  database 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.) Display/Record  the traffic
4.  區網  IPv6 mrtg  流量監看 (cont.) Mrtg traffic graph Install Mrtg Download Mrtg-2.17.2 Install libgd2 apt-get -y install libgd2-xpm-dev build-essential Install Mrtg-2.17.2 Configure mrtg.cfg Configure crontab  Per 10-minutes
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> mrtg.cfg
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/
SNMP MIB for IPv6 Traffic Vender’s network products IOS version  of the product Vender’s SNMP MIB  search service Cisco ::  SNMP Object Navigator http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?objectInput=1.3.6.1.4.1.9.9.97+&translate=Translate&submitValue=SUBMIT&submitClicked=true 5.  結語
5.  結語 (cont.)  Extract interface traffic (with Expect) Connect to router (with Expect) CLI command Show interface accounting Extract IPv4/IPv6 traffic Appfuse Display/Record  the traffic IPv6 mrtg traffic monitoring http://ayang.tyc.edu.tw/mrtg/
感謝你的耐心聆聽 ! Q&A

More Related Content

PDF
How to Cisco ACI Multi-Pod
PDF
JANOG43 Forefront of SRv6, Open Source Implementations
PDF
Finding target for hacking on internet is now easier
PDF
Using GTP on Linux with libgtpnl
PPTX
Openstack Testbed_ovs_virtualbox_devstack_single node
PDF
SRv6 Mobile User Plane : Initial POC and Implementation
PDF
p4srv6 (P4-16) design document rev1.0
PPTX
Ccna sv2 instructor_ppt_ch8
How to Cisco ACI Multi-Pod
JANOG43 Forefront of SRv6, Open Source Implementations
Finding target for hacking on internet is now easier
Using GTP on Linux with libgtpnl
Openstack Testbed_ovs_virtualbox_devstack_single node
SRv6 Mobile User Plane : Initial POC and Implementation
p4srv6 (P4-16) design document rev1.0
Ccna sv2 instructor_ppt_ch8

What's hot (20)

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

Similar to I pv6 mrtg_20111025 (20)

PPT
FEGTS IP training - TCP/IP Introduction
DOCX
Configuracion EIGRP
PPT
ASCC Network Experience in IPv6
DOC
Centralized monitoring station for it computing and network infrastructure1
PDF
True stories on the analysis of network activity using Python
PDF
v6_whats-happening (presentation at GEANT APM meeting, 2011, Ljubljana)
PPTX
I pv6 eigrp
PPTX
IPv6 EIGRP
PPT
Snmp
PDF
6to4tunnel sample config
PDF
neutron测试例子
PDF
Advanced Internetworking Report
PPTX
Getting started with IPv6
PDF
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
PDF
Neighbor discoverydhcp
ODP
Integrating Linux routing with FusionCLI™
PDF
Mininet Basics
PDF
Monitoring Dual Stack IPv4/IPv6 Networks
PDF
SDNDS.TW Mininet
PDF
[AKIBA.AWS] VPN接続とルーティングの基礎
FEGTS IP training - TCP/IP Introduction
Configuracion EIGRP
ASCC Network Experience in IPv6
Centralized monitoring station for it computing and network infrastructure1
True stories on the analysis of network activity using Python
v6_whats-happening (presentation at GEANT APM meeting, 2011, Ljubljana)
I pv6 eigrp
IPv6 EIGRP
Snmp
6to4tunnel sample config
neutron测试例子
Advanced Internetworking Report
Getting started with IPv6
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
Neighbor discoverydhcp
Integrating Linux routing with FusionCLI™
Mininet Basics
Monitoring Dual Stack IPv4/IPv6 Networks
SDNDS.TW Mininet
[AKIBA.AWS] VPN接続とルーティングの基礎
Ad

Recently uploaded (20)

DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
Cell Types and Its function , kingdom of life
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PDF
Empowerment Technology for Senior High School Guide
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
Lesson notes of climatology university.
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Computing-Curriculum for Schools in Ghana
Hazard Identification & Risk Assessment .pdf
Digestion and Absorption of Carbohydrates, Proteina and Fats
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Cell Types and Its function , kingdom of life
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Weekly quiz Compilation Jan -July 25.pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Empowerment Technology for Senior High School Guide
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Lesson notes of climatology university.
Unit 4 Skeletal System.ppt.pptxopresentatiom
Final Presentation General Medicine 03-08-2024.pptx
Orientation - ARALprogram of Deped to the Parents.pptx

I pv6 mrtg_20111025

  • 1. IPv6 mrtg 流量監測 中央大學 電算中心 楊素秋 民國 100 年 11 月
  • 2. OUTLINE 1. IPv6 Network 2. SNMP/MIBs and IPv6 3. Cisco router 之 IPv6 MIB OID 4. 區網 IPv6 mrtg 流量監看 5. 結語
  • 3. 1. 建構 IPv6 Network Different types of networks Dual stack IPv6 & IPv4 networks IPv6 only networks (few of them) Important to keep in mind Dual stack is not for ever One IP stack should be removed… one day No reasons for network admins to face twice the amount of work􀂄
  • 4. 1. 建構 IPv6 Network (cont.) 桃園區網 IPv6 建置實做 啟動 IPv6 routing 設定 DNSv6 設定 DHCPv6 啟動 6to4 tunneling
  • 5. 1. 建構 IPv6 Network (cont.)
  • 6. 1. 建構 IPv6 Network (cont.) Is IPv6 ready ? Hardware Router/Switch Firewall Wireless AP End system Application httpd, SMTP, DNS , ssh, ftp, news, whois, ntp VoIP, multimedia streaming, Printing, Chat, Mysql
  • 7. 1. 建構 IPv6 Network (cont.) IPv6 address Linux Defaut enable IPv4/IPv6 Can configure tun6to4 /etc/sysconfig/network-scripts/ifup-ipv6 Windows 7 Defaut enable IPv4/IPv6 Defaut enable Teredo tunneling Configure tun6to4 automatically Windows XP Ipv6 install (tun6to4) Configure IPv6 Manually ( netsh >)
  • 8. 1. 建構 IPv6 Network (cont.) IPv6 測試網站 (www server) audp.tyc.edu.tw, showroom.twnic.net.tw Show the remote/client ipv6 address IPv4/IPv6 enable Tun6to4 enable mrtgv6.tanet.edu.tw MRTG traffic monitoring for TANET backbone IPv6 enable Media Server Ipv6.pku6.edu.cn & other mms links
  • 9. 1. 建構 IPv6 Network (cont.)
  • 10. 1. 建構 IPv6 Network (cont.)
  • 11. SNMP and IPv6 Cisco: SNMP over IPv6 is available in 12.0(27)S More features available from 12.0(30)S Will become available in 12.3(14)T Juniper, Hitachi, 6wind: SNMP over IPv6 is available    2. SNMP/MIBs and IPv6
  • 12. 2. SNMP/MIBs and IPv6 (cont.) IPv6 MIBs status MIBs are essential for the network management SNMP-based applications are widely used but others exist too (NetFlow, XML…) SNMP rely upon MIBs … Need to have MIBs to collect IPv6information Cisco router MIB IP-MIB, IPv6-MIB RFC4293, …
  • 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. 4. 區網 IPv6 mrtg 流量監看 Extract interface traffic (with Expect) Connect to router CLI command Show interface accounting Extract IPv4/IPv6 traffic Appfuse Display/Record the traffic Mrtg traffic monitoring
  • 21. 4. 區網 IPv6 mrtg 流量監看 (cont.) A. Extract traffic (through expect) #!/bin/bash RSYNC=/usr/bin/rsync LOCALPATH=/home/yang VAR=$(expect -c&quot; spawn telnet 203.72.x.x expect Username send \“test123\r\&quot; expect Password send \“test123ncu\r\&quot; expect \&quot;\\\\$\&quot; send \&quot; show interface account \r\&quot; send \” \r\” send \” \r\” Expect –timeout 1 “ ) Echo “$VAR”
  • 22. 4. 區網 IPv6 mrtg 流量監看 (cont.) TYRC IPv6 traffic 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 區網測試網
  • 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. 4. 區網 IPv6 mrtg 流量監看 (cont.) a) Extract Traffic Counters (2011-10-21 11:00 ) 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
  • 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;\n&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. 4. 區網 IPv6 mrtg 流量監看 (cont.) b) Extract Traffic Counters to database 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 | |
  • 27. 4. 區網 IPv6 mrtg 流量監看 (cont.) Display/Record the traffic
  • 28. 4. 區網 IPv6 mrtg 流量監看 (cont.) Mrtg traffic graph Install Mrtg Download Mrtg-2.17.2 Install libgd2 apt-get -y install libgd2-xpm-dev build-essential Install Mrtg-2.17.2 Configure mrtg.cfg Configure crontab Per 10-minutes
  • 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. 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> mrtg.cfg
  • 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. SNMP MIB for IPv6 Traffic Vender’s network products IOS version of the product Vender’s SNMP MIB search service Cisco :: SNMP Object Navigator http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?objectInput=1.3.6.1.4.1.9.9.97+&translate=Translate&submitValue=SUBMIT&submitClicked=true 5. 結語
  • 35. 5. 結語 (cont.) Extract interface traffic (with Expect) Connect to router (with Expect) CLI command Show interface accounting Extract IPv4/IPv6 traffic Appfuse Display/Record the traffic IPv6 mrtg traffic monitoring http://ayang.tyc.edu.tw/mrtg/