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
After completing the configuration, check the distribution of routing information and the network availability of