Configuration Guide
Network Management and Monitor...
sFlow Configuration
8 min
sflow configuration sflow configuration introduction introduction sflow is a network monitoring technology that collects network packet samples and sends them to a remote collector encapsulated in udp packets sflow technology implements the following two sampling methods flow sampling this method samples data packets from interfaces with sflow enabled according to a specific sampling method and ratio it captures the first 128 bytes of the original packet, encapsulates it in an sflow packet, and sends it to the collector the current version only supports flow sampling counter sampling the sflow agent device periodically obtains traffic statistics from the interface and encapsulates them in an sflow packet to be sent to the collector the collector is only concerned with the number of packets on the interface and not the specific details of the packets sflow configuration sflow configuration configuring sflow agent and sflow collector information configuring sflow agent and sflow collector information true 178,239 9049773755656,244 0950226244344 left #4283c7 unhandled content type left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type configuring sflow sampling methods configuring sflow sampling methods the device supports two types of flow sampling interface based flow sampling enable flow sampling on an interface and set the sampling ratio packets in the specified sampling direction on this interface will be sampled according to the specified ratio true 276,225 1266968325792,160 8733031674208 left #4283c7 unhandled content type left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left unhandled content type display and maintenance display and maintenance true 307,190 69683257918552,164 30316742081448 left #4283c7 unhandled content type left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type configuration example configuration example network requirements network requirements the pc is connected to the network through switcha, and the network administrator needs to monitor the traffic information of the pc to ensure the security of the network procedure procedure configure switcha's ip address sonic(config)# interface ethernet 1 sonic(config if 1)# ip address 10 1 10 1/24 sonic(config)# interface ethernet 2 sonic(config if 2)# ip address 10 1 20 1/24 sonic(config)# interface ethernet 3 sonic(config if 3)# ip address 192 168 0 1/24 enable sflow functionality sonic(config)# sflow enable sonic(config)# sflow collector test 192 168 0 100 sonic(config)# sflow agent id ethernet 3 enable interface based sflow sonic(config)# interface ethernet 1 sonic(config if 1)# sflow sample rate 10000
