我试图在GRE隧道上创建IP,但我没有这样的设备:
ip tunnel add gre0 mode gre remote 192.168.152.22 local 192.168.152.21 ttl 255
ioctl: No such device我在内核中编译了GRE支持:
CONFIG_NET_IPGRE_DEMUX=y
CONFIG_NET_IPGRE=y
CONFIG_NET_IPGRE_BROADCAST=y当通过gre0显示接口时,没有ifconfig -a接口,在这里我看到了所有可用的网络接口(也包括那些尚未升级的接口)。
我的内核版本是2.6.30.9,iproute2版本是2-2.6.33。
ip tunnel show显示器:
ip tunnel show
ioctl: Invalid argument
tunl0: ip/ip remote any local any ttl inherit nopmtudisc
sit0: ipv6/ip remote any local any ttl 64 nopmtudisc 6rd-prefix 2002::/16发布于 2014-01-09 16:26:54
问题是ip_gre所需的GRE解复用器模块。当内核加载GRE解复用器驱动程序时,注册协议47句柄,所以当ip_gre.c尝试这样做时,它会失败,因为它以前已经注册过。通过修改ip_gre.c,使其不注册协议GRE句柄来解决这一问题。
发布于 2014-01-02 21:01:40
您要寻找的语法是:
ip tunnel add <name> mode <mode> ...例如:
ip tunnel add gre0 mode gre ...这个名称是一个任意的文本字符串,它可以是任何你想要的。为了清晰起见,我通常以遥控器的名字命名隧道。
发布于 2022-11-15 09:42:13
只需执行:
modprobe ip_gre在你的命令之前。
https://unix.stackexchange.com/questions/107601
复制相似问题