华为 浮动静态路由路径备份配置实例

合集下载

华为ensp如何配置静态路由.doc

华为ensp如何配置静态路由.doc

华为ensp如何配置静态路由华为ensp配置静态路由命令大全配置或删除静态路由。

[ no ] ip route ip-address{ mask | mask-length } { interfacce-name| gateway-address } [ preference preference-value] [ reject | blackhole ]【参数说明】ip-address和mask为目的IP地址和掩码,点分十进制格式,由于要求掩码32位中1 必须是连续的,因此点分十进制格式的掩码可以用掩码长度mask-length来代替,掩码长度为掩码中连续1 的位数。

interfacce-name指定该路由的发送接口名,gateway-address 为该路由的下一跳IP地址(点分十进制格式)。

preference-value为该路由的优先级别,范围0~255。

reject指明为不可达路由。

blackhole指明为黑洞路由。

【缺省情况】系统缺省可以获取到去往与路由器相连子网的子网路由。

在配置静态路由时如果不指定优先级,则缺省为60。

如果没有指明reject或blackhole,则缺省为可达路由。

【命令模式】全局配置模式配置静态路由的注意事项:当目的IP地址和掩码均为0.0.0.0时,配置的缺省路由,即当查找路由表失败后,根据缺省路由进行包的转发。

对优先级的不同配置,可以灵活应用路由管理策略,如配置到达相同目的地的多条路由,如果指定相同优先级,则可实现负载分担;如果指定不同优先级,则可实现路由备份。

在配置静态路由时,既可指定发送接口,也可指定下一跳地址,到底采用哪种方法,需要根据实际情况而定:对于支持网络地址到链路层地址解析的接口或点到点接口,指定发送接口即可;对于NBMA接口,如封装X.25或帧中继的接口、拨号口等,支持点到多点,这时除了配置IP路由外,还需在链路层建立二次路由,即IP地址到链路层地址的映射(如dialermap ip、x.25 map ip或frame-relay map ip等),这种情? 配置静态路由不能指定发送接口,应配置下一跳IP地址。

(最新整理)华为eNSP配置实例6静态路由与默认路由

(最新整理)华为eNSP配置实例6静态路由与默认路由

D 127.0.0.1

10.0.23.0/24 Direct 0 0
D 10.0.23.1
2021/7/26
14
• 发现R2的路由表里面没有去往10.0.1.0 、10.0.3.0、 10.0.13.0等网络的路由信息
• 同理,你也可以发现在R1的路由表里面没有去往10.0.3.0、 10.0.23.0、10.0.2.0等网络的路由信息
2021/7/26
17
9.查看路由表并测试连通性
• [R1]dis ip routing-table
• Route Flags: R - relay, D - download to fib
• ------------------------------------------------------------------------------
2021/7/26
9
4. 测试直连网络连通性
• 在R1上ping 10.0.12.2 通
• <R1>ping 10.0.12.2

Reply from 10.0.12.2: bytes=56 Sequence=1
ttl=255 time=1 ms
• 在R1上ping 10.0.13.2 通
• <R1>ping 10.0.13.2
<R2>ping 10.0.13.2
Request time out
不通
<R2>ping 10.0.3.2
Request time out
不通
• 此时R2如果要与网络10.0.3.0网段通讯,则需要R2上有去 往该网段的路由信息,并且R3上也需要有回到R2接口IP网 段的路由信息。

28313配置浮动静态路由

28313配置浮动静态路由

28/31/3配置浮动静态路由wangyang 发表于 2006-10-19 10:28:03试验说明:在本试验中要配置浮动静态路由。

要求在2台路由器上启动RIP协议,这样R1就有两条到达10.0.0.0网络的路由。

试验要求要有一条到10.0.0.0网络的静态路由,但却要优先选用RIP,在RIP失效的情况下才启动静态路由,这就需要使用浮动静态路由。

