首页 > 编程知识 正文

linux配置ipv6网关,ipv6的默认路由怎么写

时间:2023-05-03 15:51:41 阅读:136284 作者:889

IPv6静态路由

命令:

R1(config ) #ipv6

启用统一路由//IPv6路由

R1(config-if ) # IPv6地址

手动设置20103360111113360:1/64//ipv6地址

R1(config-if ) # IPv6地址

20103360111336033601/64

自动配置EUI-64//ipv6地址

R1(config ) #ipv6 route

2009:2323:/64

配置s0/0//ipv6静态路由

r3(config-if ) #ipv6 route :/0

s0/1//ipv6配置静态默认路由

R1(config ) #ipv6 unicast-routing

R1(config ) #int lo0

R1(config-if ) IPv6 address 201033601113360:3:1/64

R1(config ) #int lo1

R1(config-if ) IPv6 address 2011:11133603:1/64

R1(config ) #int s0/0

R1(config-if ) IPv6 address 2009336012123360:1/64

R1(config-if ) #no shutdown

R1(config ) IPv6 route 20093360232:3:/64s0/0

R1(config ) IPv6 route 2012:3:33:3:/64s0/0

R2(config ) #ipv6 unicast-routing

R2(config ) #int s0/0

R2(config-if ) IPv6 address 2009336012123360:2/64

R2 (配置if ) #clock rate 128000

R2(config-if ) #no shutdown

R2(config ) #int s0/1

R2(config-if ) IPv6 address 20093360232:3:2/64

R2 (配置if ) #clock rate 128000

R2(config-if ) #no shutdown

R2(config ) IPv6 route 2010336011113360:3360:/64s0/0

R2(config ) IPv6 route 2011:11133603:/64s0/0

R2(config ) IPv6 route 2012:3:33:3:/64s0/1

R3(config ) #ipv6 unicast-routing

R3(config ) #int lo0

r3(config-if ) IPv6地址2012:3:3:3/64

R3(config ) #int s0/1

r3(config-if ) IPv6 address 20093360232:3:3/64

R3(config-if ) #no shutdown

r3(config-if ) #ipv6 route :/0 s0/1

说明:

接口上的IPv6地址可以手动指定,也可以通过使用“EUI-64”自动生成。 例如:

R1(config ) #int lo0

r1(config-if ) IPv6 address 20103360113360:/64 eui-64

R1#show ipv6 interface brief

上述输出显示接口Loopback0的IPv6地址以" EUI-64 "方式扩展并自动生成。 EUI-64标准将IEEE802

要将MAC地址从48位扩展到64位,请在MAC地址的第24位插入16位0xFFFE,以创建唯一的64位接口标识符。

思科

IOS支持双协议栈。 这意味着接口可以同时配置IPv4和IPv6地址,接口将根据数据包的目标地址进行选择和使用

协议栈。 如果有IPv6可用,则优先使用IPv6协议。 旧的纯IP v4 APP应用程序的工作方式和以前一样。

实验调试R1 # show IPv6接口

查看s0/0//ipv6的接口信息

R1/R3#show ipv6 route

查看satic//ipv6静态路由表

R1/R3#show ipv6

查看satic//ipv6路由表中的静态路由

R1#show ipv6 route

摘要//摘要显示当前IPv6路由表

ping R1 # IPv6

2012:3333:3

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。