最佳答案
GRE可以不配做ACL的
var base_url = '/cn/tres'; $(function () { $('.headPc .navBox .nav').eq(3).find('a').addClass('acthover');})
Router A和Router B分别连接IPv4私有网络Group 1和Group 2。这两个私有网络都使用私网地址,且属于同一个VPN。通过在Router A和Router B之间建立GRE隧道,实现两个私有网络的互联。
图1-7 GRE over IPv4隧道应用组网图
在开始下面的配置之前,假设设备各接口的地址都已配置完毕,并且Router A和Router B之间路由可达。
# 创建Tunnel0接口,并指定隧道模式为GRE over IPv4隧道。
[RouterA] interface tunnel 0 mode gre
# 配置Tunnel0接口的IP地址。
[RouterA-Tunnel0] ip address 10.1.2.1 255.255.255.0
# 配置Tunnel0接口的源端地址(Router A的GigabitEthernet2/0/2的IP地址)。
[RouterA-Tunnel0] source 1.1.1.1
# 配置Tunnel0接口的目的端地址(Router B的GigabitEthernet2/0/2的IP地址)。
[RouterA-Tunnel0] destination 2.2.2.2
[RouterA-Tunnel0] quit
# 配置从Router A经过Tunnel0接口到Group 2的静态路由。
[RouterA] ip route-static 10.1.3.0 255.255.255.0 tunnel 0
# 创建Tunnel0接口,并指定隧道模式为GRE over IPv4隧道。
[RouterB] interface tunnel 0 mode gre
# 配置Tunnel0接口的IP地址。
[RouterB-Tunnel0] ip address 10.1.2.2 255.255.255.0
# 配置Tunnel0接口的源端地址(Router B的GigabitEthernet2/0/2的IP地址)。
[RouterB-Tunnel0] source 2.2.2.2
# 配置Tunnel0接口的目的端地址(Router A的GigabitEthernet2/0/2的IP地址)。
[RouterB-Tunnel0] destination 1.1.1.1
[RouterB-Tunnel0] quit
# 配置从Router B经过Tunnel0接口到Group 1的静态路由。
[RouterB] ip route-static 10.1.1.0 255.255.255.0 tunnel 0
# 查看Router A的Tunnel接口状态。
[RouterA] display interface tunnel 0
Tunnel0
Current state: UP
Line protocol state: UP
Description: Tunnel0 Interface
Bandwidth: 64kbps
Maximum Transmit Unit: 1476
Internet Address is 10.1.2.1/24 Primary
Tunnel source 1.1.1.1, destination 2.2.2.2
Tunnel keepalive disabled
Tunnel TTL 255
Tunnel protocol/transport GRE/IP
GRE key disabled
Checksumming of GRE packets disabled
Output queue - Urgent queuing: Size/Length/Discards 0/100/0
Output queue - Protocol queuing: Size/Length/Discards 0/500/0
Output queue - FIFO queuing: Size/Length/Discards 0/75/0
Last clearing of counters: Never
Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
Input: 0 packets, 0 bytes, 0 drops
Output: 0 packets, 0 bytes, 0 drops
# 查看Router B的Tunnel接口状态。
[RouterB] display interface tunnel 0
Tunnel0
Current state: UP
Line protocol state: UP
Description: Tunnel0 Interface
Bandwidth: 64kbps
Maximum Transmit Unit: 1476
Internet Address is 10.1.2.2/24 Primary
Tunnel source 2.2.2.2, destination 1.1.1.1
Tunnel keepalive disabled
Tunnel TTL 255
Tunnel protocol/transport GRE/IP
GRE key disabled
Checksumming of GRE packets disabled
Output queue - Urgent queuing: Size/Length/Discards 0/100/0
Output queue - Protocol queuing: Size/Length/Discards 0/500/0
Output queue - FIFO queuing: Size/Length/Discards 0/75/0
Last clearing of counters: Never
Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
Input: 0 packets, 0 bytes, 0 drops
Output: 0 packets, 0 bytes, 0 drops
# 从Router B可以Ping通Router A上GigabitEthernet2/0/1接口的地址。
[RouterB] ping -a 10.1.3.1 10.1.1.1
Ping 10.1.1.1 (10.1.1.1) from 10.1.3.1: 56 data bytes, press CTRL_C to break
56 bytes from 10.1.1.1: icmp_seq=0 ttl=255 time=11.000 ms
56 bytes from 10.1.1.1: icmp_seq=1 ttl=255 time=1.000 ms
56 bytes from 10.1.1.1: icmp_seq=2 ttl=255 time=0.000 ms
56 bytes from 10.1.1.1: icmp_seq=3 ttl=255 time=0.000 ms
56 bytes from 10.1.1.1: icmp_seq=4 ttl=255 time=0.000 ms
--- Ping statistics for 10.1.1.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.000/2.400/11.000/4.317 ms
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论