среда, 27 марта 2019 г.


Привет!

Попробовал балансировку на Хуавей между CX600-X2 (V6R9) и ATN910.
Все работает, только не факт, что будет точно по весам. Например, в моем примере была только одна 2Г и 3Г. И при выставлении разных весов (30 к 1) изменялось пакетов/сек, но, так как размер пакетов отличался, то скорость получалась 50/50.


Создаем два туннеля от CX600-X2 до ATN910 и прописываем:
load-balance unequal-cost enable
interface Tunnel 0/0/1
[*HUAWEI-Tunnel0/0/1] load-balance unequal-cost weight 12
interface Tunnel 0/0/2
[*HUAWEI-Tunnel0/0/2] load-balance unequal-cost weight 10

tunnel-policy IPRAN
tunnel select-seq cr-lsp lsp load-balance-number 2

понедельник, 14 января 2019 г.

Кратко по cntlmd на Центе .

1) Download cntlm rpm package from http://sourceforge.net/projects/cntlm/files/cntlm/
2) Login as root
3) Run command:
$ rpm -ivh cntlm-*.rpm
4a) Obtain password hash for the configuration file in step 4b (do not put plaintext password in configuration)
$ cntlm -H -d <domain> -u <username>
4b) Configure CNTLM:
$ vi /etc/cntlm.conf
5) Export proxy settings:
$ vi ~/.bashrc
export http_proxy=http://localhost:3128
export https_proxy=${http_proxy}
export ftp_proxy=${http_proxy}
6) Run command:
$ . ~/.bashrc
7) Enable CNTLM to start automatically:
$ chkconfig cntlmd on
          $ service cntlmd start

понедельник, 7 января 2019 г.

Интересный блог по сетям ( шейпинг на 6500 каталистах ) 

https://anetworkerblog.com/

Снпм генератор ( полезная весчь для  создания мониторинга на прометеусе )

http://devopstarter.info/snmp-exporter-generator-tutorial/

вторник, 1 января 2019 г.

root@DESKTOP-6D37CID:~# service mysql start
 * Starting MySQL database server mysqld                                                                                                                  No directory, logging in with HOME=/
                                           


  1. Остановить службу MYSQL:
    sudo service mysql stop
  2. Измените домашний каталог mysql от несуществующего к исходному каталогу, где он должен быть:
    sudo usermod -d /var/lib/mysql/ mysql
Теперь запустите сервер mysql снова с помощью
sudo service mysql start

четверг, 27 декабря 2018 г.

Дружим Cacti и Grafana .

Статья о том как заинсталисть графики из кактуса в графану .
https://github.com/doublemarket/grafana-rrd-server
https://fiat-tux.fr/2018/04/04/utiliser-les-donnees-de-munin-dans-grafana/

Пара ip sla  на CX600 V600R009C20SPC600


1. Test
nqa test-instance 1002314 pms.linux
 test-type jitter
 destination-address ipv4 10.80.3.246
 source-address ipv4 10.80.3.245
 destination-port 33434
 frequency 300
 interval milliseconds 50
 probe-count 15
 jitter-packetnum 200
 datasize 64
 start now



2. Test
nqa test-instance 1002316 pms.linux
 test-type icmpjitter
 destination-address ipv4 10.5.69.203
 source-address ipv4 10.5.69.201
 frequency 300
 interval milliseconds 50
 probe-count 15
 jitter-packetnum 200
 start now
#

1 Тест создается в том случаи когда соурс и дест. ип висят на своих железках
2 Тест создается когда дест. ип висит на чужом(промежуточном ) железе.

Вывод результатов 
display nqa results test-instance "name"


суббота, 22 декабря 2018 г.

Получаем данные о трафике в очередях через snmp

Оф. ман циски по получению трафика в очередях на определенных интерфейсах .Работает на ios ,ios xe, ios xr



