Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Блок кода
titleASBR2
ESR(config)# hostname ASBR2
ESR(config)# 
ESR(config)# ip vrf CE1
ESR(config-vrf)#   ip protocols ospf max-routes 100
ESR(config-vrf)#   rd 65500:1
ESR(config-vrf)#   route-target export 65500:1
ESR(config-vrf)#   route-target import 65500:1
ESR(config-vrf)# exit
ESR(config)# ip vrf CE2
ESR(config-vrf)#   ip protocols ospf max-routes 100
ESR(config-vrf)#   rd 65500:2
ESR(config-vrf)#   route-target export 65500:2
ESR(config-vrf)#   route-target import 65500:2
ESR(config-vrf)# exit
ESR(config)# 
ESR(config)# system jumbo-frames
ESR(config)# 
ESR(config)# vlan 100,200
ESR(config-vlan)# exit
ESR(config)# 
ESR(config)# router bgp 65500
ESR(config-bgp)#   router-id 10.11.1.2
ESR(config-bgp)#   neighbor 10.11.1.1
ESR(config-bgp-neighbor)#     remote-as 65500
ESR(config-bgp-neighbor)#     update-source 10.11.1.2
ESR(config-bgp-neighbor)#     address-family vpnv4 unicast
ESR(config-bgp-neighbor-af)#       send-community extended
ESR(config-bgp-neighbor-af)#       enable
ESR(config-bgp-neighbor-af)#     exit
ESR(config-bgp-neighbor)#     enable
ESR(config-bgp-neighbor)#   exit
ESR(config-bgp)#   enable
ESR(config-bgp)#   vrf CE1
ESR(config-bgp-vrf)#     address-family ipv4 unicast
ESR(config-bgp-vrf-af)#       redistribute ospf 1 intra-area inter-area external1 external2
ESR(config-bgp-vrf-af)#     exit
ESR(config-bgp-vrf)#   exit
ESR(config-bgp)#   vrf CE2
ESR(config-bgp-vrf)#     address-family ipv4 unicast
ESR(config-bgp-vrf-af)#       redistribute ospf 1 intra-area inter-area external1 external2
ESR(config-bgp-vrf-af)#     exit
ESR(config-bgp-vrf)#   exit
ESR(config-bgp)# exit
ESR(config)# 
ESR(config)# router ospf log-adjacency-changes
ESR(config)# router ospf 1
ESR(config-ospf)#   area 0.0.0.0
ESR(config-ospf-area)#     enable
ESR(config-ospf-area)#   exit
ESR(config-ospf)#   enable
ESR(config-ospf)# exit
ESR(config)# router ospf 1 vrf CE1
ESR(config-ospf)#   redistribute bgp 65500
ESR(config-ospf)#   area 0.0.0.0
ESR(config-ospf-area)#     enable
ESR(config-ospf-area)#   exit
ESR(config-ospf)#   enable
ESR(config-ospf)# exit
ESR(config)# router ospf 1 vrf CE2
ESR(config-ospf)#   redistribute bgp 65500
ESR(config-ospf)#   area 0.0.0.0
ESR(config-ospf-area)#     enable
ESR(config-ospf-area)#   exit
ESR(config-ospf)#   enable
ESR(config-ospf)# exit
ESR(config)# 
ESR(config)# bridge 10
ESR(config-bridge)#   ip vrf forwarding CE1
ESR(config-bridge)#   vlan 100
ESR(config-bridge)#   ip firewall disable
ESR(config-bridge)#   ip address 172.16.32.2/30
ESR(config-bridge)#   ip ospf instance 1
ESR(config-bridge)#   ip ospf
ESR(config-bridge)#   enable
ESR(config-bridge)# exit
ESR(config)# bridge 20
ESR(config-bridge)#   ip vrf forwarding CE2
ESR(config-bridge)#   vlan 200
ESR(config-bridge)#   ip firewall disable
ESR(config-bridge)#   ip address 172.16.32.6/30
ESR(config-bridge)#   ip ospf instance 1
ESR(config-bridge)#   ip ospf
ESR(config-bridge)#   enable
ESR(config-bridge)# exit
ESR(config)# 
ESR(config)# interface gigabitethernet 1/0/1
ESR(config-if-gi)#   description "to ASBR1"
ESR(config-if-gi)#   mode switchport
ESR(config-if-gi)#   spanning-tree disable
ESR(config-if-gi)#   switchport forbidden default-vlan
ESR(config-if-gi)#   switchport mode trunk
ESR(config-if-gi)#   switchport trunk allowed vlan add 100,200
ESR(config-if-gi)# exit
ESR(config)# interface gigabitethernet 1/0/2
ESR(config-if-gi)#   description "to PE2"
ESR(config-if-gi)#   mtu 1522
ESR(config-if-gi)#   ip firewall disable
ESR(config-if-gi)#   ip address 10.101.0.2/30
ESR(config-if-gi)#   ip ospf instance 1
ESR(config-if-gi)#   ip ospf
ESR(config-if-gi)# exit
ESR(config)# interface loopback 1
ESR(config-loopback)#   ip address 10.11.1.2/32
ESR(config-loopback)#   ip ospf instance 1
ESR(config-loopback)#   ip ospf
ESR(config-loopback)# exit
ESR(config)# mpls
ESR(config-mpls)#   ldp
ESR(config-ldp)#     router-id 10.11.1.2
ESR(config-ldp)#     address-family ipv4
ESR(config-ldp-af-ipv4)#       interface gigabitethernet 1/0/2
ESR(config-ldp-af-ipv4-if)#       exit
ESR(config-ldp-af-ipv4)#     exit
ESR(config-ldp)#     enable
ESR(config-ldp)#   exit
ESR(config-mpls)#   forwarding interface gigabitethernet 1/0/2
ESR(config-mpls)# exit
ESR(config)# do com 
ESR(config)# do conf

Проверим распространение маршрутной информации и сетевую доступность узлов:

Блок кода
PE1# sh bgp vpnv4 unicast all 
Status codes: * - valid, > - best, i - internal, S - stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Codes Route Distinguisher   IP Prefix          Next hop        Metric     Label   LocPrf     Weight Path            
----- --------------------- ------------------ --------------- ---------- ------- ---------- ------ ----------------
*>    65500:1               10.110.0.1/32      --              --         37      100        --     65501 i
*>    65500:1               10.111.0.1/32      --              --         35      100        --     65501 i
*>i   65500:1               10.113.0.1/32      10.10.1.2       --         43      100        0      ?
*>i   65500:1               10.114.0.1/32      10.10.1.2       --         48      100        0      ?

CE1# ping 10.113.0.1 source ip 10.110.0.1 detailed 
PING 10.113.0.1 (10.113.0.1) from 10.110.0.1 : 56 bytes of data.
64 bytes from 10.113.0.1: icmp_seq=1 ttl=0 time=1.31 ms
64 bytes from 10.113.0.1: icmp_seq=2 ttl=0 time=1.14 ms
64 bytes from 10.113.0.1: icmp_seq=3 ttl=0 time=1.08 ms
64 bytes from 10.113.0.1: icmp_seq=4 ttl=0 time=1.06 ms
64 bytes from 10.113.0.1: icmp_seq=5 ttl=0 time=1.16 ms