Вы находитесь на странице: 1из 9

Example: Configuring EBGP Multihop - Technical Documentation - Sup... https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-ma...

Understanding BGP Multihop

Example: Configuring EBGP Multihop Sessions

Requirements

Overview

neighbor

multihop
ttl

no-nexthop-change

1 of 9 3/11/2017 7:10 PM
Example: Configuring EBGP Multihop - Technical Documentation - Sup... https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-ma...

Configuration

CLI Quick Configuration

[edit]

set interfaces fe-1/2/0 unit 9 description to-D


set interfaces fe-1/2/0 unit 9 family inet address 10.10.10.9/30
set interfaces lo0 unit 3 family inet address 192.168.40.4/32
set protocols bgp group external-peers type external
set protocols bgp group external-peers multihop ttl 2
set protocols bgp group external-peers local-address 192.168.40.4
set protocols bgp group external-peers export send-static
set protocols bgp group external-peers peer-as 18
set protocols bgp group external-peers neighbor 192.168.6.7
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 10.10.10.14/32 next-hop 10.10.10.10
set routing-options static route 192.168.6.7/32 next-hop 10.10.10.10
set routing-options router-id 192.168.40.4
set routing-options autonomous-system 17

set interfaces fe-1/2/0 unit 10 description to-C


set interfaces fe-1/2/0 unit 10 family inet address 10.10.10.10/30
set interfaces fe-1/2/1 unit 13 description to-E
set interfaces fe-1/2/1 unit 13 family inet address 10.10.10.13/30
set interfaces lo0 unit 4 family inet address 192.168.6.6/32
set routing-options static route 192.168.40.4/32 next-hop 10.10.10.9
set routing-options static route 192.168.6.7/32 next-hop 10.10.10.14
set routing-options router-id 192.168.6.6

set interfaces fe-1/2/0 unit 14 description to-D


set interfaces fe-1/2/0 unit 14 family inet address 10.10.10.14/30
set interfaces lo0 unit 5 family inet address 192.168.6.7/32
set protocols bgp group external-peers multihop ttl 2
set protocols bgp group external-peers local-address 192.168.6.7
set protocols bgp group external-peers export send-static

2 of 9 3/11/2017 7:10 PM
Example: Configuring EBGP Multihop - Technical Documentation - Sup... https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-ma...

set protocols bgp group external-peers peer-as 17


set protocols bgp group external-peers neighbor 192.168.40.4
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 10.10.10.8/30 next-hop 10.10.10.13
set routing-options static route 192.168.40.4/32 next-hop 10.10.10.13
set routing-options router-id 192.168.6.7
set routing-options autonomous-system 18

Device C

Step-by-Step Procedure

[edit interfaces fe-1/2/0 unit 9]


user@C# set description to-D
user@C# set family inet address 10.10.10.9/30

[edit interfaces lo0 unit 3]


user@C# set family inet address 192.168.40.4/32

neighbor

[edit protocols bgp group external-peers]


user@C# set type external
user@C# set local-address 192.168.40.4
user@C# set export send-static
user@C# set peer-as 18
user@C# set neighbor 192.168.6.7

ttl 2

[edit protocols bgp group external-peers]


user@C# set multihop ttl 2

[edit routing-options]
user@C# set static route 10.10.10.14/32 next-hop 10.10.10.10
user@C# set static route 192.168.6.7/32 next-hop 10.10.10.10

[edit routing-options]
user@C# set router-id 192.168.40.4
user@C# set autonomous-system 17

[edit policy-options policy-statement send-static term 1]

3 of 9 3/11/2017 7:10 PM
Example: Configuring EBGP Multihop - Technical Documentation - Sup... https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-ma...

user@C# set from protocol static


user@C# set then accept

Results
show interfaces show protocols show
policy-options show routing-options

user@C# show interfaces


fe-1/2/0 {
unit 9 {
description to-D;
family inet {
address 10.10.10.9/30;
}
}
}
lo0 {
unit 3 {
family inet {
address 192.168.40.4/32;
}
}
}

user@C# show protocols


bgp {
group external-peers {
type external;
multihop {
ttl 2;
}
local-address 192.168.40.4;
export send-static;
peer-as 18;
neighbor 192.168.6.7;
}
}

user@C# show policy-options


policy-statement send-static {
term 1 {
from protocol static;
then accept;
}
}

user@C# show routing-options


static {
route 10.10.10.14/32 next-hop 10.10.10.10;
route 192.168.6.7/32 next-hop 10.10.10.10;
}
router-id 192.168.40.4;
autonomous-system 17;

commit

Configuring Device D

4 of 9 3/11/2017 7:10 PM
Example: Configuring EBGP Multihop - Technical Documentation - Sup... https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-ma...

Step-by-Step Procedure

user@host> set cli logical-system D

[edit interfaces fe-1/2/0 unit 10]


user@D# set description to-C
user@D# set family inet address 10.10.10.10/30

[edit interfaces fe-1/2/1 unit 13]


user@D# set description to-E
user@D# set family inet address 10.10.10.13/30

[edit interfaces lo0 unit 4]


user@D# set family inet address 192.168.6.6/32

