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

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

Ключ

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

...

Примечание

При настройки MTU на туннеле необходимо учитывать следующее:

  • По крайне мере одна mpls метка будет присутствовать при передаче через туннель.  В учет стоит включать все метки в стеке, например,  explicit null и/или entropy label; 
  • При привышении  MTU исходящего интерфейса  пакет будет отброшен (  если не включена безусловная фрагментация GRE трафика);
  • Control world не поддержан;
  • DF бит будет выставлен в единицу.

Ниже представлена  примерная структура пакета:

...

Блок кода
titleCE2
CE2(config)# hostname CE2
CE2(config)# 
CE2(config)# route-map BGP_OUT
CE2(config-route-map)#   rule 1
CE2(config-route-map-rule)#   exit
CE2(config-route-map)# exit
CE2(config)# router bgp 65502
CE2(config-bgp)#   neighbor 10.10.0.5
CE2(config-bgp-neighbor)#     remote-as 65500
CE2(config-bgp-neighbor)#     address-family ipv4 unicast
CE2(config-bgp-neighbor-af)#       route-map BGP_OUT out
CE2(config-bgp-neighbor-af)#       enable
CE2(config-bgp-neighbor-af)#     exit
CE2(config-bgp-neighbor)#     enable
CE2(config-bgp-neighbor)#   exit
CE2(config-bgp)#   address-family ipv4 unicast
CE2(config-bgp-af)#     network 10.101.0.0/24
CE2(config-bgp-af)#   exit
CE2(config-bgp)#   enable
CE2(config-bgp)# exit
CE2(config)# 
CE2(config)# 
CE2(config)# interface gigabitethernet 1/0/2
CE2(config-if-gi)#   description "to ESR2"
CE2(config-if-gi)#   ip firewall disable
CE2(config-if-gi)#   ip address 10.10.0.6/30
CE2(config-if-gi)# exit
CE2(config)# interface loopback 1
CE2(config-loopback)#   ip address 10.101.0.1/24
CE2(config-loopback)# exit

Конфигурация ESR1 и ESR2:

