Site icon KerKer 的模組世界

[Juniper] Junos網路介面(interface)基本介紹(二)

邊做邊學,順便留個筆記,若有錯誤請不吝指教。

Junos基本操作及root密碼設定可參考我之前的文章:Juniper Junos基本操作、root密碼設定

Juniper基本介面命名規則等內容可以查看這篇:Juniper Junos網路介面(interface)基本介紹(一)

所有Juniper相關文章列表:Juniper JunOS 系列文章列表

這裡列出一些常用的Juniper介面指令:

    show interface <terse | brief | detail | extensive>

四條指令都能顯示出介面資訊,資訊的詳細程度依序遞增。

也可以在指令後再加上介面編號來查詢特定介面的資訊:

    root> show interfaces ge-0/0/23             
    Physical interface: ge-0/0/23, Enabled, Physical link is Down
          Interface index: 671, SNMP ifIndex: 553
          Description: 10.0.0.1/30
          Link-level type: Ethernet, MTU: 1514, LAN-PHY mode, Link-mode: Half-duplex,
          Speed: Auto, Duplex: Auto, BPDU Error: None, Loop Detect PDU Error: None,
          MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled,
          Flow control: Disabled, Auto-negotiation: Enabled, Remote fault: Online,
          Media type: Copper, IEEE 802.3az Energy Efficient Ethernet: Disabled
          Device flags   : Present Running Down
          Interface flags: Hardware-Down SNMP-Traps Internal: 0x4000
          Link flags     : None
          CoS queues     : 8 supported, 8 maximum usable queues
          Current address: 64:c3:d6:66:76:1a, Hardware address: 64:c3:d6:66:76:1a
          Last flapped   : 1970-01-01 00:03:38 UTC (00:22:28 ago)
          Input rate     : 0 bps (0 pps)
          Output rate    : 0 bps (0 pps)
          Active alarms  : LINK
          Active defects : LINK
          Interface transmit statistics: Disabled

      Logical interface ge-0/0/23.0 (Index 576) (SNMP ifIndex 560)
        Flags: Device-Down SNMP-Traps 0x4004000 Encapsulation: ENET2
        Input packets : 0
        Output packets: 0                   
        Protocol inet, MTU: 1500
            Flags: Sendbcast-pkt-to-re
            Addresses, Flags: Dest-route-down Is-Preferred Is-Primary
                Destination: 10.0.0.0/30, Local: 10.0.0.2, Broadcast: 10.0.0.3

在查詢介面IP資訊時使用terse較為好用,可以用來查詢單一介面或是全部介面:

    root> show interfaces terse ge-0/0/23          
    Interface               Admin Link Proto    Local                 Remote
    ge-0/0/23               up    down
    ge-0/0/23.0             up    down inet     10.0.0.2/30

若要查詢到介面的CRC錯誤資訊則需要用到最詳細的extensive(因為資訊太多,將Error資訊的部分過濾出來也是一個實用的技巧):

    root> show interfaces  extensive ge-0/0/23 | match errors   
        Input errors:
            Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Policed discards: 0,
            L3 incompletes: 0, L2 channel errors: 0, L2 mismatch timeouts: 0,
            FIFO errors: 0, Resource errors: 0
        Output errors:
            Carrier transitions: 0, Errors: 0, Drops: 0, Collisions: 0, Aged packets: 0,
            FIFO errors: 0, HS link CRC errors: 0, MTU errors: 0, Resource errors: 0
            CRC/Align errors                         0                0
            FIFO errors 

show interface descriptions可以查看各介面的說明,若有好好維護介面的說明資訊這條指令也是相當好用:

    root> show interfaces descriptions 
    Interface       Admin Link Description
    ge-0/0/23       up    down 10.0.0.1/30
Exit mobile version