分享页面
已经找到“” 的记录6216条
通过ipmi调整风扇转速
 

1.首先设置ipmiIP

这个要注意一点的是一定要和你的网络的网段是一样的,其他的话没有什么可以说的,把服务器开机之后进入设置ipmi的界面设置就好了,并且设置好账号和密码

 

2.跳板机安装ipmitool

3.调节风扇转速

首先你要输入下面的命令把风扇转速设置为手动的

ipmitool -I lanplus -U ipmi用户名 -P ipmi密码 -H 服务器地址 raw 0x30 0x30 0x01 0x00

 

之后就可以调节转速了

 

ipmitool -I lanplus -U ipmi用户名 -P ipmi密码 -H 服务器地址 raw 0x30 0x30 0x02 0xff 0x18

 

要值得关注的是,上面16进制的最后一个16进制,当你输入0x18的时候几乎就是风扇转速最小的时候,当你不断调节大,比如下面

 

ipmitool -I lanplus -U ipmi用户名 -P ipmi密码 -H 服务器地址 raw 0x30 0x30 0x02 0xff 0x60

 

这个几乎就是风扇最大的转速,我现在的转速是

ipmitool -I lanplus -U ipmi用户名 -P ipmi密码 -H 服务器地址 raw 0x30 0x30 0x02 0xff 0x10

 

思科设备配置基于应用(协议)的策略路由
 

拓扑如下:

要求:TCP的报文设置出接口f1/0,UDP设置出接口f2/0

具体配置:

R2(config)#access-list 110 permit tcp any any

R2(config)#access-list 111 permit udp any any

R2(config)#route-map qgtest permit 10

R2(config-route-map)#match ip address 110

R2(config-route-map)#set interface f1/0

R2(config-route-map)#exit

R2(config)#route-map qgtest permit 20

R2(config-route-map)#match ip address 111

R2(config-route-map)#set interface f2/0

R2(config)#int f0/0

R2(config-if)#ip policy route-map qgtest
思科设备配置基于报文大小的策略路由
 

拓扑如下:

要求:R2f0/0端口上应用基于报文大小的策略路由haha,为大小小于100Byte的报文设置出接口f1/0,101-1000B的报文设置出口f2/0

具体配置:

1:定义route-map

R2(config)#route-map qgtest permit 10

R2(config-route-map)#match length 1 100

R2(config-route-map)#set interface f1/0

R2(config-route-map)#exit

R2(config)#route-map qgtest permit 20

R2(config-route-map)#match length 101 1000

R2(config-route-map)#set interface f2/0

R2(config-route-map)#exit

2:将route-map调用到接口上

R2(config)#int f0/0

R2(config-if)#ip policy route-map qgtest
通过GRE隧道解决OSPF非骨干区域无ABR的问题
 

拓扑如下图所示:

Area 2区域没有ABR(区域边界路由器),也就没有3LSA(网络汇总LSA,由ABR路由器发送网络汇总LSA到一个区域,用来通告该区域外部的目的地址),因此需要让R2成为ABR。这个问题可以通过在R1R2上建立GRE隧道解决。具体配置如下:

R1:

interface Tunnel0/0/0 \\创建GRE隧道

ip address 12.1.1.1 255.255.255.0

tunnel-protocol gre

source 192.168.12.1

quit

ospf 1

area 0.0.0.0

network 12.1.1.1 0.0.0.0 \\将Tunnel0/0/0加入OSPF区域0中

R2:

interface Tunnel0/0/0

ip address 12.1.1.2 255.255.255.0

tunnel-protocol gre

source 192.168.12.2

quit

ospf 1

area 0.0.0.0

network 12.1.1.2 0.0.0.0
在华为路由器上配置静态路由协议实现跨网段互通
 

静态路由是一种固定的路由方式,由网络管理员逐项加入路由表,一般应用于小型和简单的网络环境中。本文将介绍如何在华为路由器上配置静态路由协议,实现不同网段的网络互通。

 

