...
Примечание |
---|
При настройки MTU на туннеле необходимо учитывать следующее: - По крайне мере одна mpls метка будет присутствовать при передаче через туннель. При включении explicit null - две;
- При привышении MTU исходящего интерфейса пакет будет отброжен ( если не включена безусловная фрагментация GRE трафика);
- DF бит будет выставлен в единицу.
![](/download/attachments/324534476/l2vpn_gre_mtu.png?version=1&modificationDate=1669706631000&api=v2)
|
![](/download/attachments/324534476/mpls_over_gre_l2vpn.png?version=2&modificationDate=1669703716000&api=v2)
Настройки CE1 и CE2:
Конфигурация ESR1 и ESR2:
Блок кода |
---|
|
ESR1(config)# hostname ESR1
ESR1(config)#
ESR1(config)# system cpu load-balance mpls passenger ip
ESR1(config)# system cpu load-balance mpls passenger ipoe-pw-with-cw
ESR1(config)# security zone trusted
ESR1(config-zone)# exit
ESR1(config)# security zone untrusted
ESR1(config-zone)# exit
ESR1(config)#
ESR1(config)# router ospf 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)# description "From CE1"
ESR1(config-if-gi)# mode switchport
ESR1(config-if-gi)# exit
ESR1(config)# interface loopback 1
ESR1(config-loopback)# ip address 10.100.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.0.0.1/30
ESR1(config-gre)# ip ospf instance 1
ESR1(config-gre)# ip ospf network point-to-point
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.100.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)# l2vpn
ESR1(config-l2vpn)# pw-class VPWS
ESR1(config-l2vpn-pw-class)# exit
ESR1(config-l2vpn)# p2p EoMPLS
ESR1(config-l2vpn-p2p)# interface gigabitethernet 1/0/2
ESR1(config-l2vpn-p2p)# pw 100 10.100.0.2
ESR1(config-l2vpn-pw)# pw-class VPWS
ESR1(config-l2vpn-pw)# enable
ESR1(config-l2vpn-pw)# exit
ESR1(config-l2vpn-p2p)# enable
ESR1(config-l2vpn-p2p)# exit
ESR1(config-l2vpn)# 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
ESR1(config)# do com
ESR1(config)# do conf |
Блок кода |
---|
|
ESR2(config)# hostname ESR2
ESR2(config)#
ESR2(config)# system cpu load-balance mpls passenger ip
ESR2(config)# system cpu load-balance mpls passenger ipoe-pw-with-cw
ESR2(config)# security zone trusted
ESR2(config-zone)# exit
ESR2(config)# security zone untrusted
ESR2(config-zone)# exit
ESR2(config)#
ESR2(config)# router ospf 1
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)# description "From CE2"
ESR2(config-if-gi)# mode switchport
ESR2(config-if-gi)# exit
ESR2(config)# interface loopback 1
ESR2(config-loopback)# ip address 10.100.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.0.0.2/30
ESR2(config-gre)# ip ospf instance 1
ESR2(config-gre)# ip ospf network point-to-point
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.100.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)# l2vpn
ESR2(config-l2vpn)# pw-class VPWS
ESR2(config-l2vpn-pw-class)# exit
ESR2(config-l2vpn)# p2p EoMPLS
ESR2(config-l2vpn-p2p)# interface gigabitethernet 1/0/2
ESR2(config-l2vpn-p2p)# pw 100 10.100.0.1
ESR2(config-l2vpn-pw)# pw-class VPWS
ESR2(config-l2vpn-pw)# enable
ESR2(config-l2vpn-pw)# exit
ESR2(config-l2vpn-p2p)# enable
ESR2(config-l2vpn-p2p)# exit
ESR2(config-l2vpn)# 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 deny
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
ESR2(config)# do com
ESR2(config)# do conf |