openwrt GRE 设置

network 中设置GRE:

config interface 'gre'

option peeraddr '192.168.11.244'

option mtu '1500'

option proto 'gre'

option zone 'wan'

option ttl '255'


config interface 'gres'

option ifname '@gre'

option proto 'static'

option ipaddr '10.0.0.2'

option netmask '255.255.255.0'

增加一条防火墙规则允许GRE进入路由器



查看路由表:

~# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         192.168.1.1     0.0.0.0         UG    0      0        0 eth1

1.1.1.1         *               255.255.255.255 UH    0      0        0 br-lan

10.0.0.0        *               255.255.255.0   U     0      0        0 gre-gre

192.168.1.0     *               255.255.255.0   U     0      0        0 eth1

192.168.1.1     *               255.255.255.255 UH    0      0        0 eth1

192.168.2.0     *               255.255.255.0   U     0      0        0 gre-gre

192.168.10.0    *               255.255.255.0   U     0      0        0 br-lan

192.168.11.244  192.168.1.1     255.255.255.255 UGH   0      0        0 eth1


如果没有防火墙,会有不通的问题。



猜你喜欢

转载自blog.csdn.net/denty/article/details/80061966
gre