home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / LINUX / HOWTO / mini / bridge.txt < prev    next >
Text File  |  1997-07-07  |  4KB  |  123 lines

  1.  
  2. Bridging mini-HOWTO, v1.03 by Chris Cole                    Aug. 23, 1996
  3. Any suggestions/corrections welcome at:          chris@polymer.uakron.edu 
  4. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  5.  
  6. 1)  Get 'Bridge Config':
  7.  
  8.     shadow.cabi.net/pub/Linux/BRCFG.tgz
  9.  
  10. 2)  Obtain and read the 'Multiple ethernet' HOWTO:
  11.  
  12.     sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini/Multiple-Ethernet
  13.  
  14. 3)  Enable multiple ethernet devices on your box by adding this to your 
  15.     /etc/lilo.conf, and re-run lilo:
  16.  
  17.     append = "ether=0,0,eth1"
  18.  
  19.     If you have three interfaces on your bridge, use this line instead:
  20.  
  21.     append = "ether=0,0,eth1 ether=0,0,eth2"
  22.  
  23.     More interfaces can be found by adding more ether statements.  By
  24.     default a stock Linux kernel probes for a single ethercard, and once
  25.     one is found the probe ceases.  This tells the kernel to keep probing
  26.     for more ethernet devices after the first one is found.
  27.  
  28.     Alternatively, the boot parameter can be used instead:
  29.  
  30.     linux ether=0,0,eth1
  31.  
  32.     Or, with 3 interfaces, use:
  33.  
  34.     linux ether=0,0,eth1 ether=0,0,eth2
  35.  
  36. 4)  Recompile the kernel with BRIDGING enabled.
  37.  
  38. 5)  A bridge should not have an IP address.  It CAN, but a plain bridge 
  39.     doesn't need one.  To remove the IP address from your bridge, go to
  40.     /etc/sysconfig/network-scripts/ (for a RedHat system) and copy
  41.     ifcfg-lo0 to ifcfg-eth0 & ifcfg-eth1.  In these 2 eth files, change 
  42.     the line containing 'DEVICE=lo' to 'DEVICE=eth0' and 'DEVICE=eth1'.  
  43.     Other distributions may deviate from this, do what you need to do!
  44.     If there are more than 2 interfaces to this bridge, be sure to make
  45.     the corresponding configurations to those, as well.
  46.  
  47. 6)  Reboot, so you are running the new kernel with bridging in it, and
  48.     also so the network interfaces are not bound to an IP.
  49.  
  50. 7)  Once the system is back up, put the ethernet cards into promiscuous
  51.     mode, so they will look at every packet that passes by the interface:
  52.  
  53.     ifconfig promisc eth0 ; ifconfig promisc eth1
  54.  
  55.     All interfaces which are connected to network segments to be bridged
  56.     are to be put into promiscuous mode.
  57.  
  58. 8)  Turn bridging ON using the brcfg program:
  59.  
  60.     brcfg -ena
  61.  
  62. 9)  Verify that there is different traffic on each interface:
  63.  
  64.     tcpdump -i eth0    (in one window)
  65.     tcpdump -i eth1    (in another window)
  66.  
  67. 10) Run a sniffer or tcpdump on another machine to verify the bridge is 
  68.     separating the segment correctly.
  69.  
  70.  
  71. Common problems:
  72.  
  73. Q1) I get the message "ioctl(SIOCGIFBR) failed: Package not installed". 
  74.     What does this mean?
  75.  
  76. A1) You don't have bridging capability in your kernel.  Get a 2.0 or
  77.     greater kernel, and recompile with the BRIDGING option enabled.
  78.  
  79. Q2) Machines on one side cannot ping the other side!
  80.  
  81. A2) - Did you enable bridging using 'brcfg -ena'?
  82.       (brcfg should say 'bridging is ENABLED')
  83.     - Did you put the interfaces into promiscuous mode?
  84.       (issue the 'ifconfig' command.  The 'PROMISC' flag should be on
  85.       for both interfaces.)
  86.     - If using multiple-media interface adapters, make sure that the
  87.       correct one is enabled.  You may need to use the config/setup
  88.       program that came with the network interface card.
  89.  
  90. Q3) I cannot telnet/ftp from the bridge!  Why?
  91.  
  92. A3) This is because there is no IP address bound to any of bridge
  93.     interfaces.  A bridge is to be a transparent part of a network.
  94.  
  95. Q4) What do I need to set up in the way of routing?
  96.  
  97. A4) Nothing!  All routing intelligence is handled by the bridging code
  98.     in the kernel.  To see the ethernet addresses as they are found out
  99.     by the bridge, use the brcfg program in debug mode:
  100.  
  101.     brcfg -deb
  102.  
  103. Q5) The bridge appears to work, but why doesn't 'traceroute' show the
  104.     bridge as a part of the path?
  105.  
  106. A5) Due to the nature of a bridge, a traceroute should NOT show the
  107.     bridge as a part of the path.  A bridge is to be a transparent
  108.     component of the network.
  109.  
  110. Q6) Is it necessary to compile IP_FORWARD into the kernel?
  111.  
  112. A6) No.  The bridging code in the kernel takes care of the packet
  113.     transport.  IP_FORWARD is for a gateway which has IP addresses bound
  114.     to its interfaces.
  115.  
  116. Q7) Why are the physical ethernet addresses for port 1 and port 2 the
  117.     same according to the 'brcfg' program?  Shouldn't they be different?
  118.  
  119. A7) No.  Every port on a bridge intentionally is assigned the same
  120.     physical ethernet address by the bridging code.
  121.  
  122.  
  123.