It is particularly worth mentioning that there are many things worth learning about Linux bridge. Here we mainly introduce Linux bridge, including Linux bridge. Linux bridge traffic control and other Netemulator, tc)
Netem provides Network Emulation functionality for testing protocols by emulating the properties of wide area networks. The current version emulates variable delay, loss, duplication and re-ordering.
If you run a current 2.6 distribution, (Fedora, OpenSuse, Gentoo, Debian, Mandriva, Ubuntu), then netem is already enabled in the kernel and a current version of iproute2 is supported. the netem kernel component is enabled under:
Networking --> Networking Options --> QoS and/or fair queuing --> Network emulator
Port DELAY command
# Tc qdisc add dev eth0 root netem delay 100 ms indicates ms for port ting # tc qdisc del dev eth0 root netem delya ms indicates to delete the command for port Ting
# Tc qdisc change dev eth0 root netem delay 100 ms 10 ms indicates 100 ms + 10 ms latency range: 90 to 110) # tc qdisc change dev eth0 root netem delay 100 ms 10 ms 25% indicates the Ting Time Range is 100 ms ± 10 ms * 25%
Port packet loss command: # tc qdisc change dev eth0 root netem loss 0.1% packet loss rate is 0. 1% # tc qdisc change dev eth0 root netem loss 0.3% 25% packet loss rate range: 0. 3% 25%) [edit] [ed data packet Copy command # tc qdisc change dev eth0 root netem duplicate 1%
Packet copy rate 1% [edit] [edi packet distribution command # tc qdisc change dev eth0 root netem gap 5 delay 10 ms packet resend packets of an integer multiple of each lattice 5 will not be delayed. Others will delay 10 ms
[Edit] Speed Control Command: Two commands are completed together
- # Tc qdisc add dev eth0 root handle 1:0 netem delay 100 ms
- # Tc qdisc add dev eth0 parent handle 10: tbf rate 256 kbit buffer 1600 limit 3000
- # Tc-s qdisc ls dev eth0 ---- view the rule information.
- # Tc qdisc show
For more help # tc help, the tc qdisc help and above are the rule for setting up the speed control command. Linux bridge red part indicates the limit on the number of packages. You can remove the clearing rule command: tc qdisc del dev eth0 root
After that, try the basic commands of Linux bridge: (this shows the HUB of the host with two ports)
- Brctl addbr mybridge creates the bridge mybridge, and then you can use ifconfig to check that there is an additional mybridge port)
- Brctl addif mybridge eth0
- Brctl addif mybridge eth1 includes eth0 and eth1 into mybridge)
Then perform the following actions on each port:
- Ifconfig eth0 0.0.0.0 promisc
- Ifconfig eth1 0.0.0.0 promisc enable the hybrid mode)
- Ifconfig mybridge up (start the bridge)
- Edit the configuration file for Linux NTP installation and configuration service
- Linux Kernel super privilege user root
- Chatting about a Linux stock Software
- Linux File System organization structure description analysis structure
- Reasons for choosing the path to Linux Authentication