企業mpls eigrp rip 互聯互通

之前學了一篇文章說的是isp mpls 網絡,主要說的是在一臺設備上有兩個公司需要通過專業分別進行互通。A-A  B-B. 前面A和isp使用的是ospf進行路由信息交換,B使用靜態路由指向isp網關。

  今天帶來的是單企業mpls ***互通。一遍網絡使用eigrp和PE端互通,另一端使用rip和PE端互通,P-PE使用ospf進行互通。

  拓撲如下:wKioL1Z3qC-C6XpfAAA6hRYsjAw784.png

目的:通過mpls網絡爲CE-A 和CE-B建立快速交換通道。使CE-A的loopback 0 能訪問Ce-B的loopback 0

ip地址規劃:

CE-A10.1.12.1 L0 1.1.1.1 

PE-A 10.1.12.2 10.1.23.2 2.2.2.2 

P 10.1.23.3 10.1.34.3 3.3.3.3

PE-B 10.1.34.4 10.1.45.4 4.4.4.4

CE-B 10.1.45.5 5.5.5.5   所有互聯地址爲24位,loopback地址爲32位

CE-A配置如下:

   router ei 90

   network 10.1.12.1 0.0.0.0 

   network 1.1.1.1 0.0.0.0 

因爲是CE端沒有其他配置了。

PE-A:

ip vrf a

rd 1:1

rt 1:1

int f0/0

ip vrf forwarding a

ip add 10.1.12.2 255.255.255.0

int f0/1

ip address 10.1.23.2 255.255.255.0

mpls ip

int l 0

ip add 2.2.2.2 255.255.255.255

router eigrp 90

 address-family ipv4 vrf a

  redistribute bgp 1 metric 1 1 1 1 1

  network 10.1.12.2 0.0.0.0

  no auto-summary

  autonomous-system 90

 exit-address-family             -----與CE-A互聯

router ospf 1                  ------mpls網絡互聯

 router-id 2.2.2.2

 log-adjacency-changes

 network 2.2.2.2 0.0.0.0 area 0

 network 10.1.23.2 0.0.0.0 area 0

!         

router bgp 1                   --------mbgp傳遞私網路由

 no bgp default ipv4-unicast

 bgp log-neighbor-changes

 neighbor 4.4.4.4 remote-as 1

 neighbor 4.4.4.4 ebgp-multihop 255

 neighbor 4.4.4.4 update-source Loopback0

 !

 address-family ***v4

  neighbor 4.4.4.4 activate

  neighbor 4.4.4.4 send-community extended

  neighbor 4.4.4.4 next-hop-self

 exit-address-family

 !

 address-family ipv4 vrf a

  redistribute eigrp 90 metric 1        ----metric值不設置對端rip學習到cost太大,不放入路由表。(之前一直CE-B學習不到1.1.1.1這條路由,修改cost後才行)

  no synchronization

 exit-address-family

P:

interface Loopback0

 ip address 3.3.3.3 255.255.255.255

interface FastEthernet0/0

 ip address 10.1.23.3 255.255.255.0

 duplex auto

 speed auto

 mpls ip

interface FastEthernet0/1

 ip address 10.1.34.3 255.255.255.0

 duplex auto

 speed auto

 mpls ip

router ospf 1

 router-id 3.3.3.3

 log-adjacency-changes

 network 3.3.3.3 0.0.0.0 area 0

 network 10.1.23.3 0.0.0.0 area 0

 network 10.1.34.3 0.0.0.0 area 0

P主要是接口開啓mpls ip 建立mpls網絡,爲路由傳遞標籤。

PE-B:

 

ip vrf a

 rd 1:1   

 route-target export 1:1

 route-target import 1:1

interface Loopback0

 ip address 4.4.4.4 255.255.255.255

interface FastEthernet0/0

 ip address 10.1.34.4 255.255.255.0

 duplex auto

 speed auto

 mpls ip

interface FastEthernet0/1

 ip vrf forwarding a

 ip address 10.1.45.4 255.255.255.0

 duplex auto

 speed auto

