0x11 HCNP-R&S BGP基本配置实验(华为eNSP)

实验拓扑

0x11 HCNP-R&S BGP基本配置实验(华为eNSP)_第1张图片

IP基本配置 

AR7


sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys AR7
[AR7]inter g0/0/0
[AR7-GigabitEthernet0/0/0]ip add 192.168.6.2 24
[AR7-GigabitEthernet0/0/0]inter l 0
[AR7-LoopBack0]ip add 172.16.1.1 24

AR1

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys AR1
[AR1]inter g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 192.168.6.1 24
[AR1-GigabitEthernet0/0/0]inter g0/0/1
[AR1-GigabitEthernet0/0/1]ip add 192.168.5.2 24

AR2

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR2
[AR2]inter g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 192.168.5.1 24
Aug 28 2018 14:42:03-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR2-GigabitEthernet0/0/0]inter g0/0/1
[AR2-GigabitEthernet0/0/1]ip add 192.168.1.1 24
[AR2-GigabitEthernet0/0/1]q
[AR2]un in en

AR3

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR3
[AR3]un in en
Info: Information center is disabled.
[AR3]inter g0/0/0
[AR3-GigabitEthernet0/0/0]ip add 192.168.1.2 24
[AR3-GigabitEthernet0/0/0]inter g0/0/1
[AR3-GigabitEthernet0/0/1]ip add 192.168.2.1 24

AR4

sys 
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys AR5
[AR5]inter g0/0/0
[AR5-GigabitEthernet0/0/0]ip add 192.168.3.2 24

AR5

sys 
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys AR5
[AR5]inter g0/0/0
[AR5-GigabitEthernet0/0/0]ip add 192.168.3.2 24

AS100配置RIP

AR7

[AR7]rip
[AR7-rip-1]net 172.16.0.0
[AR7-rip-1]net 192.168.6.0

AR1 

[AR1]rip
[AR1-rip-1]net 192.168.6.0
[AR1-rip-1]net 192.168.5.0

AS200配置OSPF

AR2

[AR2]ospf
[AR2-ospf-1]area 0
[AR2-ospf-1-area-0.0.0.0]net 192.168.5.0 0.0.0.255
[AR2-ospf-1-area-0.0.0.0]net 192.168.1.0 0.0.0.255

AR3

[AR3]ospf
[AR3-ospf-1]area 0
[AR3-ospf-1-area-0.0.0.0]net 192.168.1.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]net 192.168.2.0 0.0.0.255

AR4

[AR4]ospf
[AR4-ospf-1]are 0
[AR4-ospf-1-area-0.0.0.0]net 192.168.2.0 0.0.0.255
[AR4-ospf-1-area-0.0.0.0]net 192.168.3.0 0.0.0.255

AR5

[AR5]ospf 
[AR5-ospf-1]area 0
[AR5-ospf-1-area-0.0.0.0]net 192.168.3.0 0.0.0.255

配置BGP

AR1

[AR1]bgp 100
[AR1-bgp]peer 192.168.5.1 as-number 200

AR2

[AR2]bgp 200
[AR2-bgp]peer 192.168.5.2 as-number 100

0x11 HCNP-R&S BGP基本配置实验(华为eNSP)_第2张图片

 

0x11 HCNP-R&S BGP基本配置实验(华为eNSP)_第3张图片

 

查看BGP邻居关系

display bgp peer

此时BGP还没有路由表,因为还没有发布。

0x11 HCNP-R&S BGP基本配置实验(华为eNSP)_第4张图片

引入

AR1

[AR1-bgp]import-route rip 1	
[AR1-bgp]import-route direct 

再次查看路由表

0x11 HCNP-R&S BGP基本配置实验(华为eNSP)_第5张图片

0x11 HCNP-R&S BGP基本配置实验(华为eNSP)_第6张图片

AR2 

[AR2-bgp]import-route direct 	
[AR2-bgp]import-route ospf 1

0x11 HCNP-R&S BGP基本配置实验(华为eNSP)_第7张图片

BGP同步

AR1

[AR1]rip	
[AR1-rip-1]import-route bgp 

AR2

[AR2]ospf	
[AR2-ospf-1]import-route bgp 

 

0x11 HCNP-R&S BGP基本配置实验(华为eNSP)_第8张图片

 AR2或者可以这样操作

OSPF中配置添加默认路由

[AR2]ospf	
[AR2-ospf-1]undo import-route bgp 
[AR2-ospf-1]default-route-advertise always 

0x11 HCNP-R&S BGP基本配置实验(华为eNSP)_第9张图片

你可能感兴趣的:(HCNP-R&S学习之路,HCNP-R,S学习之路)