华为之基于ISIS的BGP基础配置

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

华为BGP基础配置之基于ISIS
1、配置IP
R1配置:
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 1.1.1.1 32
[R1-LoopBack0]quit
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.1.1 24
[R1-GigabitEthernet0/0/1]quit
R2配置:
[R2]interface LoopBack 0
[R2-LoopBack0]ip address 2.2.2.2 32
[R2-LoopBack0]quit
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[R2-GigabitEthernet0/0/0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 23.1.1.2 24
[R2-GigabitEthernet0/0/1]quit
R3配置:
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 3.3.3.3 32
[R3-LoopBack0]quit
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 23.1.1.3 24
[R3-GigabitEthernet0/0/0]quit
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 34.1.1.3 24
[R3-GigabitEthernet0/0/1]quit
R4配置:
[R4]interface LoopBack 0
[R4-LoopBack0]ip address 4.4.4.4 32
[R4-LoopBack0]quit
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]ip address 34.1.1.4 24
[R4-GigabitEthernet0/0/0]quit
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address 45.1.1.4 24
[R4-GigabitEthernet0/0/1]quit
R5配置:
[R5]interface LoopBack 0
[R5-LoopBack0]ip address 5.5.5.5 32
[R5-LoopBack0]quit
[R5]interface GigabitEthernet 0/0/0
[R5-GigabitEthernet0/0/0]ip address 45.1.1.5 24
[R5-GigabitEthernet0/0/0]quit
[R5]interface GigabitEthernet 0/0/1
[R5-GigabitEthernet0/0/1]ip address 192.168.2.1 24
[R5-GigabitEthernet0/0/1]quit
2、配置ISIS区域,使用level-1、level-2均可。

