Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:networking [2006/06/26 19:01]
a +add performance .pdf
linux:networking [2014/09/24 16:29] (current)
mrizvic [Ethernet Bonding Types]
Line 1: Line 1:
 ====== Linux networking ====== ====== Linux networking ======
 +===== Usefull links =====
  
-=== Usefull links === 
   * [[http://linux-net.osdl.org/index.php/Main_Page|LinuxNet]] - a good place where to begin   * [[http://linux-net.osdl.org/index.php/Main_Page|LinuxNet]] - a good place where to begin
   * [[http://www.lartc.org/|Linux Advanced Routing & Traffic Control]]   * [[http://www.lartc.org/|Linux Advanced Routing & Traffic Control]]
Line 7: Line 7:
   * [[http://ebtables.sourceforge.net/|etables project]] - ethernet firewalling   * [[http://ebtables.sourceforge.net/|etables project]] - ethernet firewalling
   * [[http://www.mastershaper.org/]]   * [[http://www.mastershaper.org/]]
 +  * [[http://exef.xko.cz/others/others.htm|ttshaper - Tom's traffic shaper]]
   * **[[http://linux-ip.net/|The Guide to IP Layer Network Administration with Linux]]**   * **[[http://linux-ip.net/|The Guide to IP Layer Network Administration with Linux]]**
 +  * [[http://linux-ip.net/articles/hfsc.en/|HFSC Scheduling with Linux]] 
 +  * [[http://www.bieringer.de/linux/IPv6/IPv6-HOWTO/|IPv6 Linux howto]] 
 +  * [[http://people.debian.org/~csmall/ipv6/index.html|Debian IPv6]] 
 +  * [[http://blog.taragana.com/index.php/archive/how-to-load-balancing-failover-with-dual-multi-wan-adsl-cable-connections-on-linux/]] 
 +  * [[http://mailman.ds9a.nl/pipermail/lartc/2007q1/020170.html|script for link above]]
   * [[:linux:networking:nano|Howto to use more than one independent Internet connection]]   * [[:linux:networking:nano|Howto to use more than one independent Internet connection]]
 +  * [[:linux:networking:loadbalancing|Linux load balancing]]
  
- +===== /etc/host.conf =====
-===== /etc/hosts.conf =====+
   order hosts,bind   order hosts,bind
   multi on   multi on
Line 23: Line 28:
  
 ===== TCP Tunning (linux kernel) ===== ===== TCP Tunning (linux kernel) =====
 +Change initial tcp window:
 +
 +  ip route | while read p; do ip route change $p initcwnd 20 initrwnd 20; done 
 +
 +
 {{page>linux:sysctl#2.6 net/ipv4 options}} {{page>linux:sysctl#2.6 net/ipv4 options}}
  
Line 73: Line 83:
  
 This file will do it all regarding VLAN creation during boot process. No rc.* scripts necessary, and the VLAN setting is completely in line with the Fedora specifications. This file will do it all regarding VLAN creation during boot process. No rc.* scripts necessary, and the VLAN setting is completely in line with the Fedora specifications.
 +
  
 ==== nameif/ifrename ==== ==== nameif/ifrename ====
 +<zekozeko>
   plugin rp_pppoe.so nic-novoime   plugin rp_pppoe.so nic-novoime
   pise nekje v /usr/share/doc/pppd/   pise nekje v /usr/share/doc/pppd/
Line 81: Line 93:
   ifrename ce mas hotplug v kernelu avtomatsko dela ne da bi rabu kaj poganjat   ifrename ce mas hotplug v kernelu avtomatsko dela ne da bi rabu kaj poganjat
   samo v /etc/iftab vpises kar hoces   samo v /etc/iftab vpises kar hoces
 +
 +
 +===== Working with VLANs (Debian) =====
 +''/etc/network/interfaces''
 +  auto vlan667
 +  iface vlan667 inet static
 +    address 10.10.40.4
 +    netmask 255.255.255.0
 +    vlan_raw_device eth1
 +
 +===== Ethernet bonding =====
 +Ethernet bonding refers to aggregating multiple ethernet channels together to form a single channel. This is primarily used for redundancy in ethernet paths or for load balancing. This page refers in particular to performing ethernet bonding under Linux, and so does not limit itself to discussion of 802.3ad Trunk Aggregation. 
 +
 +==== Ethernet Bonding Types ====
 +
 +^mode=0 (balance-rr)|Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance. |
 +^mode=1 (active-backup)|One slave interface is active at any time. If one interface fails, another interface takes over the MAC address and becomes the active interface. Provides fault tolerance only. Doesn’t require special switch support|
 +^mode=2 (balance-xor)|Tranmissions are balanced across the slave interfaces based on ((source MAC) XOR (dest MAC)) modula slave count. The same slave is selected for each destination MAC. Provides load balancing and fault tolerance. Slave selection for outgoing traffic is done according to the transmit hash policy, which may be changed from the default simple XOR policy via the xmit_hash_policy option. |
 +^mode=3 (broadcast)|Transmits everything on all slave interfaces. Provides fault tolerance. |
 +^mode=4 (802.3ad)|This is classic IEEE 802.3ad Dynamic link aggregation. This requires 802.3ad support in the switch and driver support for retrieving the speed and duplex of each slave. |
 +^mode=5 (balance-tlb)|Adaptive Transmit Load Balancing. Incoming traffic is received on the active slave only, outgoing traffic is distributed according to the current load on each slave. Doesn’t require special switch support |
 +^mode=6 (balance-alb)|Adaptive Load Balancing - provides both transmit load balancing (TLB) and receive load balancing for IPv4 via ARP negotiation. Doesn’t require special switch support, but does require the ability to    change the MAC address of a device while it is open. |
 +
 +
 +==== Setup ====
 +To use Bonding Ethernet for High-Availability (fail-over) on Debian Lenny you need to:
 +   apt-get install ifenslave-2.6
 +
 +Edit /etc/network/interfaces to look like this:
 +<code>
 +iface bond0 inet static
 + address 10.0.1.5
 + netmask 255.255.255.0
 + network 10.0.1.0
 + gateway 10.0.1.254
 + up /sbin/ifenslave bond0 eth0 eth1
 +  down /sbin/ifenslave -d bond0 eth0 eth1
 +</code>
 +
 +Add the following lines to your /etc/modprobe.d/arch/i386:
 +
 +   alias bond0 bonding
 +   options bonding mode=5 miimon=100 downdelay=200 updelay=200
 +
 +
 +==== Joining interfaces for bandwidth ====
 +
 +The following section describes how to bond two or more interfaces to provide shared bandwidth and reliablity. We have two options for this, using the //mode 0// (balanced-rr) or //mode 4// (802.3ad or LACP). If the server is connected to a Cisco switch, I recommend using balanced-rr as described below. 
 +
 +First we have to configure the module in /etc/modprobe.d/aliases
 +
 +<code>
 +alias bond0 bonding
 +alias eth0 tg3
 +alias eth1 e1000
 +options bonding mode=0 miimon=100
 +</code>
 +
 +Then, we configure the bonding interface:
 +
 +<code>
 +auto bond0
 +iface bond0 inet static
 +        address 192.168.0.1
 +        netmask 255.255.255.252
 +        hwaddress ether 00:19:BB:C5:0B:35
 +        up ifenslave bond0 eth0 eth1
 +        down ifenslave -d bond0 eth0 eth1
 +</code>
 +
 +
 +On the Cisco side, we also have to configure the appropriate physical interfaces and the PortChannel interface:
 +
 +<code>
 +interface Port-Channel 1
 + switchport
 + switchport mode access
 + spanning-tree portfast
 +!
 +
 +interface FastEthernet 0/4
 +  !you might need this options
 +  !no switchport
 +  !no ip address
 +  channel-group 1 mode on
 +!
 +
 +interface FastEthernet 0/5
 +  !you might need this options
 +  !no switchport
 +  !no ip address
 +  channel-group 1 mode on
 +  !channel-group 1 mode active
 +!
 +</code>
 +
 +
 +  
 +  
 +
linux/networking.1151341291.txt.gz · Last modified: 2009/05/25 00:34 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready