当前位置: 首页 > news >正文

VPN技术-GRE隧道的配置

 

GRE隧道的配置

1, 在AR1上配置DHCP接口地址池,AR3上配置DHCP全局地址池

2, PC1获取的IP地址为10.10.10.253,PC2获取的IP地址为10.10.30.253

3,通过ip route-static将目的地址为10.10.30.253的流量引入到Tunnel

#配置AR1
sysname AR1
interface GigabitEthernet0/0/1ip address 120.120.120.1 255.255.255.0 
quit
ospf 1 router-id 1.1.1.1 area 0.0.0.0 network 120.120.120.1 0.0.0.0quitquit
dhcp enable
interface GigabitEthernet0/0/0ip address 10.10.10.254 255.255.255.0 dhcp select interface
quit
interface Tunnel0/0/0ip address 10.10.13.1 255.255.255.252 tunnel-protocol gresource 120.120.120.1destination 130.130.130.3
quit
ip route-static 10.10.30.0 255.255.255.0 Tunnel0/0/0#配置AR2
sysname AR2
interface GigabitEthernet0/0/0ip address 120.120.120.2 255.255.255.0 
quit
interface GigabitEthernet0/0/1ip address 130.130.130.2 255.255.255.0 
quit
ospf 2 router-id 2.2.2.2 area 0.0.0.0 network 120.120.120.2 0.0.0.0network 130.130.130.2 0.0.0.0quit
quit#配置AR3
sysname AR3
interface GigabitEthernet0/0/1ip address 130.130.130.3 255.255.255.0 
quit
ospf 3 router-id 3.3.3.3 area 0.0.0.0 network 130.130.130.3 0.0.0.0quit
quit
dhcp enable
interface GigabitEthernet0/0/0ip address 10.10.30.254 255.255.255.0 dhcp select global
quit
ip pool 30gateway-list 10.10.30.254 network 10.10.30.0 mask 255.255.255.0 
quit
interface Tunnel0/0/1ip address 10.10.13.2 255.255.255.252 tunnel-protocol gresource 130.130.130.3destination 120.120.120.1
quit
ip route-static 10.10.10.0 255.255.255.0 Tunnel0/0/1

效果展示:

 

http://www.lryc.cn/news/507818.html

相关文章:

  • 【spring-cloud-gateway总结】
  • 数组相关简单算法
  • 在VBA中结合正则表达式和查找功能给文档添加交叉连接
  • 动手学深度学习-多层感知机-7前向传播、反向传播和计算图
  • 【Python】基于Python的CI/CD工具链:实现自动化构建与发布
  • FPGA-PS端编程1:
  • 自制数据库迁移工具-C版-06-HappySunshineV1.5-(支持南大Gbase8a、PostgreSQL、达梦DM)
  • 了解RPC
  • centos7 安装docker
  • Docker 入门:如何使用 Docker 容器化 AI 项目(一)
  • LLMs之rStar:《Mutual Reasoning Makes Smaller LLMs Stronger Problem-Solvers》翻译与解读
  • 【RK3588 Linux 5.x 内核编程】-内核中断与ThreadedIRQ
  • Message Processing With Spring Integration高级应用:自定义消息通道与端点
  • S32K324 MCAL中的Postbuild和PreCompile使用
  • kubeadm_k8s_v1.31高可用部署教程
  • 【AI日记】24.12.22 容忍与自由 | 环境因素和个人因素
  • 【Java基础面试题030】Java和Go的区别?
  • 学习嵩山版《Java 开发手册》:编程规约 - 常量定义(P5)
  • 洛谷 P1595 信封问题 C语言递归
  • QT创建一个模板槽和信号刷新UI
  • 【计算机视觉基础CV-图像分类】01- 从历史源头到深度时代:一文读懂计算机视觉的进化脉络、核心任务与产业蓝图
  • C# cad启动自动加载启动插件、类库编译 多个dll合并为一个
  • Mybatis增删改查(配置文件版)
  • 【Spring Security系列】5 次密码错误触发账号锁定?Spring Security 高效实现方案详解
  • 笔记day5
  • Linux快速入门-兼期末快速复习使用
  • 浅谈文生图Stable Diffusion(SD)相关模型基础
  • Vivado使用VScode编译器
  • CEF127 编译指南 MacOS 篇 - 拉取 CEF 源码(五)
  • Jenkins 中 写 shell 命令执行失败,检测失败问题