网络类型实验

在这里插入图片描述
在这里插入图片描述
R1:

[R1]dhcp enable
[R1]ip pool 1
Info: It’s successful to create an IP address pool.
[R1-ip-pool-1]network 192.168.1.0 mask 24
[R1-ip-pool-1]dns-list 8.8.8.8
[R1-ip-pool-1]gateway-list 192.168.1.254
[R1-ip-pool-1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.254 24
[R1-GigabitEthernet0/0/0]dhcp select global
[R1]int s4/0/0
[R1-Serial4/0/0]ip address 15.1.1.1 24
[R1]int s4/0/0
[R1-Serial4/0/0]ppp authentication-mode pap
[R1-Serial4/0/0]ppp pap local-user bf password cipher 123456
ping 15.1.1.2
PING 15.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 15.1.1.2: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 15.1.1.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 15.1.1.2: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 15.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 15.1.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 15.1.1.1
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100
[R1]ip route-static 0.0.0.0 0.0.0.0 15.1.1.2
ping 10.1.1.2
PING 10.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=10 ms
ping 25.1.1.1
PING 25.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 25.1.1.1: bytes=56 Sequence=1 ttl=254 time=10 ms
Reply from 25.1.1.1: bytes=56 Sequence=2 ttl=254 time=30 ms
Reply from 25.1.1.1: bytes=56 Sequence=3 ttl=254 time=20 ms
Reply from 25.1.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 25.1.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms
[R1]rip 100
[R1-rip-100]version 2
[R1-rip-100]undo summary
[R1-rip-100]network 192.168.1.0
[R1-rip-100]network 10.0.0.0
[R1]display ip routing-table protocol rip (因为R1为中心站点,所以通过rip,R2、R3都向R1汇报,R1拥有2.0和3.0两个网段的路由)
Route Flags: R - relay, D - download to fib

Public routing table : RIP
Destinations : 2 Routes : 2

RIP routing table status :
Destinations : 2 Routes : 2

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.2.0/24  RIP     100  1           D   10.1.1.2        Tunnel0/0/0
192.168.3.0/24  RIP     100  1           D   10.1.1.3        Tunnel0/0/0

RIP routing table status :
Destinations : 0 Routes : 0

[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]undo rip split-horizon(关闭tunnel0/0/0口的水平分割,使的R2、R3可以通过rip获得R1上的路由)

[R1]int Tunnel 0/0/1
[R1-Tunnel0/0/1]ip address 20.1.1.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre
[R1-Tunnel0/0/1]source 15.1.1.1
[R1-Tunnel0/0/1]destination 45.1.1.1
[R1-rip-100]network 20.0.0.0
[R1]display ip routing-table protocol rip
Route Flags: R - relay, D - download to fib

Public routing table : RIP
Destinations : 3 Routes : 3

RIP routing table status :
Destinations : 3 Routes : 3

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.2.0/24  RIP     100  1           D   10.1.1.2        Tunnel0/0/0
192.168.3.0/24  RIP     100  1           D   10.1.1.3        Tunnel0/0/0
192.168.4.0/24  RIP     100  1           D   20.1.1.2        Tunnel0/0/1

RIP routing table status :
Destinations : 0 Routes : 0
[R1]acl 2000(创建nat)
[R1-acl-basic-2000]rule 0 permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]int s4/0/0
[R1-Serial4/0/0]nat outbound 2000

R2:

