|
如图,创建sham-link拓扑,在R1、R2上建立sham-link。
下面是配置:
R1:
hostname R1
boot-start-marker
boot-end-marker
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
ip vrf vpn1
rd 100:1
route-target export 100:1
route-target import 100:1
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
ip tcp synwait-time 5
ip ssh version 1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface Loopback100
ip vrf forwarding vpn1
ip address 100.1.1.1 255.255.255.255
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
interface Serial0/0
ip address 12.1.1.1 255.255.255.0
mpls label protocol ldp
mpls ip
clock rate 2000000
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
interface Serial0/1
ip vrf forwarding vpn1
ip address 13.1.1.1 255.255.255.0
clock rate 2000000
interface FastEthernet1/0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet2/0
no ip address
shutdown
duplex auto
speed auto
router ospf 2 vrf vpn1
router-id 1.1.1.1
log-adjacency-changes
area 1 sham-link 100.1.1.1 100.1.1.2 cost 10
redistribute bgp 100 subnets
network 13.1.1.1 0.0.0.0 area 1
router rip
version 2
network 1.0.0.0
network 12.0.0.0
no auto-summary
router bgp 100
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community both
exit-address-family
address-family ipv4 vrf vpn1
redistribute ospf 2 vrf vpn1
no synchronization
network 100.1.1.1 mask 255.255.255.255
exit-address-family
ip forward-protocol nd
no ip http server
no ip http secure-server
no cdp log mismatch duplex
mpls ldp router-id Loopback0 force
R2:
hostname R2
boot-start-marker
boot-end-marker
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
ip vrf vpn1
rd 100:1
route-target export 100:1
route-target import 100:1
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
ip tcp synwait-time 5
ip ssh version 1
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Loopback100
ip vrf forwarding vpn1
ip address 100.1.1.2 255.255.255.255
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
interface Serial0/0
ip address 12.1.1.2 255.255.255.0
mpls label protocol ldp
mpls ip
clock rate 2000000
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
interface Serial0/1
ip vrf forwarding vpn1
ip address 24.1.1.2 255.255.255.0
clock rate 2000000
interface FastEthernet1/0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet2/0
no ip address
shutdown
duplex auto
speed auto
router ospf 2 vrf vpn1
router-id 2.2.2.2
log-adjacency-changes
area 1 sham-link 100.1.1.2 100.1.1.1 cost 10
redistribute bgp 100 subnets
network 24.1.1.2 0.0.0.0 area 1
router rip
version 2
network 2.0.0.0
network 12.0.0.0
no auto-summary
router bgp 100
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
no auto-summary
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community both
exit-address-family
address-family ipv4 vrf vpn1
redistribute ospf 2 vrf vpn1
no synchronization
network 100.1.1.2 mask 255.255.255.255
exit-address-family
ip forward-protocol nd
no ip http server
no ip http secure-server
no cdp log mismatch duplex
mpls ldp router-id Loopback0 force
另外:R2#sh ip ospf sham-links
Sham Link OSPF_SL0 to address 100.1.1.1 is up
Area 1 source address 100.1.1.2
Run as demand circuit
DoNotAge LSA allowed. Cost of using 10 State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40,
Hello due in 00:00:03
Adjacency State INIT (Hello suppressed)
Index 0/0, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
R2的邻接状态是INIT。
R1#sh ip osp sham-links
Sham Link OSPF_SL0 to address 100.1.1.2 is up
Area 1 source address 100.1.1.1
Run as demand circuit
DoNotAge LSA allowed. Cost of using 10 State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40,
Hello due in 00:00:05
R1看不到邻接状态。。。
R1#sh ip bgp vpnv4 all
BGP table version is 39, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1 (default for vrf vpn1)
* i3.3.3.3/32 2.2.2.2 129 100 0 ?
*> 13.1.1.3 65 32768 ?
* i4.4.4.4/32 2.2.2.2 65 100 0 ?
*> 13.1.1.3 129 32768 ?
* i13.1.1.0/24 2.2.2.2 192 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 24.1.1.0/24 13.1.1.3 192 32768 ?
* i 2.2.2.2 0 100 0 ?
* i34.1.1.0/24 2.2.2.2 128 100 0 ?
*> 13.1.1.3 128 32768 ?
*> 100.1.1.1/32 0.0.0.0 0 32768 i
*>i100.1.1.2/32 2.2.2.2 0 100 0 i
R1上到4.4.4.4/32也不是走的2.2.2.2这一跳,为什么???求解释。。。
|
|