IPV4/IPV6双协议栈配置案例
拓扑:
XRV1配置:
===================================================================
hostname XRV1
!
ipv6 unicast-routing
!
interface Loopback0
ip address 192.168.1.1 255.255.255.255
ipv6 address 2001::1/64
ipv6 ospf 100 area 0
!
interface Ethernet0/0
ip address 10.10.1.1 255.255.255.252
ipv6 address 2002::1/64
!
interface Ethernet0/1
ip address 10.10.2.1 255.255.255.252
ip ospf network point-to-point
ipv6 address 2003::2/64
ipv6 ospf 100 area 0
ospfv3 network point-to-point
!
router ospfv3 100
router-id 192.168.1.1
!
address-family ipv6 unicast
exit-address-family
!
router ospf 100
router-id 192.168.1.1
network 10.10.2.0 0.0.0.3 area 0
network 192.168.1.1 0.0.0.0 area 0
!
router bgp 65001
bgp router-id 192.168.1.1
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
neighbor 10.10.1.2 remote-as 65002
neighbor 2001::3 remote-as 65001
neighbor 2001::3 update-source Loopback0
neighbor 2002::2 remote-as 65002
neighbor 192.168.1.3 remote-as 65001
neighbor 192.168.1.3 update-source Loopback0
!
address-family ipv4
neighbor 10.10.1.2 activate
neighbor 2001::3 activate
no neighbor 2002::2 activate
neighbor 192.168.1.3 activate
neighbor 192.168.1.3 next-hop-self
exit-address-family
!
address-family ipv6
neighbor 2001::3 activate
neighbor 2001::3 next-hop-self
neighbor 2002::2 activate
exit-address-family
!
XRV2配置:
===================================================================
!
hostname XRV2
!
no aaa new-model
clock timezone CST 8 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
!
ipv6 unicast-routing
!
interface Loopback0
ip address 192.168.1.2 255.255.255.255
ipv6 address 2001::2/64
ipv6 ospf 100 area 0
!
interface Ethernet0/0
ip address 10.10.1.2 255.255.255.252
ipv6 address 2002::2/64
!
interface Ethernet0/1
ip address 10.10.3.1 255.255.255.252
ip ospf network point-to-point
ipv6 address 2004::2/64
ipv6 ospf 100 area 0
ipv6 ospf network point-to-point
!
router ospfv3 100
router-id 192.168.1.2
!
address-family ipv6 unicast
exit-address-family
!
router ospf 100
router-id 192.168.1.2
network 10.10.3.0 0.0.0.3 area 0
network 192.168.1.2 0.0.0.0 area 0
!
router bgp 65002
bgp router-id 192.168.1.2
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
neighbor 10.10.1.1 remote-as 65001
neighbor 2001::4 remote-as 65002
neighbor 2001::4 update-source Loopback0
neighbor 2002::1 remote-as 65001
neighbor 192.168.1.4 remote-as 65002
neighbor 192.168.1.4 update-source Loopback0
!
address-family ipv4
neighbor 10.10.1.1 activate
no neighbor 2001::4 activate
no neighbor 2002::1 activate
neighbor 192.168.1.4 activate
neighbor 192.168.1.4 next-hop-self
exit-address-family
!
address-family ipv6
neighbor 2001::4 activate
neighbor 2001::4 next-hop-self
neighbor 2002::1 activate
exit-address-family
XRV3配置:
===================================================================
!
hostname XRV3
!
ip cef
ipv6 unicast-routing
ipv6 cef
!
interface Loopback0
ip address 192.168.1.3 255.255.255.255
ipv6 address 2001::3/64
ipv6 ospf 100 area 0
!
interface Ethernet0/0
ip address 10.10.4.1 255.255.255.252
ip ospf network point-to-point
ipv6 address 2005::1/64
ipv6 ospf 100 area 0
ospfv3 network point-to-point
!
interface Ethernet0/1
ip address 10.10.2.2 255.255.255.252
ip ospf network point-to-point
ipv6 address 2003::1/64
ipv6 ospf 100 area 0
ospfv3 network point-to-point
!
router ospfv3 100
router-id 192.168.1.3
!
address-family ipv6 unicast
exit-address-family
!
router ospf 100
router-id 192.168.1.3
network 10.10.2.0 0.0.0.3 area 0
network 10.10.4.0 0.0.0.3 area 0
network 192.168.1.3 0.0.0.0 area 0
!
router bgp 65001
bgp router-id 192.168.1.3
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
neighbor 2001::1 remote-as 65001
neighbor 2001::1 update-source Loopback0
neighbor 2001::5 remote-as 65001
neighbor 2001::5 update-source Loopback0
neighbor 192.168.1.1 remote-as 65001
neighbor 192.168.1.1 update-source Loopback0
neighbor 192.168.1.5 remote-as 65001
neighbor 192.168.1.5 update-source Loopback0
!
address-family ipv4
no neighbor 2001::1 activate
no neighbor 2001::5 activate
neighbor 192.168.1.1 activate
neighbor 192.168.1.1 route-reflector-client
neighbor 192.168.1.5 activate
neighbor 192.168.1.5 route-reflector-client
exit-address-family
!
address-family ipv6
neighbor 2001::1 activate
neighbor 2001::1 route-reflector-client
neighbor 2001::5 activate
neighbor 2001::5 route-reflector-client
exit-address-family
XRV4配置:
===================================================================
!
hostname XRV4
!
no ip domain lookup
ip cef
ipv6 unicast-routing
ipv6 cef
!
interface Loopback0
ip address 192.168.1.4 255.255.255.255
ipv6 address 2001::4/64
ipv6 ospf 100 area 0
!
interface Ethernet0/0
ip address 10.10.5.1 255.255.255.252
ip ospf network point-to-point
ipv6 address 2006::1/64
ipv6 ospf 100 area 0
ipv6 ospf network point-to-point
!
interface Ethernet0/1
ip address 10.10.3.2 255.255.255.252
ip ospf network point-to-point
ipv6 address 2004::1/64
ipv6 ospf 100 area 0
ipv6 ospf network point-to-point
!
router ospfv3 100
router-id 192.168.1.4
!
address-family ipv6 unicast
exit-address-family
!
router ospf 100
router-id 192.168.1.4
network 10.10.3.0 0.0.0.3 area 0
network 10.10.5.0 0.0.0.3 area 0
network 192.168.1.4 0.0.0.0 area 0
!
router bgp 65002
bgp router-id 192.168.1.4
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
neighbor 2001::2 remote-as 65002
neighbor 2001::2 update-source Loopback0
neighbor 2001::6 remote-as 65002
neighbor 2001::6 update-source Loopback0
neighbor 192.168.1.2 remote-as 65002
neighbor 192.168.1.2 update-source Loopback0
neighbor 192.168.1.6 remote-as 65002
neighbor 192.168.1.6 update-source Loopback0
!
address-family ipv4
no neighbor 2001::2 activate
no neighbor 2001::6 activate
neighbor 192.168.1.2 activate
neighbor 192.168.1.2 route-reflector-client
neighbor 192.168.1.6 activate
neighbor 192.168.1.6 route-reflector-client
exit-address-family
!
address-family ipv6
neighbor 2001::2 activate
neighbor 2001::2 route-reflector-client
neighbor 2001::6 activate
neighbor 2001::6 route-reflector-client
exit-address-family
!
XRV5配置:
===================================================================
hostname XRV5
!
ip cef
ipv6 unicast-routing
ipv6 cef
!
interface Loopback0
ip address 192.168.1.5 255.255.255.255
ipv6 address 2001::5/64
ipv6 ospf 100 area 0
!
interface Port-channel10
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Ethernet0/0
no switchport
ip address 10.10.4.2 255.255.255.252
ip ospf network point-to-point
duplex auto
ipv6 address 2005::2/64
ipv6 ospf 100 area 0
ospfv3 network point-to-point
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 10 mode active
!
interface Ethernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 10 mode active
!
interface Ethernet0/3
shutdown
!
interface Vlan1
ip address 10.20.1.254 255.255.255.0
ipv6 address 2011::1/64
!
interface Vlan2
ip address 10.20.2.254 255.255.255.0
ipv6 address 2012::1/64
!
interface Vlan3
ip address 10.20.3.254 255.255.255.0
ipv6 address 2013::1/64
!
interface Vlan4
ip address 10.20.4.254 255.255.255.0
ipv6 address 2014::1/64
!
router ospfv3 100
router-id 192.168.1.5
!
address-family ipv6 unicast
exit-address-family
!
router ospf 100
router-id 192.168.1.5
network 10.10.4.0 0.0.0.3 area 0
network 192.168.1.5 0.0.0.0 area 0
!
router bgp 65001
bgp router-id 192.168.1.5
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
neighbor 2001::3 remote-as 65001
neighbor 2001::3 update-source Loopback0
neighbor 192.168.1.3 remote-as 65001
neighbor 192.168.1.3 update-source Loopback0
!
address-family ipv4
network 10.20.1.0 mask 255.255.255.0
network 10.20.2.0 mask 255.255.255.0
network 10.20.3.0 mask 255.255.255.0
network 10.20.4.0 mask 255.255.255.0
no neighbor 2001::3 activate
neighbor 192.168.1.3 activate
exit-address-family
!
address-family ipv6
network 2011::/64
network 2012::/64
network 2013::/64
network 2014::/64
neighbor 2001::3 activate
exit-address-family
XRV6配置:
===================================================================
!
hostname XRV6
!
no ip domain-lookup
ip cef
ipv6 unicast-routing
ipv6 cef
!
interface Loopback0
ip address 192.168.1.6 255.255.255.255
ipv6 address 2001::6/64
ipv6 ospf 100 area 0
!
interface Port-channel10
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Ethernet0/0
no switchport
ip address 10.10.5.2 255.255.255.252
ip ospf network point-to-point
duplex auto
ipv6 address 2006::2/64
ipv6 ospf 100 area 0
ipv6 ospf network point-to-point
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 10 mode active
!
interface Ethernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 10 mode active
!
interface Ethernet0/3
!
interface Vlan1
ip address 10.30.1.254 255.255.255.0
ipv6 address 2015::1/64
!
interface Vlan2
ip address 10.30.2.254 255.255.255.0
ipv6 address 2016::2/64
!
interface Vlan3
ip address 10.30.3.254 255.255.255.0
ipv6 address 2017::1/64
!
interface Vlan4
ip address 10.30.4.254 255.255.255.0
ipv6 address 2018::1/64
!
router ospfv3 100
router-id 192.168.1.6
!
address-family ipv6 unicast
exit-address-family
!
router ospf 100
router-id 192.168.1.6
network 10.10.5.0 0.0.0.3 area 0
network 192.168.1.6 0.0.0.0 area 0
!
router bgp 65002
bgp router-id 192.168.1.6
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
neighbor 2001::4 remote-as 65002
neighbor 2001::4 update-source Loopback0
neighbor 192.168.1.4 remote-as 65002
neighbor 192.168.1.4 update-source Loopback0
!
address-family ipv4
network 10.30.1.0 mask 255.255.255.0
network 10.30.2.0 mask 255.255.255.0
network 10.30.3.0 mask 255.255.255.0
network 10.30.4.0 mask 255.255.255.0
no neighbor 2001::4 activate
neighbor 192.168.1.4 activate
exit-address-family
!
address-family ipv6
network 2015::/64
network 2016::/64
network 2017::/64
network 2018::/64
neighbor 2001::4 activate
exit-address-family
!
XRV7配置:
=========================================================================================================
!
hostname XRV7
!
interface Port-channel10
switchport trunk encapsulation dot1q
!
interface Ethernet0/0
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
channel-group 10 mode active
!
interface Ethernet0/2
switchport trunk encapsulation dot1q
channel-group 10 mode active
!
XRV8配置:
===================================================================
!
hostname XRV8
!
interface Port-channel10
switchport trunk encapsulation dot1q
!
interface Ethernet0/0
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
channel-group 10 mode active
!
interface Ethernet0/2
switchport trunk encapsulation dot1q
channel-group 10 mode active
!
在XRV6上使用show bgp ipv6 unicast summary看V6的邻居关系建立如下图:
在XRV6上使用show bgp ipv6 unicast 查看V6的BGP路由表如下图:
IPV4/IPV6双协议栈配置案例的更多相关文章
- IPv4和IPv6的差异;如何实现IPv4和IPv6双协议栈的通信
1 IPv4和IPv6的差异 1.1 地址空间 IPv6 与 IPv4 比较最显著的一个改动就是使用 128 比特上的地址来代替了 32 比特长的 IPv4 地址. IPv6 中取消了广播地址, ...
- IPv4&IPv6双重协议栈
IPV4 TCP客户与IPV6服务器之间的通信: 1 启动IPV6服务器,创建套接监听口,绑定通配地址 2 IPV4调用gethostbyname找到该服务器对应的A记录 3 调用connect,向服 ...
- IP协议/地址(IPv4&IPv6)概要
IP协议/地址(IPv4&IPv6)概要 IP协议 什么是IP协议 IP是Internet Protocol(网际互连协议)的缩写,是TCP/IP体系中的网络层协议. [1] 协议的特征 无连 ...
- Centos7+nginx+keepalived集群及双主架构案例
目录简介 一.简介 二.部署nginx+keepalived 集群 三.部署nginx+keepalived双主架构 四.高可用之调用辅助脚本进行资源监控,并根据监控的结果状态实现动态调整 一.简介 ...
- LwIP Application Developers Manual10---LwIP IPv4/IPv6 stacks
1.前言 lwIP正在加入IPv6,一个实验性的版本可以通过git下载,该版本实现了一个IPv4/IPv6的双协议栈.通过在lwipopts.h定义LWIP_IPV6可以使能IPv6 2.已实现的IP ...
- netty——私有协议栈开发案例
netty--私有协议栈开发案例 摘要: 在学习李林峰老师的Netty权威指南中,觉得第十二章<私有协议栈开发>中的案例代码比较有代表性,讲的也不错,但是代码中个人认为有些简单的错误,个人 ...
- Keepalived LVS-DR单网络双活双主配置模式
Keepalived LVS-DR单网络双活双主配置模式 Linux就该这么学 今天 LVS是Linux Virtual Server的简写,意即Linux虚拟服务器,是一个虚拟的服务器集群系统.LV ...
- 烂泥:VMWare Workation双网卡配置IP地址
本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 前几天给一个客户做远程项目实施,客户那边的服务器是Windows OS的,我们这边的业务 ...
- [STL]双层级配置器
考虑到过多“小型区块”可能造成的内存碎片问题,SGI设计了双层级配置器: 第一级配置器直接调用malloc()和free(): 第二级配置器分两种情况:当配置区块大于128字节时,调用第一级配置器:当 ...
随机推荐
- Burpsuite 1.7.33启动的一点小问题。
最近用的burp到期了,就想找个新版本的. https://www.52pojie.cn/thread-691448-1-1.html 上面帖子里贴了最新的几个版本的burp,下载以后,问题出现了,无 ...
- php配置php_pdo_mysql模块
网上的都是什么编译安装的,总算找到一个简单的方法 安装好PHP yum install php php-fpm -y 直接安装pdo模块 yum install php-pdo_mysql 在/etc ...
- bootstrap模态框弹框后执行Ajax
如下: editModal:模态框ID <script> $(document).ready(function() { $('#editModal').on('hidden.bs.moda ...
- 廖雪峰Java7处理日期和时间-3java.time的API-2ZonedDateTime
ZonedDatetime = LocalDateTime + ZoneId ZonedDateTime:带时区的日期和时间 ZoneId:新的API定义的时区对象(取代几句的java.util.Ti ...
- ijkplayer总结
12.ijkplayer的使用过程: 11.ijkpalyer引言: ==== 12.ijkplayer的使用过程: >>举例mac系统编译.so文件: ijkplayer默认是不支持 ...
- 根据url路径获取图片并显示到ListView中
项目开发中我们需要从网络获取图片显示到控件中,很多开源框架如Picasso可以实现图片下载和缓存功能.这里介绍的是一种简易的网络图片获取方式并把它显示到ListView中. 本案例实现的效果如下: 项 ...
- 采用link方式解决zabbix对于备份监控和ORACLE日志监控由于路径不统一的问题
#对于备份监控和ORACLE日志监控由于路径不统一,我们可以采用link的方式如:#ln -s 原路径 新路径(/zabbix/logs)#新路径统一放在/zabbix/logs下具体看模板指定. # ...
- 1-hadoop、mr
1.HDFS的优缺点: 优点: ① 高容错 ② 可扩展 ③ 适合大文件存储 ④ 可构建在廉价的机器上 缺点: ① 高延迟 ② 文件不能修改 ③ 不适合小文件存储 2.HDFS架构(类似于文件系统): ...
- day32基于tcp协议的远程执行命令
客户端 from socket import *import structimport json client = socket(AF_INET, SOCK_STREAM)client.connect ...
- github 添加wiki
亲们支持我的新博客哦==>地址(以后更新会尽量在新博客更新,欢迎大家访问加入我的后宫w) ) 平时都是写readMe和docs的,一直眼瞎没有注意到有wiki这个功能 随便找一个写了wiki的看 ...