这里使用level-2
R2配置:
[R2]isis 1
[R2-isis-1]network-entity 49.0001.0000.0000.0002.00 [R2-isis-1]is-level level-2
[R2-isis-1]quit
只开启GE0/0/1和loopback 0的ISIS即可
[R2]interface LoopBack 0
[R2-LoopBack0]isis enable
[R2-LoopBack0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]isis enable
[R2-GigabitEthernet0/0/1]quit
R3配置:
[R3]isis 1
[R3-isis-1]network-entity 49.0001.0000.0000.0003.00 [R3-isis-1]is-level level-2
[R3-isis-1]quit
[R3]interface LoopBack 0
[R3-LoopBack0]isis enable
[R3-LoopBack0]quit
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]isis enable
[R3-GigabitEthernet0/0/0]quit
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]isis enable
[R3-GigabitEthernet0/0/1]quit
R4配置:
[R4]isis 1
[R4-isis-1]network-entity 49.0001.0000.0000.0004.00 [R4-isis-1]quit
[R4]interface LoopBack 0
[R4-LoopBack0]isis enable
[R4-LoopBack0]quit
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]isis enable
[R4-GigabitEthernet0/0/0]quit
调试命令:
[R3]display isis peer
[R3]display ip routing-table
3、配置左侧EBGP
配置EBGP之前,先打通1.1.1.1到2.2.2.2的静态路由R1配置:
[R1]ip route-static 2.2.2.2 32 12.1.1.2
[R1]bgp 100
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 2.2.2.2 as-number 200
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R1-bgp]peer 2.2.2.2 ebgp-max-hop 2
[R1-bgp]quit
R2配置:
[R2]ip route-static 1.1.1.1 32 12.1.1.1
[R2]bgp 200
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 1.1.1.1 as-number 100
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R2-bgp]peer 1.1.1.1 ebgp-max-hop 2
[R2-bgp]quit
调试命令:
[R2]dis bgp peer
4、右侧EBGP配置
R4配置:
[R4]ip route-static 5.5.5.5 32 45.1.1.5
[R4]bgp 200
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 5.5.5.5 as-number 300
[R4-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[R4-bgp]peer 5.5.5.5 ebgp-max-hop 2
[R4-bgp]quit
R5配置
[R5]ip route-static 4.4.4.4 32 45.1.1.4
[R5]bgp 300
[R5-bgp]router-id 5.5.5.5
[R5-bgp]peer 4.4.4.4 as-number 200
[R5-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R5-bgp]peer 4.4.4.4 ebgp-max-hop 2
[R5-bgp]quit
调试命令
[R5]dis bgp peer
5、配合中间IBGP
在前面的配置步骤中已经配置router-id,这里就不再重复配置。

R2配置:
[R2]bgp 200
[R2-bgp]peer 3.3.3.3 as-number 200
[R2-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[R2-bgp]peer 3.3.3.3 next-hop-local #边界路由器需配置此参数
[R2-bgp]peer 4.4.4.4 as-number 200
[R2-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R2-bgp]peer 4.4.4.4 next-hop-local #边界路由器需配置此参数
[R2-bgp]quit
R3配置:
[R3]bgp 200
[R3-bgp]peer 2.2.2.2 as-number 200
[R3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R3-bgp]peer 4.4.4.4 as-number 200
[R3-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R3-bgp]quit
[R3]dis bgp peer
R4配置:
R4和R2都属于边界路由,配置方法相同。

[R4]bgp 200
[R4-bgp]peer 3.3.3.3 as-number 200
[R4-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[R4-bgp]peer 3.3.3.3 next-hop-local
[R4-bgp]
[R4-bgp]peer 2.2.2.2 as-number 200
[R4-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R4-bgp]peer 2.2.2.2 next-hop-local
[R4-bgp]quit
[R4]dis bgp peer
至此,所有的BGP路由配置都已经打通,但是还没有生成BGP路由。

接下来需要做两项工作:一是在bgp上宣告网段,一是在边界路由器上引入其他路由协议的自治系统,这里是引入ISIS 1。

宣告网络时,一定要注意子网掩码的一致性。

6、在R1和R5上宣告其他子网和引入直连路由。

R1配置:
[R1]bgp 100
[R1-bgp]network 192.168.1.0 24
[R1-bgp]network 1.1.1.1 32
[R1-bgp]import-route direct
[R1-bgp]dis bgp routing-table
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 8
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.1/32 0.0.0.0 0 0 ?
*> 12.1.1.0/24 0.0.0.0 0 0 ?
*> 12.1.1.1/32 0.0.0.0 0 0 ?
*> 127.0.0.0 0.0.0.0 0 0 ?
*> 127.0.0.1/32 0.0.0.0 0 0 ?
*> 192.168.1.0 0.0.0.0 0 0 i
* 0.0.0.0 0 0 ?
*> 192.168.1.1/32 0.0.0.0 0 0 ?
R5配置:
[R5]bgp 300
[R5-bgp]network 192.168.2.0 24
[R5-bgp]network 5.5.5.5 32
[R5-bgp]import-route direct
[R5-bgp]dis bgp routing-table
BGP Local router ID is 5.5.5.5
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 10
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 5.5.5.5/32 0.0.0.0 0 0 ?
*> 12.1.1.0/24 4.4.4.4 0 200 100?
*> 45.1.1.0/24 0.0.0.0 0 0 ?
*> 45.1.1.5/32 0.0.0.0 0 0 ?
*> 127.0.0.0 0.0.0.0 0 0 ?
*> 127.0.0.1/32 0.0.0.0 0 0 ?
*> 192.168.1.0 4.4.4.4 0 200
100i
*> 192.168.2.0 0.0.0.0 0 0 i
* 0.0.0.0 0 0 ?
*> 192.168.2.1/32 0.0.0.0 0 0 ?
7、在IBGP的两个边界路由上引入ISIS、直连路由和静态路由。

引入静态路由是解决1.1.1.1和5.5.5.5的联通。

R2配置:
[R2]bgp 200
[R2-bgp]import-route isis 1
[R2-bgp]import-route direct
[R2-bgp]import-route static
R4配置:
[R4]bgp 200
[R4-bgp]import-route isis 1
[R4-bgp]import-route direct
[R4-bgp]import-route static。

相关文档
最新文档