From: Victor Wagner Date: Sun, 26 Feb 2006 18:00:12 +0000 (+0000) Subject: Configuration of bridge via /etc/network/interfaces described. X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=eaf81bf118179bebeeced5e6d8d2e8c0545c7c0b;p=sites%2Fhome_page.git Configuration of bridge via /etc/network/interfaces described. --- diff --git a/hints/bluenet.html b/hints/bluenet.html index 4963f9b..9675fca 100644 --- a/hints/bluenet.html +++ b/hints/bluenet.html @@ -4,6 +4,11 @@ + +á×ÔÏÒ ×ÙÒÁÖÁÅÔ ÂÌÁÇÏÄÁÒÎÏÓÔØ áÎÄÒÅÀ +÷ÁÓÉÌØÅ×Õ ÚÁ ÐÏÄÓËÁÚËÕ ÎÁÓÞÅÔ ËÏÎÆÉÇÕÒÉÒÏ×ÁÎÉÑ bridge ÞÅÒÅÚ ÆÁÊÌ +interfaces. +

óÏÅÄÉÎÅÎÉÅ ËÏÍÐØÀÔÅÒÏ× × ÓÅÔØ ÞÅÒÅÚ bluetooth

ëÏÇÄÁ Õ ÍÅÎÑ ÚÁ×ÅÌÁÓØ × ÄÏÍÅ ÐÁÒÏÞËÁ Bluetooth ÁÄÁÐÔÅÒÏ×, ÍÎÅ ÚÁÈÏÔÅÌÏÓØ @@ -86,58 +91,58 @@ ethernet
  • îÅ ×ËÌÀÞÁÅÍ ÎÉ ÏÄÎÏÇÏ ÆÉÚÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ × ÜÔÏÔ ÂÒÉÄÖ
  • îÁÐÕÓËÁÅÍ ÎÁ ÜÔÏÔ ÂÒÉÄÖ dhcpd. -

    -çÏÔÏ×ÏÇÏ ÓËÒÉÐÔÁ ËÕÄÁ ÍÏÖÎÏ ×ÐÉÓÁÔØ ËÏÍÁÎÄÙ ÓÏÚÄÁÎÉÑ ÂÒÉÄÖÁ Ñ ÎÅ ÎÁÛÅÌ. -ðÏÜÔÏÍÕ × /etc/init.d ÂÙÌ ÄÏÂÁ×ÌÅÎ ÓËÒÉÐÔ ÓÌÅÄÕÀÝÅÇÏ ÓÏÄÅÒÖÁÎÉÑ: - +îÁÓÔÏÒÊËÉ bridge, ÒÅËÏÍÅÎÄÏ×ÁÎÎÙÅ × HOWTO-PAN ÓÌÅÄÕÀÝÉÅ:

    -#!/bin/sh
    -#
    -# This script configures bridge interface for Bluetooth Personal Area
    -# network. This interface should be up before dhcpd started
    -#
    -#
    -IFACE=pan0
    -ADDRESS=10.0.0.1
    -NETMASK=255.255.255.0
    -BROADCAST=10.0.0.255
    -
    -case "$1" in
    -start)
    -	# Creating bridge interface $IFACE
    -	brctl addbr $IFACE
    -	# Setting options according to HOWTO-PAN
    -	brctl setfd $IFACE 0
    -	brctl stp $IFACE off
    -	# Configuring interface
    -	ifconfig $IFACE $ADDRESS netmask $NETMASK broadcast $BROADCAST
    -	;;
    -stop) ifconfig pan0 down
    -	;;
    -*) 
    -	echo "Usage $0 start|stop" >&2 
    -;;	
    -esac
    +brctl setfd pan0 0
    +
    +õÓÔÁÎÏ×ÉÔØ forward delay - ÚÁÄÅÒÖËÕ × ÐÅÒÅÓÙÌËÅ ÐÁËÅÔÁ × 0 +
    +brctl stp pan0 off
     
    +úÁÐÒÅÔÉÔØ ÉÓÐÏÌØÚÏ×ÁÎÉÅ Spanning tree protocol. +

    +üÔÉ ×ÏÚÍÏÖÎÏÓÔÉ ËÏÄÁ bridging × ÌÉÎÕËÓÏ×ÏÍ ÑÄÒÅ ÐÒÅÄÎÁÚÎÁÞÅÎÙ ÄÌÑ +ÓÉÔÕÁÃÉÊ, ËÏÇÄÁ ÓÅÔÉ ÏÂßÅÄÉÎÑÀÔÓÑ ÂÏÌÅÅ ÞÅÍ ÏÄÎÉÍ bridge É ÎÕÖÎÏ +ÐÒÉÎÉÍÁÔØ ÍÅÒÙ ÄÌÑ ÔÏÇÏ ÞÔÏÂÙ ÐÁËÅÔÙ ÎÅ ÂÅÇÁÌÉ ÐÏ ËÒÕÇÕ. ÷ ÄÁÎÎÏÊ +ÐÒÏÓÔÏÊ ÓÉÔÕÁÃÉÉ - ÔÏÐÏÌÏÇÉÑ "Ú×ÅÚÄÁ", ÎÁÍ ÜÔÏ ÎÅ ÎÕÖÎÏ, Á ÚÁÄÅÒÖËÉ ÏÎÏ +ÄÏÂÁ×ÌÑÅÔ. -îÁ ÜÔÏÔ ÓËÒÉÐÔ ÓÏÚÄÁÎ ÓÉÍÌÉÎË × /etc/rc2.d Ó ÎÏÍÅÒÏÍ, ÍÅÎØÛÉÍ ÞÅÍ Õ -dhcpd (ÔÏÔ S20, Á ÜÔÏÔ S15)

    -÷ ÐÒÉÎÃÉÐÅ, ÍÏÖÎÏ ÂÙÌÏ ÂÙ ÎÅ ×ËÌÀÞÁÔØ × ÜÔÏÔ ÓËÒÉÐÔ ËÏÍÁÎÄÕ ifconfig, Á -ÞÅÓÔÎÏ ÏÐÉÓÁÔØ ÅÇÏ × /etc/network/interfaces ËÁË +óÅÔÅ×ÙÅ ÉÎÔÅÒÆÅÊÓÙ × debian ÏÐÉÓÙ×ÁÀÔÓÑ × ÆÁÊÌÅ +/etc/network/interfaces, +ÄÏËÕÍÅÎÔÉÒÏ×ÁÎÎÏÍ × man-ÓÔÒÁÎÉÃÅ interfaces(5). îÁ ÐÅÒ×ÙÊ ×ÚÇÌÑÄ, +ÎÉÞÅÇÏ ËÁÓÁÀÝÅÇÏÓÑ ÂÒÉÄÖÅÊ ÔÁÍ ÎÅ ÏÂÎÁÒÕÖÉ×ÁÅÔÓÑ. îÏ, ÏËÁÚÙ×ÁÅÔÓÑ, +ÓÉÎÔÁËÓÉÓ ÜÔÏÇÏ ÆÁÊÌÁ ÒÁÓÛÉÒÑÅÍ Ó ÐÏÍÏÝØÀ ÓËÒÉÐÔÏ×, ÐÏÍÅÝÁÅÍÙÈ × +/etc/network/if*.d. +

    +ðÁËÅÔ bridge-utils ÐÒÉÎÏÓÉÔ Ó ÓÏÂÏÊ É ÕÓÔÁÎÁ×ÌÉ×ÁÅÔ × +/etc/network/if-pre-up.d ÓËÒÉÐÔ bridge, ËÏÔÏÒÙÊ ÏÂÒÁÂÁÔÙ×ÁÅÔ ËÏÍÁÎÄÙ +ËÏÎÆÉÇÕÒÉÒÏ×ÁÎÉÑ bridge. äÏÐÏÌÎÉÔÅÌØÎÙÅ ÄÉÒÅËÔÉ×Ù ËÏÎÆÉÇÕÒÁÃÉÉ +ÉÎÔÅÒÆÅÊÓÁ, ÏÂÒÁÂÁÔÙ×ÁÅÍÙÅ ÜÔÉÍ ÓËÒÉÐÔÏÍ, ÏÐÉÓÁÎÙ × +/usr/share/doc/bridge-utils/README.Debian.gz. +

    +ðÏÜÔÏÍÕ ÄÏÂÁ×ÌÑÅÍ × /etc/network/interfaces ÆÒÁÇÍÅÎÔ ÓÌÅÄÕÀÝÅÇÏ +ÓÏÄÅÒÖÁÎÉÑ:

     auto pan0
     iface pan0 inet static
    +	bridge_ports none
    +	bridge_fd 0
    +	bridge_stp off
     	address 10.0.0.1
    -	network 10.0.0.0
     	netmask 255.255.255.0
    -	broadcast 10.0.0.255
    +	brodcast 10.0.0.255
     
    - -îÏ ÔÏÇÄÁ ÓÌÅÄÕÅÔ ÐÏÚÁÂÏÔÉÔØÓÑ, ÞÔÏÂÙ ÓËÒÉÐÔ, ×ÙÐÏÌÎÑÀÝÉÊ brctl -addbr. ×ÙÐÏÌÎÑÌÓÑ ÄÏ /etc/init.d/networking, Ô.Å. × /etc/rcS.d. -ðÏÞÅÍÕ-ÔÏ ÍÎÅ ÜÔÁ ÉÄÅÑ ÎÅ ÐÏÎÒÁ×ÉÌÁÓØ. +îÁÉÂÏÌÅÅ ×ÁÖÎÏÊ × ÜÔÏÊ ËÏÎÓÔÒÕËÃÉÉ Ñ×ÌÑÅÔÓÑ ÄÉÒÅËÔÉ×Á bridge_ports none. +óËÒÉÐÔ bridge ×ÓÔÕÐÁÅÔ × ÒÁÂÏÔÕ ÉÍÅÎÎÏ ÐÒÉ ÎÁÌÉÞÉÉ ÄÉÒÅËÔÉ×Ù +bridge_ports Ó ÎÅÐÕÓÔÙÍ ÓÐÉÓËÏÍ ÉÎÔÅÒÆÅÊÓÏ×. ðÏÓËÏÌØËÕ ÎÁ ÓÁÍÏÍ ÄÅÌÅ ÍÙ +ÎÅ ÈÏÔÉÍ ÄÏÂÁ×ÌÑÔØ ËÁËÉÅ-ÌÉÂÏ ÉÎÔÅÒÆÅÊÓÙ × ÓÐÉÓÏË ÓÒÁÚÕ (ÔÏÌØËÏ ÐÏ ÍÅÒÅ +ÐÏÄËÌÀÞÅÎÉÑ bluetooth-ËÌÉÅÎÔÏ×) ÔÏ ÉÓÐÏÌØÚÕÅÍ ÚÁÒÅÚÅÒ×ÉÒÏ×ÁÎÎÏÅ ÓÌÏ×Ï +none. +

    +ä×Å ÄÒÕÇÉÅ ÓÔÒÏËÉ, ÎÁÞÉÎÁÀÝÉÅÓÑ Ó bridge ÓÏÏÔ×ÅÔÓÔ×ÕÀÔ ×ÙÛÅÐÒÉ×ÅÄÅÎÎÙÍ +ËÏÍÁÎÄÁÍ ËÏÎÆÉÇÕÒÁÃÉÉ.

    ôÅÐÅÒØ ËÏÇÄÁ Õ ÎÁÓ ÅÓÔØ ÉÎÔÅÒÆÅÊÓ, ÍÙ ÍÏÖÅÍ ÐÒÏÐÉÓÁÔØ × /etc/dhcpd.conf ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÕÀ subnet É ÄÏÂÁ×ÉÔØ ÉÍÑ ÜÔÏÇÏ ÉÎÔÅÒÆÅÊÓÁ × ÓÔÒÏÞËÕ @@ -174,9 +179,8 @@ ifconfig $1 0.0.0.0 ðÅÒ×ÁÑ ËÏÍÁÎÄÁ × ÜÔÏÍ ÓËÒÉÐÔÅ ÄÏÂÁ×ÌÑÅ ÉÎÔÅÒÆÅÊÓ $1 (Ô.Å. ÔÏÔ, ËÏÔÏÒÙÊ pand ÐÅÒÅÄÁÌ × ËÁÞÅÓÔ×Å ÐÁÒÁÍÅÔÒÁ ÓËÒÉÐÔÕ) × ÂÒÉÄÖ pan0. ÷ÔÏÒÁÑ ËÏÍÁÎÄÁ - ÐÏÄÎÉÍÁÅÔ ÉÎÔÅÒÆÅÊÓ. õÓÔÁÎÁ×ÌÉ×ÁÔØ ÏÓÍÙÓÌÅÎÎÙÊ IP ÔÁÍ -ÎÅ ÎÁÄÏ, Ï ÜÔÏÍ ÐÏÚÁÂÏÔÉÔÓÑ ÕÒÏ×ÅÎØ ÂÒÉÄÖÁ. - - +ÎÅ ÎÁÄÏ, Ï ÜÔÏÍ ÐÏÚÁÂÏÔÉÔÓÑ ÕÒÏ×ÅÎØ ÂÒÉÄÖÁ. ÷ÅÒÏÑÔÎÏ, ÂÙÌÏ ÂÙ +ÄÏÓÔÁÔÏÞÎÏ ÐÒÏÐÉÓÁÔØ ÔÕÄÁ up ×ÍÅÓÔÏ ÎÕÌÅ×ÏÇÏ ÁÄÒÅÓÁ.

    äÁ, ÅÝÅ. òÅËÏÍÅÎÄÕÀ ÚÁÍÅÎÉÔØ ÎÁ ÜÔÏÍ ËÏÍÐØÀÔÅÒÅ ÓÔÁÎÄÁÒÔÎÙÊ ÓËÒÉÐÔ bluez-pin ÎÁ ÞÔÏ-ÎÉÂÕÄØ ÍÅÎÅÅ ÉÎÔÅÒÁËÔÉ×ÎÏÅ. éÎÁÞÅ ×Ï ×ÓÑËÏÍ ÓÌÕÞÁÅ ÐÒÉ