[R2]dhcp enable
[R2]ip pool 2
Info: It’s successful to create an IP address pool.
[R2-ip-pool-2]network 192.168.2.0 mask 24
[R2-ip-pool-2]dns-list 8.8.8.8
[R2-ip-pool-2]gateway-list 192.168.2.254
[R2-ip-pool-2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.2.254 24
[R2-GigabitEthernet0/0/0]dhcp select global
[R2-GigabitEthernet0/0/0]int s4/0/0
[R2-Serial4/0/0]ip address 25.1.1.1 24
[R2-Serial4/0/0]ppp chap ?
password Specify user password
user Specify user name
[R2-Serial4/0/0]ppp chap user bf
[R2-Serial4/0/0]ppp chap password cipher 123456
[R2-Serial4/0/0]q
[R2]aaa
[R2-aaa]local-user bf password cipher 123456
Info: Add a new user.
[R2-aaa]int s4/0/0
[R2-Serial4/0/0]ppp authentication-mode chap
ping 25.1.1.2
PING 25.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 25.1.1.2: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 25.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 25.1.1.2: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 25.1.1.2: bytes=56 Sequence=4 ttl=255 time=10 ms
Reply from 25.1.1.2: bytes=56 Sequence=5 ttl=255 time=40 ms
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 10.1.1.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source 25.1.1.1
[R2-Tunnel0/0/0]nhrp network-id 100
[R2]ip route-static 0.0.0.0 0.0.0.0 25.1.1.2
[R2-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
[R2]ping 10.1.1.1
PING 10.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms
[R2]rip 100
[R2-rip-100]version 2
[R2-rip-100]undo summary
[R2-rip-100]network 192.168.2.0(宣告网段)
[R2-rip-100]network 10.0.0.0
[R2]display ip routing-table protocol rip (此时为没有关闭R1上的水平分割,导致R1上只从tunnel0/0/0口入,不从其口出,导致R2上只学习了一条通往192.168.1.0网段的路由,没有学习到通往192.168.3.0网段的路由)
Route Flags: R - relay, D - download to fib

Public routing table : RIP
Destinations : 1 Routes : 1

RIP routing table status :
Destinations : 1 Routes : 1

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.1.0/24  RIP     100  1           D   10.1.1.1        Tunnel0/0/0

RIP routing table status :
Destinations : 0 Routes : 0

[R2]display ip routing-table protocol rip (此时为关闭了R1上的水平分割,
R2从R1上学习了到通往192.168.3.0网段的路由)
Route Flags: R - relay, D - download to fib

Public routing table : RIP
Destinations : 2 Routes : 2

RIP routing table status :
Destinations : 2 Routes : 2

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.1.0/24  RIP     100  1           D   10.1.1.1        Tunnel0/0/0
192.168.3.0/24  RIP     100  2           D   10.1.1.3        Tunnel0/0/0

RIP routing table status :
Destinations : 0 Routes : 0
[R2]acl 2000(创建nat)
[R2-acl-basic-2000]rule 0 permit source 192.168.2.0 0.0.0.255
[R2-acl-basic-2000]int s4/0/0
[R2-Serial4/0/0]nat outbound 2000

R3:

[R3]dhcp enable
[R3]ip pool 3
Info: It’s successful to create an IP address pool.
[R3-ip-pool-3]network 192.168.3.0 mask 24
[R3-ip-pool-3]dns-list 8.8.8.8
[R3-ip-pool-3]gateway-list 192.168.3.254
[R3-ip-pool-3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.3.254 24
[R3-GigabitEthernet0/0/0]dhcp select global
[R3]int s4/0/0
[R3-Serial4/0/0]ip address 35.1.1.1 24
[R3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[R3]ping 35.1.1.2
PING 35.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 35.1.1.2: bytes=56 Sequence=1 ttl=255 time=60 ms
Reply from 35.1.1.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 35.1.1.2: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 35.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 35.1.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms
[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ip address 10.1.1.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source 35.1.1.1
[R3-Tunnel0/0/0]nhrp network-id 100
[R3]ip route-static 0.0.0.0 0.0.0.0 35.1.1.2
[R3-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
[R3]ping 10.1.1.1
PING 10.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=10 ms
[R3]rip 100
[R3-rip-100]version 2
[R3-rip-100]undo summary
[R3-rip-100]network 192.168.3.0(宣告网段)
[R3-rip-100]network 10.0.0.0
[R3]display ip routing-table protocol rip (关闭R1水平分割功能之前)
Route Flags: R - relay, D - download to fib

Public routing table : RIP
Destinations : 1 Routes : 1

RIP routing table status :
Destinations : 1 Routes : 1

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.1.0/24  RIP     100  1           D   10.1.1.1        Tunnel0/0/0

RIP routing table status :
Destinations : 0 Routes : 0

[R3]display ip routing-table protocol rip (关闭R1水平分割功能之后)
Route Flags: R - relay, D - download to fib

Public routing table : RIP
Destinations : 2 Routes : 2

RIP routing table status :
Destinations : 2 Routes : 2

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.1.0/24  RIP     100  1           D   10.1.1.1        Tunnel0/0/0
192.168.2.0/24  RIP     100  2           D   10.1.1.2        Tunnel0/0/0

RIP routing table status :
Destinations : 0 Routes : 0
[R3]acl 2000(创建nat)
[R3-acl-basic-2000]rule 0 permit source 192.168.3.0 0.0.0.255
[R3-acl-basic-2000]int s4/0/0
[R3-Serial4/0/0]nat outbound 2000

R4:

[R4]dhcp enable
[R4]ip pool 4
Info: It’s successful to create an IP address pool.
[R4-ip-pool-4]network 192.168.4.0 mask 24
[R4-ip-pool-4]dns-list 8.8.8.8
[R4-ip-pool-4]gateway-list 192.168.4.254
[R4-ip-pool-4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.4.254 24
[R4-GigabitEthernet0/0/0]dhcp select global
[R4-GigabitEthernet0/0/0]int s4/0/0
[R4-Serial4/0/0]ip address 45.1.1.1 24
[R4]interface Tunnel 0/0/1(新建一个tunnel口)
[R4-Tunnel0/0/1]ip address 20.1.1.2 24
[R4-Tunnel0/0/1]tunnel-protocol gre
[R4-Tunnel0/0/1]source 45.1.1.1
[R4-Tunnel0/0/1]destination 15.1.1.1
[R4]ip route-static 0.0.0.0 0.0.0.0 45.1.1.2
[R4]ping 15.1.1.1
PING 15.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 15.1.1.1: bytes=56 Sequence=1 ttl=254 time=50 ms
Reply from 15.1.1.1: bytes=56 Sequence=2 ttl=254 time=20 ms
Reply from 15.1.1.1: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 15.1.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 15.1.1.1: bytes=56 Sequence=5 ttl=254 time=20 ms
[R4]ping 20.1.1.1
PING 20.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 20.1.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 20.1.1.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 20.1.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 20.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 20.1.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms
[R4]rip 100
[R4-rip-100]version 2
[R4-rip-100]undo summary
[R4-rip-100]network 192.168.4.0
[R4-rip-100]network 20.0.0.0
[R4]acl 2000(创建nat)
[R4-acl-basic-2000]rule 0 permit source 192.168.4.0 0.0.0.255
[R4-acl-basic-2000]int s4/0/0
[R4-Serial4/0/0]nat outbound 2000

ISP:

[ISP]int s3/0/0
[ISP-Serial3/0/0]ip address 15.1.1.2 24
[ISP-Serial3/0/0]int s3/0/1
[ISP-Serial3/0/1]ip address 25.1.1.2 24
[ISP-Serial3/0/1]int s4/0/0
[ISP-Serial4/0/0]ip address 35.1.1.2 24
[ISP-Serial4/0/0]int s4/0/1
[ISP-Serial4/0/1]ip address 45.1.1.2 24
[ISP]aaa
[ISP-aaa]local-user bf password cipher 123456
Info: Add a new user.
[ISP-aaa]local-user bf service-type ppp
[ISP-aaa]int s3/0/0
[ISP-Serial3/0/0]ppp authentication-mode pap
[ISP]int s3/0/1
[ISP-Serial3/0/1]ppp authentication-mode chap
[ISP-Serial3/0/1]ppp chap user bf
[ISP-Serial3/0/1]ppp chap password cipher 123456
[ISP-Serial3/0/1]int s4/0/0
[ISP-Serial4/0/0]link-protocol hdlc
[ISP]int lo0
[ISP-LoopBack0]ip address 5.5.5.5 24

结果如下:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 深蓝海洋 设计师:CSDN官方博客 返回首页