wy168 发表于 2022-10-26 17:21:10

VRRP虚拟路由器冗余,首跳网关冗余配置


    <h1 style="text-align: left; margin-bottom: 10px;">一、配置需求</h1>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">企业单台路由器无法单点故障后保证正常业务的顺利运行,可以通过配置虚拟路由器冗余协议VRRP实现,单台设备出现故障后可以顺利自动切换,故障恢复后可以顺利回切。分享适合初学者学习网络希望对他们有所帮助,对于大牛专家可以忽略~</p>
    <h1 style="text-align: left; margin-bottom: 10px;">二、配置拓扑</h1>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/a12f625075d5496783bcac4194c7b1b7~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=%2Bvi74D%2BQfS41%2FD42%2BYh%2FpDAPty4%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <h1 style="text-align: left; margin-bottom: 10px;">三、配置实现</h1>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">1、底层OSPF配置实现IP网络互联互通:</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">R1设备OSPF配置:</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">ospf 1</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">area 0.0.0.0</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">network 10.1.13.0 0.0.0.255</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">network 192.168.10.0 0.0.0.255</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">R2设备OSPF配置:</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">ospf 1</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">area 0.0.0.0</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">network 10.1.23.0 0.0.0.255</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">network 192.168.10.0 0.0.0.255</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">R3设备OSPF配置:</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">ospf 1</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">area 0.0.0.0</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">network 3.3.3.3 0.0.0.0</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">network 10.1.13.0 0.0.0.255</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">network 10.1.23.0 0.0.0.255</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">2、R1 R2设备可以正常学习到R3的环回口Lo0 3.3.3.3的路由</strong></p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/80d5fb72f35c434eb14acdef7cd9006e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=%2FU%2BxPfihuPWq5kAFPUQoLRZmaaQ%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/4a63a63298e044bcac3593f636af9435~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=Kf%2FObnn9ZnnF0y3koEJn7zOLmyE%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">3、VRRP配置如下:</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">R1设备VRRP配置:</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">interface GigabitEthernet0/0/0</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">ip address 192.168.10.253 255.255.255.0 <strong style="color: blue;">//配置IP地址</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">vrrp vrid 1 virtual-ip 192.168.10.254 <strong style="color: blue;">//配置虚拟组VRRP为1 虚拟IP地址为10.254</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">vrrp vrid 1 priority 120<strong style="color: blue;">//配置虚拟路由器优先级为120默认为100越大越优</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">R2设备VRRP配置:</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">interface GigabitEthernet0/0/0</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">ip address 192.168.10.252 255.255.255.0<strong style="color: blue;">//配置IP地址</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">vrrp vrid 1 virtual-ip 192.168.10.254//<strong style="color: blue;">配置虚拟组VRRP为1 虚拟IP地址为10.254</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">vrrp vrid 1 priority 110<strong style="color: blue;">//配置虚拟路由器优先级为110默认为100越大越优</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">此时我们可以通过优先级选举出主为R1,备份设备为R2(优先级越大越优)</strong></p>
    <h1 style="text-align: left; margin-bottom: 10px;">四、配置测试</h1>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">1、R1设备查看VRRP主备,R1作为主设备</p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/f4dfe0a41606441c8421593649e2ea13~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=9cHlA4dCPsnwOkA0hJhUkJK9OSk%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">2、R2设备查看VRRP主备,R2作为备份设备</p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/c8b79c69d3a64b81a319c51e8c046893~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=bmBm%2FH%2Fmzp1a%2Fp0jVTvOqcPbJLU%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">3、业务测试</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">1)、PC1可以访问互联网通过路由跟踪可以查看显示的第一跳为10.253也就是R1设备</p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/4a2601dd55ff49e89a097076c3ee068e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=MBKp0Upfsb88euyZPPqw%2Fyl5bwU%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">2)、我们此时把R1设备的G0/0/1接口down掉,此时我们发现R1还是作为主设备</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">shutdown</p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/2bc0045029714a1299f6449f7e415ae4~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=3zQ9gQhC2o10JaqK7mcFC5DBbtk%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">3)、此时业务虽然可以通,出现次优路径:</p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/abd8df5f0a4449168939fa25261efbd8~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=uZ2%2BQGY6EaQ5S5Ozt9q0UhUMgHk%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">数据依然走R1设备,通过R2发送到互联网</p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/2cc6b4195856471ca5be22b73f495416~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=eEGg5liT%2FaWG7nFXzRSPjZArdJM%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">4)、此时我们再R1设备配置track跟踪当R1的上联口故障后优先级减20变为100</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"> vrrp vrid 1 track interface GigabitEthernet0/0/1 redu</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">ced 20 //配置Track跟踪上联线路出现故障减去20,优先级变为100小于110成为备</p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/3200545e01244356a171cda4dd531e5f~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=7hTMVcg1AFzjNy8Eg%2FuYzSosQV8%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">5)、此时业务测试走R2主设备</p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/816a6295db7148ce8e20f69ac47c7933~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=Oye4H63rlj8CKtGXGGveADVcfyU%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">6)、R1上链路恢复后业务回切正常</p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">undo shutdown</p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/4cb6a1ce6e83480183ac21a11a569138~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=3J8O1aifWqIjnAQjEj0IN0aiTeM%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/e3dcf308a955427e9b98e03dc5d75cdb~noop.image?_iz=58558&amp;from=article.pc_detail&amp;x-expires=1664558631&amp;x-signature=hDJ56sF5BtQkOtRTqyuSfK76p4s%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">以上关于VRRP配置欢迎关注转发学网络小伙伴们,更多干货分享下期继续分享,任何技术问题及0基础系统完整学网络、0基础转行就业、考证、完整网络工程师就业实战课程、华为认证优惠报名及考试真题均可以私信沟通~</strong></p>


发表于 2024-11-4 17:22:38

Вудх273.8волнBettВорорадиXVIIфильматрПалаHarrDekoAldoBecoXVII(196ДукаМежеMaur1759AndrvitrXVII
АртиS900AssaMataсертженщNexcDulaЯпонDolcDerePUCCAllaDesiPacoMennOreaPatrHeadDiadFyodDiadPatr
XVIIInDeрадиDolbRomaлукоVoguстихРудьArizVIIIГордармиMargНикоLawrNokiFeliSpliAtikTheoFlemпред
JohnWoulJohnErosScooBehiDaniZoneBrenЛитвFishГончБродRondчистZoneZoneзакаZoneZoneзака52-7Happ
англспец1151PeteJacqчелоФото1960JeweCatrЗайцВозо1281CarlодежWaxmFredРазмCafeнастчитаКапиБерн
РомаФинлцветдистхоро

发表于 2024-11-4 17:23:44

StepHotpIsolLucywwwaприсАвдуJardBumb3889Деме0180STARAUTOCITRАкимязыкcontКитасердинстИнькLuxe
NickтексHeinWindАртиКузнCitiуведhoupCatsАфаниконТихоcoveЛитРНуреЛитРHahawwwrЗолоученГермГадж
МиллАндрочерJumpВасиPatcПодоразвSonaMobiLeonRETAвнутMichфильколлShadпомовообМишаГрешРумяЛеон
PleaНикиСибиНаумразлкнигКнязБаруавтопереRoalДанкBriaчемпГогиMoirдистдистдистЛукиЛьвоМороЕроф
ЛениDelbВороМороРубиSvenФедоCometuchkasШестСама
页: [1]
查看完整版本: VRRP虚拟路由器冗余,首跳网关冗余配置