************************************************************************************试验配置:现在R2和R1上启动RIP协议r2#sh run!interface Ethernet0ip address 10.0.0.11 255.0.0.0 secondaryip address 10.0.0.1 255.0.0.0!interface Serial0ip address 192.168.1.2 255.255.255.0!router ripnetwork 10.0.0.0network 192.168.1.0!**************************************r1#sh run!interface Ethernet0ip address 192.168.3.2 255.255.255.0 secondaryip address 192.168.3.1 255.255.255.0!interface Serial0ip address 192.168.1.1 255.255.255.0clockrate 64000!interface Serial1ip address 192.168.2.1 255.255.255.0clockrate 64000!router ripnetwork 192.168.1.0network 192.168.3.0 /先不用RIP宣告192.168.2.0网络!***************************************r3#sh runinterface Ethernet0ip address 10.0.0.2 255.0.0.0!interface Serial1ip address 192.168.2.2 255.255.255.0!ip classlessip route 192.168.3.0 255.255.255.0 192.168.2.1no ip http server!************************************************************* *************************************************************试验验证:r1#pingProtocol [ip]:Target IP address: 192.168.1.2Repeat count [5]:Datagram size [100]:Timeout in seconds [2]:Extended commands [n]: ySource address or interface: 192.168.3.2Type of service [0]:Set DF bit in IP header? [no]:Validate reply data? [no]:Data pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]:Sweep range of sizes [n]:Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/32 msr1#pingProtocol [ip]:Target IP address: 192.168.2.2Repeat count [5]:Datagram size [100]:Timeout in seconds [2]:Extended commands [n]: ySource address or interface: 192.168.3.2Type of service [0]:Set DF bit in IP header? [no]:Validate reply data? [no]:Data pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]:Sweep range of sizes [n]:Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds: !!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms ********************************************************************* **r1#sh ip routeGateway of last resort is not setR 10.0.0.0/8 [120/1] via 192.168.1.2, 00:00:21, Serial0C 192.168.1.0/24 is directly connected, Serial0C 192.168.2.0/24 is directly connected, Serial1C 192.168.3.0/24 is directly connected, Ethernet0**************************************************************r1(config)#ip route 10.0.0.0 255.0.0.0 192.168.2.2r1#sh ip routeGateway of last resort is not setS 10.0.0.0/8 [1/0] via 192.168.2.2C 192.168.1.0/24 is directly connected, Serial0C 192.168.2.0/24 is directly connected, Serial1C 192.168.3.0/24 is directly connected, Ethernet0通过路由表我们看到,在配置了静态路由后,静态路由被选用,而RIP被忽略,这是因为静态路由的管理距离1小于RIP的120。

浮动静态路由备份链路

浮动静态路由备份链路

浮动静态路由【实验目的】通过本实验可以掌握浮动静态路由原理、配置以及备份应用。

掌握浮动静态路由的作用:用于路由的备份。

【实验要求】现在有2台路由器,R1和R2相连,R1和R2既有串口相连,也有百兆以太网口相连。

有这样的策略,不至于路由器的串口坏了,网络处于断开状态。

我们在路由器的串口上运行RIP 协议,在路由器的以太口上运行静态路由,但是我要在路由的所有接口都是好的情况下,网络上的数据包从路由器的串口上走,因为在一切都没有改动下,网络上的数据包只会走路由器的以太口,因为静态路由的优先级高于RIP 协议,所以我们要改动静态路由的默认管理距离。

本实验通过修改静态路由的管理距离为 130,使得路由器选路的时候优先选择 RIP ,而静态路由作为备份。

【实验拓扑】1).配置R1和R2各个接口的IP 地址R1(config)#int lo0R1(config-if)#ip add 1.1.1.1 255.255.255.0R1(config)#int s0/0R1(config-if)#ip add 192.168.12.1 255.255.255.0R1(config-if)#clock rate 64000R1(config-if)#no shR1(config)#int f0/0R1(config-if)#ip add 192.168.21.1 255.255.255.0R1(config-if)#no shR2 (config)#int lo0R2(config-if)#ip add 2.2.2.2 255.255.255.0R2(config)#int s0/0R2(config-if)#ip add 192.168.12.2 255.255.255.0R2(config-if)#no shR2(config)#int f0/0R2(config-if)#ip add 192.168.21.2 255.255.255.0R2(config-if)#no sh1).配置路由器 R1R1(config)#ip route 2.2.2.0 255.255.255.0 192.168.12.2 130 //将管理距离设置为 130 R1(config)#router ripR1(config-router)#version 2 S0/0 S0/0 192.168.21.0/24 F0/0 R1 R2Lo0:1.1.1.1/24 Lo0:2.2.2.2/24 F0/0 192.168.12.0/24R1(config-router)#no auto-summaryR1(config-router)#network 1.0.0.0R1(config-router)#network 192.168.21.02).配置路由器R2R2(config)#ip route 1.1.1.0 255.255.255.0 192.168.12.1 130R2(config)#router ripR2(config-router)#version 2R2(config-router)#no auto-summaryR2(config-router)#network 192.168.21.0R2(config-router)#network 2.0.0.04.实验调试(1)在R1 上查看路由表:R1#show ip routeC 192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback02.0.0.0/24 is subnetted, 1 subnetsR 2.2.2.0 [120/1] via 192.168.21.2, 00:00:25, f0/0C 192.168.21.0/24 is directly connected, f0/0从以上输出可以看出,路由器将RIP 的路由放入路由表中,因为RIP 的管理距离为120,小于在静态路由中设定的130,而静态路由处于备份的地位。

