3

GRE实验_wx627255bd4ac6d的技术博客_51CTO博客

 2 years ago
source link: https://blog.51cto.com/u_15624911/5343031
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

实验要求:

配置GRE协议,完成全网互通。

实验环境:

GRE实验_GRE

实验配置:

(省略部分代码,可参见其他博客)

端口配置:

config terminal
int e0/0
ip address 10.0.12.2 255.255.255.0
no shutdown
int e0/1
ip address 192.168.1.254 255.255.255.0
no shutdown
exit
config terminal
int e0/0
ip address 10.0.23.2 255.255.255.0
no shutdown
int e0/1
ip address 192.168.2.254 255.255.255.0
no shutdown
exit

基本路由配置:

router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.13.0 0.0.0.255 area 0
exit
ip route 0.0.0.0 0.0.0.0 10.0.12.1
router ospf 1
network 192.168.2.0 0.0.0.255 area 0
network 192.168.13.0 0.0.0.255 area 0
exit
ip route 0.0.0.0 0.0.0.0 10.0.23.1

GRE配置:

int tunnel 0
tunnel source e0/0
tunnel destination 10.0.23.2
tunnel mode gre ip
ip address 192.168.13.1 255.255.255.0
tunnel key 123456
no shutdown
exit
int tunnel 0 #进入端口
tunnel source e0/0 #配置源端口
tunnel destination 10.0.12.2 #配置目的IP
tunnel mode gre ip #配置模式
ip address 192.168.13.2 255.255.255.0
tunnel key 123456 #配置密码
no shutdown
exit

查看配置结果:

GRE实验_路由配置_02
GRE实验_学习记录_03
GRE实验_学习记录_04

配置完成,实验结束。

(如有疏漏,还请读者指出)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK