多层MGRE

这是一个配置多层多点GRE(MGRE)网络的实验,旨在建立以R1为中心,R2和R3为分支站点的网络拓扑。R6和R7由R2管理,R8和R9由R3管理,R10通过R9的NAT访问公网。所有设备使用GRE隧道、OSPF和NHRP进行连接和路由配置。
摘要由CSDN通过智能技术生成

今天的实验内容为多层MGRE的实验操作

实验拓扑如下

在这里插入图片描述

实验要求:R4、R5为公网网段;以R1为中心站点;R2和R3为分支站点;R2,R3向R1注册;R6、R7为分支站点,R2为R6、R7的中心站点,R3为R8、R9的中心站点;R8、R9为分支站点。R10为用户,通过在R9上配置NAT去公网上进行上网行为。

配置如下:

R1

interface GigabitEthernet0/0/0
 ip address 10.1.14.1 255.255.255.0 
interface LoopBack0
 ip address 1.1.1.1 255.255.255.0 
 #
interface Tunnel0/0/0
 ip address 192.168.1.1 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 nhrp redirect
 nhrp entry multicast dynamic
 nhrp network-id 1
#
ospf 1 
 area 0.0.0.0 
  network 1.1.1.1 0.0.0.0 
  network 192.168.1.1 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 10.1.14.2
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20

R2

interface GigabitEthernet0/0/0
 ip address 10.1.24.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 192.168.1.2 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 ospf dr-priority 0
 nhrp redirect
 nhrp shortcut
 nhrp entry multicast dynamic
 nhrp network-id 1
 nhrp entry 192.168.1.1 10.1.14.1 register
#
ospf 1 
 area 0.0.0.0 
  network 2.2.2.2 0.0.0.0 
  network 192.168.1.2 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 10.1.24.2
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R3

 #
interface GigabitEthernet0/0/0
 ip address 10.1.34.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 192.168.1.3 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 ospf dr-priority 0
 nhrp redirect
 nhrp shortcut
 nhrp entry multicast dynamic
 nhrp network-id 1
 nhrp entry 192.168.1.1 10.1.14.1 register
#
ospf 1 
 area 0.0.0.0 
  network 3.3.3.3 0.0.0.0 
  network 192.168.1.3 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 10.1.34.2
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R4

#
interface GigabitEthernet0/0/0
 ip address 10.1.14.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.1.24.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 10.1.34.2 255.255.255.0 
#
interface GigabitEthernet4/0/0
 ip address 10.1.45.1 255.255.255.0 
#
interface GigabitEthernet4/0/1
#
interface GigabitEthernet4/0/2
#
interface GigabitEthernet4/0/3
#
interface NULL0
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.0 
#
ospf 1 
 area 0.0.0.0 
  network 0.0.0.0 255.255.255.255 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R5

#
interface GigabitEthernet0/0/0
 ip address 10.1.45.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.1.56.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 10.1.57.2 255.255.255.0 
#
interface GigabitEthernet4/0/0
 ip address 10.1.58.2 255.255.255.0 
#
interface GigabitEthernet4/0/1
 ip address 10.1.59.2 255.255.255.0 
#
interface GigabitEthernet4/0/2
#
interface GigabitEthernet4/0/3
#
interface NULL0
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.0 
#
ospf 1 
 area 0.0.0.0 
  network 0.0.0.0 255.255.255.255 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R6

#
interface GigabitEthernet0/0/0
 ip address 10.1.56.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 6.6.6.6 255.255.255.0 
#
interface LoopBack9
#
interface Tunnel0/0/0
 ip address 192.168.1.6 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 nhrp shortcut
 nhrp network-id 1
 nhrp entry 192.168.1.2 10.1.24.1 register
#
ospf 1 
 area 0.0.0.0 
  network 6.6.6.6 0.0.0.0 
  network 192.168.1.6 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 10.1.56.2
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R7

#
interface GigabitEthernet0/0/0
 ip address 10.1.57.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 7.7.7.7 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 192.168.1.7 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 nhrp shortcut
 nhrp network-id 1
 nhrp entry 192.168.1.2 10.1.24.1 register
#
ospf 1 
 area 0.0.0.0 
  network 7.7.7.7 0.0.0.0 
  network 192.168.1.7 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 10.1.57.2
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R8

#
interface GigabitEthernet0/0/0
 ip address 10.1.58.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 8.8.8.8 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 192.168.1.8 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 nhrp shortcut
 nhrp network-id 1
 nhrp entry 192.168.1.3 10.1.34.1 register
#
ospf 1 
 area 0.0.0.0 
  network 8.8.8.8 0.0.0.0 
  network 192.168.1.8 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 10.1.58.2
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R9

#
acl number 2000  
 rule 5 permit 
#
aaa 
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default 
 domain default_admin 
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 10.1.59.1 255.255.255.0 
 nat outbound 2000
#
interface GigabitEthernet0/0/1
 ip address 172.168.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 9.9.9.9 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 192.168.1.9 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 nhrp shortcut
 nhrp network-id 1
 nhrp entry 192.168.1.3 10.1.34.1 register
#
ospf 1 
 area 0.0.0.0 
  network 9.9.9.9 0.0.0.0 
  network 192.168.1.9 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 10.1.59.2
ip route-static 172.0.0.0 255.0.0.0 172.168.1.1
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R10

#
interface GigabitEthernet0/0/0
 ip address 172.168.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.168.2.1 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 192.168.1.10 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 nhrp shortcut
 nhrp network-id 1
 nhrp entry 192.168.1.3 10.1.34.1 register
#
ospf 1 
 area 0.0.0.0 
  network 172.168.2.1 0.0.0.0 
  network 192.168.1.10 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 172.168.1.2
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

以上为本次实验的所有命令

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值