Tuesday, August 26, 2014

Networking cheat sheet

The following are some useful rules of thumb:
  • Forwarding rate calculations for Ethernet
    • Packets per second (pps) = link speed in bps / ((size+20)*8)
    • Preamble + IFG is 20 bytes.
    • Gbps x 1.5 = Mpps @ 64 bytes (actual value is 1.488).
      • 1.5 Mpps @ 1 Gbps
      • 15 Mpps @ 10 Gbps
  • Latency
    • 5 usec per km (one way).
    • 10 usec per km (RTT).
    • Speed of light in medium = 2x10^8 m/sec, i.e. 0.67 x c.
    • 67.2 nsec @ 10G for 64 bytes (including preamble + IFG).
  • Data in flight
    • ~1300 bytes / 100 m @ 10 Gbps (RTT).
  • Recommended default sampling rate for sflow
    • 1 in (link speed in Gbps x 1000).
    • 10G, 1 in 10,000
    • 100G, 1 in 100,000
    • 400G, 1 in 400,000
    • Can use higher sampling rate if utilization is low.
    • Backoff in sampling is not recommended.  Instead keep track of discards and report them.