BGP 地址族分析 - Address-family
来源:互联网 发布:希拉里 邮件门 岛 知乎 编辑:程序博客网 时间:2024/06/06 17:57
BGP 地址族分析 - Address-family
Redback(config-router)#address-family ?
ipv4
ipv6
vpnv4
如果大家配置过MPLS VPN,那么对ipv4和vpnv4这两个地址族应该有些了解。
其实如果不是有特殊应用(MPLS、Ipv6),也不会用到这些地址族的概念,直接默认建立全局BGP邻居及属性就可以了。所以可以理解地址组是BGP的一个扩展。 下面我们就这两个地址族进行分析。
Ipv4和vpnv4地址族的分析:
特殊说明:“no bgp default ipv4-unicast” 命令是在全局BGP下禁用单播的传播,在MPLS中,正确的配置就是打上此命令,然后如果需要全局BGP连接或在BGP vpnv4连接,那么就在各个地址族中激活此邻居就可以了。
但有些全局命令是可以被继承到各个地址族中的。
以下分别分析几种常见的情况
1、如果没有配置“no bgp default ipv4-unicast”,直接在全局配置BGP邻居关系,这样ipv4地址族会默认被激活的,但是不会显示在“show run”中,如下所示:
Redback#config ter
Enter configuration commands, one per line.
Redback(config)#router bgp 1
Redback(config-router)#bgp router-id 150.1.1.1
Redback(config-router)#
Redback(config-router)#nei 150.1.2.2 update-source lo0
Redback(config-router)#address-family vpnv4
Redback(config-router-af)#nei 150.1.2.2 activate
Redback(config-router-af)#nei 150.1.2.2 send-community ex
Redback(config-router-af)#exit
Redback(config-router)#end
Redback#
Redback#sh run | b r b
router bgp 1
no synchronization
bgp router-id 150.1.1.1
neighbor 150.1.2.2 remote-as 1
neighbor 150.1.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 150.1.2.2 activate
neighbor 150.1.2.2 send-community extended
exit-address-family
!
2、此时如果打上“no bgp default ipv4-unicast” ,address-family ipv4地址族就会自动显示出来,此时如果再建立BGP全局邻居,这条命令就会生效:
Redback#config ter
Enter configuration commands, one per line.
Redback(config)#router bgp 1
Redback(config-router)#
Redback(config-router)#end
Redback#
Redback#sh run | b r b
router bgp 1
bgp router-id 150.1.1.1
no bgp default ipv4-unicast
neighbor 150.1.2.2 remote-as 1
neighbor 150.1.2.2 update-source Loopback0
!
address-family ipv4
neighbor 150.1.2.2 activate
no auto-summary >>>>> 这些命令从全局BGP配置中继承到了ipv4的地址族中
no synchronization
exit-address-family
!
address-family vpnv4
neighbor 150.1.2.2 activate
neighbor 150.1.2.2 send-community extended
exit-address-family
再加一个全局BGP邻居会怎么样呢?
Rack1R1#config ter
Enter configuration commands, one per line.
Redback(config)#router bgp 1
Redback(config-router)#
Redback(config-router)#nei 150.1.3.3 update-source lo0
Redback(config-router)#end
Redback#
Redback#sh run | b r b
router bgp 1
bgp router-id 150.1.1.1
no bgp default ipv4-unicast
neighbor 150.1.2.2 remote-as 1
neighbor 150.1.2.2 update-source Loopback0
neighbor 150.1.3.3 remote-as 1
neighbor 150.1.3.3 update-source Loopback0
!
address-family ipv4
neighbor 150.1.2.2 activate
no auto-summary
no synchronization
exit-address-family
!
address-family vpnv4
neighbor 150.1.2.2 activate
neighbor 150.1.2.2 send-community extended
exit-address-family
!
由于“no bgp default ipv4-unicast”命令的关系,虽然建立了全局BGP的邻居,但它是不会出现在任何地址族中的。如果想在ipv4或vpnv4中起效果,就得在地址族中用“nei 150.1.3.3 active”把邻居激活:
Redback(config-router)#address-family ipv4Redback(config-router-af)#nei 150.1.3.3 activate
Redback(config-router-af)#exit
Redback(config-router)#end
Redback#
Redback#sh run | b r b
router bgp 1
bgp router-id 150.1.1.1
no bgp default ipv4-unicast
neighbor 150.1.2.2 remote-as 1
neighbor 150.1.2.2 update-source Loopback0
neighbor 150.1.3.3 remote-as 1
neighbor 150.1.3.3 update-source Loopback0
!
address-family ipv4
neighbor 150.1.2.2 activate
neighbor 150.1.3.3 activate
no auto-summary
no synchronization
exit-address-family
!
address-family vpnv4
neighbor 150.1.2.2 activate
neighbor 150.1.2.2 send-community extended
exit-address-family
- BGP 地址族分析 - Address-family
- AF_INET address family
- Address family not supported by protocol family.
- address family numbers from RFC1700
- Address Family is not supported
- 异常Address family not supported by protocol family
- ICE 异常Address family not supported by protocol family
- Address family not supported by protocol family: connect
- Strom本地模式Address family not supported by protocol family
- Net exception:Address family not supported
- iOS 修改通讯录联系人地址(address)崩溃原因分析
- loopback address 回送地址
- Address Space 地址空间
- canonical-address 地址形式
- Address Book(地址薄)
- 解决android网络异常java.net.SocketException: Bad address family
- Android模拟器遭遇Address family not supported by protocol异常
- 内核中socket address family的注册过程
- Java 入门 之 数组与循环
- MFC只运行一个实例
- php函数变量和传递
- 《Natural Language Processing》斯坦福视频学习笔记——2.text processing
- WPF-10:绑定时注意UpdateSourceTrigger
- BGP 地址族分析 - Address-family
- 中文和unicode互转
- 虚拟现实(VR)和增强现实(AR)背后的核心技术是什么?
- WKWebView和UIWebView及其四种交互
- Hello World
- objective-C学习 KVC
- Android笔记(10) - Animation详解
- mysql优化-数据库结构
- 【图像基础】尺度空间:尺度的选择[经验之谈]