Skip to content

Instantly share code, notes, and snippets.

@hiroyuki-sato
Created May 13, 2014 13:02
Show Gist options
  • Save hiroyuki-sato/d9af8a829ffbb271a03d to your computer and use it in GitHub Desktop.
Save hiroyuki-sato/d9af8a829ffbb271a03d to your computer and use it in GitHub Desktop.
set traffic-policy shaper ICMP-OUTGOING default bandwidth 500Mbps

Before

vyos@vyos# set traffic-policy shaper ICMP-OUTGOING default bandwidth 500Mbps
Possible completions:
   <number>     Bandwidth in Kbps
   <number>%    Percentage of overall rate (default 100%)
   <number><suffix>
                Value with scaling suffix (kbit, kbps, ...)

After

vyos@vyos# set traffic-policy shaper ICMP-OUTGOING default bandwidth 500Mbps
Possible completions:
   <number>     Bandwidth in Kbps
   <number>%    Percentage of overall rate (default 100%)
   <number><suffix>
                Available suffixes
                bit
                bit(1), kbit(10^3), mbit(10^6), gbit, tbit
                kibit(1024), mibit(1024^3), gibit(1024^4), tbit(1024^5)
                
                byte
                kibps(1024*8), mibps(1024^2*8), gibps, tibps
                bps(8),kbps(8*10^3),mbps(8*10^6), gbps, tbps
@hiroyuki-sato
Copy link
Author

ibit, ibpsのところにX (kmgtがはいるという意味) の文字を追加した場合はバランスがわるくなってしまうため上のフォーマットに落ち着いています。

   <number>     Bandwidth in Kbps(10^3 bits per second)
   <number>%    Percentage of overall rate (default 100%)
   <number>bit  bit(1), kbit(10^3), mbit(10^6), gbit, tbit
   <number>Xibit
                kibit(1024), mibit(1024^3), gibit(1024^4), tbit(1024^5)
   <number>Xibps
                kibps(1024*8), mibps(1024^2*8), gibps, tibps *Byte/sec*
   <number>bps  bps(8),kbps(8*10^3),mbps(8*10^6), gbps, tbps *Byte/sec*

@ebiken
Copy link

ebiken commented May 16, 2014

すっきりしてよいですね。
1個Typo発見しました。

kibit(1024), mibit(1024^3), gibit(1024^4), tbit(1024^5)
 => kibit(1024), mibit(1024^2), gibit(1024^3), tbit(1024^4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment