0

I have created a bridge br-lan with the help of /etc/network/interfaces. Heres what it has.

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet manual
address 0.0.0.0

#allow-hotplug wlan0
#iface wlan0 inet dhcp
#wpa-ssid "***"
#wpa-psk "***"

allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.1


auto br-lan 
iface br-lan inet dhcp
    bridge-ports eth0

And here is my ifconfig

br-lan    Link encap:Ethernet  HWaddr 00:04:9f:04:10:39  
          inet addr:192.168.1.135  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd00:aaaa::204:9fff:fe04:1039/64 Scope:Global
          inet6 addr: fd45:6807:17db:0:204:9fff:fe04:1039/64 Scope:Global
          inet6 addr: fe80::204:9fff:fe04:1039/64 Scope:Link
          inet6 addr: fd00:aaaa::b5fc:3125:670d:1246/64 Scope:Global
          inet6 addr: fd45:6807:17db:0:b5fc:3125:670d:1246/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:515326 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2582 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:167467087 (167.4 MB)  TX bytes:858438 (858.4 KB)

eth0      Link encap:Ethernet  HWaddr 00:04:9f:04:10:39  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:544593 errors:0 dropped:2318 overruns:0 frame:0
          TX packets:11500 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:180696734 (180.6 MB)  TX bytes:3369565 (3.3 MB)

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:65536  Metric:1
          RX packets:132 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:8552 (8.5 KB)  TX bytes:8552 (8.5 KB)

tap0      Link encap:Ethernet  HWaddr 7e:30:05:94:8e:f2  
          inet6 addr: fe80::7c30:5ff:fe94:8ef2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8904 errors:0 dropped:0 overruns:0 frame:0
          TX packets:508861 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:2508423 (2.5 MB)  TX bytes:173019552 (173.0 MB)

wlan0     Link encap:Ethernet  HWaddr 00:17:7c:22:88:18  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          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)

tap0 is created in a script elsewhere which is not of my concern. Also wlan0 is made static to make an wireless hotspot.

Now eth0 does not have internet or ping to google.com etc. There is no internet even when it could ping to other IPs in the network. But the same network connected wirelessly gives internet. So I have to assume the issue is with the bridging of eth0. I also need to bridge eth0 to wlan0 to create wifi hotspot with internet. I tried route add default gw 192.168.1.1 from this link https://ubuntuforums.org/showthread.php?t=1331580 But still failed to ping google.com. It shows

ping: unknown host google.com

Edit: I have already solved the problem of internet and answered. But my question remains how to get internet to wlan0 from eth0. By creating more bridge? Is there some route command?

  • You describe you problem in a very good way. I think it is obvious what you want, but I can't find any question. Please ask the question :-) – sudodus Jan 5 '17 at 8:34
  • @sudodus Hmmm will keep in mind. Anyway question was how to connect to internet. which i think is obvious because thats my problem. Anyways second question was how to bridge same eth0 to wlan0 to create a internet AP. – jcxmej Jan 5 '17 at 8:54
0

I see my problem now. It was an IP conflict me trying to create same 192.168.1.1 gateway. I changed wlan0 static ip to 192.168.2.1. I feel silly. How can I bridge the internet from eth0(which is now on br-lan) to wlan0 any idea?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.