<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; ethernet bridge]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=13373</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=13373&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «ethernet bridge».]]></description>
		<lastBuildDate>Fri, 07 Oct 2011 17:43:54 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=218003#p218003</link>
			<description><![CDATA[<p>ы. Личное мнение - считаю целесообразным применение мостов в крайнем случае, обычно достаточно настроить форвард и роутинг.</p>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Fri, 07 Oct 2011 17:43:54 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=218003#p218003</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=218002#p218002</link>
			<description><![CDATA[<div class="quotebox"><cite>odinokiyklaus пишет:</cite><blockquote><p>Если устройства не объединять в мост и прописать им статические адреса, то с нетбука я присоединяюсь к wlan0, но шлюз и сосодняя eth0 карта не пингуются. Чтобы эти интерфейсы видели друг друга объединил их мостом.</p></blockquote></div><p>Ну тут два варианта - и на самом деле все просто -&nbsp; вариант 1- мост (ip адреса будут в одной подсети).<br />Вариант два - через iptables разрешить форвардинг между сетями.</p>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Fri, 07 Oct 2011 17:34:40 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=218002#p218002</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=217987#p217987</link>
			<description><![CDATA[<p>Товарищи, втолкуйте мне дураку, что да как. Читаю, читаю, но все равно понять не могу. <br />Итак, по порядку. Есть стационарный комп, на котором установлены 2 сетевые карты (точнее на матери 2 сет. интерфейса eth0 и&nbsp; eth1.):<br />eth0 - доступ к инету с нее. Она же является шлюзом. (eth1 - не используется)<br />wlan0 - работает в ражиме точки доступа. К ней должен подключаться нетбук, поэтому собсвенно данная карта и была куплена.<br />Обе сетевые карты работают в режиме моста br0.<br /><strong>ifconfig</strong><br /></p><div class="codebox"><pre><code>br0       Link encap:Ethernet  HWaddr 00:16:17:73:0a:ab
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::216:17ff:fe73:aab/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:902205 errors:0 dropped:0 overruns:0 frame:0
          TX packets:499783 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1282406160 (1.1 GiB)  TX bytes:42133957 (40.1 MiB)

eth0      Link encap:Ethernet  HWaddr 00:16:17:73:0a:ab
          inet6 addr: fe80::216:17ff:fe73:aab/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:902240 errors:0 dropped:0 overruns:0 frame:0
          TX packets:499812 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1295043205 (1.2 GiB)  TX bytes:44219983 (42.1 MiB)
          Interrupt:29 Base address:0x4000

eth1      Link encap:Ethernet  HWaddr 00:16:17:73:18:04
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:30 Base address:0x4000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:120 errors:0 dropped:0 overruns:0 frame:0
          TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7528 (7.3 KiB)  TX bytes:7528 (7.3 KiB)

mon.wlan0 Link encap:UNSPEC  HWaddr F4-EC-38-A0-44-DA-00-00-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:157676 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19168892 (18.2 MiB)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr f4:ec:38:a0:44:da
          inet6 addr: fe80::f6ec:38ff:fea0:44da/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:5239 (5.1 KiB)</code></pre></div><p><strong>Настройки моста и интерфейсов /etc/network/interfaces</strong><br /></p><div class="codebox"><pre><code>auto lo
iface lo inet loopback

# Bridge interfaces
auto br0
iface br0 inet static
        address 192.168.1.2
        network 192.168.1.0
        netmask 255.255.255.0
        broadcast 192.168.1.255
        bridge-ports all
        gateway 192.168.1.1
        dns-nameservers 192.168.1.1

# The primary network interface
iface eth0 inet manual
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE down

# The secondary network interface
iface wlan0 inet manual
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE down</code></pre></div><p>Настройки wlan0 как точки доступа - hostapd.conf. Конфиг рабочий.<br /></p><div class="codebox"><pre><code>interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=test
hw_mode=g
channel=4
dtim_period=2
max_num_sta=2
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
wpa=2
wpa_psk=blablabla
wpa_key_mgmt=WPA-PSK WPA-EAP
wpa_pairwise=TKIP CCMP
wpa_pairwise=CCMP</code></pre></div><p>Если устройства не объединять в мост и прописать им статические адреса, то с нетбука я присоединяюсь к wlan0, но шлюз и сосодняя eth0 карта не пингуются. Чтобы эти интерфейсы видели друг друга объединил их мостом. Ну а дальше то что и как??? oO <br />То, что bridge работает на втором канальном уровне OSI и ему нужны только MAC-адреса я понимаю. То что поверх моста можно развернуть IP и ТРС протоколы я тоже понимаю. <strong>Я не понимаю, какие адреса IP-адреса мне нужно прописывать на моем нетбуке и стационарном компеи как он будет соединяться..</strong> <br />Ведь получается, что у wlan0 нет IP-адреса..&nbsp; :O</p>]]></description>
			<author><![CDATA[null@example.com (odinokiyklaus)]]></author>
			<pubDate>Fri, 07 Oct 2011 15:14:49 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=217987#p217987</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176249#p176249</link>
			<description><![CDATA[<p><strong>jacuba</strong>, Вот вам подсказка еще одна: </p><p><strong>bridge.sh</strong><br /></p><div class="codebox"><pre><code>#!/bin/bash
PATH=&quot;/sbin:/usr/sbin:/usr/local/sbin&quot;;
slaveIfs=&quot;1 2 3 4 6 7 8 9 10&quot;;
cmd=&quot;$1&quot;;
[ -z &quot;$cmd&quot; ] &amp;&amp; cmd=&quot;start&quot;;
case &quot;$cmd&quot; in
  start)
    brctl addbr br0;
    brctl stp br0 on;
    brctl addif br0 eth0;
    brctl addif br0 eth1;
    (ifdown eth0 1&gt;/dev/null 2&gt;&amp;1;);
    (ifdown eth1 1&gt;/dev/null 2&gt;&amp;1;);
    ifconfig eth0 0.0.0.0 up;
    ifconfig eth1 0.0.0.0 up;
    ifconfig br0 10.0.3.129 broadcast 10.0.3.255 netmask 255.255.255.0 up ### Adapt to your needs.
    route add default gw 10.0.3.129; ### Adapt to your needs.
    for file in br0 eth0 eth1;
    do
      echo &quot;1&quot; &gt; /proc/sys/net/ipv4/conf/${file}/proxy_arp;
      echo &quot;1&quot; &gt; /proc/sys/net/ipv4/conf/${file}/forwarding;
    done;
    echo &quot;1&quot; &gt; /proc/sys/net/ipv4/ip_forward;
    ;;
  stop)
    brctl delif br0 eth0;
    brctl delif br0 eth1;
    ifconfig br0 down;
    brctl delbr br0;
    #ifup eth0; ### Adapt to your needs.
    #ifup eth1; ### Adapt to your needs.
    ;;
  restart,reload)
    $0 stop;
    sleep 3;
    $0 start;
    ;;
esac;</code></pre></div><p><a href="http://www.tldp.org/HOWTO/Ethernet-Bridge-netfilter-HOWTO-3.html#ss3.1">источник</a> </p><p>P.S. поправьте только немного и все, ну и положить в /etc/init.d/&nbsp; Читайте линк, там об этом подробно описано =)</p>]]></description>
			<author><![CDATA[null@example.com (i2ks)]]></author>
			<pubDate>Thu, 05 May 2011 12:39:40 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176249#p176249</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176248#p176248</link>
			<description><![CDATA[<div class="quotebox"><cite>i2ks пишет:</cite><blockquote><p>Если руками то:</p><p>1)&nbsp; brctl addbr br0<br />2)&nbsp; brctl stp br0 off<br />3) brctl addif br0 eth0<br />4) brctl addif br0 eth1<br />5) ifconfig eth0 down<br />6) ifconfig eth1 down<br />7) ifconfig eth0 0.0.0.0 up<br /><img src="https://linuxforum.ru/img/smilies/af.gif" alt="af" /> ifconfig eth1 0.0.0.0 up<br />9) ifconfig br0 10.10.10.10 up</p></blockquote></div><p>Проделал это, мост поднялся, сеть видна, спасибо.<br />Вечером попробую это перенести в /etc/network/interfaces</p><br /><p><strong>i2ks, Kettler</strong>, Спасибо огромное.</p>]]></description>
			<author><![CDATA[null@example.com (jacuba)]]></author>
			<pubDate>Thu, 05 May 2011 12:36:08 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176248#p176248</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176247#p176247</link>
			<description><![CDATA[<p>сделайте то что написал в посте #24, а потом: <br />brctl showstp br0 on<br />и вывод: brctl showstp br0</p>]]></description>
			<author><![CDATA[null@example.com (i2ks)]]></author>
			<pubDate>Thu, 05 May 2011 12:34:02 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176247#p176247</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176246#p176246</link>
			<description><![CDATA[<p><strong>Kettler</strong>, я сделал, как ты написал в 19 посте, теперь ifconfig не дает вообще никакого вывода.</p><br /><br /><div class="quotebox"><blockquote><p>далее: brctl show покажите , если все ок, то ifconfig br0 up</p></blockquote></div><p>brctrl show раньше показывал, что оба интерфейса добавлены в мост, но пинги проходили только между 2-мя интерфейсами, дальше них пинг не уходил.</p>]]></description>
			<author><![CDATA[null@example.com (jacuba)]]></author>
			<pubDate>Thu, 05 May 2011 12:28:15 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176246#p176246</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176245#p176245</link>
			<description><![CDATA[<div class="quotebox"><cite>jacuba пишет:</cite><blockquote><p>мне кажется, что проблема в этом:<br />я попытался вручную проделать все что написано в interfaces</p></blockquote></div><p>Если руками то:</p><p>1)&nbsp; brctl addbr br0<br />2)&nbsp; brctl stp br0 off<br />3) brctl addif br0 eth0<br />4) brctl addif br0 eth1<br />5) ifconfig eth0 down<br />6) ifconfig eth1 down<br />7) ifconfig eth0 0.0.0.0 up<br /><img src="https://linuxforum.ru/img/smilies/af.gif" alt="af" /> ifconfig eth1 0.0.0.0 up<br />9) ifconfig br0 10.10.10.10 up</p>]]></description>
			<author><![CDATA[null@example.com (i2ks)]]></author>
			<pubDate>Thu, 05 May 2011 12:26:25 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176245#p176245</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176244#p176244</link>
			<description><![CDATA[<div class="quotebox"><cite>jacuba пишет:</cite><blockquote><p># brctrl addbr br0 # ifconfig eht0 down # ifconfig eth1 down # brctrl addif br0 eth1 # brctrl addif br0 eth0</p></blockquote></div><p>далее: brctl show покажите , если все ок, то ifconfig br0 up</p>]]></description>
			<author><![CDATA[null@example.com (i2ks)]]></author>
			<pubDate>Thu, 05 May 2011 12:21:32 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176244#p176244</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176243#p176243</link>
			<description><![CDATA[<p>зделай как в 19 сообщении</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Thu, 05 May 2011 12:19:43 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176243#p176243</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176242#p176242</link>
			<description><![CDATA[<p>мне кажется, что проблема в этом: <br />я попытался вручную проделать все что написано в interfaces<br /></p><div class="codebox"><pre><code>~ # ip link set $IFACE promisc on
-/bin/sh: ip: not found
~ # echo $PATH
/sbin:/usr/sbin:/bin:/usr/bin</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (jacuba)]]></author>
			<pubDate>Thu, 05 May 2011 12:19:00 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176242#p176242</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176241#p176241</link>
			<description><![CDATA[<p>уменьши вот так<br /></p><div class="codebox"><pre><code>iface eth1 inet manual
     

iface eth0 inet manual

auto br0
iface br0 inet static
address 10.10.10.76
netmask 255.255.255.0
bridge_ports eth1 eth0</code></pre></div><p>После рестарт networking и покаж ifconfig</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Thu, 05 May 2011 12:17:02 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176241#p176241</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176238#p176238</link>
			<description><![CDATA[<p>Я перезагрузил компьютер.<br /></p><div class="codebox"><pre><code>~ # ifconfig 
eth0      Link encap:Ethernet  HWaddr BE:15:1A:57:11:CF  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:180 (180.0 B)  TX bytes:0 (0.0 B)
          Interrupt:25 Base address:0x1800 

eth1      Link encap:Ethernet  HWaddr 00:04:25:1C:67:0B  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:26 Base address:0x1c00</code></pre></div><div class="codebox"><pre><code>~ # vi /etc/network/interfaces 

auto eth1
        iface eth1 inet manual
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE down

auto eth0
        iface eth0 inet manual
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE down

#Bridge interface
auto br0
        iface br0 inet static
        address 10.10.10.76
        netmask 255.255.255.0
        bridge_ports eth1 eth0</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (jacuba)]]></author>
			<pubDate>Thu, 05 May 2011 12:10:09 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176238#p176238</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176235#p176235</link>
			<description><![CDATA[<p>оставьте как есть щас в interfaces перезагрузите и после сюда вывод ifconfig</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Thu, 05 May 2011 12:00:15 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176235#p176235</guid>
		</item>
		<item>
			<title><![CDATA[Re: ethernet bridge]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=176233#p176233</link>
			<description><![CDATA[<div class="quotebox"><cite>jacuba пишет:</cite><blockquote><p>вазелиновые пальцы.<br />не нашел как удалить пост, заметил уже после того, как добавил следующий.</p></blockquote></div><p>под постом есть кнопка &quot;изменить&quot; =)</p>]]></description>
			<author><![CDATA[null@example.com (i2ks)]]></author>
			<pubDate>Thu, 05 May 2011 11:55:22 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=176233#p176233</guid>
		</item>
	</channel>
</rss>
