多域mpls *** 類型A

跨域*** 組網-OptionA

組網需求

R1 和R6 屬於同一個***。R1 通過AS100 的R2 接入,R6 通過AS200 的R5 接入。採用OptionA方式實現跨域的BGP/MPLS ***.

r1#show  run

hostname r1

!

no ip domain lookup

!

ip cef

!

interface Loopback0

 ip address 10.1.1.1 255.255.255.0

!

interface FastEthernet0/0

 ip address 1.1.1.1 255.255.255.0

 duplex half

!

router bgp 1000

 no synchronization

 bgp log-neighbor-changes

 redistribute connected

 neighbor 1.1.1.2 remote-as 100

 no auto-summary

!

ip classless

!

line con 0

 exec-timeout 0 0

 logging synchronous

!

End

r2#show  run

hostname r2

!

no ip domain lookup

!

ip vrf ***

 rd 100:1

 route-target export 100:1

 route-target import 100:1

!

ip cef

!

!

interface Loopback0

 ip address 20.1.1.1 255.255.255.255

!         

interface FastEthernet0/0

 ip vrf forwarding ***

 ip address 1.1.1.2 255.255.255.0

 duplex half

!

interface FastEthernet1/0

 ip address 2.1.1.1 255.255.255.0

 duplex half

 tag-switching ip

!

router ospf 1

 log-adjacency-changes

 network 2.1.1.0 0.0.0.255 area 0

 network 20.1.1.1 0.0.0.0 area 0

!

router bgp 100

 no synchronization

 bgp log-neighbor-changes

 neighbor 30.1.1.1 remote-as 100

 neighbor 30.1.1.1 update-source Loopback0

 no auto-summary

 !

 address-family ***v4

 neighbor 30.1.1.1 activate

 neighbor 30.1.1.1 next-hop-self

 neighbor 30.1.1.1 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf ***

 redistribute connected

 neighbor 1.1.1.1 remote-as 1000

 neighbor 1.1.1.1 activate

 no auto-summary

 no synchronization

 exit-address-family

!

ip classless

!

line con 0

 exec-timeout 0 0

 logging synchronous

!

End

r3#show run

hostname r3

!

no ip domain lookup

!

ip vrf ***

 rd 100:2

 route-target export 100:1

 route-target import 100:1

!

ip cef

!

interface Loopback0

 ip address 30.1.1.1 255.255.255.255

!         

interface FastEthernet0/0

 ip vrf forwarding ***

 ip address 3.1.1.1 255.255.255.0

 duplex half

!

interface FastEthernet1/0

 ip address 2.1.1.2 255.255.255.0

 duplex half

 tag-switching ip

!

router ospf 1

 log-adjacency-changes

 network 2.1.1.2 0.0.0.0 area 0

 network 30.1.1.1 0.0.0.0 area 0

!

router bgp 100

 no synchronization

 bgp log-neighbor-changes

 neighbor 20.1.1.1 remote-as 100

 neighbor 20.1.1.1 update-source Loopback0

 no auto-summary

 !

 address-family ***v4

 neighbor 20.1.1.1 activate

 neighbor 20.1.1.1 next-hop-self

 neighbor 20.1.1.1 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf ***

 neighbor 3.1.1.2 remote-as 200

 neighbor 3.1.1.2 activate

 no auto-summary

 no synchronization

 exit-address-family

!

ip classless

!

line con 0

 exec-timeout 0 0

 logging synchronous

!

End

r4#show  run

hostname r4

!

no ip domain lookup

!

ip vrf ***

 rd 200:2

 route-target export 100:1

 route-target import 100:1

!

ip cef

!

interface Loopback0

 ip address 40.1.1.1 255.255.255.255

!         

interface FastEthernet0/0

 ip vrf forwarding ***

 ip address 3.1.1.2 255.255.255.0

 duplex half

!

interface FastEthernet1/0

 ip address 4.1.1.1 255.255.255.0

 duplex half

 tag-switching ip

!

router ospf 1

 log-adjacency-changes

 network 4.1.1.0 0.0.0.255 area 0

 network 40.1.1.1 0.0.0.0 area 0

!

router bgp 200

 no synchronization

 bgp log-neighbor-changes

 neighbor 50.1.1.1 remote-as 200

 neighbor 50.1.1.1 update-source Loopback0

 no auto-summary

 !

 address-family ***v4

 neighbor 50.1.1.1 activate

 neighbor 50.1.1.1 next-hop-self

 neighbor 50.1.1.1 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf ***

 neighbor 3.1.1.1 remote-as 100

 neighbor 3.1.1.1 activate

 no auto-summary

 no synchronization

 exit-address-family

