lhoffmeyer
  
 
  
 
 
Group: Members 
Posts: 4 
Joined: Feb. 2006 | 
  | 
Posted: Feb. 09 2006,18:09 | 
   | 
 
 
  
So, I am attempting to bridge the network which I assume will allow me to  obtain internet access.
  I setup the network parameters in /opt/bootlocal.sh that I originally thought would work and didn't (IP address, Gateway ...)
  then, I created the bridge script I found the QEMU forums but have now realized that there is no ifrename in the DSL packages so this script will not work.  Any suggestions/modifications to this that I can try?
  Lance
 
 
  #!/bin/sh
  ############################################################################### # # Setup a network bridge instead of the main network interface. # This bridge can then be used to connect further (virtual) interfaces to the LAN, eg. Qemu's tap devices. # Starting the bridge leads to ca. 5 seconds of "network unreachable".
  # Network interface that shall be replaced by a bridge. HOSTIF=eth0
  # ###############################################################################
 
  # Names used during bridge construction. BRIF=br0 NEWHOSTIF=$BRIF$HOSTIF
  # Check for root permissions if [ `id -u` -gt 0 ]; then     echo "Need root permissions to run."     exit 1 fi
  # Check for necessary tools IFCONFIG=`which ifconfig` IFRENAME=`which ifrename` BRCTL=`which brctl` IFUP=`which ifup` IFDOWN=`which ifdown`
  if [ -z $IFCONFIG ]; then     echo "ifconfig not found (make sure this machine has networking, and ifconfig is in the path)"     exit 127 fi
  if [ -z $IFRENAME ]; then     echo "ifrename not found (is package ifrename installed?)"     exit 127 fi
  if [ -z $BRCTL ]; then     echo "brctl not found (is package bridge-utils installed?)"     exit 127 fi
  if [ -z $IFUP -o -z $IFDOWN ]; then      echo "ifup/ifdown not found (is this not a Debian distro?)"     exit 127 fi
 
  # Main functionality case "$1" in     start)         echo "Creating bridge $BRIF with $HOSTIF"
          # Deactivate current network setup         $IFDOWN $HOSTIF         $IFCONFIG $HOSTIF 0.0.0.0 down
          # Rename host interface         $IFRENAME -i $HOSTIF -n $NEWHOSTIF
          # Create bridge         $BRCTL addbr $HOSTIF         $BRCTL stp $HOSTIF off         $BRCTL setfd $HOSTIF 1         $BRCTL addif $HOSTIF $NEWHOSTIF         $BRCTL show
          # Activate bridge interfaces         $IFCONFIG $HOSTIF up         $IFCONFIG $NEWHOSTIF up
          # Configure new bridge to match old config         echo "Configuring bridge $BRIF"         $IFUP $HOSTIF         ;;
      stop)         echo "Removing bridge $BRIF which contains $NEWHOSTIF"
          # Deactivate interfaces         $IFDOWN $HOSTIF         $IFCONFIG $NEWHOSTIF down         $IFCONFIG $HOSTIF down
          # Remove bridge         $BRCTL delif $HOSTIF $NEWHOSTIF         $BRCTL delbr $HOSTIF
          # Rename bridged interface to old name         $IFRENAME -i $NEWHOSTIF -n $HOSTIF
          # Activate old network setup         $IFCONFIG $HOSTIF up
          # Reconfigure network to match original network setup         $IFUP $HOSTIF         ;;
      status)         $BRCTL show         ;;
      *)         echo "Usage: $0 [start|stop|status]"         ;; esac
  exit 0 
 |