Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ip link add name br0 type bridge give Error: Unknown device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
denn0n
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2020
Posts: 87

PostPosted: Tue Dec 21, 2021 9:17 pm    Post subject: ip link add name br0 type bridge give Error: Unknown device Reply with quote

hi as the title says

Code:
ip link add name br0 type bridge


Give

Code:
Error: Unknown device type.


everything it's up to date 8O 8O 8O
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Tue Dec 21, 2021 9:34 pm    Post subject: Reply with quote

denn0n,

Does your kernel have bridge support?

Code:
$ 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

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3624

PostPosted: Tue Dec 21, 2021 9:35 pm    Post subject: Reply with quote

Unsure whether this link matches your requirements...
Thanks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
denn0n
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2020
Posts: 87

PostPosted: Tue Dec 21, 2021 10:16 pm    Post subject: Reply with quote

NeddySeagoon wrote:
denn0n,

Does your kernel have bridge support?

Code:
$ 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


NeddySeagoon Thank You, the output it's
Code:

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 ?
Back to top
View user's profile Send private message
denn0n
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2020
Posts: 87

PostPosted: Tue Dec 21, 2021 10:17 pm    Post subject: Reply with quote

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


Really Thank You ! I will do it !
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Tue Dec 21, 2021 10:22 pm    Post subject: Reply with quote

denn0n,

You must have
Code:
CONFIG_BRIDGE=y


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

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
denn0n
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2020
Posts: 87

PostPosted: Wed Dec 22, 2021 1:21 am    Post subject: Reply with quote

NeddySeagoon wrote:
denn0n,

You must have
Code:
CONFIG_BRIDGE=y


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


After do

Code:

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

Code:

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
Code:

ip link add name br0 type bridge
Error: Unknown device type.


:?:
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Wed Dec 22, 2021 10:20 am    Post subject: Reply with quote

denn0n,

Are you using the kernel you think you are?
What in the time/date in
Code:
uname -a

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

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
denn0n
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2020
Posts: 87

PostPosted: Wed Dec 22, 2021 4:29 pm    Post subject: Reply with quote

NeddySeagoon wrote:
denn0n,

Are you using the kernel you think you are?
What in the time/date in
Code:
uname -a

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


NeddySeagoon

The output of
Code:
uname -a
it's

Code:
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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Wed Dec 22, 2021 4:49 pm    Post subject: Reply with quote

denn0n,

You missed a step in your kernel build or install.

What does
Code:
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
Code:
mount /boot

What does
Code:
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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
denn0n
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2020
Posts: 87

PostPosted: Wed Dec 22, 2021 8:00 pm    Post subject: Reply with quote

NeddySeagoon wrote:
denn0n,

You missed a step in your kernel build or install.

What does
Code:
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
Code:
mount /boot

What does
Code:
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.


Yes i did :oops: :oops: :oops: , I do it correctly and works as expected and the
Code:
uname -a
give now
Code:
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

Code:
ip link add name br0 type bridge
don't give any error
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Wed Dec 22, 2021 8:31 pm    Post subject: Reply with quote

denn0n,

I've done that so many times that
Code:
uname -a
is a part of my reboot after a kernel update process. :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
denn0n
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2020
Posts: 87

PostPosted: Thu Dec 23, 2021 12:57 am    Post subject: Reply with quote

NeddySeagoon wrote:
denn0n,

I've done that so many times that
Code:
uname -a
is a part of my reboot after a kernel update process. :)


just have create a file to remember me those steps jajaja :P :P :P :P Thank You NeddySeagoon, as always have you be really helpful
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21624

PostPosted: Thu Dec 23, 2021 2:39 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
dimko
Apprentice
Apprentice


Joined: 12 Feb 2006
Posts: 196

PostPosted: Thu Feb 10, 2022 11:42 pm    Post subject: Thats a very good point Reply with quote

NeddySeagoon wrote:
denn0n,

Are you using the kernel you think you are?
What in the time/date in
Code:
uname -a

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



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
_________________
Just a user.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1659

PostPosted: Fri Feb 11, 2022 12:08 am    Post subject: Re: Thats a very good point Reply with quote

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.

IMHo compile bridge as module and:
modprobe bridge
then
lsmod |grep bridge


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:
Code:
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.
Back to top
View user's profile Send private message
dimko
Apprentice
Apprentice


Joined: 12 Feb 2006
Posts: 196

PostPosted: Fri Feb 11, 2022 5:33 pm    Post subject: Re: Thats a very good point Reply with quote

grknight wrote:
Code:
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.

Interesting!
Even "modprobe -h" doesn't have this argument!
_________________
Just a user.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum