编程开源技术交流,分享技术与知识

网站首页 > 开源技术 正文

服务器怎么接入交换机?(服务器与交换机怎么互通)

wxchong 2024-08-24 01:55:10 开源技术 8 ℃ 0 评论

本章节介绍服务器接入交换机的配置。其中交换机的组网方式可以是堆叠、M-LAG和单机,为了使网络具有更高的可靠性,推荐采用M-LAG组网方式。服务器网卡模式可以是主备模式和负载分担模式。


图1-1 组网示意图1

配置过程

主备模式

1、交换机组网场景一:堆叠

配置堆叠系统SwitchA&SwitchB。

[~SwitchA&SwitchB] interface 10ge 1/0/1
[*SwitchA&SwitchB-10GE1/0/1] stp edged-port enable    //如果交换机接带交换板的服务器,需要在服务器上去使能STP,防止发生抢根现象。
[*SwitchA&SwitchB-10GE1/0/1] quit
[*SwitchA&SwitchB] interface 10ge 1/0/2
[*SwitchA&SwitchB-10GE1/0/2] stp edged-port enable
[*SwitchA&SwitchB-10GE1/0/2] commit

2、交换机组网场景一:M-LAG

配置SwitchA。

[~SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] stp edged-port enable    //如果交换机接带交换板的服务器,需要在服务器上去使能STP,防止发生抢根现象。
[*SwitchA-10GE1/0/1] commit

配置SwitchB。

[~SwitchB] interface 10ge 1/0/1
[*SwitchB-10GE1/0/1] stp edged-port enable
[*SwitchB-10GE1/0/1] commit

3、交换机组网场景一:单机

配置SwitchA。

[~SwitchA] interface 10ge 1/0/1  
[*SwitchA-10GE1/0/1] stp edged-port enable    //如果交换机接带交换板的服务器,需要在服务器上去使能STP,防止发生抢根现象。 
[*SwitchA-10GE1/0/1] commit

配置SwitchB。

[~SwitchB] interface 10ge 1/0/1  
[*SwitchB-10GE1/0/1] stp edged-port enable    //如果交换机接带交换板的服务器,需要在服务器上去使能STP,防止发生抢根现象。 
[*SwitchB-10GE1/0/1] commit

负载均衡模式

1、交换机组网场景一:堆叠

配置堆叠系统SwitchA&SwitchB,将交换机接口10GE1/0/1和10GE1/0/2加入eth-trunk。

[~SwitchA&SwitchB] interface eth-trunk 1  
[*SwitchA&SwitchB-Eth-Trunk1] trunkport 10ge 1/0/1  
[*SwitchA&SwitchB-Eth-Trunk1] trunkport 10ge 1/0/2  
[*SwitchA&SwitchB-Eth-Trunk1] mode lacp-static 
[*SwitchA&SwitchB-Eth-Trunk1] stp edged-port enable  //如果交换机接带交换板的服务器,需要在服务器上去使能STP,防止发生抢根现象。
[*SwitchA&SwitchB-Eth-Trunk1] commit

2、交换机组网场景一:M-LAG

配置SwitchA,将交换机接口10GE1/0/1加入eth-trunk。

[~SwitchA] interface eth-trunk 1  
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/1  
[*SwitchA-Eth-Trunk1] mode lacp-static 
[*SwitchA-Eth-Trunk1] dfs-group 1 m-lag 1 
[*SwitchA-Eth-Trunk1] stp edged-port enable    //如果交换机接带交换板的服务器,需要在服务器上去使能STP,防止发生抢根现象(欢迎关注公众号:网络工程师阿龙)。 
[*SwitchA-Eth-Trunk1] commit

配置SwitchB,将交换机接口10GE1/0/1加入eth-trunk。

[~SwitchB] interface eth-trunk 1  
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/1  
[*SwitchB-Eth-Trunk1] mode lacp-static 
[*SwitchB-Eth-Trunk1] dfs-group 1 m-lag 1 
[*SwitchB-Eth-Trunk1] stp edged-port enable    //如果交换机接带交换板的服务器,需要在服务器上去使能STP,防止发生抢根现象。 
[*SwitchB-Eth-Trunk1] commit

——END ——

资源领取 | 学习培训 | 网工提升

请+V 咨询

↓↓↓↓

微信号:glab-mary

文章来源:部分内容综合自网络,因觉优质,特此分享,侵删。

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表