Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of IPV6 module loading failure under Linux

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to solve the IPV6 module loading failure problem under Linux", the content is simple and easy to understand, and the organization is clear. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn this article "how to solve the IPV6 module loading failure problem under Linux".

A colleague SUSE Linux Enterprise Server 11 SP3 environment failed to configure an ipv6 address, indicating that IPv6 is not supported, requesting help, the first reaction is that ipv6 related kernel modules are not loaded.

Main inspection contents:

IPv6 address exists.

ifconfig |grep inet6

No default inet6 address

IPv6 module exists

# modinfo -n ipv6 /lib/modules/3.0.101-0.47.90-default/kernel/net/ipv6/ipv6.ko # modinfo -n ipv6_lib /lib/modules/3.0.101-0.47.90-default/kernel/net/ipv6/ipv6_lib.ko

Does the system load IPv6-related modules

lsmod |grep ipv6 # lsmod |grep ipv6 ipv6_lib 341467 0

Only ipv6_lib module, no main module ipv6

From the above information, we know that ipv6 module exists, but there is a problem with loading, which may be caused by configuration.

First check whether the dependencies of the modules are correct: # cat /lib/modules/`uname -r`/modules.dep| grep -w ipv6.ko: /lib/modules/3.0.101-0.47.90-default/kernel/net/ipv6/ipv6.ko: /lib/modules/3.0.101-0.47.90-default/kernel/net/ipv6/ipv6_lib.ko

no problem

Next, check the modprobe configuration to see if the ipv6 module load is blocked: # cat /etc/modprobe.conf| grep -i ipv6 alias sit0 ipv6 Finally checked the files in/etc/modprobe.d/directory

Found a 50-ipv6.conf file that reads:

# cat /etc/modprobe.d/50-ipv6.conf install ipv6 /bin/true

What does this mean? The modprobe.conf(5) document reads as follows:

install modulename command... This is the most powerful primitive: it tells modprobe to run your command instead of inserting the module in the kernel as normal. The command can be any shell command: this allows you to do any kind of complex processing you might wish. For example, if the module "fred" works better with the module "barney" already installed (but it doesn't depend on it, so modprobe won't automatically load it), you could say "install fred /sbin/modprobe barney; /sbin/modprobe --ignore-install fred", which would do what you wanted. Note the --ignore-install, which stops the second modprobe from running the same install command again. See also remove below. You can also use install to make up modules which don't otherwise exist. For example: "install probe-ethernet /sbin/modprobe e100 || /sbin/modprobe eepro100", which will first try to load the e100 driver, and if it fails, then the eepro100 driver when you do "modprobe probe-ethernet". If you use the string "$CMDLINE_OPTS" in the command, it will be replaced by any options specified on the modprobe command line. This can be useful because users expect "modprobe fred opt=1" to pass the "opt=1" arg to the module, even if there's an install command in the configuration file. So our above example becomes "install fred /sbin/modprobe barney; /sbin/modprobe --ignore-install fred $CMDLINE_OPTS"

This is the most powerful primitive: it tells modprobe to run your command instead of inserting the module in the kernel as normal. This means that it lets modprobe execute the command on the command line, rather than loading the specified kernel module in the usual way.

How should I understand this sentence? We illustrate this by the execution of two commands:

# modprobe -v -n ipv6 insmod /lib/modules/3.0.101-0.47.90-default/kernel/net/ipv6/ipv6_lib.ko install /bin/true

-n-dry-run-show indicates not to actually insert the module-v: prints information about what the program does so the output above indicates modprobe did nothing but load the ipv6_lib.ko module and install /bin/true

# modprobe --show-depends ipv6 insmod /lib/modules/3.0.101-0.47.90-default/kernel/net/ipv6/ipv6_lib.ko install /bin/true

- show-depends only lists module dependencies, starting with insmod; install command also does not do the actual load operation, only lists the load action to be done From the above information, it will not do ipv6.ko module loading.

Remove/bin/true and re-execute modprobe ipv6 to check module loading:

# modprobe -v ipv6 # lsmod |grep ipv6 ipv6 12758 1 ipv6_lib 341467 71 ipv6 # ifconfig |grep inet6 inet6 addr: fe80::9af5:37ff:fe00:9527/64 Scope:Link inet6 addr: fe80::9af5:37ff:fee3:3ac4/64 Scope:Link inet6 addr: ::1/128 Scope:Host

To sum up, it can be considered that the configuration of the 50-ipv6.conf file caused the incomplete loading of ipv6.

The above is "How to solve the IPV6 module loading failure problem under Linux" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report