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
Last revision Both sides next revision
linux:networking [2009/03/19 12:49]
a bonding setup (debian) - HA
linux:networking [2014/08/21 10:27]
zagi [TCP Tunning (linux kernel)]
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 28: 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 110: Line 115:
 ^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=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. | ^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 ==== ==== Setup ====
Line 131: Line 137:
    options bonding mode=5 miimon=100 downdelay=200 updelay=200    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.txt · Last modified: 2014/09/24 16:29 by mrizvic
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready