Score:1

Bridge two interfaces with netplan

cn flag

I have two physical interfaces in my device: eth0 and eth1

I want to use eth0 to communicate with a raspberry directly connected via ethernet. The raspberry's static IP is 192.168.1.201. The eth1 interface is connected to a normal router (with network 192.168.1.0/24) for internet access.

My netplan configurations is as follows:

network:
  version: 2
  ethernets:
    eth0:
      addresses:
        - 192.168.1.11/24
      routes:
        - to: 192.168.1.201/32
          via: 0.0.0.0
    eth1:
      dhcp4: yes
      # I normally get assigned 192.168.1.100

There seems to be a problem due to the fact that both interfaces are using the same 192.168.1.0/24 network. When I reboot I am unable to get an IP from the dhcp server in eth1 unless I unplug the raspberry on my eth0 interface.

Does anyone have some idea on how I could bridge the two interfaces?

Constraints:

  • Cannot change raspberry's static IP
  • Cannot connect raspberry to router, it must be directly plugged in to the eth0 interface.
  • Cannot change router's configuration
Score:0
us flag

The way to set up a bridge with netplan is documented at https://netplan.io/examples/#configuring-network-bridges.

Note that when using a bridge, the IP configuration goes on the bridge and not the component interfaces.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.