华为路由器静态路由配置命令详解

华为路由器静态路由配置命令详解

华为路由器静态路由配置命令详解2007-09-12 10:40 来源:希赛网【简介】路由器静态路由配置命令详解加入收藏设为首页文曲星视频器1080随心更换彩壳本本JVC圆您摄像梦想森海塞尔仅1501. ip route配置或删除静态路由。

[ no ] ip route ip-address { mask mask-length } { interfacce-namegateway-address } [ preference preference-value ] [ reject blackhole ] 【参数说明】ip-address和mask为目的IP地址和掩码,点分十进制格式,由于要求掩码32位中‘1’必须是连续的,因此点分十进制格式的掩码可以用掩码长度mask-length来代替,掩码长度为掩码中连续‘1’的位数。

interfacce-name指定该路由的发送接口名,gateway-address为该路由的下一跳IP地址(点分十进制格式)。

preference-value为该路由的优先级别,范围0~255。

reject指明为不可达路由。

blackhole指明为黑洞路由。

【缺省情况】系统缺省可以获取到去往与路由器相连子网的子网路由。

在配置静态路由时如果不指定优先级,则缺省为60。

如果没有指明reject或blackhole,则缺省为可达路由。

【命令模式】全局配置模式【使用指南】配置静态路由的注意事项:当目的IP地址和掩码均为0.0.0.0时,配置的缺省路由,即当查找路由表失败后,根据缺省路由进行包的转发。

对优先级的不同配置,可以灵活应用路由管理策略,如配置到达相同目的地的多条路由,如果指定相同优先级,则可实现负载分担;如果指定不同优先级,则可实现路由备份。

在配置静态路由时,既可指定发送接口,也可指定下一跳地址,到底采用哪种方法,需要根据实际情况而定:对于支持网络地址到链路层地址解析的接口或点到点接口,指定发送接口即可;对于NBMA接口,如封装X.25或帧中继的接口、拨号口等,支持点到多点,这时除了配置IP路由外,还需在链路层建立二次路由,即IP地址到链路层地址的映射(如dialer map ip、x.25 map ip或frame-relay map ip等),这种情? 配置静态路由不能指定发送接口,应配置下一跳IP 地址。

华为路由器浮动静态路由及负载均衡

华为路由器浮动静态路由及负载均衡

