【实验】IPv4下,使用ISIS的advertise passive-only特性来减小路由表条目

【实验】IPv4下,使用ISIS的advertise passive-only特性来减小路由表条目
【实验】IPv4下,使用ISIS的advertise passive-only特性来减小路由表条目

实验需求:

  • 每台路由器配置一个loopback口,四台路由器之间开启ISIS,实现loopback口之间的通信;
  • 路由表只允许出现四个loopback口的IPv4地址和配置在自己接口上的IPv4地址。

实验环境:

使用四台Cisco 2811路由器,IOS是目前最新的c2800nm-adventerprisek9-mz.151-4.M10.bin

实验步骤:

1、配置IP地址:

R1-Cisco-2811:

int s 0/0/0
ip add 12.1.1.1 255.255.255.0
no sh

int s 0/1/0
ip add 13.1.1.1 255.255.255.0
no sh

int l 0
ip add 1.1.1.1 255.255.255.255

R2-Cisco-2811:

int s 0/0/0
ip add 12.1.1.2 255.255.255.0
no sh

int s 0/1/0
ip add 24.1.1.2 255.255.255.0
no sh

int l 0
ip add 2.2.2.2 255.255.255.255

R3-Cisco-2811:

int s 0/0/1
ip add 34.1.1.3 255.255.255.0
no sh

int s 0/1/0
ip add 13.1.1.3 255.255.255.0
no sh

int l 0
ip add 3.3.3.3 255.255.255.255

R4-Cisco-2811:

int s 0/0/1
ip add 34.1.1.4 255.255.255.0
no sh

int s 0/1/0
ip add 24.1.1.4 255.255.255.0
no sh

int l 0
ip add 4.4.4.4 255.255.255.255

2、开启ISIS:

R1-Cisco-2811:

router isis 1234
net 49.1234.0000.0000.0001.00
is-type level-1

int l 0
ip router isis 1234

int s 0/0/0
ip router isis 1234

int s 0/1/0
ip router isis 1234

R2-Cisco-2811:

router isis 1234
net 49.1234.0000.0000.0002.00
is-type level-1

int l 0
ip router isis 1234

int s 0/0/0
ip router isis 1234

int s 0/1/0
ip router isis 1234

R3-Cisco-2811:

router isis 1234
net 49.1234.0000.0000.0003.00
is-type level-1

int l 0
ip router isis 1234

int s 0/0/1
ip router isis 1234

int s 0/1/0
ip router isis 1234

R4-Cisco-2811:

router isis 1234
net 49.1234.0000.0000.0004.00
is-type level-1

int l 0
ip router isis 1234

int s 0/0/1
ip router isis 1234

int s 0/1/0
ip router isis 1234

现在的路由表分别有以下这些IPv4地址:

3、使用advertise passive-only特性减小路由表条目

advertise passive-only:即只通告设置为被动口的路由(如果你把loopback口设置为被动口,那么只通告loopback口的路由出去)

R1-Cisco-2811:

router isis 1234
advertise passive-only
passive-interface Loopback0

R2-Cisco-2811:

router isis 1234
advertise passive-only
passive-interface Loopback0

R3-Cisco-2811:

router isis 1234
advertise passive-only
passive-interface Loopback0

R4-Cisco-2811:

router isis 1234
advertise passive-only
passive-interface Loopback0

可以看到路由表相对于之前少了一些ISIS的路由条目:

4、测试连通性:

R1#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

R1#ping 4.4.4.4 —— 注意,R4没有R1接口下的路由了,所以R4没法回包,也就ping不通
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

R1#ping 4.4.4.4 so l 0 —— 要想ping通需要带loopback口来ping
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms

R1去traceroute R4的截图:

 

 

 

 

 

END

打赏作者
这里是 “ CCIE 工程师社区 ” 官方的捐款通道,您是否可以考虑请我们喝杯咖啡呢?

您的支持将鼓励我们继续创作!

[微信] 扫描二维码打赏

[支付宝] 扫描二维码打赏

Was this article helpful?

Related Articles

Leave A Comment?

This site uses Akismet to reduce spam. Learn how your comment data is processed.