Конфигурация маршрутизаторов:

Маршрутизатор Balagan-Telekom:

!

hostname balagan

!

interface Loopback1

 ip address 101.0.0.1 255.255.255.255

!

interface FastEthernet0/0

 description to R1

 ip address 65.1.0.2 255.255.255.252

!

router bgp 651

 bgp log-neighbor-changes

 network 101.0.0.0 mask 255.255.0.0

 neighbor 65.1.0.1 remote-as 100

!

ip route 101.0.0.0 255.255.0.0 Null0

!

Маршрутизатор R1:

!

hostname R1

!

ip cef

!

interface Loopback0

 ip address 1.1.1.1 255.255.255.255

!

interface FastEthernet0/0

 description to R2

 ip address 10.0.12.1 255.255.255.0

 mpls ip

!

interface FastEthernet0/1

 description to R3

 ip address 10.0.13.1 255.255.255.0

 mpls ip

!

interface FastEthernet1/0

 description to Balagan-Telekom

 ip address 65.1.0.1 255.255.255.252

!

router ospf 1

 network 1.1.1.1 0.0.0.0 area 0

 network 10.0.0.0 0.0.255.255 area 0

!

router bgp 100

 bgp log-neighbor-changes

 network 100.0.0.0 mask 255.255.0.0

 neighbor 6.6.6.6 remote-as 100

 neighbor 6.6.6.6 update-source Loopback0

 neighbor 6.6.6.6 next-hop-self

 neighbor 65.1.0.2 remote-as 651

!

ip route 100.0.0.0 255.255.0.0 Null0

!

mpls ldp router-id Loopback0 force

!

Маршрутизатор R2:

!

hostname R2

!

ip cef

!

interface Loopback0

 ip address 2.2.2.2 255.255.255.255

!

interface FastEthernet0/0

 description to R5

 ip address 10.0.25.2 255.255.255.0

 mpls ip

!

interface FastEthernet0/1

 description to R1

 ip address 10.0.12.2 255.255.255.0

 mpls ip  

!

router ospf 1

 network 2.2.2.2 0.0.0.0 area 0

 network 10.0.0.0 0.0.255.255 area 0

!

mpls ldp router-id Loopback0 force

!

Маршрутизатор R3:

!

hostname R3

!

ip cef

!

interface Loopback0

 ip address 3.3.3.3 255.255.255.255

!

interface FastEthernet0/0

 description to R1

 ip address 10.0.13.3 255.255.255.0

 mpls ip

!

interface FastEthernet0/1

 description to R4

 ip address 10.0.34.3 255.255.255.0

 mpls ip  

!        

router ospf 1

 network 3.3.3.3 0.0.0.0 area 0

 network 10.0.0.0 0.0.255.255 area 0

!

mpls ldp router-id Loopback0 force

!

Маршрутизатор R4:

!

hostname R4

!

ip cef

!

interface Loopback0

 ip address 4.4.4.4 255.255.255.255

!

interface FastEthernet0/0

 description to R3

 ip address 10.0.34.4 255.255.255.0

 mpls ip

!

interface FastEthernet0/1

 description to R5

 ip address 10.0.45.4 255.255.255.0

 mpls ip  

!        

router ospf 1

 network 4.4.4.4 0.0.0.0 area 0

 network 10.0.0.0 0.0.255.255 area 0

!

mpls ldp router-id Loopback0 force

!

Маршрутизатор R5:

!

hostname R5

!

ip cef

!

!

interface Loopback0

 ip address 5.5.5.5 255.255.255.255

!

interface Loopback100

 no ip address

!

interface FastEthernet0/0

 description to R4

 ip address 10.0.45.5 255.255.255.0

 mpls ip

!

interface FastEthernet0/1

 description to R2

 ip address 10.0.25.5 255.255.255.0

 mpls ip  

!        

interface FastEthernet1/0

 description to R6

 ip address 172.16.56.5 255.255.255.0

 mpls ip  

!        

!

router ospf 1

 network 5.5.5.5 0.0.0.0 area 0

 network 10.0.0.0 0.0.255.255 area 0

!

mpls ldp router-id Loopback0 force

!

Маршрутизатор R6:

!

hostname R6

!

ip cef

!

interface Loopback1

 ip address 100.0.0.1 255.255.255.255

!

interface Loopback0

 ip address 6.6.6.6 255.255.255.255

!

interface FastEthernet0/0

 description to R5

 ip address 10.0.56.6 255.255.255.0

 mpls ip

!

interface FastEthernet0/1

 description to Filkin

 ip address 65.2.0.1 255.255.255.252

