ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [EdgeRouter] 명령어 익히기 - 각종 정보 조회
    Device 2021. 3. 10. 08:30

    기본적으로 show 라는 명령을 입력 후 ? 를 입력하면 show 명령어의 Parameter들을 볼 수 있다.

    여기에 두번 연속 입력하면 아래와 같이 각 명령어와 설명이 같이 나온다.

    $ show
    Possible completions:
      arp           Show Address Resolution Protocol (ARP) information
      bfd           Bidirectional Forwarding Detection (BFD)
      bgp           Border Gateway Protocol (BGP)
      bi-lsp        Bi-directional lsp status and configuration
      bridge        Show bridging information
      configuration Show running configuration
      conntrack     Show conntrack entries in the conntrack table
      cspf          CSPF Information
      date          Show system date and time
      debugging     Show route protocol debugging flags
      dhcp          Show Dynamic Host Configuration Protocol (DHCP) information
      dhcpv6        Show status related to DHCPv6
      dhcpv6-pd     Show status related to DHCPv6 Prefix Delegation
      dns           Show Domain Name Server (DNS) information
      firewall      Show firewall information
      flow-accounting
                    Show flow accounting statistics
      flow-accounting-ipt
      hardware      Show system hardware details
      history       show command history
      host          Show host information
      incoming      Show ethernet input-policy information
      interfaces    Show network interface information
      ip            Show IPv4 routing information
      ipv6          Show IPv6 routing information
      ldp           Label Distribution Protocol (LDP)
      lldp          Show lldp
      load-balance  Show load-balance
      log           Show contents of current master log file
      login         Show current login credentials
      mpls          Show MPLS specific data
      nat           Show Network Address Translation (NAT) information
      ntp           Show peer status of network time daemon
      openvpn       Show OpenVPN information
      pppoe-client  Show active PPPoE client sessions
      pppoe-server  Show active PPPoE server sessions
      queueing      Show ethernet queueing information
      reboot        Show scheduled reboot
      route-map     Show route-map information
      rsvp          Resource Reservation Protocol (RSVP)
      shutdown      Show scheduled shutdown
      snmp          Show status of SNMP on localhost
      ssh-recovery  Show status of recovery Secure SHell (SSH) service
      system        Show system information
      tech-support  Show consolidated tech-support report
      traffic-control
                    Show traffic control information
      ubnt          Show UBNT information
      udapi         Show UDAPI Information
      unms          Show UNMS information
      update        Run an update command
      upnp2         show UPnp
      users         Show user information
      version       Show Vyatta version information
      vpls          VPLS instance information
      vpn           Show Virtual Private Network (VPN) information
      vrrp          Show Virtual Router Redundancy Protocol (VRRP) information
      webproxy      Show webproxy information

    몇몇 명령어는 리눅스 명령어로 얻을 수 있는 정보들도 있긴 하지만

     

    WebUI에서 볼수 없는 몇가지 정보를 아래와 같이 볼 수 있다.

     

    WAN 인터페이스 DHCP Client 상태 보기

    $ show dhcp client leases
    interface  : eth0
    ip address : 121.10.215.124    [Active]
    subnet mask: 255.255.255.0
    domain name: kornet     [overridden by domain-name set using CLI]
    router     : 121.10.215.254
    name server: 168.126.63.1 168.126.63.2
    dhcp server: 125.141.115.26
    lease time : 3600
    last update: Tue Mar 9 22:42:02 KST 2021
    expiry     : Tue Mar 09 23:41:59 KST 2021
    reason     : RENEW

    nameserver 상태보기

    $ show dns forwarding nameservers
    -----------------------------------------------
       Nameservers configured for DNS forwarding
    -----------------------------------------------
    168.126.63.1 available via 'dhcp eth0'
    168.126.63.2 available via 'dhcp eth0'

    dns forwarding 상태

    $ show dns forwarding statistics
    ----------------
    Cache statistics
    ----------------
    Cache size: 150
    Queries forwarded: 24158
    Queries answered locally: 3021
    Total DNS entries inserted into cache: 44908
    DNS entries removed from cache before expiry: 4545
    
    ---------------------
    Nameserver statistics
    ---------------------
    Server: 168.126.63.1
    Queries sent: 22908
    Queries retried or failed: 60
    
    Server: 168.126.63.2
    Queries sent: 3006
    Queries retried or failed: 47

    하드웨어 정보보기

    $ show hardware
    cpu          fan          mem          power        temperature
    
    $ show hardware cpu
    Architecture:          mips64
    Byte Order:            Big Endian
    CPU(s):                2
    On-line CPU(s) list:   0,1
    Thread(s) per core:    1
    Core(s) per socket:    1
    Socket(s):             2
    L1d cache:             16K
    L1i cache:             32K
    L2 cache:              128K

    인터페이스 정보보기

    $ show interfaces
    Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
    Interface    IP Address                        S/L  Description
    ---------    ----------                        ---  -----------
    eth0         121.10.215.124/24                u/u  Internet
    eth1         192.168.1.1/24                    u/u  Local
    eth2         192.168.2.1/24                    u/D  Local 2
    lo           127.0.0.1/8                       u/u
                 ::1/128
    $ show interfaces counters
    Interface    Rx Packets   Rx Bytes     Tx Packets   Tx Bytes
    eth0           11632800 12598790103        2654460 1479550303
    eth1            2749061 1497984950        9179940 12415687375
    eth2                  0          0              0          0
    imq0                  0          0              0          0
    lo                  482      89644            482      89644

    로그보그

    $ show log
    Mar  8 23:57:15 ubnt rsyslogd: set SCM_CREDENTIALS failed on '/dev/log': Protocol not available
    Mar  8 23:57:15 ubnt kernel: Linux version 3.10.107-UBNT (root@aed5f1a708f2) (gcc version 4.7.0 (Cavium Inc. Version: SDK_BUILD build 51) ) #1 SMP Fri Feb 21 09:09:08 UTC 2020
    Mar  8 23:57:15 ubnt kernel: CVMSEG size: 2 cache lines (256 bytes)
    Mar  8 23:57:15 ubnt kernel: Checking for the multiply/shift bug... no.
    Mar  8 23:57:15 ubnt kernel: Checking for the daddiu bug... no.

     

    nat 변환 상태 보기

    $ show nat translations
    Pre-NAT              Post-NAT             Type  Prot  Timeout
    192.168.1.42         121.10.215.124        snat  tcp   7429
    192.168.1.39         121.10.215.124        snat  tcp   7429
    192.168.1.48         121.10.215.124        snat  tcp   7192
    192.168.1.40         121.10.215.124        snat  tcp   7409
    192.168.1.41         121.10.215.124        snat  tcp   7194
    192.168.1.42         121.10.215.124        snat  tcp   7424

     

    offload 상태보기

    $ show ubnt offload statistics
    
     Statistics
    ========================
    
    RX packets:                  2162749    bytes:            2511927003
    TX packets:                  2137316    bytes:            2538517295
    Bypass packets:                25433    bytes:               3332132
    Bad L4 checksum:                   0    bytes:                     0
    
    Protocol        RX packets      RX bytes                TX packets      TX bytes
    
    ipv4            2162749        2511927003             2162749        2541849427
    ipv6            0                 0                   0                 0
    pppoe           0                 0                   0                 0
    vlan            0                 0                   0                 0
    
     Forwarding cache size (IPv4)
    =============================
    
    table_size (buckets)                  8192
    table size (bytes)                    1048576
    flows_max (bytes)                     4915200
    
     Flow cache table size (IPv6)
    =============================
    
    table_size (buckets)                  8192
    table size (bytes)                    1048576
    flows_max (bytes)                     2883584
    
     Flow timers
    =============================
    
    cycles                                41807598317588
    clock_rate                            500000000
    HZ                                    100
    timer_ticks                           8330709
    new_flow_interval (timer_ticks)       1200
    old_flow_interval (timer_ticks)       400
    
     Low-level IPv4 flow dynamics
    =============================
    
    ipv4_flow_found                       2146594
        ipv4_flow_found_expired           4566
        ipv4_flow_found_old_random_bypass 249
        ipv4_flow_found_action_bypass     0
    
    ipv4_flow_not_found                   16155
    
     IPv4 flow creation dynamics
    =============================
    
    ipv4_create_flow_found                            4805
    ipv4_create_flow_found_replaced                   4803
    ipv4_create_flow_not_found                        3242
    ipv4_create_flow_not_found_just_created           0
    ipv4_create_flow_not_found_replaced_expired       3241
    ipv4_create_flow_not_found_replaced_non_expired   1
    
     Low-level IPv6 flow dynamics
    =============================
    
    ipv6_flow_found                       0
        ipv6_flow_found_expired           0
        ipv6_flow_found_old_random_bypass 0
        ipv6_flow_found_action_bypass     0
    
    ipv6_flow_not_found                   0
    
     IPv6 flow creation dynamics
    =============================
    
    ipv6_create_flow_found                            0
    ipv6_create_flow_found_replaced                   0
    ipv6_create_flow_not_found                        0
    ipv6_create_flow_not_found_just_created           0
    ipv6_create_flow_not_found_replaced_expired       0
    ipv6_create_flow_not_found_replaced_non_expired   0
    
     Flow cache flushes
    =============================
    
    ipv4_flushes                          0
    ipv6_flushes                          0
    728x90
    반응형

    댓글

Designed by Tistory.