QNOS operation

Reinstall QNOS

  1. 讓service port連得到LAB 2網段
  2. 透過console port (minicom),重開機進入ONIE,砍掉舊的QNOS
  3. 在ONIE中,透過service port把ONIE Installer傳進去並安裝
1
2
3
4
5
6
7
(Switch) #reload
Hit any key to stop autoboot:  0
=> run onie_uninstall
ONIE:/ # onie-discovery-stop
ONIE:/ # ip addr
ONIE:/ # ip addr add 10.103.15.170/24 dev eth0
ONIE:/ # route add default gw 10.103.15.1
1
# scp <your folder>/onie-installer-x86_64-quanta_ix2_rangeley root@<ONIE IP address>:/
1
2
3
ONIE:/ # onie-nos-install onie-installer-x86_64-quanta_ix2_rangeley
(Switch) #dev sysapiDebugAdvanceLicenseKeyGenerate
(Switch) #reload
  1. Set service port (Telnet)
1
2
3
4
5
(Switch) #configure
(Switch) (Config)#serviceport protocol none
(Switch) (Config)#serviceport ip 10.103.15.169 255.255.255.0 10.103.15.1
(Switch) (Config)#exit
(Switch) #copy running-config startup-config
  1. Auto start the Restful API
1
2
(Switch) #configure
(Switch) (Config)#application install orig_restful_api auto-restart start-on-boot
  1. Add scripts
1
2
(Switch) #copy scp://shihta@192.168.1.112/Users/shihta/workspace/goenv-vscode-telegraf/switch_script/common/showtransceiver.scr script showtransceiver.scr
(Switch) #copy scp://shihta@192.168.1.112/Users/shihta/workspace/goenv-vscode-telegraf/switch_script/common/showifstatus.scr script showifstatus.scr
  1. Set lldp
1
2
3
#configure
(Config)#interface range 0/1-0/224
(Interface 0/1-0/224)#lldp portid-subtype mac-address
  1. edit /etc/sudoers.d/nfvd
1
admin ALL=(ALL) NOPASSWD: /usr/sbin/dmidecode,/usr/sbin/qnos-show
  1. export logging

System Message: ERROR/3 (<string>, line 68)

Error in "code-block" directive: 1 argument(s) required, 0 supplied.

.. code-block::

  logging host 10.103.3.74 ipv4 6553 6
  logging syslog

10-a. X86 datetime:

  • add OS dns server by edit /etc/resolv.conf

    System Message: ERROR/3 (<string>, line 77)

    Error in "code-block" directive: 1 argument(s) required, 0 supplied.

    .. code-block::
    
      nameserver 1.1.1.1
    
    

10-b: non-x86 datetime

  • add OS dns server by CLI

    System Message: ERROR/3 (<string>, line 85)

    Error in "code-block" directive: 1 argument(s) required, 0 supplied.

    .. code-block::
    
      ip name-server 8.8.8.8
      sntp server "time.stdtime.gov.tw"
      sntp server "time.google.com"
      sntp server "0.ubuntu.pool.ntp.org"
      sntp clock timezone "UTC" 0 0 before-utc
    
    
    

minicom

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
minicom -s

# select "Serial port setup"

+-----------------------------------------------------------------------+
| A -    Serial Device      : /dev/ttyS0                                |
| B - Lockfile Location     : /var/lock                                 |
| C -   Callin Program      :                                           |
| D -  Callout Program      :                                           |
| E -    Bps/Par/Bits       : 115200 8N1                                |
| F - Hardware Flow Control : No                                        |
| G - Software Flow Control : No                                        |
|                                                                       |
|    Change which setting?                                              |
+-----------------------------------------------------------------------+
        | Screen and keyboard      |
        | Save setup as dfl        |
        | Save setup as..          |
        | Exit                     |
        | Exit from Minicom        |
        +--------------------------+

IX8D

  • Ports:
    • ssh: 22
    • qnos-cli: 22
    • Restful API: 8080

fluentd

  • From Rynn

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    
    config
    fluentd entry1
    sourcetag 222.1 type localsyslog  ==> 設定 fluentd source type
    severitylevel 5   ==> 設定你所需要的 level
    enable
    exit
    matchpattern 222.** type forward   ==> 設定 fluentd 行為
    server ipv4 1.2.3.4 24224   ==> 設定 fluentd output server address and port
    advance buffer flush-interval 10s
    exit
    enable
    exit
    fluentd  ==> 啟動 fluentd
    
  • My elasticsearch

    1
    2
    3
    4
    5
    6
    
    fluentd entry1
    no matchpattern # remove all matchpattern
    
    matchpattern 222.** type elasticsearch
    host ipv4 10.103.3.74 9200
    advance buffer flush-interval 10s
    
  • Switch config

    System Message: ERROR/3 (<string>, line 166)

    Error in "code-block" directive: 1 argument(s) required, 0 supplied.

    .. code-block::
    
      <source>
        @type syslog
        port 6553
        bind 0.0.0.0
        format /^(?<time>...............) (?<host>.*)-1 %(?<ident>.*): \[(?<addr>[0-9a-fx]*)\] (?<file>\S+) (?<logcnt>[0-9]+) %% (?<message>.*)$/
        protocol_type udp
        tag 222.1
      </source>
    
      <match 222.**>
        @type elasticsearch
        host 10.103.3.74
        port 9200
        logstash_format false
        utc_index true
        index_name fluentd
        type_name fluentd
        include_tag_key false
        request_timeout 5s
        reload_connections true
        reload_on_failure false
        buffer_type memory
        buffer_queue_limit 16
        buffer_chunk_limit 8m
        flush_interval 10s
      </match>
    
    
    

fluentd docker image

  • docker image: gcr.io/google-containers/fluentd-elasticsearch:v2.3.2
  • config file: /etc/fluent/fluent.conf
  • start container: docker run -tid -v $PWD/fluent.conf:/etc/fluent/fluent.conf -p 6553:6553/tcp -p 6553:6553/udp gcr.io/google-containers/fluentd-elasticsearch:v2.3.2

Cell 1

  • Rack #4: port 13 & 14. ssh -i ./.ssh/cell1/id_rsa root@10.102.33.112
comments powered by Disqus