!

router ospf 1

 network 6.6.6.6 0.0.0.0 area 0

 network 10.0.0.0 0.0.255.255 area 0

!

router bgp 100

 bgp log-neighbor-changes

 network 100.0.0.0 mask 255.255.0.0

 neighbor 1.1.1.1 remote-as 100

 neighbor 1.1.1.1 update-source Loopback0

 neighbor 1.1.1.1 next-hop-self

 neighbor 65.2.0.2 remote-as 652

!

ip route 100.0.0.0 255.255.0.0 Null0

!

mpls ldp router-id Loopback0 force

!

Маршрутизатор Филькин Сертификат:

!

hostname filkin

!

interface Loopback1

 ip address 102.0.0.1 255.255.255.255

!

interface FastEthernet0/0

 description to R6

 ip address 65.2.0.2 255.255.255.252

!

router bgp 652

 bgp log-neighbor-changes

 network 102.0.0.0 mask 255.255.0.0

 neighbor 65.2.0.1 remote-as 100

!

ip route 102.0.0.0 255.255.0.0 Null0

==============================

R1#sh ip route

Codes: L - local, 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, H - NHRP, l - LISP

           + - replicated route, % - next hop override

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

      2.0.0.0/32 is subnetted, 1 subnets

O            2.2.2.2 [110/11] via 10.0.12.2, 02:09:48, FastEthernet0/0

      3.0.0.0/32 is subnetted, 1 subnets

O            3.3.3.3 [110/11] via 10.0.13.3, 02:09:38, FastEthernet0/1

      4.0.0.0/32 is subnetted, 1 subnets

O            4.4.4.4 [110/21] via 10.0.13.3, 02:09:38, FastEthernet0/1

      5.0.0.0/32 is subnetted, 1 subnets

O            5.5.5.5 [110/21] via 10.0.12.2, 02:09:38, FastEthernet0/0

      6.0.0.0/32 is subnetted, 1 subnets

O            6.6.6.6 [110/31] via 10.0.12.2, 01:54:02, FastEthernet0/0

      10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks

C        10.0.12.0/24 is directly connected, FastEthernet0/0

L        10.0.12.1/32 is directly connected, FastEthernet0/0

C        10.0.13.0/24 is directly connected, FastEthernet0/1

L        10.0.13.1/32 is directly connected, FastEthernet0/1

O        10.0.25.0/24 [110/20] via 10.0.12.2, 02:09:38, FastEthernet0/0

O        10.0.34.0/24 [110/20] via 10.0.13.3, 02:09:38, FastEthernet0/1

O        10.0.45.0/24 [110/30] via 10.0.13.3, 02:09:38, FastEthernet0/1

                          [110/30] via 10.0.12.2, 02:09:38, FastEthernet0/0

O        10.0.56.0/24 [110/30] via 10.0.12.2, 01:54:07, FastEthernet0/0

      65.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C        65.1.0.0/30 is directly connected, FastEthernet1/0

L        65.1.0.1/32 is directly connected, FastEthernet1/0

      100.0.0.0/16 is subnetted, 1 subnets

S            100.0.0.0 is directly connected, Null0

      101.0.0.0/16 is subnetted, 1 subnets

B            101.0.0.0 [20/0] via 65.1.0.2, 01:58:26

      102.0.0.0/16 is subnetted, 1 subnets

B            102.0.0.0 [200/0] via 6.6.6.6, 01:49:49

R1#sh ip bgp

BGP table version is 21, 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, m multipath, b backup-path, f RT-Filter,

                  x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

         Network              Next Hop                Metric LocPrf Weight Path

 * i 100.0.0.0/16         6.6.6.6                      0        100          0 i

 *>                       0.0.0.0                      0             32768 i

 *>  101.0.0.0/16         65.1.0.2                     0                 0 651 i

 *>i 102.0.0.0/16         6.6.6.6                      0        100          0 652 i

R1#sh mpls forwarding-table

Local          Outgoing   Prefix               Bytes Label   Outgoing   Next Hop    

Label          Label          or Tunnel Id         Switched          interface              

16             Pop Label  2.2.2.2/32           0                 Fa0/0          10.0.12.2  

17             Pop Label  10.0.25.0/24         0                 Fa0/0          10.0.12.2  

18             19         5.5.5.5/32           0                 Fa0/0          10.0.12.2  

19             22         4.4.4.4/32           0                 Fa0/1          10.0.13.3  

20             Pop Label  3.3.3.3/32           0                 Fa0/1          10.0.13.3  

