N
N
Ninazu2018-08-15 11:21:45
linux
Ninazu, 2018-08-15 11:21:45

How to set up a bridge on Linux, and why might DHCP not work?

The connection scheme is as
follows Router -> Laptop via WiFi (Linux Mint) -> RaspberryPi via USB (Raspbian)
When RaspberryPi is connected, a USB network card appears on the laptop

enp0s20u7 Link encap:Ethernet  HWaddr 86:d4:73:0a:de:da  
          inet6 addr: fe80::bba:c26d:7a3b:b1d3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34 errors:1 dropped:0 overruns:0 frame:0
          TX packets:114 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5050 (5.0 KB)  TX bytes:18224 (18.2 KB)

But the laptop cannot assign an IP to it via DHCP.
If you replace the laptop with an iMac in the connection scheme, then after a long deliberation, the IP address is still assigned somewhere like 169.254.50.16, but it says that it is Self-Signed and you can even contact the raspberrypi.local host via ssh . Although there is no access to external resources from RaspberryPi. I solved the problem by creating a bridge
How to make it work at least according to this scheme, on a laptop? Although it is much better to solve this from the raspberry side, if possible. So that when connected to another computer, it uses its network to access external resources.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Drno, 2018-08-15
@Drno

First, on a laptop, you need to "raise" the DHCP server for the network card to USB.
Secondly - allow NAT for Raspbery's access to the Internet.
Address 169.254.50.16 - if I'm not mistaken, it means that DHCP could not be obtained.
Doesn't Raspbury know how to connect to wifi?

R
Radjah, 2018-08-15
@Radjah

> So that when connected to another computer, it uses its network to access external resources.
Either a bridge, or configure traffic forwarding, or NAT. Everything on the machine the Pi is plugged into.
or
10.128.0.0/24 is the address of the Pi or the network where the Pi is located. You can assign anything statically.
usb0 is the interface on which the Pi hangs.
eth0 is an interface that looks to the desired network.
I would still buy a WiFi adapter from realtek, for example, and a piece of twisted pair, so as not to deal with such crutches.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question