Wlan + Lan Bridge?

komodo

Vu+ User
I tried to run your script, except of IP address, but it's working.

Code:
root@vusolo2:~# sh /home/komodo/test.sh
interface wlan0 does not exist!

after this i logged in again

Code:
ssh 192.168.2.201 -l root
root@192.168.2.201's password:
root@vusolo2:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1D:EC:04:8F:FF
          inet6 addr: fe80::21d:ecff:fe04:8fff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2322 errors:0 dropped:146 overruns:0 frame:0
          TX packets:2187 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:182927 (178.6 KiB)  TX bytes:296865 (289.9 KiB)
 
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:79 errors:0 dropped:0 overruns:0 frame:0
          TX packets:79 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7192 (7.0 KiB)  TX bytes:7192 (7.0 KiB)
 
mybridge  Link encap:Ethernet  HWaddr 00:1D:EC:04:8F:FF
          inet addr:192.168.2.201  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::21d:ecff:fe04:8fff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:73 errors:0 dropped:0 overruns:0 frame:0
          TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8304 (8.1 KiB)  TX bytes:9450 (9.2 KiB)

Script looks like this

Code:
root@vusolo2:/home/komodo# cat test.sh
#!/bin/bash
brctl addbr mybridge
brctl addif mybridge eth0
brctl addif mybridge wlan0
ifconfig eth0 0.0.0.0
ifconfig wlan0 0.0.0.0
ifconfig mybridge 192.168.2.201 netmask 255.255.255.0 up

Maybe i shoul really try with wlan interface, but i don't know why it should make some problems.
 

komodo

Vu+ User
I am out of ideas :)

Do you always get add bridge failed: invalid argument ?

Or only this that you loose connection ?
 

fabrizio432

Vu+ User
Solved the script issue.
I used the command
Code:
dos2unix bridge.sh
and now the script runs without errors.
Nevertheless the bridge doesn't work.
 

komodo

Vu+ User
I said that it can be EOL issue :)

And what's actual status ?

After you run this script then you can't acces box via 192.168.1.99 ?

Try this

Code:
sh bridge.sh && ifconfig > /home/root/ifconfig.out

and then restart the box and check the ifconfig.out file if there is all ok, or if there is some missing setting.

Or maybe better, you should make some script testscript.sh whith this

Code:
ifconfig > /home/root/ifconfig.out
brctl show >> /home/root/ifconfig.out

and run

Code:
sh bridge.sh && sh testscript.sh

to see if address and bridge is set up.
 

komodo

Vu+ User
Btw, do you access your box from the same network ? Becase after this, there is no default gateway.
 

fabrizio432

Vu+ User
I said that it can be EOL issue :)

You were right for sure!

And what's actual status ?

After you run this script then you can't acces box via 192.168.1.99 ?

Try this

Code:
sh bridge.sh && ifconfig > /home/root/ifconfig.out

and then restart the box and check the ifconfig.out file if there is all ok, or if there is some missing setting.
This is ifconfig.out:

Code:
eth0      Link encap:Ethernet  HWaddr 00:1D:EC:01:86:EB
          inet6 addr: fe80::21d:ecff:fe01:86eb/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:5992 (5.8 KiB)
          Interrupt:16
 
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:942 errors:0 dropped:0 overruns:0 frame:0
          TX packets:942 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:60366 (58.9 KiB)  TX bytes:60366 (58.9 KiB)
 
mybridge  Link encap:Ethernet  HWaddr 00:1D:EC:01:86:EB
          inet addr:192.168.1.99  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21d:ecff:fe01:86eb/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:76 (76.0 B)  TX bytes:731 (731.0 B)
 
wlan0    Link encap:Ethernet  HWaddr 98:FC:11:CC:6B:03
          inet6 addr: fe80::9afc:11ff:fecc:6b03/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:78 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1862093 (1.7 MiB)  TX bytes:46542 (45.4 KiB)

Apparently it's all ok, but I can't connect.
 

komodo

Vu+ User
This looks ok, but how brctl show looks like after change ?

And you are connecting via wlan or via wired connection ?

What's your IP address ?

And what do you mean with Ican't connect ? That your connection is closed after this script, or you can't connect from new console ?
 

fabrizio432

Vu+ User
Or maybe better, you should make some script testscript.sh whith this

Code:
ifconfig > /home/root/ifconfig.out
brctl show >> /home/root/ifconfig.out

and run

Code:
sh bridge.sh && sh testscript.sh

to see if address and bridge is set up.

