cust-A-1与cust-B-1的lo0地址要互通
root@PE> show configuration | display set
set version 14.1R4.8
set system host-name PE
set system root-authentication encrypted-password "$1$65QU7nZx$/CELLqn/JjiG1yYaOD/c3/"
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.2/30
set interfaces ge-0/0/1 unit 0 family inet address 192.168.2.2/30
set interfaces lo0 unit 0 family inet address 10.0.255.3/32
set routing-options router-id 10.0.255.3
set routing-options autonomous-system 65003
set policy-options policy-statement import-from-cust-A term 1 from community cust-A
set policy-options policy-statement import-from-cust-A term 1 then accept
set policy-options policy-statement import-from-cust-B term 1 from community cust-B
set policy-options policy-statement import-from-cust-B term 1 then accept
set policy-options community cust-A members target:65003:1
set policy-options community cust-B members target:65003:2
set routing-instances cust-A instance-type vrf
set routing-instances cust-A interface ge-0/0/0.0
set routing-instances cust-A route-distinguisher 65003:1
set routing-instances cust-A vrf-import import-from-cust-B
set routing-instances cust-A vrf-target target:65003:1
set routing-instances cust-A routing-options auto-export
set routing-instances cust-A protocols bgp group PE-CE type external
set routing-instances cust-A protocols bgp group PE-CE neighbor 192.168.1.1 peer-as 65001
set routing-instances cust-B instance-type vrf
set routing-instances cust-B interface ge-0/0/1.0
set routing-instances cust-B route-distinguisher 65003:2
set routing-instances cust-B vrf-import import-from-cust-A
set routing-instances cust-B vrf-target target:65003:2
set routing-instances cust-B routing-options auto-export
set routing-instances cust-B protocols bgp group PE-CE type external
set routing-instances cust-B protocols bgp group PE-CE neighbor 192.168.2.1 peer-as 65002
root@cust-A# run show configuration | display set
set version 14.1R4.8
set system host-name cust-A
set system root-authentication encrypted-password "$1$EQZTCpt8$v6k.Awtmq53g76ezR1VKd."
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/30
set interfaces lo0 unit 0 family inet address 10.0.255.1/32
set routing-options router-id 10.0.255.1
set routing-options autonomous-system 65001
set protocols bgp group EBGP type external
set protocols bgp group EBGP export export-lo0
set protocols bgp group EBGP neighbor 192.168.1.2 peer-as 65003
set policy-options policy-statement export-lo0 term 1 from interface lo0.0
set policy-options policy-statement export-lo0 term 1 then accept
root@cust-B# run show configuration | display set
set version 14.1R4.8
set system root-authentication encrypted-password "$1$r/RbmCuW$eWwmuUqbY6CE5OcvADzap0"
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/1 unit 0 family inet address 192.168.2.1/30
set interfaces lo0 unit 0 family inet address 10.0.255.2/32
set routing-options router-id 10.0.255.2
set routing-options autonomous-system 65002
set protocols bgp group EBGP type external
set protocols bgp group EBGP export export-lo0
set protocols bgp group EBGP neighbor 192.168.2.2 peer-as 65003
set policy-options policy-statement export-lo0 term 1 from interface lo0.0
set policy-options policy-statement export-lo0 term 1 then accept
验证:
root@cust-A> show route
inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.1/32 *[Direct/0] 00:27:35
> via lo0.0
10.0.255.2/32 *[BGP/170] 00:05:25, localpref 100
AS path: 65003 65002 I, validation-state: unverified
> to 192.168.1.2 via ge-0/0/0.0
192.168.1.0/30 *[Direct/0] 00:27:35
> via ge-0/0/0.0
192.168.1.1/32 *[Local/0] 00:27:35
Local via ge-0/0/0.0
root@cust-B> show route
inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.1/32 *[BGP/170] 00:09:49, localpref 100
AS path: 65003 65001 I, validation-state: unverified
> to 192.168.2.2 via ge-0/0/1.0
10.0.255.2/32 *[Direct/0] 00:27:34
> via lo0.0
192.168.2.0/30 *[Direct/0] 00:27:34
> via ge-0/0/1.0
192.168.2.1/32 *[Local/0] 00:27:34
Local via ge-0/0/1.0
root@cust-B> ping source 10.0.255.2 10.0.255.1 rapid count 6
PING 10.0.255.1 (10.0.255.1): 56 data bytes
!!!!!!
--- 10.0.255.1 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.340/4.229/6.315/1.034 ms
网友评论