[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to use bridge-utils to enable connection sharing?



> In order to achieve that, i installed on the host (debian, buster for
> the time being)
>
> apt install bridge-utils
>
> and looked up the interfaces in question (enp0s3 and enp0s8)
>
> brctl addbr br0
> brctl addif br0 enp0s3 enp0s8
>
> but, even after rebooting, the bridge does not work

The above brctl just tell the OS to create a "virtual switch" composed
of the two ethernet interfaces `enp0s3` and `enp0s8`.

> 2: enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master br0 state
> DOWN group default qlen 1000
>     link/ether 08:00:27:e1:93:46 brd ff:ff:ff:ff:ff:ff
> 3: enp0s8: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master br0 state
> DOWN group default qlen 1000
>     link/ether 08:00:27:7e:c0:bb brd ff:ff:ff:ff:ff:ff
> 4: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
> default qlen 1000
>     link/ether 08:00:27:7e:c0:bb brd ff:ff:ff:ff:ff:ff

This shows that you have not configured any IP address on `br0`, and
have not brought the interfaces up either.

    ifconfig enp0s3 up
    ifconfig enp0s8 up
    ifconfig br0 up

should be enough for the bridge to work in the sense that your "backup"
server should now be able to talk to the "router" (via the "host") as if
it were connected directly to the router.  E.g. it should be able to get
an IP address via DHCP.

You'll also want to configure your `br0` interface so it gets an IP
address (so your "host" can also connect to the Internet).
Assuming your "router" runs a DHCP daemon, you get that IP address via DHCP.


        Stefan


Reply to: