You are not logged in.
Hi There,
I have just got working a 3G modem which appears as device wwan0. I am trying to link this interface to my wired ethernet eth0.
wwan0 seems to work fine with network manager, getting a IP address via dhcp works just fine and I can use the interface.
However, when I disable network manager and try to bring up the bridge with "netcfg up bridge" it times out, failing to get an lease with dhcp.
My /etc/network.d/bridge file contains the following:
INTERFACE="br0"
CONNECTION="bridge"
DESCRIPTION="Bridge wired and wireless connection"
BRIDGE_INTERFACES="eth0 wwan0"
IP="dhcp"
#FWD_DELAY=10
As per the wiki, I have tried using various values for FWD_DELAY (i.e 10 7 5,4,3,2,1,0) but nothing ..
The relevant sections of /etc/rc.conf are:
NETWORKS=(bridge)
....
DAEMONS=( ... net-profiles !networkmanager ...)
It seems that DHCP via networkmanager is the only way the interface gets an IP. I even tried "dhcpd br0" or "dhcpd wwan0" and they both time out.
Anyone have any suggestions?
Last edited by bmentink (2012-05-15 22:02:00)
Offline
What you are trying to do is not supported in netcfg IMO. Why not stick to networkmanager (wiki and the links in see also there).
Offline
What you are trying to do is not supported in netcfg IMO. Why not stick to networkmanager (wiki and the links in see also there).
What do you mean? netcfg supports starting bridge interfaces ... I am just doing the same as this wiki: https://wiki.archlinux.org/index.php/So … cess_Point
The only change is I am linking eth0 and wwan0 ..
How can I stick with Networkmanager, it doesn't support the creation of bridges as far as I know .. please show me how to create and dhcp a bridge with Networkmanager ..
Offline
What do you mean? netcfg supports starting bridge interfaces ... I am just doing the same as this wiki: https://wiki.archlinux.org/index.php/So … cess_Point
No, as I read your wiki link netcfg supported the way you tried it (i.e. without hostapd) before kernel 2.6.33. Or are you using an older kernel?
The only change is I am linking eth0 and wwan0 ..
Yes, exactly - and netcfg does not support 3G interfaces. Please read the wiki links above - its all in there.
Further, there are plenty of threads here about it, try a search for "3G and hostapd".
Offline
Sorry, still am at a loss of how to implement this, confused even more by all the different ways to share a connection.
None of the examples are doing what I want to achieve ..
On my wwan0 3G interface I want to use dhcp to get an external IP dished out my the network....
I then want to bridge that connection to my wired interface eth0 PASSING on that IP to a router ... i.e eth0 is connected to the wlan input on the router.
The router then uses it's dhcp server to dish up IP's to my internal network..
Can someone please hint as to the easiest way to achieve this ..
Thanks,
Bernie
Last edited by bmentink (2012-05-13 09:04:02)
Offline
On my wwan0 3G interface I want to use dhcp to get an external IP dished out my the network....
I then want to bridge that connection to my wired interface eth0 PASSING on that IP to a router ... i.e eth0 is connected to the wlan input on the router.
The router then uses it's dhcp server to dish up IP's to my internal network..
Now you get me confused on what you want to do with that "eth0 is connected to the wlan input on the router".
In your first post you say you want to bridge the eth0 to wired.
I think you want to forward the wwan via eth0 to your routers' eth, which then share's the connection out via wlan with other devices.
What you do in your router to share the wired connection is one thing. The other one is using hostapd on your PC with the 3G device to forward that connection out via eth0 (i.e. what used to be bridge). That you do with the iptables forward and dnsmasq for DNS resolving.
But maybe someone else has another idea or wants to add to that.
By the way: if you plan to do this regularly, there are routers which can use 3G usb devices directly also. Might be more straight forward (and stable) connection.
Offline
Now you get me confused on what you want to do with that "eth0 is connected to the wlan input on the router". .
Sorry, my mistake, I mis-typed ... I meant eth0 on my PC is connected to the WAN (wide area network) input on my router, not wlan ...
The other one is using hostapd on your PC with the 3G device to forward that connection out via eth0 (i.e. what used to be bridge). That you do with the iptables forward and dnsmasq for DNS resolving. .
That is where my confusion comes in, if I use dnsmasq doesn't that give my eth0 interface a static IP, all I want is it to pass thorugh the IP of the wwan0 interface (i.e the one it got from the phone network)
.. or can I not do that ..
By the way: if you plan to do this regularly, there are routers which can use 3G usb devices directly also. Might be more straight forward (and stable) connection.
I am aware of that option, but why spend the money on a new router when I am using the PC 24/7 anyway (it is my media box and server).
Thanks for the help.
Offline
That is where my confusion comes in, if I use dnsmasq doesn't that give my eth0 interface a static IP, all I want is it to pass thorugh the IP of the wwan0 interface (i.e the one it got from the phone network)
.. or can I not do that ..
You definetely want your eth0 to get a static IP. But maybe you get along without dnsmasq, yes.
I have not done what you want to try, perhaps someone else has.
How about you try the following with networkmanager up to step 6-
https://wiki.archlinux.org/index.php/In … structions
-and from step 6 virtually as described there.
Offline
Hi,
Ok I have this working now, here are the steps I used.
1. Allowed NetworkManager to setup the 3G Interface wwan0 with DHCP ..
2. Disabled my eth0 interface from Networkmanager by putting an entry in /etc/Networkmanager/Networkmanager.conf
3. Manually configured eth0 with a static IP of 192.168.0.1
4. did the "echo 1 > /proc/sys/net/ipv4/ip_forward" thing for IP forwarding
5. did the following with iptables:
iptables -t nat -A POSTROUTING -o wwan0 -j MASQUERADE
rc.d save iptables
rc.d start iptables
6. Connected my wireless router "wan" port to eth0 and configured for 192.168.0.2 IP address and DNS servers dished up from the network ..
( .. looked at the entries in /etc/resolve.conf on the PC I am sharing the internet )
I can then connect to my wireless lan with my other computers..and on to the internet ... yahoo .. :-)
The only issue I have with this setup is getting the 3G interface to connect automatically to the network .. I ticked the box in networkmanager, but it doesn't seem to work
if I reboot the PC or take the usb T stick out and plug back in, I have to manually connect to the network with networkmanager. Does anyone know how to do this automatically ..
[edit] seems this is a known bug ... you can only auto connect when the interface power is set to "on", but stupidly it defaults to "off"
Thanks,
B.
Last edited by bmentink (2012-05-14 07:56:04)
Offline
Great to hear you got it working.
Have a look here for that autoconnect issue.
One other point: You should also be able to let networkmanager configure that static eth0 IP, but if it works like this .. why change.
Offline
Thanks. I will try the script when I get home .... good find!
PS: I could not get networkmanager to setup the eth0 interface correctly with a static IP. The reason is that the interface eth0 is connected to my router via a power-line modem, so it keeps trying to connect using that interface (re-trying etc). So killing networkmanager from using that interface andbringing it up via rc.conf works just fine ..
EDIT: The script works great to auto-connect a mobile broadband interface ... marking this thread solved.
Last edited by bmentink (2012-05-15 22:01:39)
Offline