IPV4 GRE组网配置与抓包分析

发布时间:2026/10/2 19:10:15
IPV4 GRE组网配置与抓包分析 一 组网拓扑两端终端实现内网互通通过ipv4 over ipv4隧道实现二 设备配置2.1 R1设备配置sysname R1#ip unreachables enableip ttl-expires enable#lldp global enable#acl advanced 3000description NATrule 100 permit ip#interface GigabitEthernet0/0port link-mode routecombo enable copperip address 192.168.1.1 255.255.255.0#interface GigabitEthernet0/1port link-mode routecombo enable copperip address 202.1.1.2 255.255.255.0nat outbound 3000#interface Tunnel1 mode greip address 2.2.2.1 255.255.255.252source 202.1.1.2destination 203.1.1.2keepalive 10 3#ip route-static 0.0.0.0 0 202.1.1.1ip route-static 192.168.2.0 24 Tunnel1#2.2 R2设备配置sysname R2#ip unreachables enableip ttl-expires enable#lldp global enable#acl advanced 3000description NATrule 100 permit ip#interface GigabitEthernet0/0port link-mode routedescription NATcombo enable copperip address 203.1.1.2 255.255.255.0nat outbound 3000#interface GigabitEthernet0/1port link-mode routecombo enable copperip address 192.168.2.1 255.255.255.0#interface Tunnel1 mode greip address 2.2.2.2 255.255.255.252source 203.1.1.2destination 202.1.1.2keepalive 10 3#ip route-static 0.0.0.0 0 203.1.1.1ip route-static 192.168.1.0 24 Tunnel1#2.3 ISP设备配置sysname ISP#ip unreachables enableip ttl-expires enable#lldp global enable#interface LoopBack0ip address 8.8.8.8 255.255.255.255#interface GigabitEthernet0/0port link-mode routecombo enable copperip address 202.1.1.1 255.255.255.0#interface GigabitEthernet0/1port link-mode routecombo enable copperip address 203.1.1.1 255.255.255.0#2.4 PC1设备配置sysname PC1#ip unreachables enableip ttl-expires enable#lldp global enable#interface GigabitEthernet0/0port link-mode routecombo enable copperip address 192.168.1.2 255.255.255.0#ip route-static 0.0.0.0 0 192.168.1.1#2.5 PC2设备配置sysname PC2#ip unreachables enableip ttl-expires enable#lldp global enable#interface GigabitEthernet0/0port link-mode routecombo enable copperip address 192.168.3.2 255.255.255.0#ip route-static 0.0.0.0 0 192.16821.1#三 业务测试和GRE抓包3.1 PC1业务测试PC1ping 192.168.2.2Ping 192.168.2.2 (192.168.2.2): 56 data bytes, press CTRLC to break56 bytes from 192.168.2.2: icmp_seq0 ttl253 time1.244 ms56 bytes from 192.168.2.2: icmp_seq1 ttl253 time2.140 ms56 bytes from 192.168.2.2: icmp_seq2 ttl253 time2.108 ms56 bytes from 192.168.2.2: icmp_seq3 ttl253 time1.756 ms56 bytes from 192.168.2.2: icmp_seq4 ttl253 time2.110 ms--- Ping statistics for 192.168.2.2 ---5 packet(s) transmitted, 5 packet(s) received, 0.0% packet lossround-trip min/avg/max/std-dev 1.244/1.872/2.140/0.344 msPC1%Aug 10 09:57:19:941 2026 PC1 PING/6/PING_STATISTICS: Ping statistics for 192.168.2.2: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev 1.244/1.872/2.140/0.344 ms.PC1PC1tracert 192.168.2.2traceroute to 192.168.2.2 (192.168.2.2), 30 hops at most, 40 bytes each packet, press CTRLC to break1 192.168.1.1 (192.168.1.1) 0.685 ms 0.406 ms 0.373 ms2 2.2.2.2 (2.2.2.2) 2.099 ms 0.893 ms 1.035 ms3 192.168.2.2 (192.168.2.2) 1.153 ms 1.702 ms 0.484 msPC13.2 PC2业务测试PC2ping 192.168.1.2Ping 192.168.1.2 (192.168.1.2): 56 data bytes, press CTRLC to break56 bytes from 192.168.1.2: icmp_seq0 ttl253 time1.244 ms56 bytes from 192.168.1.2: icmp_seq1 ttl253 time2.140 ms56 bytes from 192.168.1.2: icmp_seq2 ttl253 time2.108 ms56 bytes from 192.168.1.2: icmp_seq3 ttl253 time1.756 ms56 bytes from 192.168.1.2: icmp_seq4 ttl253 time2.110 msPC2PC2tracert 192.168.1.2traceroute to 192.168.1.2 (192.168.1.2), 30 hops at most, 40 bytes each packet, press CTRLC to break1 192.168.2.1 (192.168.2.1) 0.685 ms 0.406 ms 0.373 ms2 2.2.2.1 (2.2.2.1) 2.099 ms 0.893 ms 1.035 ms3 192.168.1.2 (192.168.1.2) 1.153 ms 1.702 ms 0.484 msPC23.3 wireshark抓包分析

关于本文作者

来自尧图内容编辑团队

尧图内容编辑团队 内容团队

尧图内容编辑团队

本文由尧图网络内容编辑团队执笔。团队由资深项目经理、前端工程师与设计师组成,所有内容均来自亲手交付的真实项目,先讲清问题、再给出可落地的解法。尧图深耕北京网站建设十年,服务过京华建材集团、智造科技等各行业客户,把一线经验沉淀为可复用的行业观察。

  • 十年建站经验,覆盖建材、制造、服务、文创等
  • 项目经理把关选题与事实准确性
  • 工程师与设计师联合撰写专业细节
  • 统一编辑规范,保证文风与排版一致
  • 每月复盘转化数据,迭代选题方向

延伸阅读

相关资讯与近期热门内容

深度阅读推荐

建站决策前值得细读的三篇

网站改版的5个关键决策
2024-08-12

网站改版的5个关键决策

什么时候该改版、改到什么程度、如何避免流量掉光,京华建材集团改版复盘给出答案。

获取专属建站方案

看完文章,把您的行业与预算告诉我们,免费获取一份量身定制的官网建设方案与报价。

立即免费咨询