Utilicemos el siguiente comando para visualizar las estadísticas de una interfaz de un equipo Foritgate
FGT # diagnose netlink interface list [nombre_de_interfaz]
– Donde [nombre_de_interfaz] es el nombre que tiene el puerto en la unidad Foritgate como port13, wan1, etc.
Y el siguiente es para limpiar los contadores:
FGT # diagnose netlink interface clear wan1
Ejemplo:
1 2 3 4 5 6 7 8 9 10 11 |
FortiGate # diagnose netlink interface list port18 if=port18 family=00 type=1 index=16 phyindex=11 mtu=1500 link=0 master=0 ref=18301 state=start present flags=up broadcast run promsic allmulti multicast Qdisc=mq hw_addr=00:09:0f:09:01:ac broadcast_addr=ff:ff:ff:ff:ff:ff stat: rxp=10167354658 txp=8242177193 rxb=13418896918142 txb=3015580349565 rxe=0 txe=0 rxd=0 txd=0 mc=0 collision=0 re: rxl=0 rxo=0 rxc=0 rxf=0 rxfi=0 rxm=0 te: txa=0 txc=0 txfi=0 txh=0 txw=0 misc rxc=0 txc=0 stop=0 input_type=0 state=6 arp_entry=1 refcnt=18301 FortiGate # |
Además puedes utilizar los comandos:
# di hardware deviceinfo nic [nombre_de_interfaz]
# get hardware nic [nombre_de_interfaz]
Donde [nombre_de_interfaz] es el nombre que tiene el puerto en la unidad Foritgate como port13, wan1, etc.
Ambos comandos muestran hardware y la información de estado de cada interfaz. La información de hardware incluye detalles como el nombre/versión del controlador y la revisión del chip. La información de estado incluye paquetes transmitidos y recibidos y diferentes tipos de errores.
Ejemplo:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
FortiGate # get hardware nic port13 Description :FortiASIC NP4 Adapter Driver Name :FortiASIC Unified NPU Driver Version :1.0 PCI Slot :13:00.0 PCI_Revision_ID :1 Board :fgt3240c SN :FG3K2C3Z148xxcxxxxx Major ID :17 Minor ID :0 LIF ID :6 NPU OID :6 NPU OID_VID :9 netdev flags :0x00001303 Current_HWaddr 00:09:0f:09:00:06 Permanent_HWaddr 08:5b:0e:81:44:8e Queue :On rx_buffer_len :2048 max_frame_size :1522 min_frame_size :278 << Output Omitted >> ========== NTurbo Info ========== nt_intf_num :2 nt_oid[4] :[0240][0242] nt_vid_xmit[4] :[0223][0224] nt_vid_fwd[0][6]:[0123][0125][0000][0000][0000][0000] nt_vid_fwd[1][6]:[0124][0126][0000][0000][0000][0000] ========== Link Status ========== Admin :up PHY Status :up PHY Speed :1000 Duplex :Full link_status :1 serdes_mode :0 rx_link_status :1 remote_fault :0 local_fault :0 local_warning :0 int_phy_link :0 int_phy_reinit_cnt:0 link_andone :0 ============ Counters =========== clst_tx_orig :36660184 clst_tx_o_free :0 clst_tx_redir :0 clst_tx_rd_free :0 clst_tx_reply :0 clst_tx_rp_free :0 dd_wo_eop :0 tcp_udp_csum_err:56126 rx_error :0 rx_crc_error :0 << Output Omitted>> sw_rx_pkts :66182955776 sw_rx_bytes :17941465728374 sw_tx_pkts :108937887060 sw_tx_bytes :124094844273412 sw_rx_mc_pkts :9083475 sw_rx_bc_pkts :2022 sw_np_rx_pkts :118516237358 sw_np_rx_bytes :135455325129844 sw_np_tx_pkts :73768829294 sw_np_tx_bytes :19529968832961 sw_np_rx_mc_pkts:9 sw_np_rx_bc_pkts:16912 FortiGate # |
Por último podemos visualizar el estado, su velocidad y el dúplex de todas las interfaces con:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
FortiGateCasaGuerrero # get system interface physical == [onboard] ==[aux] mode: static ip: 0.0.0.0 0.0.0.0 ipv6: ::/0 status: down speed: n/a ==[mgmt] mode: static ip: 0.0.0.0 0.0.0.0 ipv6: ::/0 status: down speed: n/a << Output omitted >> ==[port12] mode: static ip: 0.0.0.0 0.0.0.0 ipv6: ::/0 status: down speed: n/a ==[port13] mode: static ip: 10.1.50.1 255.255.255.128 ipv6: ::/0 status: up speed: 1000Mbps (Duplex: full) << Output omitted >> ==[port24] mode: static ip: 0.0.0.0 0.0.0.0 ipv6: ::/0 status: up speed: 1000Mbps (Duplex: full) FortiGate # |