1.拓扑结构

如下图所示:

A.两台路由器(R1R2)通过点到点IP地址(10.10.10.0/30)互联;

B.A区用户网段为:192.168.10.0/24PC1IP地址为:192.168.10.2,用户网段的网关为192.168.10.1(配置在R1E0/0/0接口上);

C.B区用户网段为:172.16.10.0/24PC2IP地址为:172.16.10.2,用户网段的网关为172.16.10.1(配置在R2E0/0/0接口上)。

2.操作目的

使不同网段的主机(PC1PC2)网络能相互ping通。

3.IP地址配置

R1

R2

PC1

PC2

4.静态路由配置

华为设备静态路由命令格式:

ip route-statuc [目的网段] [目的网段的掩码] [下一跳地址|出接口]

具体配置如下:

R1

R2

5.验证配置

A.查看路由表,R1R2各自有一条指向对方接口IP地址的静态路由:

B.不同网段的设备(PC1PC2)互ping

PC1 ping PC2

PC2 ping PC1

6.总结

通过上述最基本的静态路由配置操作,成功实现不同网段的网络互通。在实际组网中,可能存在需要同时运行静态路由(或默认路由,即目的网段配置为0.0.0.0/0的静态路由)和动态路由协议的情况,应根据实际需求灵活配置。

在华为路由器上配置基本的BGP协议传递路由信息
 

拓扑如下图所示:

上图中AR1AR3形成ibgp邻居,区域13AR2AR4形成ibgp邻居,区域24AR1AR2形成ebgp对等体(邻居)。为了让AR3AR4互通,需要通过AR1AR2相互传递路由给对端的bgp区域,让区域13和区域24通过bgp协议相互学习到对方的路由。因为bgp只负责控制路由,而底层依然是靠igp来完成寻址建立tcp连接。所以需要使用igp路由使得bgp对等体可以建立tcp连接相互形成bgp对等体,对等体形成后AR1AR2需要分别将自己从igbp邻居学到的路由宣告给ebgp邻居,从ebgp邻居学到的路由宣告给ibgp邻居,达到as13as24相互通信的目的。

具体配置如下:

R1:

interface GigabitEthernet0/0/0

ip address 12.1.1.1 255.255.255.0

interface GigabitEthernet0/0/1

ip address 13.1.1.1 255.255.255.0

interface LoopBack0

ip address 1.1.1.1 255.255.255.255

quit

bgp 13

router-id 1.1.1.1

peer 2.2.2.2 as-number 24 \\与R2建立ebgp邻居

peer 2.2.2.2 ebgp-max-hop 2 \\ebgp邻居允许的最大跳数修改为2(因为不是直连而是用loopback0接口)

peer 2.2.2.2 connect-interface LoopBack0 \\更新发送bgp报文的接口为loopback0接口

peer 3.3.3.3 as-number 13 \\与R3建立ibgp对等体

peer 3.3.3.3 connect-interface LoopBack0

ipv4-family unicast

network 3.0.0.0 \\宣告从R3这个ibgp邻居学到的路由(给R2这个ebgp邻居)

network 13.1.1.0 255.255.255.0 \\宣告自己的直连路由给ebgp邻居

peer 2.2.2.2 enable \\指定与邻居2.2.2.2开启MP-BGP功能,iPv4地址族默认开启

peer 3.3.3.3 enable

peer 3.3.3.3 next-hop-local \\从ebgp邻居学习到的路由传递给ibgp邻居时,路由的下一跳修改为自己

quit

quit

rip 1 \\使用igp路由搭建底层寻址

undo summary

network 1.0.0.0

network 13.0.0.0

quit

ip route-static 2.2.2.2 255.255.255.255 12.1.1.2 \\R1与R2建立ebgp对等体需要建立tcp连接,这里用静态做底层的寻址