21             23         10.0.45.0/24         0                 Fa0/0          10.0.12.2  

               23         10.0.45.0/24         0                 Fa0/1          10.0.13.3  

22             Pop Label  10.0.34.0/24         0                 Fa0/1          10.0.13.3  

23             24         6.6.6.6/32           0                 Fa0/0          10.0.12.2  

24             25         10.0.56.0/24         0                 Fa0/0          10.0.12.2  

R1#sh ip cef 102.0.0.0/16 detail

102.0.0.0/16, epoch 0, flags rib only nolabel, rib defined all labels

  recursive via 6.6.6.6

        nexthop 10.0.12.2 FastEthernet0/0 label 24

R1#sh ip cef 102.0.0.0/16 internal

102.0.0.0/16, epoch 0, flags rib only nolabel, rib defined all labels, RIB[B], refcount 5, per-destination sharing

  sources: RIB

  feature space:

   IPRM: 0x00018000

  ifnums:

   FastEthernet0/0(3): 10.0.12.2

  path F283BE08, path list F28CDB7C, share 1/1, type recursive, for IPv4

  recursive via 6.6.6.6[IPv4:Default], fib F282C304, 1 terminal fib, v4:Default:6.6.6.6/32

        path F283BFC8, path list F24D9D8C, share 1/1, type attached nexthop, for IPv4

          MPLS short path extensions: MOI flags = 0x0 label 24

        nexthop 10.0.12.2 FastEthernet0/0 label 24, adjacency IP adj out of FastEthernet0/0, addr 10.0.12.2 F1C4D0E0

  output chain: label 24 TAG adj out of FastEthernet0/0, addr 10.0.12.2 F1C4CFB0

-------------------------------------------------------------------------

R2#sh mpls forwarding-table

Local          Outgoing   Prefix               Bytes Label   Outgoing   Next Hop

Label          Label          or Tunnel Id         Switched          interface

16             Pop Label  1.1.1.1/32           18768             Fa0/1          10.0.12.1

18             Pop Label  10.0.13.0/24         0                 Fa0/1          10.0.12.1

19             Pop Label  5.5.5.5/32           0                 Fa0/0          10.0.25.5

20             17         4.4.4.4/32           0                 Fa0/0          10.0.25.5

21             20         3.3.3.3/32           0                 Fa0/1          10.0.12.1

22             22         10.0.34.0/24         0                 Fa0/1          10.0.12.1

               24         10.0.34.0/24         0                 Fa0/0          10.0.25.5

23             Pop Label  10.0.45.0/24         0                 Fa0/0          10.0.25.5

24             16         6.6.6.6/32           18206             Fa0/0          10.0.25.5

25             Pop Label  10.0.56.0/24         0                 Fa0/0          10.0.25.5

-------------------------------------------------------------------------

R6#sh ip bgp

BGP table version is 16, local router ID is 100.0.0.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

                  r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

                  x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

         Network              Next Hop                Metric LocPrf Weight Path

 * i 100.0.0.0/16         1.1.1.1                      0        100          0 i

 *>                       0.0.0.0                      0             32768 i

 *>i 101.0.0.0/16         1.1.1.1                      0        100          0 651 i

 *>  102.0.0.0/16         65.2.0.2                     0                 0 652 i

R6#sh ip cef 101.0.0.0/16 detail

101.0.0.0/16, epoch 0, flags rib only nolabel, rib defined all labels

  recursive via 1.1.1.1

        nexthop 10.0.56.5 FastEthernet0/0 label 20

R6#sh mpls forwarding-table      

Local          Outgoing   Prefix               Bytes Label   Outgoing   Next Hop    

Label          Label          or Tunnel Id         Switched          interface              

16             Pop Label  5.5.5.5/32           0                 Fa0/0          10.0.56.5  

17             17         4.4.4.4/32           0                 Fa0/0          10.0.56.5  

18             18         3.3.3.3/32           0                 Fa0/0          10.0.56.5  

19             19         2.2.2.2/32           0                 Fa0/0          10.0.56.5  

20             20         1.1.1.1/32           0                 Fa0/0          10.0.56.5  

21             Pop Label  10.0.45.0/24         0                 Fa0/0          10.0.56.5  

22             24         10.0.34.0/24         0                 Fa0/0          10.0.56.5  

23             Pop Label  10.0.25.0/24         0                 Fa0/0          10.0.56.5  

25             23         10.0.13.0/24         0                 Fa0/0          10.0.56.5  

26             22         10.0.12.0/24         0                 Fa0/0          10.0.56.5