{"id":4405,"date":"2025-09-23T00:18:54","date_gmt":"2025-09-22T21:18:54","guid":{"rendered":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/gre-tunnel\/"},"modified":"2025-09-23T00:29:33","modified_gmt":"2025-09-22T21:29:33","slug":"gre-tunnel","status":"publish","type":"docs","link":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/gre-tunnel\/","title":{"rendered":"GRE Tunnel (Generic Routing Encapsulation)"},"content":{"rendered":"\n<p><strong>GRE-\u0442\u0443\u043d\u043d\u0435\u043b\u044c<\/strong> \u2014 \u044d\u0442\u043e <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/downtime\/\" data-internallinksmanager029f6b8e52c=\"233\" title=\"Downtime (\u0412\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f)\">\u043f\u0440\u043e\u0441\u0442\u043e\u0439<\/a> \u0441\u043f\u043e\u0441\u043e\u0431 \u00ab\u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c\u00bb \u043e\u0434\u0438\u043d \u043f\u0430\u043a\u0435\u0442 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438 \u043f\u0440\u043e\u0442\u044f\u043d\u0443\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0442\u044f\u043c\u0438 \u043f\u043e\u0432\u0435\u0440\u0445 \u043b\u044e\u0431\u043e\u0439 <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/ip-adres\/\" data-internallinksmanager029f6b8e52c=\"204\" title=\"IP-\u0430\u0434\u0440\u0435\u0441 (Internet Protocol)\">IP<\/a>-\u0441\u0435\u0442\u0438. \u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0436\u0435\u0442 \u0435\u0445\u0430\u0442\u044c <strong><a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/ipv4\/\" data-internallinksmanager029f6b8e52c=\"205\" title=\"IPv4 (Internet Protocol version 4)\">IPv4<\/a><\/strong> \u0438\u043b\u0438 <strong><a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/ipv6\/\" data-internallinksmanager029f6b8e52c=\"206\" title=\"IPv6 (Internet Protocol version 6)\">IPv6<\/a><\/strong> (\u0430 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u0432\u0435\u043d\u0434\u043e\u0440\u043e\u0432 \u2014 \u0438 L2-\u043a\u0430\u0434\u0440\u044b), \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u2014 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 IP. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f <strong>\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439<\/strong> \u043a\u043e\u0440\u0438\u0434\u043e\u0440: \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u0443\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u0441\u043e\u0441\u0435\u0434 \u0440\u044f\u0434\u043e\u043c, \u0445\u043e\u0442\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442.<\/p>\n\n\n\n<p><strong>\u0417\u0430\u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442.<\/strong><br>\u0421\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0444\u0438\u043b\u0438\u0430\u043b\u044b, \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e (OSPF\/<a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/bgp-session\/\" data-internallinksmanager029f6b8e52c=\"317\" title=\"BGP Session\">BGP<\/a>\/EIGRP) \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0435\u0442\u044c, \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u0430\u0441\u0442, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u00abIPv6 \u043f\u043e\u0432\u0435\u0440\u0445 IPv4\u00bb (\u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442), \u0447\u0430\u0441\u0442\u044c DMVPN-\u0441\u0445\u0435\u043c (mGRE+NHRP), \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/virtual-machine\/\" data-internallinksmanager029f6b8e52c=\"260\" title=\"VM (Virtual Machine)\">VM<\/a>\/\u043e\u0431\u043b\u0430\u043a\u0430 \u0431\u0435\u0437 \u0437\u0430\u0432\u044f\u0437\u043a\u0438 \u043d\u0430 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<\/p>\n\n\n\n<p><strong>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 (\u043a\u043e\u0440\u043e\u0442\u043a\u043e).<\/strong><br>\u0414\u0432\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 (\u0442\u0443\u043d\u043d\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b) \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044e\u0442\/\u0434\u0435\u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044e\u0442 \u0442\u0440\u0430\u0444\u0438\u043a. \u0421\u043d\u0430\u0440\u0443\u0436\u0438 \u044d\u0442\u043e IP-\u043f\u0430\u043a\u0435\u0442 \u0441 <strong>Protocol=47 (GRE)<\/strong> \u2014 \u043d\u0435 <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/tcp\/\" data-internallinksmanager029f6b8e52c=\"222\" title=\"TCP (Transmission Control Protocol)\">TCP<\/a>\/<a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/udp\/\" data-internallinksmanager029f6b8e52c=\"223\" title=\"UDP (User Datagram Protocol)\">UDP<\/a> \u0438 \u0431\u0435\u0437 \u043f\u043e\u0440\u0442\u043e\u0432. \u041d\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u00ab\u0448\u0430\u043f\u043a\u0430\u00bb GRE \u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <strong>\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 MTU \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f<\/strong>: \u043e\u0431\u044b\u0447\u043d\u043e +~24\u201336 \u0431\u0430\u0439\u0442 \u043f\u0440\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u043c IPv4 \u0438 +~44\u201352 \u0431\u0430\u0439\u0442 \u043f\u0440\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u043c IPv6 (\u0431\u043e\u043b\u044c\u0448\u0435, \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a\u043b\u044e\u0447\/\u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438). \u0417\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0439\u0442\u0435 \u044d\u0442\u043e \u0432 \u0440\u0430\u0441\u0447\u0451\u0442\u0430\u0445 MTU\/MSS.<\/p>\n\n\n\n<p><strong>\u0427\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u041d\u0435\u0442 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438.<\/strong> GRE \u2014 \u00ab\u0442\u0440\u0443\u0431\u0430 \u0431\u0435\u0437 \u0437\u0430\u043c\u043a\u0430\u00bb. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u2014 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u0432 <strong><a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/ipsec\/\" data-internallinksmanager029f6b8e52c=\"255\" title=\"IPsec (Internet Protocol Security)\">IPsec<\/a><\/strong> (GRE-over-IPsec) \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 IPsec VTI.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/nat\/\" data-internallinksmanager029f6b8e52c=\"207\" title=\"NAT (Network Address Translation)\">NAT<\/a> \u0438 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u044b.<\/strong> \u042d\u0442\u043e <strong>\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b 47<\/strong>, \u0430 \u043d\u0435 \u00ab<a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/port\/\" data-internallinksmanager029f6b8e52c=\"225\" title=\"Port (\u041f\u043e\u0440\u0442 )\">\u043f\u043e\u0440\u0442<\/a> 47\u00bb: \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 NAT\/ACL \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0435\u0433\u043e \u0440\u0435\u0436\u0443\u0442. \u041d\u0443\u0436\u043d\u044b \u044f\u0432\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\/ALG \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 GRE.<\/li>\n\n\n\n<li><strong>PMTU\/\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f.<\/strong> \u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/icmp\/\" data-internallinksmanager029f6b8e52c=\"224\" title=\"ICMP (Internet Control Message Protocol)\">ICMP<\/a> \u043b\u043e\u043c\u0430\u0435\u0442 Path MTU Discovery \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u0432\u0438\u0441\u0430\u043d\u0438\u044f. \u0427\u0430\u0441\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 MSS-clamp \u0438 \u0440\u0443\u0447\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 MTU \u043d\u0430 \u0442\u0443\u043d\u043d\u0435\u043b\u0435.<\/li>\n\n\n\n<li><strong>\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f.<\/strong> \u0418\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u00ab\u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445\u00bb \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 (\u043a\u043e\u0433\u0434\u0430 next-hop \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0443\u0445\u043e\u0434\u0438\u0442\u2026 \u0432 \u044d\u0442\u043e\u0442 \u0436\u0435 \u0442\u0443\u043d\u043d\u0435\u043b\u044c). \u0414\u0435\u0440\u0436\u0438\u0442\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0434\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432.<\/li>\n<\/ul>\n\n\n\n<p><strong>\u041c\u0438\u043d\u0438-\u043f\u0440\u0438\u043c\u0435\u0440 (Linux\/iproute2).<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><div class=\"code-block\"><button class=\"copy-btn\">\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button><code># \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0439 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 IP\nip tunnel add gre1 mode gre local 203.0.113.10 remote 198.51.100.20 ttl 255\nip link set gre1 mtu 1476 up        # \u043f\u0440\u0438\u043c\u0435\u0440: 1500 - ~24 \u0431\u0430\u0439\u0442\u0430 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445\nip addr add 10.10.10.1\/30 dev gre1  # \u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u044f\n# \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f:\nip route add 10.20.0.0\/16 via 10.10.10.2 dev gre1\n<\/code><\/div><\/pre>\n\n\n\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u00ab\u0432 \u0434\u0435\u0441\u044f\u0442\u043a\u0443\u00bb.<\/strong><br>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0432\u0435 \u0441\u0435\u0442\u0438 \u00ab\u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e <strong>L3-\u0441\u043e\u0441\u0435\u0434\u0438<\/strong>\u00bb, \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044f\u0441\u044c \u043a \u0436\u0435\u043b\u0435\u0437\u0443\/\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443, \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0414\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 IPsec, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0439\u0442\u0435 MTU\/MSS \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435, \u0447\u0442\u043e \u0444\u0430\u0435\u0440\u0432\u043e\u043b \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b 47.<\/p>\n","protected":false},"featured_media":0,"parent":2927,"menu_order":217,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-4405","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/comments?post=4405"}],"version-history":[{"count":1,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4405\/revisions"}],"predecessor-version":[{"id":4407,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4405\/revisions\/4407"}],"up":[{"embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/2927"}],"prev":[{"title":"Containerd","link":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/containerd\/","href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4353"}],"wp:attachment":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/media?parent=4405"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/doc_tag?post=4405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}