R3:

interface GigabitEthernet0/0/0

ip address 13.1.1.3 255.255.255.0

interface LoopBack0

ip address 3.3.3.3 255.255.255.255

quit

bgp 13

router-id 3.3.3.3

peer 1.1.1.1 as-number 13

peer 1.1.1.1 connect-interface LoopBack0

ipv4-family unicast

peer 1.1.1.1 enable

quit

quit

rip 1

undo summary

network 3.0.0.0

network 13.0.0.0

R2:

interface GigabitEthernet0/0/0

ip address 12.1.1.2 255.255.255.0

interface GigabitEthernet0/0/1

ip address 24.1.1.2 255.255.255.0

interface LoopBack0

ip address 2.2.2.2 255.255.255.255

quit

bgp 24

router-id 2.2.2.2

peer 1.1.1.1 as-number 13 \\与R1建立ebgp对等体

peer 1.1.1.1 ebgp-max-hop 2

peer 1.1.1.1 connect-interface LoopBack0

peer 4.4.4.4 as-number 24 \\与R4建立ibgp对等体

peer 4.4.4.4 connect-interface LoopBack0

ipv4-family unicast

network 4.4.4.4 255.255.255.255

network 24.1.1.0 255.255.255.0

peer 1.1.1.1 enable

peer 4.4.4.4 enable

peer 4.4.4.4 next-hop-local

quit

quit

ospf 1

area 0.0.0.0

network 2.2.2.2 0.0.0.0

network 24.1.1.2 0.0.0.0

quit

ip route-static 1.1.1.1 255.255.255.255 12.1.1.1

R4:

interface GigabitEthernet0/0/0

ip address 24.1.1.4 255.255.255.0

interface LoopBack0

ip address 4.4.4.4 255.255.255.255

quit

bgp 24

router-id 4.4.4.4

peer 2.2.2.2 as-number 24

peer 2.2.2.2 connect-interface LoopBack0

ipv4-family unicast

peer 2.2.2.2 enable

quit

quit

ospf 1

area 0.0.0.0

network 4.4.4.4 0.0.0.0

network 24.1.1.4 0.0.0.0
在华为路由器上配置vrrp实现网关冗余
 

虚拟路由冗余协议VRRPVirtual Router Redundancy Protocol)是通过把几台路由设备联合组成一台虚拟的路由设备,将虚拟路由设备的IP地址作为用户的默认网关实现与外部网络通信。当网关设备发生故障时,VRRP机制能够选举新的网关设备承担数据流量,从而保障网络的可靠通信。本文将介绍如何在华为路由器上配置vrrp协议实现网关的冗余。拓扑如下图所示:

具体配置如下:

R1:

[R1]interface g0/0/0

[R1-GigabitEthernet0/0/0]ip address 192.168.1.254 24

[R1]interface g0/0/1

[R1-GigabitEthernet0/0/1]ip address 192.168.13.1 24

R2:

[R2-GigabitEthernet0/0/0]ip add

[R2-GigabitEthernet0/0/0]ip address 192.168.1.253 24

[R2-GigabitEthernet0/0/0]int g0/0/1

[R2-GigabitEthernet0/0/1]ip add

[R2-GigabitEthernet0/0/1]ip address 192.168.23.1 24

R3:

[R3]interface g0/0/0

[R3-GigabitEthernet0/0/0]ip ad

[R3-GigabitEthernet0/0/0]ip address 192.168.13.2 24

[R3]interface g0/0/0

[R3-GigabitEthernet0/0/0]ip ad

[R3-GigabitEthernet0/0/0]ip address 192.168.13.2 24

[R3-LoopBack1]ip address 10.0.0.1 24

R1、R2配置vrrp,并监控g0/0/1:

