====== Linux networking ====== === Usefull links === * [[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.tldp.org/HOWTO/ADSL-Bandwidth-Management-HOWTO/index.html|ADSL Bandwidth Management HOWTO]] * [[http://ebtables.sourceforge.net/|etables project]] - ethernet firewalling * [[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/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:loadbalancing|Linux load balancing]] ===== /etc/host.conf ===== order hosts,bind multi on nospoof on spoofalert on spoof warn reorder on FIXME **Description of upper configuration!** ===== TCP Tunning (linux kernel) ===== {{page>linux:sysctl#2.6 net/ipv4 options}} ===== Linux as bridge ===== more at: [[http://linux-net.osdl.org/index.php/Bridge]], {{linux:yu-linux-tsm2004.pdf|Performance Evaluation of Linux bridge}} # brctl addbr "bridgename" # brctl addif bridgename device See MAC table # brctl showmacs ===== VLANs on bridge interfaces ===== Interface **must** be ''UP'' # ifconfig up # vconfig add [vlanid] configuration above should work with applying {{linux:bridge.diff|this (bridge.diff) patch}} to your linux kernel. Otherwise you need to do this like this # ifconfig ethX up # ifconfig ethY up # vconfig add ethX [vlanid] # vconfig add ethY [vlanid] # brctl addbr "bridgename" # brctl addif ethX.vlanID # brctl addif ethY.vlanID ==== VLAN's in Fedora ==== There are many ways to create VLAN's on Linux. By far the most cumbersome is by various rc.* scripts that later must be maintained. A "8201q" module must be loaded, ethernet interface must be brought up in order to create particular VLAN using "vconfig". Lastly, an "ifconfig" must be used to fill in IP address, possibly even "route" command to create some default route. RedHat Fedora (and possibly other RedHad distro) have automatic setup possible via scripts in /etc/sysconfig/network-scripts directory. Creating file in that directory with the name eg. "ifcfg-eth1.222" will eventually be file for the VLAN with the tag 222. Content of the file /etc/sysconfig/network-scripts/ifcfg-eth1.222 may be something like this: DEVICE=eth1.222 BOOTPROTO=static BROADCAST=1.2.3.255 HWADDR=00:11:22:33:44:55 IPADDR=1.2.3.4 NETMASK=255.255.255.0 NETWORK=1.2.3.0 ONBOOT=yes TYPE=Ethernet VLAN=yes 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 ==== plugin rp_pppoe.so nic-novoime pise nekje v /usr/share/doc/pppd/ na koncu enga fajla, mislim da README.Debian sicer pa uporabljam ifrename, ne nameif ifrename ce mas hotplug v kernelu avtomatsko dela ne da bi rabu kaj poganjat 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