【实验】IPv6下,使用链路本地地址(Link-Local Address)来减小路由表条目

IPv6下,使用link-local地址来减小路由表条目
IPv6下,使用link-local地址来减小路由表条目

实验需求:

  • 每台路由器配置一个loopback口,四台路由器之间开启OSPF/ISIS,实现loopback口之间的通信;
  • 每两台路由器之间的链路不能配置IPv6地址,直接使用link-local地址来实现链路之间的通信。

实验环境:

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

实验步骤:

实验一、四台路由器之间开启OSPF:

1、配置loopback口和链路间的link-local地址:

R1-Cisco 2811:

ipv6 unicast-routing

int l 0
ipv6 address 1::1/128

int s 0/0/0
! 在接口上开启IPv6,将
自动生成link-local地址
ipv6 enable
no sh

int s 0/1/0
ipv6 enable
no sh

R2-Cisco 2811:

ipv6 unicast-routing

int l 0
ipv6 address 2::2/128

int s 0/0/0
ipv6 enable
no sh

int s 0/1/0
ipv6 enable
no sh

R3-Cisco 2811:

ipv6 unicast-routing

int l 0
ipv6 address 3::3/128

int s 0/0/1
ipv6 enable
no sh

int s 0/1/0
ipv6 enable
no sh

R4-Cisco 2811:

ipv6 unicast-routing

int l 0
ipv6 address 4::4/128

int s 0/0/1
ipv6 enable
no sh

int s 0/1/0
ipv6 enable
no sh

R1#sh ipv6 int s 0/0/0
Serial0/0/0 is down, line protocol is down
IPv6 is tentative, link-local address is FE80::21B:54FF:FE0A:1878 [TEN] —— 
link-local地址
No Virtual link-local address(es):
No global unicast address is configured
Joined group address(es):
 FF02::1
 FF02::2
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
ND RAs are suppressed (periodic)
Hosts use stateless autoconfig for addresses.

link-local地址只在本链路有效,范围从FE80::/10 ~ FEBF::/10。

2、配置OSPF:

R1-Cisco 2811:

ipv6 router ospf 1234
router-id 1.1.1.1

int l 0
ipv6 ospf 1234 a 0

int s 0/0/0
ipv6 ospf 1234 a 0

int s 0/1/0
ipv6 ospf 1234 a 0

R2-Cisco 2811:

ipv6 router ospf 1234
router-id 2.2.2.2

int l 0
ipv6 ospf 1234 a 0

int s 0/0/0
ipv6 ospf 1234 a 0

int s 0/1/0
ipv6 ospf 1234 a 0

R3-Cisco 2811:

ipv6 router ospf 1234
router-id 3.3.3.3

int l 0
ipv6 ospf 1234 a 0

int s 0/0/1
ipv6 ospf 1234 a 0

int s 0/1/0
ipv6 ospf 1234 a 0

R4-Cisco 2811:

ipv6 router ospf 1234
router-id 4.4.4.4

int l 0
ipv6 ospf 1234 a 0

int s 0/0/1
ipv6 ospf 1234 a 0

int s 0/1/0
ipv6 ospf 1234 a 0

3、测试连通性:

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

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

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

可以看到每台路由器的路由表非常精简,只有4条loopback口的IPv6地址的表项(和一个默认的组播地址表项):

OSPFv3 R1-Cisco 2811实验截图
OSPFv3 R1-Cisco 2811实验截图
OSPFv3 R2-Cisco 2811实验截图
OSPFv3 R2-Cisco 2811实验截图

实验二、四台路由器之间开启ISIS:

1、配置link-local地址:(同实验一)

2、配置ISIS:

R1-Cisco 2811:

router isis 1
net 49.1234.0000.0000.0001.00
is-type level-1

int l 0
ipv6 router isis 1

int s 0/0/0
ipv6 router isis 1

int s 0/1/0
ipv6 router isis 1

R2-Cisco 2811:

router isis 1
net 49.1234.0000.0000.0002.00
is-type level-1

int l 0
ipv6 router isis 1

int s 0/0/0
ipv6 router isis 1

int s 0/1/0
ipv6 router isis 1

R3-Cisco 2811:

router isis 1
net 49.1234.0000.0000.0003.00
is-type level-1

int l 0
ipv6 router isis 1

int s 0/0/1
ipv6 router isis 1

int s 0/1/0
ipv6 router isis 1

R4-Cisco 2811:

router isis 1
net 49.1234.0000.0000.0004.00
is-type level-1

int l 0
ipv6 router isis 1

int s 0/0/1
ipv6 router isis 1

int s 0/1/0
ipv6 router isis 1

3、测试连通性:

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

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

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

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

可以看到每台路由器的路由表非常精简,只有4条loopback口的IPv6地址的表项(和一个默认的组播地址表项):

ISIS R3-Cisco 2811实验截图
ISIS R3-Cisco 2811实验截图
打赏 赞(0)
比特币钱包
以太坊钱包
比特币钱包二维码图片

比特币钱包扫描二维码打赏

以太坊钱包二维码图片

以太坊钱包扫描二维码打赏

Was this article helpful?

Related Articles

Leave A Comment?

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据