Cisco recommends that you have:

    Net-SNMP, or any similar command line based utility, running on a UNIX based operating system, for polling SNMP MIBs (Management Information Bases) from a Cisco device. Net-SNMP is a third-party open source utility available for download at http://www.net-snmp.org/.
    QoS should be configured and applied on the interface(s) for which you will do SNMP polling.

Components Used

The information in this document is based on these software and hardware versions:

    Any Cisco IOS® device that runs 12.0(3)T or higher. The procedure in this document was verified on a Cisco 6500 that runs 12.2(33) SXJ3.
    Cisco SNMP Object Navigator can be accessed at http://tools.cisco.com/Support/SNMP/do/BrowseOID.do

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Get Class Based QoS Details Applied to an Interface With SNMP

Use this procedure in order to determine or confirm the required Object Identifier (OID) for polling.

    Get the ifindex (Object Identifier/OID 1.3.6.1.2.1.2.2.1.1) for the interface.

    Example 1 - CLI command to get the ifindex of the interface GigabitEthernet6/1/3:

    show snmp mib ifmib ifindex | include GigabitEthernet6/1/3
    GigabitEthernet6/1/3: Ifindex = 73


    Example 2 - SNMP command to get the ifindex of the same interface:

    UNIX #snmpwalk -v2c -c <community-name>  <ip address of device>  1.3.6.1.2.1.2.2 | grep -i GigabitEthernet6/1/3
    IF-MIB::ifDescr.73 = STRING: GigabitEthernet6/1/3


    The ifindex value returned in these examples is 73.
    Get the cbQosIfIndex (OID 1.3.6.1.4.1.9.9.166.1.1.1.1.4) for the ifindex you retrieved in Step 1.

    Example - SNMP command to get the cbQosIfIndex for ifindex 73:

    UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.1.1.1.4 | grep -i 73

    SNMPv2-SMI::enterprises.9.9.166.1.1.1.1.4.1170 = INTEGER: 73


    The cbQosPolicyIndex (OID 1.3.6.1.4.1.9.9.166.1.1.1.1.1) value returned in this example is 1170.
    Use the MIB Object cbQosCMName (1.3.6.1.4.1.9.9.166.1.7.1.1.1) to get the names of class-maps configured on the router.

    The output will show each class-map with its Index. For example, cbQosConfigIndex (1.3.6.1.4.1.9.9.166.1.5.1.1.2).

    UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.7.1.1.1

       SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1593 = STRING: "class-default"

       SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1874801 = STRING:"DOMESTIC_IN

       SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.5134417 = STRING:"INTERNATIONAL_IN"

       SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.6181089 = STRING:"DOMESTIC_OUT"

       SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.12374209 = STRING:"INTERNATIONAL_OUT"



    Make a note of the highlighted value 6181089, which is cbQosConfigIndex.
    Use cbQosConfigIndex to get the cbQosPolicyIndex (1.3.6.1.4.1.9.9.166.1.1.1.1.1) and
    cbQosObjectsIndex (1.3.6.1.4.1.9.9.166.1.5.1.1.1) for individual class-maps.

    Example - command to monitor class-map DOMESTIC_OUT:

    UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.5.1.1.2

   5. In order to get the Object Identifier (OID), search for the cbQosConfigIndex value obtained in Step 3 (6181089) in the output below:

    UNIX #snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.5.1.1.2 grep -i 'Gauge32: 6181089'
    SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.352 = Gauge32: 11986352
    SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.1163651 = Gauge32: 9637091
    SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.7200738 = Gauge32: 1594
    SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.352.10567713 = Gauge32: 1593
    SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.354.354 = Gauge32: 11986352
    SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.354.431603 = Gauge32: 9637091
    SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1170.7552545 = Gauge32: 6181089


    The highlighted values are: cbQosConfigIndex (6181089), cbQosPolicyIndex (1170), and cbQosObjectsIndex (7552545).

    Important: In this example, the cbQosConfigIndex and corresponding cbQosObjectsIndex are for the cbQosObjectsType (1.3.6.1.4.1.9.9.166.1.5.1.1.3) "classmap". For any other type of cbQosObjectsType, you must look into the correlation derived under cbQosObjects as part of cbQosObjectsIndex (1.3.6.1.4.1.9.9.166.1.5.1.1.3). Refer to the definition of cbQosParentObjectsIndexa




    ===================================================================


    Poll data from the Policy-map (in correlation with QosObjectsType=classmap) from cbQosClassMapStats (1.3.6.1.4.1.9.9.166.1.15). Many options are available:

