特殊:Badtitle/NS100:BridgingNetworkInterfaces:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Oneleaf留言 | 贡献
新页面: {{From|https://help.ubuntu.com/community/BridgingNetworkInterfaces}} {{Languages|UbuntuHelp:BridgingNetworkInterfaces}} I struggled to find the right information, so I think this might be...
 
Wikibot留言 | 贡献
无编辑摘要
 
(未显示同一用户的7个中间版本)
第1行: 第1行:
{{From|https://help.ubuntu.com/community/BridgingNetworkInterfaces}}
{{From|https://help.ubuntu.com/community/BridgingNetworkInterfaces}}
{{Languages|UbuntuHelp:BridgingNetworkInterfaces}}
{{Languages|UbuntuHelp:BridgingNetworkInterfaces}}
<<Include(Tag/StyleCleanup)>>
I struggled to find the right information, so I think this might be useful! If you want to write to me directly, my e-mail is on my wiki page at Ubuntu:HervéFache.
I struggled to find the right information, so I think this might be useful! If you want to write to me directly, my e-mail is on my wiki page at Ubuntu:HervéFache.
Also, consider this article: [http://www.linux.com/article.pl?sid=06/07/10/1729226] on the same subject.
Also, consider this article: [http://www.linux.com/article.pl?sid=06/07/10/1729226] on the same subject.
 
== Installing bridge utilities ==
You will need the bridge utilities for that:
You will need the bridge utilities for that, which all you need to do is install the bridge-utils package.
<pre><nowiki>
<pre><nowiki>
sudo apt-get install bridge-utils
apt-get install bridge-utils  
</nowiki></pre>
</nowiki></pre>
 
== Setting up bridge utilities ==
With no further ado, this is my /etc/network/interfaces file:
With no further ado, this is my /etc/network/interfaces file:
<pre><nowiki>
<pre><nowiki>
第35行: 第35行:
# The wireless side of the bridge
# The wireless side of the bridge
iface ath0 inet manual
iface ath0 inet manual
wireless-essid MY_ESSID
  wireless-essid MY_ESSID
wireless-key **********
  wireless-key **********
wireless-mode master
  wireless-mode master


# The local network bridge
# The local network bridge
iface br0 inet static
iface br0 inet static
bridge_ports ath0 eth1
  bridge_ports ath0 eth1
address 192.168.0.2
  address 192.168.0.2
netmask 255.255.255.0
  netmask 255.255.255.0
</nowiki></pre>
</nowiki></pre>
The explanation is as simple as this file: the system is going to start eth0 (the internet side network interface), ath0 (the wireless network interface) and br0 (the bridge). ath0 being 'manual' and not 'static' or 'dhcp', no IP will be assigned to it, but I need the 'auto' to set the wireless parameters. eth1 is set up automatically as part of the bridge setup.
The explanation is as simple as this file: the system is going to start eth0 (the internet side network interface), ath0 (the wireless network interface) and br0 (the bridge). ath0 being 'manual' and not 'static' or 'dhcp', no IP will be assigned to it, but I need the 'auto' to set the wireless parameters. eth1 is set up automatically as part of the bridge setup.
Note: the bridge takes time to come up. Be patient!
Note: the bridge takes time to come up. Be patient!
Before you start complaining, you should know that in fact, this does not work for me. For some reason, the atheros wireless interface goes back down in the process. I tried very hard to find a way to bring it back up, and the only one I could rely on was to add this in /etc/rc.local, just before the line containing 'exit 0':
Before you start complaining, you should know that in fact, this does not work for me. For some reason, the atheros wireless interface goes back down in the process. I tried very hard to find a way to bring it back up, and the only one I could rely on was to add this in /etc/rc.local, just before the line containing 'exit 0':
<pre><nowiki>
<pre><nowiki>
第55行: 第52行:
</nowiki></pre>
</nowiki></pre>
This is an ugly hack, but at least it does bring ath0 up...
This is an ugly hack, but at least it does bring ath0 up...
'''Note for Edgy users: the madwifi driver does not support setting the mode this way, and even using the required tool did not provide me a working access point.'''
'''Note for Edgy users: the madwifi driver does not support setting the mode this way, and even using the required tool did not provide me a working access point.'''
----
----
[[category:CategoryNetworking]] [[category:CategoryCleanup]]
[[category:CategoryNetworking]]  


[[category:UbuntuHelp]]
[[category:UbuntuHelp]]

2010年5月19日 (三) 21:47的最新版本

{{#ifexist: :BridgingNetworkInterfaces/zh | | {{#ifexist: BridgingNetworkInterfaces/zh | | {{#ifeq: {{#titleparts:BridgingNetworkInterfaces|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:BridgingNetworkInterfaces|1|-1|}} | zh | | }}

<<Include(Tag/StyleCleanup)>> I struggled to find the right information, so I think this might be useful! If you want to write to me directly, my e-mail is on my wiki page at Ubuntu:HervéFache. Also, consider this article: [1] on the same subject.

Installing bridge utilities

You will need the bridge utilities for that, which all you need to do is install the bridge-utils package.

 apt-get install bridge-utils 

Setting up bridge utilities

With no further ado, this is my /etc/network/interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0


# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
auto eth0
auto ath0
auto br0


# The internet network interface
iface eth0 inet dhcp


# The wireless side of the bridge
iface ath0 inet manual
  wireless-essid MY_ESSID
  wireless-key **********
  wireless-mode master

# The local network bridge
iface br0 inet static
  bridge_ports ath0 eth1
  address 192.168.0.2
  netmask 255.255.255.0

The explanation is as simple as this file: the system is going to start eth0 (the internet side network interface), ath0 (the wireless network interface) and br0 (the bridge). ath0 being 'manual' and not 'static' or 'dhcp', no IP will be assigned to it, but I need the 'auto' to set the wireless parameters. eth1 is set up automatically as part of the bridge setup. Note: the bridge takes time to come up. Be patient! Before you start complaining, you should know that in fact, this does not work for me. For some reason, the atheros wireless interface goes back down in the process. I tried very hard to find a way to bring it back up, and the only one I could rely on was to add this in /etc/rc.local, just before the line containing 'exit 0':

ifconfig ath0 up

This is an ugly hack, but at least it does bring ath0 up... Note for Edgy users: the madwifi driver does not support setting the mode this way, and even using the required tool did not provide me a working access point.