实验要求
拓扑设计
ipv4
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 23.1.1.1 24
[r2]ip route-static 0.0.0.0 0.0.0.0 23.1.1.2
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 23.1.1.2 24
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 34.1.1.1 24
[r3]int lo0
[r3-LoopBack0]ip add 3.3.3.3 24
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[r4]ip route-static 0.0.0.0 0.0.0.0 34.1.1.1
测试:
访问公网环境
[r1-LoopBack0]ip add 192.168.1.1 30
[r1-LoopBack0]int lo1
[r1-LoopBack1]ip add 192.168.1.5 30
[r1-GigabitEthernet0/0/1]ip add 192.168.0.1 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.0.2 24
[r2-GigabitEthernet0/0/0]q
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.0.0 0.0.255.255
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]nat outbound 2000
ipv6
[r1]ipv6
[r1]int lo0
[r1-LoopBack0]ipv6 enable
[r1-LoopBack0]ipv6 address 2002:1701:0101::1 65</