!

ip classless

!

line con 0

 exec-timeout 0 0

 logging synchronous

!

End

r5#show run

!

!

hostname r5

!

no ip domain lookup

!

ip vrf ***

 rd 200:1

 route-target export 100:1

 route-target import 100:1

!

ip cef

!

interface Loopback0

 ip address 50.1.1.1 255.255.255.255

!         

interface FastEthernet0/0

 ip vrf forwarding ***

 ip address 5.1.1.1 255.255.255.0

 duplex half

!

interface FastEthernet1/0

 ip address 4.1.1.2 255.255.255.0

 duplex half

 tag-switching ip

!

router ospf 1

 log-adjacency-changes

 network 4.1.1.0 0.0.0.255 area 0

 network 50.1.1.1 0.0.0.0 area 0

!

router bgp 200

 no synchronization

 bgp log-neighbor-changes

 neighbor 40.1.1.1 remote-as 200

 neighbor 40.1.1.1 update-source Loopback0

 no auto-summary

 !

 address-family ***v4

 neighbor 40.1.1.1 activate

 neighbor 40.1.1.1 next-hop-self

 neighbor 40.1.1.1 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf ***

 redistribute connected

 neighbor 5.1.1.2 remote-as 2000

 neighbor 5.1.1.2 activate

 no auto-summary

 no synchronization

 exit-address-family

!

ip classless

!

line con 0

 exec-timeout 0 0

 logging synchronous

!

End

r6#show run

!

hostname r6

!

!

no ip domain lookup

!

ip cef

!

interface Loopback0

 ip address 60.1.1.1 255.255.255.0

!

interface FastEthernet0/0

 ip address 5.1.1.2 255.255.255.0

 duplex half

!

interface FastEthernet1/0

 no ip address

 shutdown

 duplex half

!

router bgp 2000

 no synchronization

 bgp log-neighbor-changes

 redistribute connected

 neighbor 5.1.1.1 remote-as 200

 no auto-summary

!

ip classless

!

line con 0

 exec-timeout 0 0

 logging synchronous

!

end

r1#    show    ip  route

     1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, FastEthernet0/0

     5.0.0.0/24 is subnetted, 1 subnets

B       5.1.1.0 [20/0] via 1.1.1.2, 00:12:08

     10.0.0.0/24 is subnetted, 1 subnets

C       10.1.1.0 is directly connected, Loopback0

     60.0.0.0/24 is subnetted, 1 subnets

B       60.1.1.0 [20/0] via 1.1.1.2, 00:12:08

r2#show  ip  route   vrf    ***

Routing Table: ***

     1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, FastEthernet0/0

     5.0.0.0/24 is subnetted, 1 subnets

B       5.1.1.0 [200/0] via 30.1.1.1, 00:09:55

     10.0.0.0/24 is subnetted, 1 subnets

B       10.1.1.0 [20/0] via 1.1.1.1, 00:39:04

     60.0.0.0/24 is subnetted, 1 subnets

B       60.1.1.0 [200/0] via 30.1.1.1, 00:09:55

r2#show ip ro

     2.0.0.0/24 is subnetted, 1 subnets

C       2.1.1.0 is directly connected, FastEthernet1/0

     20.0.0.0/32 is subnetted, 1 subnets

C       20.1.1.1 is directly connected, Loopback0

     30.0.0.0/32 is subnetted, 1 subnets

O       30.1.1.1 [110/2] via 2.1.1.2, 00:46:41, FastEthernet1/0

r3#  show ip ro  vrf  ***

Routing Table: ***

     1.0.0.0/24 is subnetted, 1 subnets

B       1.1.1.0 [200/0] via 20.1.1.1, 00:16:55

     3.0.0.0/24 is subnetted, 1 subnets

C       3.1.1.0 is directly connected, FastEthernet0/0

     5.0.0.0/24 is subnetted, 1 subnets

B       5.1.1.0 [20/0] via 3.1.1.2, 00:10:32

     10.0.0.0/24 is subnetted, 1 subnets

B       10.1.1.0 [200/0] via 20.1.1.1, 00:16:55

     60.0.0.0/24 is subnetted, 1 subnets

B       60.1.1.0 [20/0] via 3.1.1.2, 00:10:32

r3#show  ip ro

     2.0.0.0/24 is subnetted, 1 subnets

C       2.1.1.0 is directly connected, FastEthernet1/0

     20.0.0.0/32 is subnetted, 1 subnets

