...
| Блок кода | ||
|---|---|---|
| ||
ESR(config)# hostname CE1 ESR(config)# ESR(config)# route-map BGP ESR(config-route-map)# rule 1 ESR(config-route-map-rule)# exit ESR(config-route-map)# exit ESR(config)# router bgp 6550165510 ESR(config-bgp)# neighbor 192.168.1.2 ESR(config-bgp-neighbor)# remote-as 65500 ESR(config-bgp-neighbor)# address-family ipv4 unicast ESR(config-bgp-neighbor-af)# route-map BGP out 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)# address-family ipv4 unicast ESR(config-bgp-af)# network 10.110100.0.1/32 ESR(config-bgp-af)# exit ESR(config-bgp)# enable ESR(config-bgp)# exit ESR(config)# interface gigabitethernet 1/0/1.100 ESR(config-if-sub)# ip firewall disable ESR(config-if-sub)# ip address 192.168.1.1/30 ESR(config-if-sub)# exit ESR(config)# interface loopback 1 ESR(config-loopback)# ip address 10.110100.0.1/32 ESR(config-loopback)# exit ESR(config)# do com ESR(config)# do conf |
...
| Блок кода | ||
|---|---|---|
| ||
ESR(config)# hostname CE2 ESR(config)# ESR(config)# route-map BGP ESR(config-route-map)# rule 1 ESR(config-route-map-rule)# exit ESR(config-route-map)# exit ESR(config)# router bgp 6550165511 ESR(config-bgp)# neighbor 192.168.2.2 ESR(config-bgp-neighbor)# remote-as 65500 ESR(config-bgp-neighbor)# address-family ipv4 unicast ESR(config-bgp-neighbor-af)# route-map BGP out 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)# address-family ipv4 unicast ESR(config-bgp-af)# network 10.112101.0.1/32 ESR(config-bgp-af)# exit ESR(config-bgp)# enable ESR(config-bgp)# exit ESR(config)# interface gigabitethernet 1/0/1.100 ESR(config-if-sub)# ip firewall disable ESR(config-if-sub)# ip address 192.168.2.1/30 ESR(config-if-sub)# exit ESR(config)# ESR(config)# interface loopback 1 ESR(config-loopback)# ip address 10.112101.0.1/32 ESR(config-loopback)# exit ESR(config)# do com ESR(config)# do conf |
...
| Блок кода | ||
|---|---|---|
| ||
ESR(config)# hostname CE3 ESR(config)# ESR(config)# route-map BGP ESR(config-route-map)# rule 1 ESR(config-route-map-rule)# exit ESR(config-route-map)# exit ESR(config)# router bgp 6550165512 ESR(config-bgp)# neighbor 192.168.3.2 ESR(config-bgp-neighbor)# remote-as 65500 ESR(config-bgp-neighbor)# address-family ipv4 unicast ESR(config-bgp-neighbor-af)# route-map BGP out 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)# address-family ipv4 unicast ESR(config-bgp-af)# network 10.113103.0.1/32 ESR(config-bgp-af)# exit ESR(config-bgp)# enable ESR(config-bgp)# exit ESR(config)# interface gigabitethernet 1/0/1.100 ESR(config-if-sub)# ip firewall disable ESR(config-if-sub)# ip address 192.168.3.1/30 ESR(config-if-sub)# exit ESR(config)# ESR(config)# interface loopback 1 ESR(config-loopback)# ip address 10.113103.0.1/32 ESR(config-loopback)# exit ESR(config)# do com ESR(config)# do conf |
...
| Блок кода | ||
|---|---|---|
| ||
ESR(config)# hostname CE4 ESR(config)# ESR(config)# route-map BGP ESR(config-route-map)# rule 1 ESR(config-route-map-rule)# exit ESR(config-route-map)# exit ESR(config)# router bgp 6550165513 ESR(config-bgp)# neighbor 192.168.4.2 ESR(config-bgp-neighbor)# remote-as 65500 ESR(config-bgp-neighbor)# address-family ipv4 unicast ESR(config-bgp-neighbor-af)# route-map BGP out 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)# address-family ipv4 unicast ESR(config-bgp-af)# network 10.114104.0.1/32 ESR(config-bgp-af)# exit ESR(config-bgp)# enable ESR(config-bgp)# exit ESR(config)# interface gigabitethernet 1/0/1.100 ESR(config-if-sub)# ip firewall disable ESR(config-if-sub)# ip address 192.168.4.1/30 ESR(config-if-sub)# exit ESR(config)# ESR(config)# interface loopback 1 ESR(config-loopback)# ip address 10.114104.0.1/32 ESR(config-loopback)# exit ESR(config)# do com ESR(config)# do conf |
...
| Блок кода | ||
|---|---|---|
| ||
PE2(config)# hostname PE2 PE2(config)# PE2(config)# ip vrf CE1CE3 PE2(config-vrf)# ip protocols bgp max-routes 100 PE2(config-vrf)# rd 65501:1 PE2(config-vrf)# route-target export 65501:1 PE2(config-vrf)# route-target import 65501:1 PE2(config-vrf)# exit PE2(config)# ip vrf CE2CE4 PE2(config-vrf)# ip protocols bgp max-routes 100 PE2(config-vrf)# rd 65501:2 PE2(config-vrf)# route-target export 65501:2 PE2(config-vrf)# route-target import 65501:2 PE2(config-vrf)# exit PE2(config)# PE2(config)# system jumbo-frames PE2(config)# PE2(config)# route-map BGP_OUT PE2(config-route-map)# rule 1 PE2(config-route-map-rule)# exit PE2(config-route-map)# exit PE2(config)# router bgp 65500 PE2(config-bgp)# neighbor 10.11.1.2 PE2(config-bgp-neighbor)# remote-as 65500 PE2(config-bgp-neighbor)# update-source 10.11.1.1 PE2(config-bgp-neighbor)# address-family vpnv4 unicast PE2(config-bgp-neighbor-af)# send-community extended PE2(config-bgp-neighbor-af)# enable PE2(config-bgp-neighbor-af)# exit PE2(config-bgp-neighbor)# enable PE2(config-bgp-neighbor)# exit PE2(config-bgp)# enable PE2(config-bgp)# vrf CE1CE3 PE2(config-bgp-vrf)# neighbor 192.168.3.1 PE2(config-bgp-vrf-neighbor)# remote-as 65512 PE2(config-bgp-vrf-neighbor)# address-family ipv4 unicast PE2(config-bgp-neighbor-af-vrf)# route-map BGP_OUT out PE2(config-bgp-neighbor-af-vrf)# enable PE2(config-bgp-neighbor-af-vrf)# exit PE2(config-bgp-vrf-neighbor)# enable PE2(config-bgp-vrf-neighbor)# exit PE2(config-bgp-vrf)# address-family ipv4 unicast PE2(config-bgp-vrf-af)# redistribute bgp 65500 route-map BGP_OUT PE2(config-bgp-vrf-af)# exit PE2(config-bgp-vrf)# enable PE2(config-bgp-vrf)# exit PE2(config-bgp)# vrf CE2CE4 PE2(config-bgp-vrf)# neighbor 192.168.4.1 PE2(config-bgp-vrf-neighbor)# remote-as 65513 PE2(config-bgp-vrf-neighbor)# address-family ipv4 unicast PE2(config-bgp-neighbor-af-vrf)# route-map BGP_OUT out PE2(config-bgp-neighbor-af-vrf)# enable PE2(config-bgp-neighbor-af-vrf)# exit PE2(config-bgp-vrf-neighbor)# enable PE2(config-bgp-vrf-neighbor)# exit PE2(config-bgp-vrf)# address-family ipv4 unicast PE2(config-bgp-vrf-af)# redistribute bgp 65500 route-map BGP_OUT PE2(config-bgp-vrf-af)# exit PE2(config-bgp-vrf)# enable PE2(config-bgp-vrf)# exit PE2(config-bgp)# exit PE2(config)# PE2(config)# router ospf 1 PE2(config-ospf)# router-id 10.11.1.1 PE2(config-ospf)# area 0.0.0.0 PE2(config-ospf-area)# enable PE2(config-ospf-area)# exit PE2(config-ospf)# enable PE2(config-ospf)# exit PE2(config)# PE2(config)# interface gigabitethernet 1/0/1.100 PE2(config-if-sub)# ip vrf forwarding CE1CE3 PE2(config-if-sub)# description "to CE3" PE2(config-if-sub)# ip firewall disable PE2(config-if-sub)# ip address 192.168.3.2/30 PE2(config-if-sub)# exit PE2(config)# interface gigabitethernet 1/0/1.200 PE2(config-if-sub)# ip vrf forwarding CE2CE4 PE2(config-if-sub)# description "CE4" PE2(config-if-sub)# ip firewall disable PE2(config-if-sub)# ip address 192.168.4.2/30 PE2(config-if-sub)# exit PE2(config)# interface gigabitethernet 1/0/2 PE2(config-if-gi)# description "to ASBR2" PE2(config-if-gi)# mtu 1522 PE2(config-if-gi)# ip firewall disable PE2(config-if-gi)# ip address 10.102.0.1/30 PE2(config-if-gi)# ip ospf instance 1 PE2(config-if-gi)# ip ospf PE2(config-if-gi)# exit PE2(config)# interface loopback 1 PE2(config-loopback)# ip address 10.11.1.1/32 PE2(config-loopback)# ip ospf instance 1 PE2(config-loopback)# ip ospf PE2(config-loopback)# exit PE2(config)# mpls PE2(config-mpls)# ldp PE2(config-ldp)# router-id 10.11.1.1 PE2(config-ldp)# address-family ipv4 PE2(config-ldp-af-ipv4)# interface gigabitethernet 1/0/2 PE2(config-ldp-af-ipv4-if)# exit PE2(config-ldp-af-ipv4)# exit PE2(config-ldp)# enable PE2(config-ldp)# exit PE2(config-mpls)# forwarding interface gigabitethernet 1/0/2 PE2(config-mpls)# exit PE2(config)# do com PE2(config)# do conf |
...