华为网络---静态路由
发表于:2025-02-24 作者:千家信息网编辑
千家信息网最后更新 2025年02月24日,需求描述1.需要在三台路由器上配置静态路由,以实现各网段之间的互通2.若要实现全网互通,必须明确如下两个问题数据包被路由器转发或丢弃,取决于是否能够在路由表中找到数据包的目标地址所对应的条目路由器可以
千家信息网最后更新 2025年02月24日华为网络---静态路由
需求描述
1.需要在三台路由器上配置静态路由,以实现各网段之间的互通
2.若要实现全网互通,必须明确如下两个问题数据包被路由器转发或丢弃,取决于是否能够在路由表中找到数据包的目标地址所对应的条目路由器可以自动生成所有直连网段的路由条目,对于那些非直连网段就需要通过静态路由指定了
3.因此,要想实现全网互通,就必须为每台路由器指定所有非直连网段的路由条目
实验环境
三台路由器R1、R2、 R3两两互连,每台路由器上都配置了Loopback地址模拟网络环境
第一步:配置R1路由器
system-v //从用户视图进入系统视图[Huawei]sysname R1 //设置路由器名称[R1]int g0/0/0 //进入端口[R1-GigabitEthernet0/0/0]ip add 12.0.0.1 24[R1-GigabitEthernet0/0/0]q //从系统视图返回到用户视图[R1]int g0/0/1[R1-GigabitEthernet0/0/1]ip add 13.0.0.1 24[R1-GigabitEthernet0/0/1]q[R1]int loo 0 //进入回环网卡接口[R1-LoopBack0]ip add 1.1.1.1 32[R1-LoopBack0]q[R1]dis ip int b //查看接口状态Interface IP Address/Mask Physical ProtocolGigabitEthernet0/0/0 12.0.0.1/24 up up GigabitEthernet0/0/1 13.0.0.1/24 up up LoopBack0 1.1.1.1/32 up up(s)[R1]ip route-static 3.3.3.3 32 13.0.0.3[R1]ip route-static 3.3.3.3 32 12.0.0.2[R1]ip route-static 2.2.2.2 32 13.0.0.3[R1]ip route-static 2.2.2.2 32 12.0.0.2//配置路由静态路由[R1]display ip routing-table //查看路由表Route Flags: R - relay, D - download to fib------------------------------------------------------------------------------Routing Tables: Public Destinations : 9 Routes : 11 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0 2.2.2.2/32 Static 60 0 RD 13.0.0.3 GigabitEthernet0/0/1 Static 60 0 RD 12.0.0.2 GigabitEthernet0/0/0 3.3.3.3/32 Static 60 0 RD 13.0.0.3 GigabitEthernet0/0/1 Static 60 0 RD 12.0.0.2 GigabitEthernet0/0/0 12.0.0.0/24 Direct 0 0 D 12.0.0.1 GigabitEthernet0/0/0 12.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0 13.0.0.0/24 Direct 0 0 D 13.0.0.1 GigabitEthernet0/0/1 13.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
第二步:配置R2路由器
system-v[Huawei]sysname R2[R2]int g0/0/0[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24[R2-GigabitEthernet0/0/0]q[R2]int g0/0/2[R2-GigabitEthernet0/0/2]ip add 23.0.0.2 24[R2-GigabitEthernet0/0/2]q[R2]int loo 0[R2-LoopBack0]ip add 2.2.2.2 32[R2-LoopBack0]q[R2]ip route-static 1.1.1.1 32 12.0.0.1[R2]ip route-static 1.1.1.1 32 23.0.0.3[R2]ip route-static 3.3.3.3 32 12.0.0.1[R2]ip route-static 3.3.3.3 32 23.0.0.3[R2]dis ip int b Interface IP Address/Mask Physical ProtocolGigabitEthernet0/0/0 12.0.0.2/24 up upGigabitEthernet0/0/2 23.0.0.2/24 up up LoopBack0 2.2.2.2/32 up up(s) [R2]display ip routing-tableRoute Flags: R - relay, D - download to fib------------------------------------------------------------------------------Routing Tables: Public Destinations : 9 Routes : 11 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.1/32 Static 60 0 RD 12.0.0.1 GigabitEthernet0/0/0 Static 60 0 RD 23.0.0.3 GigabitEthernet0/0/2 2.2.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0 3.3.3.3/32 Static 60 0 RD 12.0.0.1 GigabitEthernet0/0/0 Static 60 0 RD 23.0.0.3 GigabitEthernet0/0/2 12.0.0.0/24 Direct 0 0 D 12.0.0.2 GigabitEthernet0/0/0 12.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0 23.0.0.0/24 Direct 0 0 D 23.0.0.2 GigabitEthernet0/0/2 23.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/2 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
第三步:配置R3路由器
system-v[Huawei]sysname R3[R3]int g0/0/1[R3-GigabitEthernet0/0/1]ip add 13.0.0.3 24[R3-GigabitEthernet0/0/1]q[R3]int g0/0/2[R3-GigabitEthernet0/0/2]ip add 23.0.0.3 24[R3-GigabitEthernet0/0/2]q[R3]int loo 0[R3-LoopBack0]ip add 3.3.3.3 32[R3-LoopBack0]q[R3]dis ip int bInterface IP Address/Mask Physical ProtocolGigabitEthernet0/0/1 13.0.0.3/24 up up GigabitEthernet0/0/2 23.0.0.3/24 up up LoopBack0 3.3.3.3/32 up up(s)[R3]display ip routing-tableRoute Flags: R - relay, D - download to fib------------------------------------------------------------------------------Routing Tables: Public Destinations : 7 Routes : 7 Destination/Mask Proto Pre Cost Flags NextHop Interface 3.3.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0 13.0.0.0/24 Direct 0 0 D 13.0.0.3 GigabitEthernet0/0/1 13.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1 23.0.0.0/24 Direct 0 0 D 23.0.0.3 GigabitEthernet0/0/2 23.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/2 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
第四步: 测试全网互通
1.测试R2与R1的互联互通
[R2]ping -a 2.2.2.2 1.1.1.1PING 1.1.1.1: 56data bytes, press CTRL C to breakReply from 1.1.1.1:bytes=56 Sequence=1 tt1=255time=120 msReply from 1.1.1.1:bytes=56Sequence=2 tt1=255time=15 msReply from 1.1.1.1: bytes=56 Sequence=3 tt1=255time=15 msReply from 1.1.1.1:bytes=56 Sequence=4 tt1=255 time=30 msReply from 1.1.1.1:bytes=56 Sequence=5 tt1=255 time=20 ms1.1.1.1 ping statistics ---5 packet (s) t r ansmi tted5 packet (s) received0.00%packet 1083round-trip min/ avg/max = 20/54/120 ms
2.测试R2与R3的互联互通
[R2 ]ping -a 2.2.2.2 3.3.3.3PING 3.3.3.3: 56data bytes,press CTRL c to breakReply from 3.3.3.3:bytes=56 Sequence=1 tt1=255 time-30 msReply from 3.3.3.3:bytes=56 Sequence=2 tt1=255 time=40msReply from 3.3.3.3: bytes=56 Sequence=3 tt1=255 time=50 ms Reply from 3.3.3.3: bytes=56 Sequence=4 tt1=255 time=30 msReply from 3.3.3.3: bytes=56 Sequence=5 tt1=255 time=30 ms 3.3.3.3 ping statistics5 packet (s) t r ansmi tted5 packet (s) received0.00%packet 1083round- trip min/ avg/max = 30/ 36/50 ms
路由
路由器
配置
网段
视图
静态
全网
条目
测试
地址
接口
数据
环境
用户
系统
三台
互联
网络
两个
之间
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
怎么打开游戏服务器
联想sr550服务器
sql2008数据库日志压
网络安全法海报怎么做
做软件开发要英语过6级
金算盘财务软件数据库
服务器需要配地址吗
传奇巨星数据库
三丰云服务器哪个好用不卡
震旦289服务器连接错误
江苏上九网络技术公司
mssql收缩数据库
山东省春考网络技术能考的大学
浅谈网络安全产品的分类
智慧农业软件开发
关系数据库hbase
linuxdb2数据库安装步骤
天津网络技术服务询问报价
小型网站需要多少服务器
贵州农产品配送软件开发
网络安全责任制度原则
杭州管理软件开发费用多少
小米米家智能家居售后服务器
小学网络安全培训内容
idea启动服务器后怎么调试
orl数据库修改最大连接数
浅谈网络安全产品的分类
软件开发项目推广
街道网络安全水平有待提高
全球网络安全公司有哪些