# ip link add name br0 type bridge give Error: Unknown device

## denn0n

hi as the title says 

```
ip link add name br0 type bridge
```

Give 

```
Error: Unknown device type.
```

everything it's up to date   :Shocked:   :Shocked:   :Shocked: 

----------

## NeddySeagoon

denn0n,

Does your kernel have bridge support?

```
$ grep -i bridge /usr/src/linux/.config

CONFIG_BRIDGE_NETFILTER=y

CONFIG_NETFILTER_FAMILY_BRIDGE=y

# CONFIG_NF_CONNTRACK_BRIDGE is not set

CONFIG_BRIDGE_NF_EBTABLES=m

CONFIG_BRIDGE_EBT_BROUTE=m

CONFIG_BRIDGE_EBT_T_FILTER=m

CONFIG_BRIDGE_EBT_T_NAT=m

CONFIG_BRIDGE_EBT_802_3=m

CONFIG_BRIDGE_EBT_AMONG=m

CONFIG_BRIDGE_EBT_ARP=m

CONFIG_BRIDGE_EBT_IP=m

CONFIG_BRIDGE_EBT_IP6=m

CONFIG_BRIDGE_EBT_LIMIT=m

CONFIG_BRIDGE_EBT_MARK=m

CONFIG_BRIDGE_EBT_PKTTYPE=m

CONFIG_BRIDGE_EBT_STP=m

CONFIG_BRIDGE_EBT_VLAN=m

CONFIG_BRIDGE_EBT_ARPREPLY=m

CONFIG_BRIDGE_EBT_DNAT=m

CONFIG_BRIDGE_EBT_MARK_T=m

CONFIG_BRIDGE_EBT_REDIRECT=m

CONFIG_BRIDGE_EBT_SNAT=m

CONFIG_BRIDGE_EBT_LOG=m

CONFIG_BRIDGE_EBT_NFLOG=m

CONFIG_BRIDGE=y

CONFIG_BRIDGE_IGMP_SNOOPING=y
```

----------

## CaptainBlood

Unsure whether this link matches your requirements...

Thanks 4 ur attention, interest & support.

----------

## denn0n

 *NeddySeagoon wrote:*   

> denn0n,
> 
> Does your kernel have bridge support?
> 
> ```
> ...

 

NeddySeagoon Thank You, the output it's 

```

grep -i bridge /usr/src/linux/.config 

CONFIG_NF_CONNTRACK_BRIDGE=m

# CONFIG_BRIDGE is not set

# PC-card bridges

CONFIG_DRM_BRIDGE=y

CONFIG_DRM_PANEL_BRIDGE=y

# Display Interface Bridges

# end of Display Interface Bridges
```

do you suggest all the Configs as yours ?

----------

## denn0n

 *CaptainBlood wrote:*   

> Unsure whether this link matches your requirements...
> 
> Thanks 4 ur attention, interest & support.

 

Really Thank You ! I will do it !

----------

## NeddySeagoon

denn0n,

You must have 

```
CONFIG_BRIDGE=y 
```

The other entries are to support netfilter on the bridge. That may be useful.

----------

## denn0n

 *NeddySeagoon wrote:*   

> denn0n,
> 
> You must have 
> 
> ```
> ...

 

After do 

```

cd /usr/src/linux

make menuconfig

[*] Networking support  --->

   Networking options  --->

      <*> 802.1d Ethernet Bridging

make && make modules_install

make install 

genkernel --install --lvm --kernel-config=/usr/src/linux/.config initramfs

```

reboot 

and 

```

grep -i bridge /usr/src/linux/.config 

# CONFIG_NF_CONNTRACK_BRIDGE is not set

# CONFIG_BRIDGE_NF_EBTABLES is not set

CONFIG_BRIDGE=y

CONFIG_BRIDGE_IGMP_SNOOPING=y

# CONFIG_BRIDGE_MRP is not set

# PC-card bridges

CONFIG_DRM_BRIDGE=y

CONFIG_DRM_PANEL_BRIDGE=y

# Display Interface Bridges

# end of Display Interface Bridges

```

