实验拓扑图:

R1:

<Huawei>sys

[Huawei]sysname R1

[R1]router id 1.1.1.1

[R1]un in en

[R1]isis 1

[R1-isis-1]network-entity 49.0001.0000.0000.0001.00

[R1-isis-1]is-level level-1

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ip address 10.1.123.1 24

[R1-GigabitEthernet0/0/0]isis enable 1

[R1-GigabitEthernet0/0/0]q

[R1]int LoopBack 0

[R1-LoopBack0]ip address 1.1.1.1 24

[R1-LoopBack0]isis enable 1

[R1-LoopBack0]q

[R1]int LoopBack 6

[R1-LoopBack6]ip address 11.11.11.11 24

[R1-LoopBack6]isis 1

[R1-isis-1]import-route direct

[R1-isis-1]import-route direct level-1

R2:

<Huawei>sys

[Huawei]sysname R2

[R2]router i

[R2]router id 2.2.2.2

[R2]un in en

[R2]isis 1

[R2-isis-1]network-entity 49.0001.0000.0000.0002.00

[R2-isis-1]int g0/0/0

[R2-GigabitEthernet0/0/0]ip address 10.1.123.2 24

[R2-GigabitEthernet0/0/0]isis enable 1

[R2-GigabitEthernet0/0/0]int g0/0/1

[R2-GigabitEthernet0/0/1]ip address 10.1.24.1 24

[R2-GigabitEthernet0/0/1]isis enable 1

[R2-GigabitEthernet0/0/1]q

[R2]int LoopBack 0

[R2-LoopBack0]ip address 2.2.2.2 24

[R2-LoopBack0]isis enable 1

[R2-LoopBack0]q

R3:

<Huawei>sys

[Huawei]sysname R3

[R3]router id 3.3.3.3

[R3] un in en

[R3]isis 1

[R3-isis-1]network-entity 49.0001.0000.0000.0003.00

[R3-isis-1]int s4/0/0

[R3-Serial4/0/0]ip address 10.1.34.3 24

[R3-Serial4/0/0]link-protocol ppp

[R3-Serial4/0/0]isis enable 1

[R3-Serial4/0/0]int g0/0/0

[R3-GigabitEthernet0/0/0]ip address 10.1.123.3 24

[R3-GigabitEthernet0/0/0]isis enable 1

[R3-GigabitEthernet0/0/0]q

[R3]int LoopBack 0

[R3-LoopBack0]ip address 3.3.3.3 24

[R3-LoopBack0]isis enable 1

[R3-LoopBack0]q

R4:

<Huawei>sys

[Huawei]sysname R4

[R4]router id 4.4.4.4

[R4]un in en

[R4]isis 1

[R4-isis-1]is-level level-2

[R4-isis-1]network-entity 49.0002.0000.0000.0004.00

[R4-isis-1]int s4/0/0

[R4-Serial4/0/0]link-protocol ppp

[R4-Serial4/0/0]ip address 10.1.34.4 24

[R4-Serial4/0/0]isis enable 1

[R4-Serial4/0/0]int g0/0/0

[R4-GigabitEthernet0/0/0]ip address 10.1.24.4 24

[R4-GigabitEthernet0/0/0]isis enable 1

[R4-GigabitEthernet0/0/0]int g0/0/1

[R4-GigabitEthernet0/0/1]ip address 10.1.45.4 24

[R4-GigabitEthernet0/0/1]isis enable 1

[R4-GigabitEthernet0/0/1]q

[R4]int LoopBack 0

[R4-LoopBack0]ip address 4.4.4.4 24

[R4-LoopBack0]isis enable 1

[R4-LoopBack0]q

R5:

<Huawei>sys

[Huawei]sysname R5

[R5]router id 5.5.5.5

[R5]un in en

[R5]isis 1

[R5-isis-1]is-level level-2

[R5-isis-1]network-entity 49.0002.0000.0000.0005.00

[R5-isis-1]int g0/0/0

[R5-GigabitEthernet0/0/0]ip address 10.1.45.5 24

[R5-GigabitEthernet0/0/0]isis enable 1

[R5-GigabitEthernet0/0/0]int g0/0/1

[R5-GigabitEthernet0/0/1]ip add 10.1.56.5 24

[R5-GigabitEthernet0/0/1]isis enable 1

[R5-GigabitEthernet0/0/1]int g0/0/2

[R5-GigabitEthernet0/0/2]ip address 10.1.58.5 24

[R5-GigabitEthernet0/0/2]isis enable 1

[R5-GigabitEthernet0/0/2]q

[R5]int LoopBack 0

[R5-LoopBack0]ip address 5.5.5.5 24

[R5-LoopBack0]isis enable 1

[R5-LoopBack0]q

R6:

<Huawei>sys

[Huawei]sysname R6

[R6]router id 6.6.6.6

[R6]un in en

[R6]isis 1

[R6-isis-1]network-entity 49.0003.0000.0000.0006.00

[R6]int g0/0/0

[R6-GigabitEthernet0/0/0]ip address 10.1.56.6 24

[R6-GigabitEthernet0/0/0]isis enable 1

[R6-GigabitEthernet0/0/0]int g0/0/1

[R6-GigabitEthernet0/0/1]ip address 10.1.67.6 24

[R6-GigabitEthernet0/0/1]isis enable 1

[R6]int LoopBack 0

[R6-LoopBack0]ip address 6.6.6.6 24

[R6-LoopBack0]isis enable 1

[R6-LoopBack0]q

R7:

<Huawei>sys

[Huawei]sysname R7

[R7]router id 7.7.7.7

[R7]un in en

[R7]isis 1

[R7-isis-1]network-entity 49.0003.0000.0000.0007.00

[R7-isis-1]is-level level-1

[R7-isis-1]int g0/0/0

[R7-GigabitEthernet0/0/0]ip address 10.1.67.7 24

[R7-GigabitEthernet0/0/0]isis enable 1

[R7]int LoopBack 0

[R7-LoopBack0]ip address 7.7.7.7 24

[R7-LoopBack0]isis enable 1

[R7-LoopBack0]q

(1)在R1上使用display isis lsdb

R8:

<Huawei>

<Huawei>SYS

[Huawei]sysname R8

[R8]int e0/0/0

[R8-Ethernet0/0/0]ip address 10.1.58.8 24

[R8-Ethernet0/0/0]q

[R8]ip route-static 0.0.0.0 0 10.1.58.5 #在R8上启用默认路由

R5:

R5]acl 2000

[R5-acl-basic-2000]rule permit source 10.1.12.0 0.0.0.255

[R5-acl-basic-2000]rule permit source 10.1.67.0 0.0.0.255

[R5-acl-basic-2000]q

[R5]ip route-static 8.8.8.0 24 10.1.58.8

[R5]int g0/0/2

[R5-GigabitEthernet0/0/2]isis enable

[R5-GigabitEthernet0/0/2]q

[R5]isis 1

[R5-isis-1]import-route static level-2

[R2]isis 1

[R2-isis-1]import-route isis level-2 into level-1

[R2-isis-1]import-route isis level-2 into level-1 filter-policy 2005

[R2-isis-1]q

[R2]acl 2005

[R2-acl-basic-2005]rule permit source 4.4.4.0 0.0.0.255

[R2-acl-basic-2005]rule permit source 5.5.5.0 0.0.0.255 #这时,在R1上只看到4.4.4.0和5.5.5.0两条明细

[R2-acl-basic-2005]q

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