目录
1.题目
2.IP划分
公网是使用R3来替代的
所以R2和R4都有缺省指向R3
[r2]ip route-static 0.0.0.0 0 23.1.1.2
[r4]ip route-static 0.0.0.0 0 34.1.1.1
3.R1和R2之间网络搭建
3.1.IPV4网络搭建RIP
R2
[r2]rip 1
[r2-rip-1]ver 2
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 192.168.0.0
R1
[r1]rip 1
[r1-rip-1]ver 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.0.0
对R1上面两个环回进行汇总
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]rip summary-address 192.168.1.0 255.255.255.0
然后R2向R1发一条缺省
[r2-rip-1]default-route originate
制作ACL,启用NAT
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.0.0 0.0.255.255
[r2-acl-basic-2000]int g0/0/1
[r2-GigabitEthernet0/0/1]nat outbound 2000
3.2.R1和R2 IPV6搭建
IPV6 IP分配
23.1.1.1 --->2002:1701:0101::/48
2002:1701:101::/64 --- 2002:1701:101:FFFF:/64
2002:1701:101::/65 作为R1环回
2002:1701:101:0:8000::/65 作为R1环回
2002:1701:101:1:: 64 作为接口IP
2002:1701:101:2:: 64 作为R2环回
[r1]ipv6
[r1]int lo0[r1-LoopBack0]ipv6 enable
[r1-LoopBack0]ipv6 add 2002:1701:101::1 65[r1-LoopBack1]ipv6 enable
[r1-LoopBack1]ipv6 add 2002:1701:101:0:8000::1 65[r1-LoopBack1]int g0/0/0
[r1-GigabitEthernet0/0/0]ipv6 enable
[r1-GigabitEthernet0/0/0]ipv6 address 2002:1701:101:1::1 64
[r2]ipv6
[r2]int g0/0/0[r2-GigabitEthernet0/0/0]ipv6 enable
[r2-GigabitEthernet0/0/0]ipv6 add 2002:1701:101:1::2 64[r2-LoopBack0]ipv6 add 2002:1701:101:2::1 64
RIPNG搭建
R1 ps:RIPNG是借口宣告
[r1]ripng 1
[r1-ripng-1]int lo0
[r1-LoopBack0]ripng 1 enable
[r1-LoopBack0]int lo1
[r1-LoopBack1]ripng 1 enable
[r1-LoopBack1]int g0/0/0
[r1-GigabitEthernet0/0/0]ripng 1 enable
R2
[r2]ripng 1
[r2-ripng-1]int lo0
[r2-LoopBack0]ripng 1 enable
[r2-LoopBack0]int g0/0/0
[r2-GigabitEthernet0/0/0]ripng 1 enable
汇总两个环回
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ripng summary-address 2002:1701:101:0000:: 64
R2给R1缺省
[r2-GigabitEthernet0/0/0]ripng default-route only
3.3.tunner配置6to4
[r2]int t0/0/0
[r2-Tunnel0/0/0]ipv6 enable
[r2-Tunnel0/0/0]ipv6 address 2002:1701:101:3::1 64
[r2-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
[r2-Tunnel0/0/0]source 23.1.11[r2]ipv6 route-static 2002:: 16 Tunnel 0/0/0
需要配置一条静态,只要是去那个路由没有的就去Tunnel接口
4.右边IPV6配置
4.1.IP划分
34.1.1.2 -----> 2002:2201:0102:: 48
2002:2201:0102:: 49 AS1
2002:2201:0102:: 64 2002:2201:0102:7fff:: 64
2002:2201:0102:8000:: 49 AS2
2002:2201:0102:8000:: 64 2002:2201:0102:FFFF:: 64
2002:2001:0102::1 64 R4环回
2002:2201:0102:8000::1 R5环回
2002:2201:0102:8002::1 64 R6环回
2002:2201:0102:8004::1 64 R7环回
2002:2201:0102:8006::1 64 R8环回
2002:2201:0102:1:: 64 R4 R5接口链接
2002:2201:102:8001:: R6 R5接口链接
2002:2201:0102:8003:: R6 R7接口链接
2002:2201:0102:8005:: R7 R8接口链接
4::4 R4环回
5::5 R5环回
6::6 R6环回
7::7 R7环回
8::8 R8环回
4.2.OSPFV3
这个是跑在AS2中的
R5
[r5]ospfv3 1
[r5-ospfv3-1]router-id 5.5.5.5
[r5-ospfv3-1]int lo0
[r5-LoopBack0]ospfv3 1 area 0
[r5-LoopBack0]int g0/0/1
[r5-GigabitEthernet0/0/1]ospfv3 1 area 0
R6
[r6]ospfv3 1
[r6-ospfv3-1]router-id 6.6.6.6
[r6-ospfv3-1]int lo0
[r6-LoopBack0]ospfv3 1 area 0
[r6-LoopBack0]int g0/0/0
[r6-GigabitEthernet0/0/0]ospfv3 1 area 0
[r6-GigabitEthernet0/0/0]int g0/0/1
[r6-GigabitEthernet0/0/1]ospfv3 1 area 0
R7
[r7]ospfv3 1
[r7-ospfv3-1]router-id 7.7.7.7
[r7-ospfv3-1]int lo0
[r7-LoopBack0]ospfv3 1 area 0
[r7-LoopBack0]int g0/0/0
[r7-GigabitEthernet0/0/0]ospfv3 1 area 0
[r7-GigabitEthernet0/0/0]int g0/0/1
[r7-GigabitEthernet0/0/1]ospfv3 1 area 0
R8
[r8]ospfv3 1
[r8-ospfv3-1]router-id 8.8.8.8
[r8-ospfv3-1]int lo0
[r8-LoopBack0]ospfv3 1 area 0
[r8-LoopBack0]int g0/0/0
[r8-GigabitEthernet0/0/0]ospfv3 1 area 0
4.3.BGP建邻
R4
[r4]bgp 1
[r4-bgp]router-id 4.4.4.4
[r4-bgp]peer 2002:2201:0102:1::2 as-number 2
[r4-bgp]ipv6
[r4-bgp-af-ipv6]peer 2002:2201:0102:1::2 enable
R5
[r5]bgp 64512
[r5-bgp]router-id 5.5.5.5
[r5-bgp]confederation id 2
[r5-bgp]peer 2002:2201:0102:1::1 as-number 1
[r5-bgp-af-ipv6]peer 2002:2201:0102:1::1 enable
[r5-bgp]peer 6::6 as-number 64512
[r5-bgp]peer 6::6 connect-interface LoopBack 0 5::5
[r5-bgp]ipv6
[r5-bgp-af-ipv6]peer 6::6 enable
R6
R7
[r7]bgp 64512
[r7-bgp]router-id 7.7.7.7
[r7-bgp]confederation id 2
[r7-bgp]confederation peer-as 64513
[r7-bgp]peer 6::6 as-number 64512
[r7-bgp]peer 6::6 connect-interface LoopBack 0 7::7
[r7-bgp]peer 8::8 as-number 64513
[r7-bgp]peer 8::8 connect-interface LoopBack 0 7::7
[r7-bgp]peer 8::8 ebgp-max-hop 2
[r7-bgp]ipv6
[r7-bgp-af-ipv6]peer 8::8 enable
[r7-bgp-af-ipv6]peer 6::6 enable
R8
[r8]bgp 64513
[r8-bgp]router-id 8.8.8.8
[r8-bgp]confederation id 2
[r8-bgp]confederation peer-as 64512
[r8-bgp]peer 7::7 as-number 64512
[r8-bgp]peer 7::7 connect-interface LoopBack 0 8::8
[r8-bgp]peer 7::7 ebgp-max-hop 2
[r8-bgp]ipv6
[r8-bgp-af-ipv6]peer 7::7 enable
4.4. 其他配置
R4--Tunner配置
[r4]int t0/0/0
[r4-Tunnel0/0/0]ipv6 enable
[r4-Tunnel0/0/0]ipv6 add 2002:2201:0102:2::1 64
[r4-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
[r4-Tunnel0/0/0]source 34.1.1.2[r4]ipv6 route-static 2002:: 16 Tunnel 0/0/0
需要一条静态直接去往左边
汇总并且宣告
[r5]ipv6 route-static 2002:2201:0102:8000:: 49 NULL 0
[r5]bgp 64512
[r5-bgp]ipv6
[r5-bgp-af-ipv6]network 2002:2201:0102:8000:: 49[r4]bgp 1
[r4-bgp]ipv6
[r4-bgp-af-ipv6]network 2002:: 16[r5-bgp-af-ipv6]peer 6::6 next-hop-local 这里要修改为本地不然R6没办法使用
[r6-bgp-af-ipv6]peer 7::7 reflect-client 反射器让R6能把路由传递给R7