[edit routing-options]
user@D# set static route 192.168.40.4/32 next-hop 10.10.10.9
user@D# set static route 192.168.6.7/32 next-hop 10.10.10.14

[edit routing-options]
user@D# set router-id 192.168.6.6

Results
show interfaces show routing-
options

user@D# show interfaces


fe-1/2/0 {
unit 10 {
description to-C;
family inet {
address 10.10.10.10/30;
}
}
}
fe-1/2/1 {
unit 13 {
description to-E;
family inet {
address 10.10.10.13/30;
}
}
}
lo0 {
unit 4 {
family inet {

5 of 9 3/11/2017 7:10 PM
Example: Configuring EBGP Multihop - Technical Documentation - Sup... https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-ma...

address 192.168.6.6/32;
}
}
}

user@D# show protocols

user@D# show routing-options


static {
route 192.168.40.4/32 next-hop 10.10.10.9;
route 192.168.6.7/32 next-hop 10.10.10.14;
}
router-id 192.168.6.6;

commit

Configuring Device E

Step-by-Step Procedure

user@host> set cli logical-system E

[edit interfaces fe-1/2/0 unit 14]


user@E# set description to-D
user@E# set family inet address 10.10.10.14/30

[edit interfaces lo0 unit 5]


user@E# set family inet address 192.168.6.7/32

neighbor

[edit protocols bgp group external-peers]


user@E# set local-address 192.168.6.7
user@E# set export send-static
user@E# set peer-as 17
user@E# set neighbor 192.168.40.4

multihop
ttl 2

[edit protocols bgp group external-peers]


user@E# set multihop ttl 2

[edit routing-options]
user@E# set static route 10.10.10.8/30 next-hop 10.10.10.13
user@E# set static route 192.168.40.4/32 next-hop 10.10.10.13

6 of 9 3/11/2017 7:10 PM
Example: Configuring EBGP Multihop - Technical Documentation - Sup... https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-ma...

[edit routing-options]
user@E# set router-id 192.168.6.7
user@E# set autonomous-system 18

[edit policy-options policy-statement send-static term 1]


user@E# set from protocol static
user@E# set then accept

Results
show interfaces show protocols show
policy-options show routing-options

user@E# show interfaces


fe-1/2/0 {
unit 14 {
description to-D;
family inet {
address 10.10.10.14/30;
}
}
}
lo0 {
unit 5 {
family inet {
address 192.168.6.7/32;
}
}
}

user@E# show protocols


bgp {
group external-peers {
multihop {
ttl 2;
}
local-address 192.168.6.7;
export send-static;
peer-as 17;
neighbor 192.168.40.4;
}
}

user@E# show policy-options


policy-statement send-static {
term 1 {
from protocol static;
then accept;
}
}

user@E# show routing-options


static {
route 10.10.10.8/30 next-hop 10.10.10.13;
route 192.168.40.4/32 next-hop 10.10.10.13;
}

7 of 9 3/11/2017 7:10 PM
Example: Configuring EBGP Multihop - Technical Documentation - Sup... https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-ma...

router-id 192.168.6.7;
autonomous-system 18;

commit

Verification

Verifying Connectivity

Purpose

Action
ping 10.10.10.14 source 192.168.40.4
ping 10.10.10.9 source 192.168.6.7

user@C> ping 10.10.10.14 source 192.168.40.4


PING 10.10.10.14 (10.10.10.14): 56 data bytes
64 bytes from 10.10.10.14: icmp_seq=0 ttl=63 time=1.262 ms
64 bytes from 10.10.10.14: icmp_seq=1 ttl=63 time=1.202 ms
^C
--- 10.10.10.14 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.202/1.232/1.262/0.030 ms

user@E> ping 10.10.10.9 source 192.168.6.7


PING 10.10.10.9 (10.10.10.9): 56 data bytes
64 bytes from 10.10.10.9: icmp_seq=0 ttl=63 time=1.255 ms
64 bytes from 10.10.10.9: icmp_seq=1 ttl=63 time=1.158 ms
^C
--- 10.10.10.9 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.158/1.206/1.255/0.049 ms

Meaning

Verifying That BGP Sessions Are Established

Purpose

Action
show bgp summary

user@C> show bgp summary

8 of 9 3/11/2017 7:10 PM
Example: Configuring EBGP Multihop - Technical Documentation - Sup... https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-ma...

Groups: 1 Peers: 1 Down peers: 0


Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0 2 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
192.168.6.7 18 147 147 0 1 1:04:27 0/2/2/0 0/0/0/0

user@E> show bgp summary


Groups: 1 Peers: 1 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0 2 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
192.168.40.4 17 202 202 0 1 1:02:18 0/2/2/0 0/0/0/0

Meaning

Viewing Advertised Routes

Purpose

Action
show route advertising-protocol bgp neighbor

user@C> show route advertising-protocol bgp 192.168.6.7


inet.0: 5 destinations, 7 routes (5 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 10.10.10.14/32 Self I
* 192.168.6.7/32 Self I

user@E> show route advertising-protocol bgp 192.168.40.4


inet.0: 5 destinations, 7 routes (5 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 10.10.10.8/30 Self I
* 192.168.40.4/32 Self I

Meaning
send-static

9 of 9 3/11/2017 7:10 PM

Вам также может понравиться