ifconfig.out with brctl show:
Code:
eth0      Link encap:Ethernet  HWaddr 00:1D:EC:01:86:EB 
          inet6 addr: fe80::21d:ecff:fe01:86eb/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:5087 (4.9 KiB)
          Interrupt:16
 
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:692 errors:0 dropped:0 overruns:0 frame:0
          TX packets:692 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:46044 (44.9 KiB)  TX bytes:46044 (44.9 KiB)
 
mybridge  Link encap:Ethernet  HWaddr 00:1D:EC:01:86:EB 
          inet addr:192.168.1.99  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21d:ecff:fe01:86eb/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:36 (36.0 B)  TX bytes:144 (144.0 B)
 
wlan0    Link encap:Ethernet  HWaddr 98:FC:11:CC:6B:03 
          inet6 addr: fe80::9afc:11ff:fecc:6b03/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:50 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1076668 (1.0 MiB)  TX bytes:37117 (36.2 KiB)
 
bridge name    bridge id        STP enabled    interfaces
mybridge        8000.001dec0186eb    no        eth0
                            wlan0
 

fabrizio432

Vu+ User
This looks ok, but how brctl show looks like after change ?

And you are connecting via wlan or via wired connection ?

What's your IP address ?

And what do you mean with Ican't connect ? That your connection is closed after this script, or you can't connect from new console ?
I connect via wifi. My ip is 192.168.1.54
I can't connect from new console neither using 192.168.1.95 or 192.168.1.99
 

komodo

Vu+ User
And via wired network ? Are you able to connect ?

Maybe you shoul try to enable STP.

Try add at the end of the sript this

brctl stp mybridge on

If no, i will really borrow some wifi. I'm courious why is not working :) because we are using bridges everyday at work witthout problems.
 

fabrizio432

Vu+ User
And via wired network ? Are you able to connect ?

Maybe you shoul try to enable STP.

Try add at the end of the sript this

brctl stp mybridge on

If no, i will really borrow some wifi. I'm courious why is not working :) because we are using bridges everyday at work witthout problems.

No way:
Code:
eth0      Link encap:Ethernet  HWaddr 00:1D:EC:01:86:EB
          inet6 addr: fe80::21d:ecff:fe01:86eb/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:5149 (5.0 KiB)
          Interrupt:16
 
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:1559 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1559 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:94442 (92.2 KiB)  TX bytes:94442 (92.2 KiB)
 
mybridge  Link encap:Ethernet  HWaddr 00:1D:EC:01:86:EB
          inet addr:192.168.1.99  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21d:ecff:fe01:86eb/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:36 (36.0 B)  TX bytes:222 (222.0 B)
 
wlan0    Link encap:Ethernet  HWaddr 98:FC:11:CC:6B:03
          inet6 addr: fe80::9afc:11ff:fecc:6b03/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:165 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3846973 (3.6 MiB)  TX bytes:55554 (54.2 KiB)
 
bridge name    bridge id        STP enabled    interfaces
mybridge        8000.001dec0186eb    yes        eth0
                            wlan0

I noticed that after running script the vusolo doesn't connect to the AP, so:

I replaced wifi dongle (from cisco wusb100 to d-link dwa125).
I disabled mac filter from AP.
I set promisc mode on/off.

This is the actual script saved in /usr/script, so I can run via remote:
Code:
#!/bin/bash
ifconfig eth0 promisc up
ifconfig wlan0 promisc up
brctl addbr mybridge
brctl addif mybridge eth0
brctl addif mybridge wlan0
ifconfig eth0 0.0.0.0
ifconfig wlan0 0.0.0.0
ifconfig mybridge 192.168.1.99 netmask 255.255.255.0 up
brctl stp mybridge on
ifconfig > /home/root/ifconfig.out
brctl show >> /home/root/ifconfig.out
 
echo ""
exit 0
 

komodo

Vu+ User
Ok, i will try as i have some wifi usb :)

Btw, what's your network schema ?

VU -> Wired --\
-------------------- > Router
VU -> Wifi ---/
 

paolino

Vu+ User+++
Is it possible setting vuplus to bridge wlan between lan, so the wireless network is on the same as lan network?

At the moment I can enable only one network at a time:

screenshotv.jpg

Explain better, what you want to do. Maybe Wireless Acces Point to make Vu+ to act like WLAN acces point to your LAN ADSL Modem?
 

paolino

Vu+ User+++
+
This is my goal:
vuplusbridge.jpg
No, it will not work. Vu+ is running Linux based enigma2. And not Linux distribution for PC. It can act as an Acces Point, but in your case the acces point is your modem. You should make WLAN-LAN bridge on your PC or change your LAN router to WLAN-LAN.
 
Top