实验目的:浮动静态路由、负载均衡1、拓扑2、配置地址R1配置interface GigabitEthernet0/0/0ip address 200.1.1.1 255.255.255.0#interface GigabitEthernet0/0/1ip address 200.1.3.1 255.255.255.0#interface GigabitEthernet0/0/2ip address 192.168.1.254 255.255.255.0查看接口地址配置[AR1]display ip interface brief*down: administratively down^down: standby(l): loopback(s): spoofingThe number of interface that is UP in Physical is 4 The number of interface that is DOWN in Physical is 0 The number of interface that is UP in Protocol is 4 The number of interface that is DOWN in Protocol is 0Interface IP Address/Mask PhysicalProtocolGigabitEthernet0/0/0 200.1.1.1/24 up up GigabitEthernet0/0/1 200.1.3.1/24 up up GigabitEthernet0/0/2 192.168.1.254/24 up up NULL0 unassigned up up(s)R2#interface GigabitEthernet0/0/1ip address 200.1.2.2 255.255.255.0#interface GigabitEthernet0/0/0ip address 200.1.1.2 255.255.255.0R3interface GigabitEthernet0/0/1ip address 200.1.2.3 255.255.255.0interface GigabitEthernet0/0/0ip address 200.1.3.3 255.255.255.0interface GigabitEthernet0/0/ip address 192.168.2.254 255.255.255.03、配置路由[AR1]ip route-static 192.168.2.0 24 200.1.3.3[AR3]ip route-static 192.168.1.0 24 200.1.3.1[AR2]ip route-static 192.168.1.0 24 200.1.1.1 去A[AR2]ip route-static 192.168.2.0 24 200.1.2.3 去B跟踪路由4、配置浮动静态路由实现路由备份[AR1]ip route-static 192.168.1.0 24 200.1.2.2 preference 100[AR1]ip route-static 192.168.2.0 24 200.1.1.2 preference 100查看路由表没有上面的路由条目,原因优先级高才写入路由表192.168.2.0/24 Static 60 0 RD 200.1.3.3[AR1]display ip routing-table protocol staticRoute Flags: R - relay, D - download to fib------------------------------------------------------------------------------Public routing table : StaticDestinations : 1 Routes : 2 Configured Routes : 2Static routing table status : <Active>Destinations : 1 Routes : 1Destination/Mask Proto Pre Cost Flags NextHop Interface192.168.2.0/24 Static 600 RD 200.1.3.3 GigabitEthernet0/0/1Static routing table status : <Inactive>Destinations : 1 Routes : 1Destination/Mask Proto Pre Cost Flags NextHop Interface192.168.2.0/24 Static 1000 R 200.1.1.2 GigabitEthernet0/0/05、手动制造故障[AR1]interface g0/0/1[AR1-GigabitEthernet0/0/1]shutdown浮动路由写入路由表192.168.2.0/24 Stati c 100 0 200.1.1.2---------------------------------------------------------------------------------------------------------------------二、通过负载均衡实现网络优化创建等价路由:优先级、cost、目标地址、掩码相同[AR3]ip route-static 192.168.1.0 24 200.1.2.2[AR1]ip route-static 192.168.2.024 200.1.1.2[AR1]display ip routing-table protocol staticRoute Flags: R - relay, D - download to fib------------------------------------------------------------------------------Public routing table : StaticDestinations : 1 Routes : 2 Configured Routes : 2Static routing table status : <Active>Destinations : 1 Routes : 2Destination/Mask Proto Pre Cost Flags NextHop Interface192.168.2.0/24 Static 60 0 RD 200.1.3.3 GigabitEthernet0/0/1 Static 600 RD 200.1.1.2 GigabitEthernet0/0/0验证:在两条链路上抓包看有流量经过两条链路!。

华为交换机怎么配置静态路由?

华为交换机怎么配置静态路由?

华为交换机怎么配置静态路由?
如果我们把三层交换机配置成路由使⽤之后;那么就需要在交换机上配置静态路由表;这样当你的电脑通过你的交换机的时候它就知道下⼀跳地址应该怎么⾛了;所以今天⼩编将为⼤家介绍⼀下华为交换机如何配置静态路由表;
1、登陆交换机,进⼊管理视图<Quidway> system-view
2、先确认当前配置⾥⾯是否有静态路由
3、然后我们就可以配置静态路由了:ip route-static 0.0.0.0 0.0.0.0 192.168.88.1,这个路由是所有的访问⼩⼀跳都是88.1
4、接着我们在配置⼀条指定静态路由:ip route-static 10.10.100.0 255.255.255.0 10.10.101.1,这条的意思就是到10.10.100.0/24这个段的访问吓⼀跳地址是10.10.101.1
6、配置完成之后,⽤display current来查看当前配置
7、然后返回到视图⾥⾯进⾏保存,输⼊save 即可
8、确认保存。

华为路由交换由浅入深系列(二)静态路由、浮动路由、默认路由配置以及华为路由协议优先级总结

华为路由交换由浅入深系列(二)静态路由、浮动路由、默认路由配置以及华为路由协议优先级总结