[R1-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.1.250

[R1-GigabitEthernet0/0/0]vrrp vrid 1 track interface g0/0/1 reduced 50




[R2-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.1.250

[R2-GigabitEthernet0/0/0]vrrp vrid 1 track interface g0/0/1 reduced 51

R1、R2、R3配置静态路由,确保全网互通:

[R1]ip route-static 10.0.0.1 255.255.255.0 192.168.13.2

[R2]ip route-static 10.0.0.1 255.255.255.0 192.168.23.2

[R3]ip route-static 192.168.1.0 255.255.255.0 192.168.13.1

[R3]ip route-static 192.168.1.0 255.255.255.0 192.168.23.1

测试:

R1上查看vrrp

R2上查看vrrp

PC上测试:

模拟R2->R3线路故障,将R3G0/0/0shutdown,测试路由:

PC上跟踪路由:

R2上看vrrp

如上图所示,vrrp自动切换R2master路由,链路备份成功。

在华为路由器上配置RIP协议实现网络互通
 

RIP(Routing Information Protocol,路由信息协议)是一种内部网关协议(IGP),是一种动态路由选择协议,用于自治系统(AS)内的路由信息的传递。RIP协议基于距离矢量算法(DistanceVectorAlgorithms),使用“跳数”(metric)来衡量到达目标地址的路由距离。这种协议的路由器只关心自己周围的世界,只与自己相邻的路由器交换信息,范围限制在15(15)之内。本文将介绍如何在华为路由器上配置基本的RIP协议实现网络互通。拓扑结构如下所示:

具体配置如下:

AR1:

[Huawei]rip //启用RIP协议

[Huawei-rip-1]version 2 //配置路由器使用 RIP 版本2

[Huawei-rip-1]network 192.168.1.0 //宣告网络192.168.1.0进入RIP协议

[Huawei-rip-1]network 192.168.2.0 //宣告网络192.168.2.0进入RIP协议

AR2:

[Huawei]rip

[Huawei-rip-1]version 2

[Huawei-rip-1]network 192.168.2.0

[Huawei-rip-1]network 192.168.3.0

AR3:

[Huawei]rip

[Huawei-rip-1]version 2

[Huawei-rip-1]network 192.168.3.0

[Huawei-rip-1]network 192.168.4.0

验证:

[Huawei]display rip 1 route //查看rip 1的路由表

[Huawei]display ip routing-table //查看路由表

测试PC1PC2能否ping通:

在华为设备上配置VRRP MSTP实现网关冗余和负载分担
 

拓扑如下图所示:

具体配置如下:

SW3:

先创建vlan10、20

vlan batch 10 20

然后在接口下划分trunk、access模式

interface Ethernet0/0/1

port link-type access

port default vlan 10

interface Ethernet0/0/2

port link-type access

port default vlan 20

interface Ethernet0/0/3

port link-type trunk

port trunk allow-pass vlan 10 20

interface Ethernet0/0/4

port link-type trunk

port trunk allow-pass vlan 10 20

配置mstp

stp mode mstp

stp region-configuration

region-name qgtest

instance 10 vlan 10

instance 20 vlan 20

active region-configuration

SW1:

先创建vlan10、20

vlan batch 10 20

配置链路聚合和trunk口

interface Eth-Trunk1

trunkport int g0/0/1

trunkport int g0/0/2

interface Eth-Trunk1

port link-type trunk

port trunk allow-pass vlan 10 20

interface GigabitEthernet0/0/3

port link-type trunk

port trunk allow-pass vlan 10 20

配置mstp

stp mode mstp

stp region-configuration

region-name qgtest

instance 10 vlan 10

instance 20 vlan 20

active region-configuration

stp instance 10 root primary

stp instance 20 root secondary

配置VRRP

interface Vlanif10

ip address 192.168.10.253 255.255.255.0

vrrp vrid 10 virtual-ip 192.168.10.254

vrrp vrid 10 priority 120

interface Vlanif20

ip address 192.168.20.252 255.255.255.0

vrrp vrid 20 virtual-ip 192.168.20.254

vrrp vrid 20 priority 100

SW2:

先创建vlan10、20

vlan batch 10 20

配置链路聚合和trunk口

interface Eth-Trunk1

trunkport int g0/0/1

trunkport int g0/0/2

interface Eth-Trunk1

port link-type trunk

port trunk allow-pass vlan 10 20

interface GigabitEthernet0/0/3

port link-type trunk

port trunk allow-pass vlan 10 20

配置mstp

stp mode mstp

stp region-configuration

region-name qgtest

instance 10 vlan 10

instance 20 vlan 20

active region-configuration

stp instance 20 root primary

stp instance 10 root secondary

配置VRRP

interface Vlanif20

ip address 192.168.20.253 255.255.255.0

vrrp vrid 20 virtual-ip 192.168.20.254

vrrp vrid 20 priority 120

interface Vlanif10

ip address 192.168.10.252 255.255.255.0

vrrp vrid 10 virtual-ip 192.168.10.254

vrrp vrid 10 priority 100

备注:如果SW1有上行接口和上行链路时,其中一个发生故障,VRRP默认是无法感知的,即主备状态无法切换,数据包无法发送出去,这是就要用到track功能。具体配置如下:

SW1/SW2:

vrrp 10 track int g0/0/3 reduced 30

假设G0/0/3为上行口,配置完这条命令之后,即当上行链路发生故障时,其优先级减少30,然后当前优先级小于Backup状态的三层交换机,则主备状态发生切换。

在华为路由器上配置MPLS-VPN构建企业IP专网
 

一.拓扑结构如下图所示:

说明:本拓扑中只有一个客户分别有两个办公场所,需要让客户的两个办公地点之间进行通信,使用mpls-vpn

二.配置步骤思路如下:

1.客户CE网络配置路由协议并宣告内网;

2ISPPEP之间配置IGP路由协议保证路由连通;

3ISPPE针对每一个客户配置一个VRF虚拟路由器,在华为里面叫做vpn instance实例;

4ISP的客户的办公场所连接的PE之间要创建MP-BGPvpnv4连接,用于传输VRF路由和RT属性;

5PE之间有了MP-BGP_vpn路由后,要把PE上的客户的VRF中的路由重分布到MP-BGP中传输到对端PE

6PE之间的MP-BGP路由中有了客户的VRF的路由后,PE之间的VRF可以通信,但是客户的CE路由器不知道VRF路由,所以需要在PE上将MP-BGP的路由重分布到客户所使用的协议中去(在PE上配置),让客户的CE能够从PE上学习到VPN的路由条目。达到两端办公场所相互通信的目的。

三.具体配置

1.客户CE设备配置路由(本教程中采用静态)

CE1:

interface GigabitEthernet0/0/0

ip address 12.1.1.1 255.255.255.0

interface GigabitEthernet0/0/1

ip address 192.168.1.10 255.255.255.0

interface LoopBack0

ip address 1.1.1.1 255.255.255.255

ip route-static 0.0.0.0 0.0.0.0 12.1.1.2

CE2:

interface GigabitEthernet0/0/0

ip address 45.1.1.5 255.255.255.0

interface GigabitEthernet0/0/1

ip address 192.168.2.30 255.255.255.0

interface LoopBack0

ip address 5.5.5.5 255.255.255.255

ip route-static 0.0.0.0 0.0.0.0 45.1.1.4

CE端只有客户自己的路由和一条到达ISP的默认路由

2.ISP内部的PE1-P-PE2之间使用IGP连通,并配置MPLS互通

PE1路由器:

lsp-trigger all //LSP的触发策略:all代表所有静态路由和IGP路由项触发建立LSP

interface GigabitEthernet0/0/0

ip address 23.1.1.2 255.255.255.0

mpls

mpls ldp

interface GigabitEthernet0/0/1

ip binding vpn-instance vpn1 //物理接口划分到vpn-instanc中

ip address 12.1.1.2 255.255.255.0

quit

ospf 1 router-id 2.2.2.2

area 0.0.0.0

network 23.1.1.2 0.0.0.0

quit

quit

interface LoopBack0

ip address 2.2.2.2 255.255.255.255

ospf enable 1 area 0.0.0.0

P路由器:

lsp-trigger all

interface GigabitEthernet0/0/0

ip address 23.1.1.3 255.255.255.0

mpls

mpls ldp

interface GigabitEthernet0/0/1

ip address 34.1.1.3 255.255.255.0

mpls

mpls ldp

interface LoopBack0

ip address 3.3.3.3 255.255.255.255

ospf enable 1 area 0.0.0.0

quit

ospf 1 router-id 3.3.3.3

area 0.0.0.0

network 23.1.1.3 0.0.0.0

network 34.1.1.3 0.0.0.0

PE2路由器:

lsp-trigger all

interface GigabitEthernet0/0/0

ip address 34.1.1.4 255.255.255.0

mpls

mpls ldp

interface GigabitEthernet0/0/1

ip binding vpn-instance vpn1

ip address 45.1.1.4 255.255.255.0

quit

ospf 1 router-id 4.4.4.4

area 0.0.0.0

network 34.1.1.4 0.0.0.0

quit

quit

interface LoopBack0

ip address 4.4.4.4 255.255.255.255

ospf enable 1 area 0.0.0.0

3.PE配置针对于每个客户的vrf虚拟路由表,在华为中是vpan-instance实例,并定义RDRT

PE1路由器:

ip vpn-instance 1

ip vpn-instance vpn1

ipv4-family

route-distinguisher 1:1

vpn-target 1:1 export-extcommunity

vpn-target 1:1 import-extcommunity

PE2路由器:

ip vpn-instance vpn1

ipv4-family

route-distinguisher 1:1

vpn-target 1:1 export-extcommunity

vpn-target 1:1 import-extcommunity

4.PE之间创建vpnv4连接,用于相互传递本端vpn-instance中的客户路由

PE1路由器:

bgp 1

router-id 2.2.2.2

peer 4.4.4.4 as-number 1

peer 4.4.4.4 connect-interface LoopBack0

ipv4-family unicast

undo peer 4.4.4.4 enable

ipv4-family vpnv4

policy vpn-target

peer 4.4.4.4 enable

ipv4-family vpn-instance vpn1

import-route static

PE2路由器:

bgp 1

router-id 4.4.4.4

peer 2.2.2.2 as-number 1

peer 2.2.2.2 connect-interface LoopBack0

ipv4-family unicast

undo peer 2.2.2.2 enable

ipv4-family vpnv4

policy vpn-target

peer 2.2.2.2 enable

ipv4-family vpn-instance vpn1

import-route static

5.mplsvpnv4连接建立后,需要把客户网络的路由通过MP-BGP传递到对端的PE中去形成vpn路由,因为这个时候在PEvpn路由表中还没有客户的路由条目,可以使用<PE1>display ip routing-table vpn-instance vpn1 命令查看vpn实例vpn1中的路由条目,所以这个时候PE1vpn实例中并没有CE1的路由,所以无法通过vpn传递给PE2设备,所以CE1CE2设备就无法通信。现在需要想办法在PE1vrf表中添加到达192.168.1.0/24的路由,可以使用静态路由,也可以使用动态路由(使用动态路由,必须PECE都要配置相同的IGP路由),本教程中使用静态路由添加

PE1路由器:

ip route-static vpn-instance vpn1 192.168.1.0 255.255.255.0 12.1.1.1 \\添加192.168.1.0/24的路由到vrf表

PE2路由器:

ip route-static vpn-instance vpn1 192.168.2.0 255.255.255.0 45.1.1.5
扫码添加专属客服
扫码关注公众号