Lab 6 Sham Link

Topology:

 

实验目的:理解Sham-link的使用场景。

说明:默认情况下,R5,R4互通,流量是经过直连链路。通过配置sham-link,R5,R4互通流量经过ISP,R4,R5之间的直连链路为备份链路。(假设R4,R5之间的链路为低带宽)

Step 1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。

R1:

lo 0:1.1.1.1/32

lo 1:11.11.11.11/32

s0/0:12.1.1.1/24

s0/1:15.1.1.1/24

R2:

lo 0:2.2.2.2/32

s0/0:12.1.1.2/24

s0/1:23.1.1.2/24

R3:

lo 0:3.3.3.3/32

lo 1:33.33.33.33/32

s0/0:23.1.1.3/24

s0/1:34.1.1.3/24

R4:

lo 0:4.4.4.4/32

s0/0:34.1.1.4/24

f1/0:45.1.1.4/24

R5:

lo 0:5.5.5.5/32

s0/1:15.1.1.5/24

f1/0:45.1.1.5/24

Step 2、在R1,R2,R3之间运行isis。

R1:

router isis

 net 49.0001.1111.1111.1111.00

int lo 0

 ip router isis

int s0/0

 ip router isis

R2:

router isis

 net 49.0001.2222.2222.2222.00

int lo 0

ip router isis

int s0/0

ip router isis

int s0/1

ip router isis

R3:

router isis

 net 49.0001.3333.3333.3333.00

int lo 0

 ip router isis

int s0/0

 ip router isis

Step 3、启用ip cef。

全局模式下:ip cef

Step 4、R1,R2,R3配置MPLS。

R1:

ip cef   

mpls label range 1000 1999

mpls label protocol ldp

tag-switching tdp router-id Loopback0

int s0/0

mpls ip

R2:

ip cef

mpls label range 2000 2999

mpls label protocol ldp

mpls ldp router-id lo 0

int s0/0

mpls ip

int s0/1

mpls ip

R3:

ip cef

mpls label range 3000 3999

mpls label protocol ldp

mpls ldp router-id lo 0

int s0/0

mpls ip

Step 5、R1,R3配置VRF。

R1:

ip vrf AAA

rd 100:1

route-target both 100:1

interface Loopback1

 ip vrf forwarding AAA

 ip address 11.11.11.11 255.255.255.255

 no clns route-cache

!

interface Serial0/1

 ip vrf forwarding AAA

 ip address 15.1.1.1 255.255.255.0

 serial restart-delay 0

 no clns route-cache

!

R3:

!

ip vrf AAA

 rd 100:1

 route-target export 100:1

 route-target import 100:1

interface Loopback1

 ip vrf forwarding AAA

 ip address 33.33.33.33 255.255.255.255

 no clns route-cache

interface Serial0/1

 ip vrf forwarding AAA

 ip address 34.1.1.3 255.255.255.0

 serial restart-delay 0

 no clns route-cache

!

Step 6、R1,R3配置MP-BGP。

R1:

router bgp 123

 bgp router-id 1.1.1.1

 no bgp default ipv4-unicast

 bgp log-neighbor-changes

 neighbor 3.3.3.3 remote-as 123

 neighbor 3.3.3.3 update-source Loopback0

 !

 address-family vpnv4

 neighbor 3.3.3.3 activate

 neighbor 3.3.3.3 send-community extended

 exit-address-family

 !       

 address-family ipv4 vrf AAA

 redistribute connected

 redistribute ospf 100

 net 11.11.11.11 mask 255.255.255.255

 no auto-summary

 no synchronization

 exit-address-family

R3:

router bgp 123

 bgp router-id 3.3.3.3

 no bgp default ipv4-unicast

 bgp log-neighbor-changes

 neighbor 1.1.1.1 remote-as 123

 neighbor 1.1.1.1 update-source Loopback0

 !

 address-family ipv4

 neighbor 1.1.1.1 activate

 no auto-summary

 no synchronization

 exit-address-family

 !

 address-family vpnv4

 neighbor 1.1.1.1 activate

 neighbor 1.1.1.1 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf AAA

 redistribute connected

 redistribute ospf 100

 net 33.33.33.33 mask 255.255.255.255

 no auto-summary

 no synchronization

 exit-address-family

Step 7、R4,R5配置ospf 100。

R1:

router ospf 100 vrf AAA

 log-adjacency-changes

 area 0 sham-link 11.11.11.11 33.33.33.33

 redistribute bgp 123 subnets

 network 15.1.1.0 0.0.0.255 area 0

R3:

router ospf 100 vrf AAA

 log-adjacency-changes

 area 0 sham-link 33.33.33.33 11.11.11.11

 redistribute bgp 123 subnets

 network 34.1.1.0 0.0.0.255 area 0

Step 8、查看的相关命令以及测试结果。

R1#show ip ospf 100 sh

Sham Link OSPF_SL0 to address 33.33.33.33 is up

Area 0 source address 11.11.11.11

  Run as demand circuit

  DoNotAge LSA allowed. Cost of using 1 State POINT_TO_POINT,

  Timer intervals configured, Hello 10, Dead 40, Wait 40,

    Hello due in 00:00:05

    Adjacency State FULL (Hello suppressed)

    Index 2/2, retransmission queue length 0, number of retransmission 1

    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)

    Last retransmission scan length is 1, maximum is 1

    Last retransmission scan time is 0 msec, maximum is 0 msec

猜你喜欢

转载自www.cnblogs.com/cyrusxx/p/12817784.html