Menu
- Mac Eth0 Won't Allow Manual Software
- Mac Eth0 Won't Allow Manual File
- Mac Eth0 Won't Allow Manual Update
- Mac Eth0 Won't Allow Manual Free
Active3 years, 5 months ago
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a
hostapd.conf
: (some details changed for security, and yes, I know WEP is no good)...And this in
/etc/network/interfaces
:Everything seems to come up ok, but I cannot associate with the bridged wireless connection - even though the flashing lights on the USB stick suggest packets are being exchanged.
But now it says 'device eth0 has different mac address'. The ifcfg-eth0 file has the same HWADDR as that shown in MAC Address of network adapter property of the admin console of the VM. What I have tried so far: (1) delete ifcfg-eth0 file or comment out the line that says HWADDR=xxx (2) checked hwconf, but no entry for HWDAAR. Examples: iwconfig eth0 nwid AB34 iwconfig eth0 nwid off nickname Set the nickname, or the station name. Some 802.11 products do define it, but this is not used as far as the protocols (MAC, IP, TCP) are concerned and completely useless as far as configuration goes.
- See Connect your Mac to a VPN. Try entering /index.html or /index.htm at the end of the address. Choose View Reload Page. If the page still won’t open, quit Safari, reopen it, then try again. Try again at a different time. The website server may be busy, or the website may be unavailable temporarily. Contact your network administrator for help.
- Mar 23, 2016 No matter what I do, my Raspberry Pi (Raspbian Jessie, Raspberry Pi 3) does not maintain a static IP address on my local network. I have my router configured to assign the network interface (by MAC address) a specific IP, and I also have addressing set to manual for the eth0 interface. It should not be possible for it to even attempt to use any other address, and yet about 1 in 3 times I.
I have read somewhere that not all cards/devices will run in hostap mode - they won't pass packets in one direction: is that right? (The info was a bit old)- this my card:
So, what have I got wrong here?
Update: So I have done further investigations and can get the bridge up, but seemingly that destroys the (wired) ethernet connection, which is odd. E.g., on the RPi:
Boot the system...
(router) - this works
Attempt to associate with wireless LAN ... fails (or rather 'with limited connectivity' on Android phone - no good)
This just shows mac of wlan0 and mac of phone at this point
At this point I can now associate the phone with the wireless network, but...
...fails
And similarly I can no longer ping the RasPi from any other machine on the network
Running
Suggests the bridge is dropping packets...
Any ideas?
Further update: The
/etc/network/interfaces
file now (and for the above sequence) reads:adrianmcmenamin
adrianmcmenaminadrianmcmenamin28211 gold badge44 silver badges1717 bronze badges
5 Answers
Bridges made easy:
There is a project on sourceforge made just for your situation. http://sourceforge.net/projects/bridger/ It even comes as a deb package.
With regard to 'dropping' packets:
- Did you check to see if iptables is set to default drop?
sudo iptables --list
should say 'ACCEPT, ACCEPT, ACCEPT' for a box of this type. If that's the issue turn it off. - Are you even forwarding the packets, bro? Make sure the line 'net.ipv4.ip_forward=1' is NOT commented in /etc/sysctl.conf (it is by default), then restart your networking.
- Promiscuous mode is not supported by your wireless dongle. (meaning it can't accept packets that are not destined for it)
Pure Bridge vs. Shared Bridge:
- iface br0 inet dhcp indicates a shared bridge, meaning that the bridge itself gets an ip and can be an endpoint for traffic.
- A pure bridge does not get an ip address and only forwards traffic between the two interfaces
- Shared Bridge Sample /etc/network/interfaces config file (Debian/Ubuntu)
Restart the network:
sudo /etc/init.d/networking restart
After making complex network configuration changes its easier to just reboot rather than make sure everything restarted properly in the reboot.You think you have routing issues:
- Eliminate DNS as a cause by testing with
ping 8.8.8.8
. If this works, then you probably have a DNS issue in your network. - Check your gateway with
sudo ip route
hopefully you seedefault via 192.168.1.1 dev br0 proto dhcp
(assuming your gateway is 192.168.1.1). If it's missing or wrong, fix itsudo ip route add default via 192.168.1.1
. Test again:ping 8.8.8.8
- Renew your shared bridge ip with
dhclient br0
and retest withping 8.8.8.8
- Check your 'slave' interfaces with
ifconfig
and make sure eth0 and wlan0 do NOT have ip addresses. They are a part of the bridge now. If they do, make sure you remove them from all the config files, set them to static 0.0.0.0 or something.
If NONE of this works, try that debian bridging app, and if that doesn't work then your wireless dongle doesn't support promiscuous mode. (see above)
If it works at any time here, reboot and make sure it still works.
MattParkMattPark
I have some wireless bridges working on Debian Linux and Openwrt, so I am very familiar with this issue.
You missed one important command: You forgot to tell your wireless driver to transmit 4-address frames (sometimes improperly/historically called WDS), which is required for 802.11/wireless bridging. Do this with the command 'iw dev wlan0 set 4addr on'. Use a 'pre-up' statement in your Debian interfaces file on the bridge to apply it before bringing up the bridge. Note that 4-address frame mode requires driver support and some old crappy 802.11 drivers or hardware may not support it.
I also strongly suspect your problems may have been complicated by a bug in the Linux kernel which specifically affects bridged interfaces. I ran into this bug myself and had to compile my own wpa_supplicant from sources because the version in Debian is old and affected. wpa_supplicant and hostapd share a common code base, but I'm not completely sure that this affected hostapd as well as wpa_supplicant.
There is a work-around commit to the issue here:
I am under the impression this is in the 2.5 release, and I know it's in the current 2.6 source. The current Debian version is 2.4, which is broken. Please pester the Debian project to update their wpasupplicant and hostapd packages.
Here is a sample config for a wireless bridge client using WPA/WPA2 with a wireless bridge between interfaces wlan0 and eth0, with the host getting a DHCP address on the br0 interface (replace 'dhcp' with 'manual' for no IP address). For a situation where you want to be the AP, include the interface= and bridge= commands in hostapd.conf and omit the wpa-* commands below.
In your /etc/network/interfaces file:
And make sure your wpa_supplicant is version 2.5 or later. It won't work with wpa_supplicant 2.4 and current kernel versions.
I should also note that there is currently a race bug in ifup where bridge interfaces may fail to come up at boot time, but that's a whole other issue.
turnip_turnip_turnipturnip_turnip_turnip
You seem to need ip forwarding.
try
cat /proc/sys/net/ipv4/ip_forward
If it's
0
issue: echo 1 > /proc/sys/net/ipv4/ip_forward
CSᵠCSᵠ
Bridging can only work when an interface receives all packets otherwise they will get see packets addressed only to them. Your current setup might describe a configuration for a router though but not for a bridge.
eth0 and wlan0 should have no ip addresses (meaning 0.0.0.0) and if desired, you could always use an IP address for br0 though.
Here's some official documentation also: http://wiki.debian.org/BridgeNetworkConnections
John WilcoxJohn Wilcox
configure wlan0
vi /etc/network/interface
vi /etc/sysctl.conf
vi /etc/rc.local
netawaternetawater
Not the answer you're looking for? Browse other questions tagged linuxwireless-networkingbridgeraspberry-pi or ask your own question.
Active9 months ago
I understood the very basic concept of how to use
/etc/network/interfaces
, but all I find online are examples, example after example, which I can copy-paste from. What I miss is an explanation of the syntax, an explanation of the meaning of the commands and which order the commands require. I want to understand, because most of the time copy-paste is not enough, because I'm not working on a fresh machine, so I can't just overwrite existing configurations because it would break a lot of stuff. man interfaces
was not very helpful since it is written very complicated.Example questions I have: what does
Foo BarFoo Barinet
in an iface
line mean exactly (I could not even find it in the manpage), what does manual
in an iface
line mean exactly (many examples use it, but according to manpage it needs an extra config file then, which the examples don't present), when do I use or need them? When not? When I create a bridge, what exactly happens to the interfaces?1,30766 gold badges1515 silver badges2626 bronze badges
2 Answers
Well, let’s separate it into pieces, to make it easier to understand
/etc/network/interfaces
:Link layer+interface type options (generally the first of each interface stanza and called address family + method by
interfaces(5)
manpages):auto interface
– Start the interface(s) at boot. That’s why the lo
interface uses this kind of linking configuration.![Won Won](https://secure.logitech.com/assets/35517/glamour-image-lgwireless-mouse-m315-and-m23-grey.png)
allow-auto interface
– Same as auto
allow-hotplug interface
– Start the interface when a 'hotplug' event is detected. In the real world, this is used in the same situations as auto
but the difference is that it will wait for an event like 'being detected by udev hotplug api' or 'cable linked'. See 'Related Stuff(hotplug)' for additional info.These options are pretty much 'layer 2' options, setting up link states on interfaces, and are not related with 'layer 3' (routing and addressing). As an example you could have a link aggregation where the bond0 interface needs to be up whatever the link state is, and its members could be up after a link state event:
So, this way I create a link aggregation and the interfaces will be added to it and removed on cable link states.
Most common interface types:
All options below are a suffix to a defined interface (
iface <Interface_family>
). Basically the iface eth0
creates a stanza called eth0
on an Ethernet device. iface ppp0
should create a point-to-point interface, and it could have different ways to acquire addresses like inet wvdial
that will forward the configuration of this interface to wvdialconf
script. The tuple inet
/inet6
+ option
will define the version of the IP protocol that will be used and the way this address will be configured (static
, dhcp
, scripts
...).The online Debian manuals will give you more details about this.Options on Ethernet interfaces:
inet static
– Defines a static IP address.inet manual
– Does not define an IP address for an interface. Generally used by interfaces that are bridge or aggregation members, interfaces that need to operate in promiscuous mode (e.g. port mirroring or network TAPs), or have a VLAN device configured on them. It's a way to keep the interface up without an IP address.inet dhcp
– Acquire IP address through DHCP protocol.inet6 static
– Defines a static IPv6 address.Example:
This example will bring
eth0
up, and create a VLAN interface called vlan10
that will process the tag number 10 on an Ethernet frame.Common options inside an interface stanza(layer 2 and 3):
address
– IP address for a static IP configured interfacenetmask
– Network mask. Can be ommited if you use cidr address. Example:gateway
– The default gateway of a server. Be careful to use only one of this guy.vlan-raw-device
– On a VLAN interface, defines its 'father'.bridge_ports
– On a bridge interface, define its members.down
– Use the following command to down the interface instead of ifdown
.post-down
– Actions taken right after the interface is down.pre-up
– Actions before the interface is up.up
– Use the following command to up the interface instead of ifup
. It is up to your imagination to use any option available on iputils
. As an example we could use up ip link set $IFACE up mtu 9000
to enable jumbo frames during the up
operation(instead of using the mtu
option itself). You can also call any other software like up sleep 5; mii-tool -F 100baseTx-FD $IFACE
to force 100Mbps Full duplex 5 seconds after the interface is up.hwaddress ether 00:00:00:00:00:00
- Change the mac address of the interface instead of using the one that is hardcoded into rom, or generated by algorithms. You can use the keyword random
to get a randomized mac address.dns-nameservers
– IP addresses of nameservers. Requires the resolvconf
package. It’s a way to concentrate all the information in /etc/network/interfaces
instead of using /etc/resolv.conf
for DNS-related configurations.Do not edit the resolv.conf
configuration file manuallyas it will be dynamically changed by programs in the system.dns-search example.net
– Append example.net as domain to queries of host, creating the FQDN. Option domain
of /etc/resolv.conf
wpa-ssid
– Wireless: Set a wireless WPA SSID.mtu
- MTU size. mtu 9000
= Jumbo Frame. Useful if your Linux box is connected with switches that support larger MTU sizes. Can break some protocols(I had bad experiences with snmp and jumbo frames).wpa-psk
– Wireless: Set a hexadecimal encoded PSK for your SSID.ip_rp_filter 1
- Reverse path filter enabled. Useful in situations where you have 2 routes to a host, and this will force the packet to come back from where it came(same interface, using its routes). Example: You are connected on your lan(192.168.1.1/24
) and you have a dlna server with one interface on your lan(192.168.1.10/24
) and other interface on dmz to execute administrative tasks(172.16.1.1/24
). During a ssh session from your computer to dlna dmz ip, the information needs to come back to you, but will hang forever because your dlna server will try to deliver the response directly through it's lan interface. With rp_filter enabled, it will ensure that the connection will come back from where it came from. More information here.Some of those options are not optional. Debian will warn you if you put an IP address on an interface without a netmask, for example.
You can find more good examples of network configuration here.
Related Stuff:
Links that have information related to
/etc/network/interfaces
network configuration file:Mac Eth0 Won't Allow Manual Software
- HOWTO: Wireless Security - WPA1, WPA2, LEAP, etc.
- How can I bridge two interfaces with ip/iproute2?.
user34720
I would also add that:
- interfaces is for ifup/ifdown services.
- When u use allow-hotplug it will not start with ifup/ifdown, bcos u need to use flag --allow=hotplug.
U may track what is happening with ifup by using --verbose flag.
Im not 100% shure of this, but it seems that basically when ifup is called u will execute all from /etc/network/interfaces with up ... if not stated otherwise.
Mac Eth0 Won't Allow Manual File
Im not shure how it relates to : service networking ...
Mac Eth0 Won't Allow Manual Update
Would be nice if someone would point whats happening after call:
in relation to ifup/ifdown.
yourstrulyyourstruly