Linux bridge basic commands can be tried first

Source: Internet
Author: User

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

 
 
  1. # Tc qdisc add dev eth0 root handle 1:0 netem delay 100 ms
  2. # Tc qdisc add dev eth0 parent handle 10: tbf rate 256 kbit buffer 1600 limit 3000
  3. # Tc-s qdisc ls dev eth0 ---- view the rule information.
  4. # 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)

 
 
  1. Brctl addbr mybridge creates the bridge mybridge, and then you can use ifconfig to check that there is an additional mybridge port)
  2. Brctl addif mybridge eth0
  3. Brctl addif mybridge eth1 includes eth0 and eth1 into mybridge)

Then perform the following actions on each port:

 
 
  1. Ifconfig eth0 0.0.0.0 promisc
  2. Ifconfig eth1 0.0.0.0 promisc enable the hybrid mode)
  3. Ifconfig mybridge up (start the bridge)
  1. Edit the configuration file for Linux NTP installation and configuration service
  2. Linux Kernel super privilege user root
  3. Chatting about a Linux stock Software
  4. Linux File System organization structure description analysis structure
  5. Reasons for choosing the path to Linux Authentication

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.