当前位置: 首页 > Linux

FRR学习第五天--EVPNL2网关

时间:2023-04-07 01:53:57 Linux

L2网关-----同子网包转发spine配置bgpevpn配置routerbgp7677bgprouter-id192.168.59.130bgpbestpathas-pathmultipath-relaxneighbor结构对等组邻居结构远程作为外部邻居192.168.59.128对等组结构邻居192.168.59.129对等组结构!地址系列l2vpnevpn邻居结构激活出口地址系列!地址系列l2vpnevpn:本bgp路由支持地址协议l2vpnevpn。neighborfabricactivate:地址协议激活。配置此命令后,设备将接收并发布evpn路由。leaf1和host1配置接口配置sudoipnetnsaddhost1sudoiplinkaddveth1typevethpeernameeth0netnshost1sudoipnetnsexechost1iplinksetloupsudoipnetnsexechost1iplinkseteth0upsudoipnetnsexechost1ipaddradd2.2.2.2/24deveth0sudoiplinkaddbr10typebridgesudoiplinkaddvxlan10typevxlanid10local192.168.59.128dstport4789nolearningsudoiplinksetbr10upsudoiplinksetvxlan10upsudoiplinksetveth1upsudoiplinksetveth1masterbr10sudoip链接集vxlan10masterbr10bgpevpn配置路由器bgp7675bgprouter-id192.168.59.128bgpbestpathas-pathmultipath-relaxneighborfabricpeer-groupneighborfabricremote-asexternalneighbor192.168.59.130peer-groupfabric!地址系列l2vpnevpnneighborfabricactivateadvertise-all-vniexit-address-family!leaf2和host2配置接口配置sudoipnetnsaddhost2sudoiplinkaddveth1typevethpeernameeth0netnshost2sudoipnetnsexechost2iplinksetloupsudoip网络执行host2iplinkseteth0upsudoipnetnsexechost2ipaddradd2.2.2.3/24deveth0sudoiplinkaddbr10typebridgesudoiplinkaddvxlan10typevxlanid10local192.168.59.129dstport4789nolearningsudoip链接集br10upsudoip链接集vxlan10upsudoiplinksetveth1upsudoiplinksetveth1masterbr10sudoiplinksetvxlan10masterbr10bgpevpn配置路由器bgp7676bgprouter-id192.168.59.129bgpbestpathas-pathmultipath-relaxneighborfabricpeer-groupneighborfabricremote-作为外部邻居192.168.59.130对等组结构!address-familyl2vpnevpnneighborfabricactivateadvertise-all-vniexit-address-family!查看bgp信息leaf1查看邻居信息ubuntu#showbgpneighborsBGPneighborsis192.168.59.130,remoteAS7677,localAS7675,externallinkHostname:bgpd会话参数BGP版本4的对等组结构成员,远程路由器ID192.168.59.130,本地路由器ID192.168.59.128BGP状态=已建立,00:46:26最后read00:00:26,上次写入00:00:26保持时间为180,保持活动间隔为60秒邻居功能:4字节AS:通告和接收AddPath:IPv4单播:RX通告IPv4单播并接收L2VPNEVPN:RX通告L2VPNEVPN和接收路由刷新:公布和接收(旧和新)地址族IPv4单播:公布和接收地址族L2VPNEVPN:公布和接收主机名能力:公布(名称:bgpd,域名:n/a)接收(名称:bgpd,domainname:n/a)GracefulRestartCapabilty:advertisedandreceivedRemoteRestarttimeris120secondsAddressfamilybypeer:noneGracefulrestartinformation:End-of-RIB发送:IPv4Unicast,L2VPNEVPNEnd-of-RIB收到:IPv4单播,L2VPNEVPN消息统计:Inq深度为0Outq深度为0发送Rcvd打开:33Notifications:40Updates:2727Keepalives:4848RouteRefresh:00Capability:00Total:8278advertisementruns之间的最短时间是0secondsForaddressfamily:IPv4Unicastfabricpeer-groupmemberUpdategroup4,subgroup5发送到该邻居的数据包队列长度0社区属性(全部)0个接受的前缀对于地址系列:L2VPNEVPN交换矩阵对等组成员更新组5,子组6数据包队列长度0NEXT_HOP传播到该邻居未更改社区属性发送到该邻居(all)advertise-all-vni3acceptedprefixesConnectionsestablished2;dropped1Lastreset00:46:28,duetoNOTIFICATIONsent(Cease/Connectioncollisionresolution)本地主机:192.168.59.128,本地端口:179外国主机:192.168.59.130,外国端口:42668Nexthop:192.168.59.128Nexthopglobal:fe80::31eb:95a6:e763:13a6Nexthoplocal:fe80::31eb:95a6:e763:13a6BGPconnection:sharednetworkBGPConnectRetryTimerinSeconds:120Readthread:onWritethread:onubuntu#查看转发信息ubuntu#showbgpl2vpnevpnBGP表版本为2,本地路由器ID为192.168.59.128状态代码:s抑制,d阻尼,h历史,*有效,>最佳,i-内部来源代码:i-IGP,e-EGP,?-不完整的网络下一跃点度量LocPrf权重路径路由区分器:ip192.168.59.128:4*>[2]:[0]:[48]:[3a:58:62:d5:eb:53]192.168.59.12832768i*>[3]:[0]:[32]:[192.168.59.128]192.168.59.12832768iRoute标识符:ip192.168.59.129:4*>[2]:[0]:[48]:[c6:cb:34:b1:a1:87]:[128]:[fe80::c3a:daff:fe3b:b737]192.168.59.129076777676i*>[2]:[0]:[48]:[de:f6:18:47:27:a6]192.168.59.129076777676i*>[3]:[0]:[32]:[192.168.59.129]192.168.59.129076777676iDisplayed5outof5totalprefixesubuntu#