Article Title: How to enable GRE tunnel under RHEL5 server. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. first, load the kernel module ip_gre.o. The GRE module in the previous versions of kernal is ip_gre.o, and RHEL5 is called ip_gre.ko.
Modprobe-l | grep ip_gre.ko
The above Command is to look at this module
Insmode/lib/modules/2.4.20-8/kernel/net/ipv4/ip_gre.ko
The above command loads the ip_gre.ko module.
In addition, you must load it again after each restart or logout.
2. start the GRE tunnel
Ip tunnel add new tunnel name mode gre remote peer physical IP local physical IP ttl 255
Ip link set new tunnel name up
Ip addr add new tunnel name IP dev new tunnel name
Ip route add peer intranet private network segment/mask dev new tunnel name