题目
ip地址规划
R1:
GigabitEthernet0/0/1 192.168.2.1/24
LoopBack0 192.168.1.1/32
R2
GigabitEthernet0/0/0 200.1.23.1/24
GigabitEthernet0/0/1 192.168.2.2/24
GigabitEthernet0/0/2 192.168.2.2/24
LoopBack0 2.2.2.2/32
R3:
GigabitEthernet0/0/0 200.1.34.1/24
GigabitEthernet0/0/1 200.1.23.2/24
LoopBack0 3.3.3.3/32
R4:
GigabitEthernet0/0/0 192.168.3.2/24
GigabitEthernet0/0/1 200.1.34.2/24
GigabitEthernet0/0/2 192.168.3.2/24
GigabitEthernet4/0/0 200.1.47.1/24
LoopBack0 4.4.4.4/32
R5:
GigabitEthernet0/0/1 192.168.3.1/24
LoopBack0 192.168.4.1/32
R6:
GigabitEthernet0/0/2 192.168.2.1/24
LoopBack0 192.168.1.1/32
R7:
GigabitEthernet0/0/0 200.1.47.2/24
GigabitEthernet0/0/2 192.168.3.1/24
LoopBack0 192.168.4.2/32
MPLS——LDP配置
R2:
[R2]mpls lsr-id 2.2.2.2
[R2]mpls
[R2-mpls]mpls ldp
[R2-mpls-ldp]q
[R2-GigabitEthernet0/0/0]mpls
[R2-GigabitEthernet0/0/0]mpls ldp
R3:
[R3]mpls lsr-id 2.2.2.2
[R3]mpls
[R3-mpls]mpls ldp
[R3-mpls-ldp]q
[R3-GigabitEthernet0/0/0]mpls
[R3-GigabitEthernet0/0/0]mpls ldp
[R3-GigabitEthernet0/0/1]mpls
[R3-GigabitEthernet0/0/1]mpls ldp
R4:
[R4]mpls lsr-id 2.2.2.2
[R4]mpls
[R4-mpls]mpls ldp
[R4-mpls-ldp]q
[R4-GigabitEthernet0/0/1]mpls
[R4-GigabitEthernet0/0/1]mpls ldp
虚拟空间VRF
R2:
ip vpn-instance a
ipv4-family
route-distinguisher 1:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
ip vpn-instance b
ipv4-family
route-distinguisher 2:2
vpn-target 2:2 export-extcommunity
vpn-target 2:2 import-extcommunity
R4:
ip vpn-instance a
ipv4-family
route-distinguisher 1:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
ip vpn-instance b
ipv4-family
route-distinguisher 2:2
vpn-target 2:2 export-extcommunity
vpn-target 2:2 import-extcommunity
公网OSPF
R2:
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 200.1.23.0 0.0.0.255
R3:
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 200.1.23.0 0.0.0.255
network 200.1.34.0 0.0.0.255
R4:
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 200.1.34.0 0.0.0.255
network 200.1.47.0 0.0.0.255
BGP及重发布
R1:
192.168.3.0/24 Static 60 0 RD 192.168.2.2 GigabitEthernet0/0/1
192.168.4.0/24 Static 60 0 RD 192.168.2.2 GigabitEthernet0/0/1
R5:
192.168.1.0/24 Static 60 0 RD 192.168.3.2 GigabitEthernet0/0/1
192.168.2.0/24 Static 60 0 RD 192.168.3.2 GigabitEthernet0/0/1
R2:
bgp 2
router-id 2.2.2.2
peer 4.4.4.4 as-number 2
peer 4.4.4.4 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 4.4.4.4 enable
ipv4-family vpnv4
policy vpn-target
peer 4.4.4.4 enable
ipv4-family vpn-instance a
import-route direct
import-route static
ipv4-family vpn-instance b
import-route rip 1[R2]rip 1 vpn-instance b
[R2-rip-1]display this
[V200R003C00]
rip 1 vpn-instance b
version 2
network 192.168.2.0
import-route bgp
R4:
bgp 2
router-id 4.4.4.4
peer 2.2.2.2 as-number 2
peer 2.2.2.2 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.2 enable
ipv4-family vpn-instance a
import-route direct
import-route static
ipv4-family vpn-instance b
import-route ospf 2[R4]ospf 2 vpn-instance b
[R4-ospf-2]display this
[V200R003C00]
ospf 2 vpn-instance b
import-route bgp
area 0.0.0.1
network 192.168.3.0 0.0.0.255
R6:
rip 1
version 2
network 192.168.1.0
network 192.168.2.0
R7:
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 200.1.47.0 0.0.0.255
area 0.0.0.1
network 192.168.3.0 0.0.0.255
network 192.168.4.0 0.0.0.255