MGRE網路的chap認證--ppp認證--tunnel 隧道綜合實驗
阿新 • • 發佈:2018-12-23
MGRE網路的chap認證--ppp認證--tunnel 隧道綜合實驗
一.要求:
1.R5為Ips只能配置地址。
2.R1--R3建立MGRE環境且用EIGRP學習各自環回。
3.R4 可以正常訪問R5環回。
4.R1和R5 進行chap認證,R5為主認證方(不基於主機名)。
二.地址規劃:
路由器 | 環回地址 |
---|---|
R2 | 192.168.2.1/24 |
R3 | 192.168.3.1/24 |
R4 | 192.168.4.1/24 |
R5 | 5.5.5.5/24 |
路由器 | 介面 | IP地址 |
---|---|---|
R1 | S0/0 | 192.168.1.2/24 |
R1 | S0/1 | 10.1.1.1/24 |
R1 | tunnel0 | 20.1.1.1/24 |
R2 | S0/0 | 10.1.2.2/24 |
R2 | tunnel0 | 20.1.1.2/24 |
R3 | S0/0 | 10.1.3.2/24 |
R3 | tunnel0 | 20.1.1.3/24 |
R5 | S0/0 | 10.1.1.2/24 |
R5 | S0/1 | 10.1.2.1/24 |
R5 | S0/2 | 10.1.3.1/24 |
三.拓撲圖
四.配置
R1
**R1配置** r1#show running-config Building configuration... Current configuration : 1934 bytes ! ! Last configuration change at 05:01:14 CET Sun Dec 16 2018 version 15.2 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname r1 ! boot-start-marker boot-end-marker ! ! no aaa new-model clock timezone CET 1 0 mmi polling-interval 60 no mmi auto-configure no mmi pvc mmi snmp-timeout 180 ! no ip domain lookup ip cef no ipv6 cef ! multilink bundle-name authenticated interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Tunnel0 ip address 20.1.1.1 255.255.255.0 no ip redirects ip nhrp map multicast dynamic ip nhrp network-id 100 tunnel source Serial0/1 tunnel mode gre multipoint ! interface Serial0/0 ip address 192.168.1.2 255.255.255.0 ip nat inside ip virtual-reassembly in serial restart-delay 0 ! interface Serial0/1 ip address 10.1.1.1 255.255.255.0 ip nat outside ip virtual-reassembly in encapsulation ppp ppp chap hostname R5 ppp chap password 0 123 serial restart-delay 0 ! interface Serial0/2 no ip address ip nat outside ip virtual-reassembly in shutdown serial restart-delay 0 ! interface Serial0/3 no ip address shutdown serial restart-delay 0 ! interface Serial1/0 no ip address shutdown serial restart-delay 0 ! interface Serial1/1 no ip address shutdown serial restart-delay 0 ! interface Serial1/2 no ip address shutdown serial restart-delay 0 ! interface Serial1/3 no ip address shutdown serial restart-delay 0 ! ! router eigrp 100 network 20.0.0.0 network 192.168.1.0 ! ip forward-protocol nd no ip http server no ip http secure-server ip nat inside source list 1 interface Serial0/1 overload ip route 0.0.0.0 0.0.0.0 10.1.1.2 ! access-list 1 permit 192.168.0.0 0.0.255.255 ! control-plane line con 0 exec-timeout 0 0 logging synchronous line aux 0 line vty 0 4 login transport input all ! ! end
R2
**R2配置**
r2#show running-config
Building configuration...
Current configuration : 1666 bytes
!
! Last configuration change at 04:34:52 CET Sun Dec 16 2018
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone CET 1 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
redundancy
!
interface Loopback0
ip address 192.168.2.1 255.255.255.0
!
interface Tunnel0
ip address 20.1.1.2 255.255.255.0
no ip redirects
ip nhrp map 20.1.1.1 10.1.1.1
ip nhrp map multicast 10.1.1.1
ip nhrp network-id 100
ip nhrp nhs 20.1.1.1
tunnel source Serial0/0
tunnel mode gre multipoint
!
interface Serial0/0
ip address 10.1.2.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
!
router eigrp 100
network 20.0.0.0
network 192.168.2.0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 10.1.2.1
!
control-plane
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
transport input all
!
end
R3
**R3配置**
r3#show running-config
Building configuration...
Current configuration : 1648 bytes
!
! Last configuration change at 04:40:51 CET Sun Dec 16 2018
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r3
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone CET 1 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
redundancy
!
interface Loopback0
ip address 192.168.3.1 255.255.255.0
!
interface Tunnel0
ip address 20.1.1.3 255.255.255.0
no ip redirects
ip nhrp map 20.1.1.1 10.1.1.1
ip nhrp map multicast 10.1.1.1
ip nhrp network-id 100
ip nhrp nhs 20.1.1.1
tunnel source Serial0/0
tunnel mode gre multipoint
!
interface Serial0/0
ip address 10.1.3.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
!
router eigrp 100
network 20.0.0.0
network 192.168.3.0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 10.1.3.1
!
control-plane
!
line cosice 0
logging synchronous
line aux 0
line vty 0 4
login
transport input all
!
!
end
R4
**R4配置**
r4#show running-config Building configuration...
Current configuration : 1423 bytes
!
! Last configuration change at 04:42:51 CET Sun Dec 16 2018
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r4
!
boot-start-marker
boot-end-marker
!
no aaa new-model
clock timezone CET 1 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
redundancy
!
interface Loopback0
ip address 192.168.4.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
!
router eigrp 100
network 192.168.1.0
network 192.168.4.0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 192.168.1.2
!
control-plane
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
transport input all
!
!
R5
**R5配置**
r5#show running-config
Building configuration...
Current configuration : 1425 bytes
!
! Last configuration change at 05:02:14 CET Sun Dec 16 2018
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r5
!
boot-start-marker
boot-end-marker
!
no aaa new-model
clock timezone CET 1 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
username R5 password 0 123
!
redundancy
!
interface Loopback0
ip address 5.5.5.5 255.255.255.0
!
interface Serial0/0
ip address 10.1.1.2 255.255.255.0
encapsulation ppp
ppp authentication chap
serial restart-delay 0
!
interface Serial0/1
ip address 10.1.2.1 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
ip address 10.1.3.1 255.255.255.0
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
control-plane
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
transport input all
!
!
end
五.總結
1.路由器之間不能使用Ethernet介面,Ethernet介面不能改封裝模式為PPP.
2.Tunnel隧道地址不能和公網配置在同一網段,EIGRP宣告後會造成Tunnel超時而路由翻滾。
3.模擬器GNS3不支援NAT和Tunnel在同一介面。(1以下版本,1以上未嘗試。歡迎評論求解)