but still the same 

```

ip link add name br0 type bridge

Error: Unknown device type.
```

 :Question: 

----------

## NeddySeagoon

denn0n,

Are you using the kernel you think you are?

What in the time/date in 

```
uname -a
```

Thats the build time/date of the running kernel. Is it what you expected?

----------

## denn0n

 *NeddySeagoon wrote:*   

> denn0n,
> 
> Are you using the kernel you think you are?
> 
> What in the time/date in 
> ...

 

NeddySeagoon 

The output of 

```
uname -a
```

 it's 

```
uname -a

Linux localhost.localdomain 5.10.49-gentoo-r1 #11 SMP Sat Sep 4 22:46:50 CDT 2021 x86_64 AMD A8-7410 APU with AMD Radeon R5 Graphics AuthenticAMD GNU/Linux
```

and as I see now It remains the same as first install since I just have install gentoo in this computer a few little more then 90 days a go or something like that

----------

## NeddySeagoon

denn0n,

You missed a step in your kernel build or install.

What does 

```
ls -l /boot 
```

show? 

It should be empty. Leave it if its not. Not empty usually means that you forgot to mount /boot for the kernel install steps.

Do 

```
mount /boot
```

What does 

```
ls -l /boot
```

 show now? 

As the kernel you are running is 5.10.49-gentoo-r1 which is an old kernel, you will probably need to update grub.cfg so that it knows about new kernels.

Provided that's the problem only the kernel install and grub.cfg steps need to be performed again.

The compiled kernel is still in /usr/src/linux, so no need to rebuild it.

----------

## denn0n

 *NeddySeagoon wrote:*   

> denn0n,
> 
> You missed a step in your kernel build or install.
> 
> What does 
> ...

 

Yes i did   :Embarassed:   :Embarassed:   :Embarassed:  , I do it correctly and works as expected and the 

```
uname -a
```

 give now 

```
Linux localhost.localdomain 5.10.49-gentoo-r1 #13 SMP Tue Dec 21 20:34:09 CST 2021 x86_64 AMD A8-7410 APU with AMD Radeon R5 Graphics AuthenticAMD GNU/Linux

```

and 

```
ip link add name br0 type bridge
```

 don't give any error

----------

## NeddySeagoon

denn0n,

I've done that so many times that 

```
uname -a
```

is a part of my reboot after a kernel update process. :)

----------

## denn0n

 *NeddySeagoon wrote:*   

> denn0n,
> 
> I've done that so many times that 
> 
> ```
> ...

 

 just have create a file to remember me those steps jajaja   :Razz:   :Razz:   :Razz:   :Razz:   Thank You NeddySeagoon, as always  have you be really helpful

----------

## Hu

To guard against this, you could have the initramfs prints the result of uname -a as part of its normal operation, so that the kernel's identification is always shown.

----------

## dimko

 *NeddySeagoon wrote:*   

> denn0n,
> 
> Are you using the kernel you think you are?
> 
> What in the time/date in 
> ...

 

It's exactly reason why you want to use modules whenever you can.

With modules, you know what is loaded or not if you lsmod.

IMHo compile bridge as module and:

modprobe bridge

then

lsmod |grep bridge

----------

## grknight

 *dimko wrote:*   

> 
> 
> It's exactly reason why you want to use modules whenever you can.
> 
> With modules, you know what is loaded or not if you lsmod.
> ...

 

You do not need to use modules to see if something is loaded.  You just need to change your modprobe a bit to get a message:

```
modprobe --first-time bridge
```

This will say unknown if not built, nothing if it loads, or "already in kernel" if enabled including if built-in.

----------

## dimko

 *grknight wrote:*   

> 
> 
> ```
> modprobe --first-time bridge
> ```
> ...

 

Interesting!

Even "modprobe -h" doesn't have this argument!

----------