华为路由交换由浅入深系列(二)静态路由、浮动路由、默认路由配置以及华为路由协议优先级总结掌握目标一、配置设备名称与IP地址:二、配置静态路由三、配置浮动路由用于备份四、配置默认路由五、了解华为不同路由协议的优先级一、配置设备名称与IP地址:R1:<Huawei>system-viewEnter system view,return user view with Ctrl+Z.[Huawei]sysname R1[R1]interface g0/0/1[R1-GigabitEthernet0/0/1]ip address202.100.1.1255.255.255.0 quit[R1]interface g0/0/2[R1-GigabitEthernet0/0/2]ip add202.100.2.1255.255.255.0quit[R1-GigabitEthernet0/0/1]int lo0 =====创建环回接口[R1-LoopBack0]ip add1.1.1.1255.255.255.255[R1-LoopBack0]quit[R1]display current-configuration interface =====显示接口信息#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1ip address202.100.1.1255.255.255.0#interface GigabitEthernet0/0/2ip address202.100.2.1255.255.255.0#interface NULL0#interface LoopBack0ip address1.1.1.1255.255.255.255R2:[R2]interface g0/0/1[R2-GigabitEthernet0/0/1]ip add202.100.1.2255.255.255.0 [R2-GigabitEthernet0/0/1]int g0/0/0[R2-GigabitEthernet0/0/0]ip add202.100.3.2255.255.255.0 [R2-GigabitEthernet0/0/0]int lo0[R2-LoopBack0]ip ad2.2.2.2255.255.255.255[R2-LoopBack0]quitR3:[R3]int g0/0/2[R3-GigabitEthernet0/0/2]ip add202.100.2.3255.255.255.0 [R3-GigabitEthernet0/0/2]int g0/0/0[R3-GigabitEthernet0/0/0]ip add202.100.3.3255.255.255.0 [R3-GigabitEthernet0/0/0]int lo0[R3-LoopBack0]ip add3.3.3.3255.255.255.255<R1>ping-c2202.100.1.2=====ping两个数据包PING202.100.1.2:56data bytes,press CTRL_C to breakReply from202.100.1.2:bytes=56Sequence=1ttl=255time=10ms Reply from202.100.1.2:bytes=56Sequence=2ttl=255time=1ms---202.100.1.2ping statistics---2packet(s)transmitted2packet(s)received0.00%packet lossround-trip min/avg/max=1/5/10ms<R1>ping-c2202.100.2.3PING202.100.2.3:56data bytes,press CTRL_C to breakReply from202.100.2.3:bytes=56Sequence=1ttl=255time=20ms Reply from202.100.2.3:bytes=56Sequence=2ttl=255time=10ms---202.100.2.3ping statistics---2packet(s)transmitted2packet(s)received0.00%packet lossround-trip min/avg/max=10/15/20ms<R1>display ip routing-table ====查看路由表Route Flags:R-relay,D-download to fib------------------------------------------------------------------------------Routing Tables:PublicDestinations:11 Routes:11Destination/Mask Proto Pre Cost Flags NextHop Interface1.1.1.1/32Direct0 127.0.0.0/8Direct0 0 D 127.0.0.1127.0.0.1127.0.0.1LoopBack00 D InLoopBack0InLoopBack0InLoopBack0GigabitEthernet0127.0.0.1/32Direct0 127.255.255.255/32Direct0 202.100.1.0/24Direct0 0 D0 D 127.0.0.1 0 D 202.100.1.1二、配置静态路由[R1]ip route-static 3.3.3.3 255.255.255.255 202.100.2.3 ===添加静态路由[R1]ip route-static 202.100.3.0 255.255.255.0 202.100.2.3[R1]display ip routing-table =====Static 代表静态路由,60 代表静态路由优先级Route Flags: R - relay, D - download to fib------------------------------------------------------------------------------Routing Tables: PublicDestinations : 13 Routes : 13Destination/Mask Proto Pre Cost Flags NextHop Interface1.1.1.1/32 Direct 03.3.3.3/32 Static 60<R1>ping -c 1 3.3.3.3 PING 3.3.3.3: 56 data bytes, press CTRL_C to breakReply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=10 ms0 D 127.0.0.1 LoopBack0 0 RD 202.100.2.3 GigabitEthernet0<R1>ping -c 1 202.100.3.3PING202.100.3.3:56data bytes,press CTRL_C to breakReply from202.100.3.3:bytes=56Sequence=1ttl=255time=10ms三、配置浮动路由用于备份配置备份静态路由,当R1与R3之间链路出现故障时,可走R2。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档