Блок кода
titleESR1
ESR1(config)# hostname ESR1
ESR1(config)# 
ESR1(config)# ip vrf l3vpn_service
ESR1(config-vrf)#   ip protocols bgp max-routes 100
ESR1(config-vrf)#   rd 65500:1
ESR1(config-vrf)#   route-target export 65500:1
ESR1(config-vrf)#   route-target import 65500:1
ESR1(config-vrf)# exit
ESR1(config)# 
ESR1(config)# 
ESR1(config)# system cpu load-balance mpls passenger ip
ESR1(config)# security zone untrusted
ESR1(config-zone)# exit
ESR1(config)# security zone trusted
ESR1(config-zone)# exit
ESR1(config)# 
ESR1(config)# route-map BGP_OUT
ESR1(config-route-map)#   rule 1
ESR1(config-route-map-rule)#   exit
ESR1(config-route-map)# exit
ESR1(config)# router bgp 65500
ESR1(config-bgp)#   router-id 10.12.0.1
ESR1(config-bgp)#   neighbor 10.12.0.2
ESR1(config-bgp-neighbor)#     remote-as 65500
ESR1(config-bgp-neighbor)#     update-source 10.12.0.1
ESR1(config-bgp-neighbor)#     address-family vpnv4 unicast
ESR1(config-bgp-neighbor-af)#       send-community extended
ESR1(config-bgp-neighbor-af)#       enable
ESR1(config-bgp-neighbor-af)#     exit
ESR1(config-bgp-neighbor)#     enable
ESR1(config-bgp-neighbor)#   exit
ESR1(config-bgp)#   enable
ESR1(config-bgp)#   vrf l3vpn_service
ESR1(config-bgp-vrf)#     neighbor 10.10.0.1
ESR1(config-bgp-vrf-neighbor)#       remote-as 65501
ESR1(config-bgp-vrf-neighbor)#       address-family ipv4 unicast
ESR1(config-bgp-neighbor-af-vrf)#         route-map BGP_OUT out
ESR1(config-bgp-neighbor-af-vrf)#         enable
ESR1(config-bgp-neighbor-af-vrf)#       exit
ESR1(config-bgp-vrf-neighbor)#       enable
ESR1(config-bgp-vrf-neighbor)#     exit
ESR1(config-bgp-vrf)#     address-family ipv4 unicast
ESR1(config-bgp-vrf-af)#       redistribute bgp 65500 route-map BGP_OUT
ESR1(config-bgp-vrf-af)#     exit
ESR1(config-bgp-vrf)#     enable
ESR1(config-bgp-vrf)#   exit
ESR1(config-bgp)# exit
ESR1(config)# 
ESR1(config)# router ospf 1
ESR1(config-ospf)#   router-id 10.12.0.1
ESR1(config-ospf)#   area 0.0.0.0
ESR1(config-ospf-area)#     enable
ESR1(config-ospf-area)#   exit
ESR1(config-ospf)#   enable
ESR1(config-ospf)# exit
ESR1(config)# 
ESR1(config)# interface gigabitethernet 1/0/1
ESR1(config-if-gi)#   security-zone untrusted
ESR1(config-if-gi)#   ip address 192.0.2.1/30
ESR1(config-if-gi)# exit
ESR1(config)# interface gigabitethernet 1/0/2
ESR1(config-if-gi)#   ip vrf forwarding l3vpn_service
ESR1(config-if-gi)#   description "from CE1"
ESR1(config-if-gi)#   ip firewall disable
ESR1(config-if-gi)#   ip address 10.10.0.2/30
ESR1(config-if-gi)# exit
ESR1(config)# interface loopback 1
ESR1(config-loopback)#   ip address 10.12.0.1/32
ESR1(config-loopback)#   ip ospf instance 1
ESR1(config-loopback)#   ip ospf
ESR1(config-loopback)# exit
ESR1(config)# tunnel gre 1
ESR1(config-gre)#   key 60
ESR1(config-gre)#   ttl 64
ESR1(config-gre)#   mtu 1472
ESR1(config-gre)#   ip firewall disable
ESR1(config-gre)#   local address 192.0.2.1
ESR1(config-gre)#   remote address 192.0.2.2
ESR1(config-gre)#   ip address 10.11.0.1/30
ESR1(config-gre)#   ip ospf instance 1
ESR1(config-gre)#   ip ospf
ESR1(config-gre)#   enable
ESR1(config-gre)# exit
ESR1(config)# 
ESR1(config)# mpls
ESR1(config-mpls)#   ldp
ESR1(config-ldp)#     router-id 10.12.0.1
ESR1(config-ldp)#     address-family ipv4
ESR1(config-ldp-af-ipv4)#       interface gre 1
ESR1(config-ldp-af-ipv4-if)#       exit
ESR1(config-ldp-af-ipv4)#     exit
ESR1(config-ldp)#     enable
ESR1(config-ldp)#   exit
ESR1(config-mpls)#   forwarding interface gre 1
ESR1(config-mpls)# exit
ESR1(config)# security zone-pair untrusted self
ESR1(config-zone-pair)#   rule 1
ESR1(config-zone-pair-rule)#     action permit
ESR1(config-zone-pair-rule)#     match protocol gre
ESR1(config-zone-pair-rule)#     enable
ESR1(config-zone-pair-rule)#   exit
ESR1(config-zone-pair)# exit


