1、实验拓扑

NEXT-HOP-LOCAL的作用_R3

2、实验目的

1)R1没有配置next-hop-local,观察R2中的bgp路由表中ebgp引入路由的下一跳

2)1)R1配置next-hop-local,观察R2中的bgp路由表中ebgp引入路由的下一跳

3、实验配置

R1:

[V200R003C00]

#

sysname R1

#

snmp-agent local-engineid 800007DB03000000000000

snmp-agent  

#

clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

drop illegal-mac alarm

#

set cpu-usage threshold 80 restore 75

#

aaa  

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default  

domain default_admin  

local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

local-user admin service-type http

#

isis 100

is-level level-2

cost-style wide

network-entity 49.0001.0010.0100.1001.00

#

firewall zone Local

priority 15

#

interface GigabitEthernet0/0/0

ip address 10.1.1.1 255.255.255.0  

#

interface GigabitEthernet0/0/1

ip address 20.1.1.1 255.255.255.0  

isis enable 100

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.1 255.255.255.255  

isis enable 100

#

bgp 100

router-id 1.1.1.1

peer 2.2.2.2 as-number 100  

peer 2.2.2.2 connect-interface LoopBack0

peer 10.1.1.2 as-number 200  

peer 10.1.1.2 ebgp-max-hop 2  

#

ipv4-family unicast

 undo synchronization

 peer 2.2.2.2 enable

 peer 2.2.2.2 next-hop-local  

 peer 10.1.1.2 enable

#

ipv6-family unicast

 undo synchronization

#

user-interface con 0

authentication-mode password

idle-timeout 0 0

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<R1> 

R2:

<R2>display current-configuration  

[V200R003C00]

#

sysname R2

#

snmp-agent local-engineid 800007DB03000000000000

snmp-agent  

#

clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

drop illegal-mac alarm

#

set cpu-usage threshold 80 restore 75

#

aaa  

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default  

domain default_admin  

local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

local-user admin service-type http

#

isis 100

is-level level-2

cost-style wide

network-entity 49.0001.0020.0200.2002.00

#

firewall zone Local

priority 15

#

interface GigabitEthernet0/0/0

ip address 20.1.1.2 255.255.255.0  

isis enable 100

#

interface GigabitEthernet0/0/1

ip address 30.1.1.1 255.255.255.0  

isis enable 100

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack0

ip address 2.2.2.2 255.255.255.255  

isis enable 100

#

bgp 100

router-id 2.2.2.2

peer 1.1.1.1 as-number 100  

peer 1.1.1.1 connect-interface LoopBack0

peer 3.3.3.3 as-number 100  

peer 3.3.3.3 connect-interface LoopBack0

#

ipv4-family unicast

 undo synchronization

 peer 1.1.1.1 enable

 peer 1.1.1.1 reflect-client

 peer 3.3.3.3 enable

 peer 3.3.3.3 reflect-client

#

user-interface con 0

authentication-mode password

idle-timeout 0 0

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<R2>

R3:

<R3>display current-configuration  

[V200R003C00]

#

sysname R3

#

snmp-agent local-engineid 800007DB03000000000000

snmp-agent  

#

clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

drop illegal-mac alarm

#

set cpu-usage threshold 80 restore 75

#

aaa  

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default  

domain default_admin  

local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

local-user admin service-type http

#

isis 100

is-level level-2

cost-style wide

network-entity 49.0001.0030.0300.3003.00

#

firewall zone Local

priority 15

#

interface GigabitEthernet0/0/0

ip address 30.1.1.2 255.255.255.0  

isis enable 100

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack0

ip address 3.3.3.3 255.255.255.255  

isis enable 100

#

bgp 100

router-id 3.3.3.3

peer 2.2.2.2 as-number 100  

peer 2.2.2.2 connect-interface LoopBack0

#

ipv4-family unicast

 undo synchronization

 peer 2.2.2.2 enable

#

user-interface con 0

authentication-mode password

idle-timeout 0 0

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<R3>

R4:

<R4>display current-configuration  

[V200R003C00]

#

sysname R4

#

snmp-agent local-engineid 800007DB03000000000000

snmp-agent  

#

clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

drop illegal-mac alarm

#

set cpu-usage threshold 80 restore 75

#

aaa  

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default  

domain default_admin  

local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

local-user admin service-type http

#

firewall zone Local

priority 15

#

interface GigabitEthernet0/0/0

ip address 10.1.1.2 255.255.255.0  

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack0

ip address 192.168.1.1 255.255.255.255  

#

interface LoopBack1

ip address 4.4.4.4 255.255.255.255  

#

bgp 200

router-id 4.4.4.4

peer 10.1.1.1 as-number 100  

peer 10.1.1.1 ebgp-max-hop 2  

#

ipv4-family unicast

 undo synchronization

 network 192.168.1.1 255.255.255.255  

 peer 10.1.1.1 enable

#

user-interface con 0

authentication-mode password

idle-timeout 0 0

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<R4>

4、实验结果

1)R1没有配置next-hop-local

NEXT-HOP-LOCAL的作用_边界路由器_02

2)配置next-hop-local(下一跳本地)

NEXT-HOP-LOCAL的作用_边界路由器_03

5、知识点总结

边界路由器从EBGP的对等体中学习到的路由,在传递的过程中下一跳地址为边界路由器对等体的出接口地址。导致IBGP中除了此边界路由器外,其他路由器学到的此路由的下一跳均为边界路由器对等体的出接口地址;只有配置了next-hop-local后,其他路由器学到的此路由的下一跳改编为边界路由器的ip地址