+-- -R-- Counter   cbQosCMPrePolicyPktOverflow(1)
+-- -R-- Counter   cbQosCMPrePolicyPkt(2)
+-- -R-- Counter64 cbQosCMPrePolicyPkt64(3)
+-- -R-- Counter   cbQosCMPrePolicyByteOverflow(4)
+-- -R-- Counter   cbQosCMPrePolicyByte(5)
+-- -R-- Counter64 cbQosCMPrePolicyByte64(6)
+-- -R-- Gauge     cbQosCMPrePolicyBitRate(7)
+-- -R-- Counter   cbQosCMPostPolicyByteOverflow(8)
+-- -R-- Counter   cbQosCMPostPolicyByte(9)
+-- -R-- Counter64 cbQosCMPostPolicyByte64(10)
+-- -R-- Gauge     cbQosCMPostPolicyBitRate(11)
+-- -R-- Counter   cbQosCMDropPktOverflow(12)
+-- -R-- Counter   cbQosCMDropPkt(13)
+-- -R-- Counter64 cbQosCMDropPkt64(14)
+-- -R-- Counter   cbQosCMDropByteOverflow(15)
+-- -R-- Counter   cbQosCMDropByte(16)
+-- -R-- Counter64 cbQosCMDropByte64(17)
+-- -R-- Gauge     cbQosCMDropBitRate(18)
+-- -R-- Counter   cbQosCMNoBufDropPktOverflow(19)
-- -R-- Counter   cbQosCMNoBufDropPkt(20)
-- -R-- Counter64 cbQosCMNoBufDropPkt64(21)


Refer to the SNMP MIB Locator for MIBs for these options.

For example, the object cbQosCMPostPolicyBitRate (1.3.6.1.4.1.9.9.166.1.15.1.1.11) polls the bit rate of the traffic after QoS policy execution.

Example - command to get the post policy bit rate:

UNIX # snmpwalk -v2c -c <community-name> <ip address of device> 1.3.6.1.4.1.9.9.166.1.15.1.1.11.1170.7552545
SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.11.1170.7552545 = Gauge32: 27000

После добавления данных в систему мониторинга получаем веселые картинки .

Кратко с форума http://forums.cacti.net/about33275.html

ISCO-CLASS-BASED-QOS-MIB IODs:
 ftp://ftp.cisco.com/pub/mibs/oid/CISCO-CLASS-BASED-QOS-MIB.oid:

    "config"       = ".1.3.6.1.4.1.9.9.166.1.7.1.1.1", # list of all
 configured QoS classes
    "config_index" = ".1.3.6.1.4.1.9.9.166.1.5.1.1.2",  #
cbQosConfigIndex
    "int_index"    = ".1.3.6.1.4.1.9.9.166.1.1.1.1.4",  # cbQosIfIndex
    "policy_direction" = ".1.3.6.1.4.1.9.9.166.1.1.1.1.3", #
 cbQosPolicyDirection
    "int_name"        = ".1.3.6.1.2.1.31.1.1.1.1",
    "int_description" = ".1.3.6.1.2.1.31.1.1.1.18",
    "class_traffic" =  ".1.3.6.1.4.1.9.9.166.1.15.1.1.11",
    "pre_class_traffic" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.7",
    "drop_class_traffic" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.18",
    "drop_class_byte"  = ".1.3.6.1.4.1.9.9.166.1.15.1.1.17",
    "pre_class_byte" = ".1.3.6.1.4.1.9.9.166.1.15.1.1.6",
    "class_byte"  =  ".1.3.6.1.4.1.9.9.166.1.15.1.1.10",