Блок кода
ESR2(config)# hostname ESR2
ESR2(config)# 
ESR2(config)# ip vrf l3vpn_service
ESR2(config-vrf)#   ip protocols bgp max-routes 100
ESR2(config-vrf)#   rd 65500:1
ESR2(config-vrf)#   route-target export 65500:1
ESR2(config-vrf)#   route-target import 65500:1
ESR2(config-vrf)# exit
ESR2(config)# 
ESR2(config)# 
ESR2(config)# system cpu load-balance mpls passenger ip
ESR2(config)# security zone untrusted
ESR2(config-zone)# exit
ESR2(config)# security zone trusted
ESR2(config-zone)# exit
ESR2(config)# 
ESR2(config)# route-map BGP_OUT
ESR2(config-route-map)#   rule 1
ESR2(config-route-map-rule)#   exit
ESR2(config-route-map)# exit
ESR2(config)# router bgp 65500
ESR2(config-bgp)#   router-id 10.12.0.2
ESR2(config-bgp)#   neighbor 10.12.0.1
ESR2(config-bgp-neighbor)#     remote-as 65500
ESR2(config-bgp-neighbor)#     update-source 10.12.0.2
ESR2(config-bgp-neighbor)#     address-family vpnv4 unicast
ESR2(config-bgp-neighbor-af)#       send-community extended
ESR2(config-bgp-neighbor-af)#       enable
ESR2(config-bgp-neighbor-af)#     exit
ESR2(config-bgp-neighbor)#     enable
ESR2(config-bgp-neighbor)#   exit
ESR2(config-bgp)#   enable
ESR2(config-bgp)#   vrf l3vpn_service
ESR2(config-bgp-vrf)#     neighbor 10.10.0.6
ESR2(config-bgp-vrf-neighbor)#       remote-as 65502
ESR2(config-bgp-vrf-neighbor)#       address-family ipv4 unicast
ESR2(config-bgp-neighbor-af-vrf)#         route-map BGP_OUT out
ESR2(config-bgp-neighbor-af-vrf)#         enable
ESR2(config-bgp-neighbor-af-vrf)#       exit
ESR2(config-bgp-vrf-neighbor)#       enable
ESR2(config-bgp-vrf-neighbor)#     exit
ESR2(config-bgp-vrf)#     address-family ipv4 unicast
ESR2(config-bgp-vrf-af)#       redistribute bgp 65500 route-map BGP_OUT
ESR2(config-bgp-vrf-af)#     exit
ESR2(config-bgp-vrf)#     enable
ESR2(config-bgp-vrf)#   exit
ESR2(config-bgp)# exit
ESR2(config)# 
ESR2(config)# router ospf 1
ESR2(config-ospf)#   router-id 10.12.0.2
ESR2(config-ospf)#   area 0.0.0.0
ESR2(config-ospf-area)#     enable
ESR2(config-ospf-area)#   exit
ESR2(config-ospf)#   enable
ESR2(config-ospf)# exit
ESR2(config)# 
ESR2(config)# interface gigabitethernet 1/0/1
ESR2(config-if-gi)#   security-zone untrusted
ESR2(config-if-gi)#   ip address 192.0.2.2/30
ESR2(config-if-gi)# exit
ESR2(config)# interface gigabitethernet 1/0/2
ESR2(config-if-gi)#   ip vrf forwarding l3vpn_service
ESR2(config-if-gi)#   description "from CE2"
ESR2(config-if-gi)#   ip firewall disable
ESR2(config-if-gi)#   ip address 10.10.0.5/30
ESR2(config-if-gi)# exit
ESR2(config)# interface loopback 1
ESR2(config-loopback)#   ip address 10.12.0.2/32
ESR2(config-loopback)#   ip ospf instance 1
ESR2(config-loopback)#   ip ospf
ESR2(config-loopback)# exit
ESR2(config)# tunnel gre 1
ESR2(config-gre)#   key 60
ESR2(config-gre)#   ttl 64
ESR2(config-gre)#   mtu 1472
ESR2(config-gre)#   ip firewall disable
ESR2(config-gre)#   local address 192.0.2.2
ESR2(config-gre)#   remote address 192.0.2.1
ESR2(config-gre)#   ip address 10.11.0.2/30
ESR2(config-gre)#   ip ospf instance 1
ESR2(config-gre)#   ip ospf
ESR2(config-gre)#   enable
ESR2(config-gre)# exit
ESR2(config)# 
ESR2(config)# mpls
ESR2(config-mpls)#   ldp
ESR2(config-ldp)#     router-id 10.12.0.2
ESR2(config-ldp)#     address-family ipv4
ESR2(config-ldp-af-ipv4)#       interface gre 1
ESR2(config-ldp-af-ipv4-if)#       exit
ESR2(config-ldp-af-ipv4)#     exit
ESR2(config-ldp)#     enable
ESR2(config-ldp)#   exit
ESR2(config-mpls)#   forwarding interface gre 1
ESR2(config-mpls)# exit
ESR2(config)# security zone-pair untrusted self
ESR2(config-zone-pair)#   rule 1
ESR2(config-zone-pair-rule)#     action permit
ESR2(config-zone-pair-rule)#     match protocol gre
ESR2(config-zone-pair-rule)#     enable
ESR2(config-zone-pair-rule)#   exit
ESR2(config-zone-pair)# exit