O       20.1.1.1 [110/2] via 2.1.1.1, 00:47:18, FastEthernet1/0

     30.0.0.0/32 is subnetted, 1 subnets

C       30.1.1.1 is directly connected, Loopback0

r4#  show ip ro  vrf  ***

Routing Table: ***

     1.0.0.0/24 is subnetted, 1 subnets

B       1.1.1.0 [20/0] via 3.1.1.1, 00:13:11

     3.0.0.0/24 is subnetted, 1 subnets

C       3.1.1.0 is directly connected, FastEthernet0/0

     5.0.0.0/24 is subnetted, 1 subnets

B       5.1.1.0 [200/0] via 50.1.1.1, 00:12:22

     10.0.0.0/24 is subnetted, 1 subnets

B       10.1.1.0 [20/0] via 3.1.1.1, 00:13:11

     60.0.0.0/24 is subnetted, 1 subnets

B       60.1.1.0 [200/0] via 50.1.1.1, 00:12:22

r4#show  ip  ro

       

     

     50.0.0.0/32 is subnetted, 1 subnets

O       50.1.1.1 [110/2] via 4.1.1.2, 00:53:00, FastEthernet1/0

     4.0.0.0/24 is subnetted, 1 subnets

C       4.1.1.0 is directly connected, FastEthernet1/0

     40.0.0.0/32 is subnetted, 1 subnets

C       40.1.1.1 is directly connected, Loopback0

r5#   show  ip ro  vrf  ***

Routing Table: ***

     1.0.0.0/24 is subnetted, 1 subnets

B       1.1.1.0 [200/0] via 40.1.1.1, 00:12:37

     5.0.0.0/24 is subnetted, 1 subnets

C       5.1.1.0 is directly connected, FastEthernet0/0

     10.0.0.0/24 is subnetted, 1 subnets

B       10.1.1.0 [200/0] via 40.1.1.1, 00:12:37

     60.0.0.0/24 is subnetted, 1 subnets

B       60.1.1.0 [20/0] via 5.1.1.2, 00:26:13

r5#show ip ro

     50.0.0.0/32 is subnetted, 1 subnets

C       50.1.1.1 is directly connected, Loopback0

     4.0.0.0/24 is subnetted, 1 subnets

C       4.1.1.0 is directly connected, FastEthernet1/0

     40.0.0.0/32 is subnetted, 1 subnets

O       40.1.1.1 [110/2] via 4.1.1.1, 00:33:35, FastEthernet1/0

r6#    show ip ro

     1.0.0.0/24 is subnetted, 1 subnets

B       1.1.1.0 [20/0] via 5.1.1.1, 00:14:49

     5.0.0.0/24 is subnetted, 1 subnets

C       5.1.1.0 is directly connected, FastEthernet0/0

     10.0.0.0/24 is subnetted, 1 subnets

B       10.1.1.0 [20/0] via 5.1.1.1, 00:14:49

     60.0.0.0/24 is subnetted, 1 subnets

C       60.1.1.0 is directly connected, Loopback0

r2#show   mpls     forwarding-table  

Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop    

tag    tag or VC   or Tunnel Id      switched   interface              

16     Pop tag     30.1.1.1/32       0          Fa1/0      2.1.1.2      

17     Aggregate   1.1.1.0/24[V]     520                                

18     Untagged    10.1.1.0/24[V]    2280       Fa0/0      1.1.1.1   

r3#show mpls  forwarding-table   

Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop    

tag    tag or VC   or Tunnel Id      switched   interface              

16     Pop tag     20.1.1.1/32       0          Fa1/0      2.1.1.1      

17     Untagged    5.1.1.0/24[V]     2280       Fa0/0      3.1.1.2      

18     Untagged    60.1.1.0/24[V]    570        Fa0/0      3.1.1.2 

r4#show     mpls   forwarding-table   

Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop    

tag    tag or VC   or Tunnel Id      switched   interface              

16     Pop tag     50.1.1.1/32       0          Fa1/0      4.1.1.2      

17     Untagged    1.1.1.0/24[V]     570        Fa0/0      3.1.1.1      

18     Untagged    10.1.1.0/24[V]    2280       Fa0/0      3.1.1.1  

r5#   show   mpls  forwarding-table   

Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop    

tag    tag or VC   or Tunnel Id      switched   interface              

16     Pop tag     40.1.1.1/32       0          Fa1/0      4.1.1.1      

19     Aggregate   5.1.1.0/24[V]     2080                               

20     Untagged    60.1.1.0/24[V]    570        Fa0/0      5.1.1.2 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章