router ospf 1

 log-adjacency-changes

 network 4.4.4.4 0.0.0.0 area 0

 network 10.1.34.4 0.0.0.0 area 0

router rip

 version 2

  address-family ipv4 vrf a

  redistribute bgp 1 metric transparent

  network 10.0.0.0

  no auto-summary

 exit-address-family

router bgp 1

 no bgp default ipv4-unicast

 bgp log-neighbor-changes

 neighbor 2.2.2.2 remote-as 1

 neighbor 2.2.2.2 update-source Loopback0

 !

 address-family ipv4

  neighbor 2.2.2.2 activate

  no auto-summary

  no synchronization

 exit-address-family

 !

 address-family ***v4

  neighbor 2.2.2.2 activate

  neighbor 2.2.2.2 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf a

  redistribute rip

  no synchronization

 exit-address-family

CE-B:

router rip

 version 2

 network 5.0.0.0

 network 10.0.0.0

 no auto-summary

驗證結果:


CE-A#sh ip route 

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route


Gateway of last resort is not set


     1.0.0.0/32 is subnetted, 1 subnets

C       1.1.1.1 is directly connected, Loopback0

     5.0.0.0/32 is subnetted, 1 subnets

D EX    5.5.5.5 [170/2560025856] via 10.1.12.2, 00:44:04, FastEthernet0/0

     10.0.0.0/24 is subnetted, 2 subnets

C       10.1.12.0 is directly connected, FastEthernet0/0

D EX    10.1.45.0 [170/2560025856] via 10.1.12.2, 00:44:04, FastEthernet0/0

在CE-A上已經學習到了對端CE-B的路由信息。

CE-A#ping 5.5.5.5 so 1.1.1.1


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:

Packet sent with a source address of 1.1.1.1 

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 40/42/48 ms

PE-A#sh mpls forwarding-table 查看標籤信息,主要用於排錯

Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop    

tag    tag or VC   or Tunnel Id      switched   interface              

16     16          4.4.4.4/32        0          Fa0/1      10.1.23.3    

17     Pop tag     3.3.3.3/32        0          Fa0/1      10.1.23.3    

18     Pop tag     10.1.34.0/24      0          Fa0/1      10.1.23.3    

19     Untagged    1.1.1.1/32[V]     456        Fa0/0      10.1.12.1    

20     Aggregate   10.1.12.0/24[V]   0  

P#sh mpls ldp neighbor        查看ldp鄰居

    Peer LDP Ident: 4.4.4.4:0; Local LDP Ident 3.3.3.3:0

        TCP connection: 4.4.4.4.45281 - 3.3.3.3.646

        State: Oper; Msgs sent/rcvd: 61/62; Downstream

        Up time: 00:46:58

        LDP discovery sources:

          FastEthernet0/1, Src IP addr: 10.1.34.4

        Addresses bound to peer LDP Ident:

          10.1.34.4       4.4.4.4         

    Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 3.3.3.3:0

        TCP connection: 2.2.2.2.646 - 3.3.3.3.21529

        State: Oper; Msgs sent/rcvd: 61/62; Downstream

        Up time: 00:46:48

        LDP discovery sources:

          FastEthernet0/0, Src IP addr: 10.1.23.2

        Addresses bound to peer LDP Ident:

          10.1.23.2       2.2.2.2   

PE-B#sh ip rou vrf a    查看vrf路由表


Routing Table: a

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route


Gateway of last resort is not set


     1.0.0.0/32 is subnetted, 1 subnets

B       1.1.1.1 [200/1] via 2.2.2.2, 00:47:09

     5.0.0.0/32 is subnetted, 1 subnets

R       5.5.5.5 [120/1] via 10.1.45.5, 00:00:18, FastEthernet0/1

     10.0.0.0/24 is subnetted, 2 subnets

B       10.1.12.0 [200/0] via 2.2.2.2, 00:47:09

C       10.1.45.0 is directly connected, FastEthernet0/1


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