订购服务器以后进入DCImanager的控制面板,你就可以看到端口的现状而改变目前的设置。
每台独立服务器的两个网卡默认连接到不同的网络交换机。为了提高容错性,我们推荐使用标准的公开链路汇聚控制协议LACP。
服务器上安装的操作系统默认使用1Gbps的界面。为了使用10Gbps的网卡,你必须手动设置10Gbps的界面。
(!) 注意!这个说明是对有经验的用户而写出来的。如果你有问题,请联系你的网管员。
这个文章里描写如何在以下的操作系统设置网络:
Ubuntu/Debian
CentOS
1.在设置过程中我们将使用ethool命令和nano文本编辑器。如果你没有它们,请首先安装它们。
Ubuntu/Debian:
apt-get install ethtool net-tools nano
CentOS:
yum install ethtool net-tools nano
2.为了检查服务器上有的界面,请执行:
ifconfig
(i) 在CentOS界面的名称是 eno1, 在Debian界面的名称是 eth0.
输出如下 (Ubuntu/Debian):
root@10g:~# ifconfig
eth0 Link encap:Ethernet HWaddr 0c:c4:7a:d9:db:fe
inet addr:92.223.xxx.xxx Bcast:92.223.xxx.255 Mask:255.255.255.0
inet6 addr: fe80::ec4:7aff:fed9:dbfe/64 Scope:Link
inet6 addr: 0a00:00c0:00::00/48 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8955 errors:0 dropped:0 overruns:0 frame:0
TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:540520 (540.5 KB) TX bytes:7175 (7.1 KB)
Memory:fb520000-fb53ffff
3.为了检查目前的界面是否有10GB的连接请执行:
ethtool eth0
输出如下:
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: on (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
Supported link modes:1000baseT/Full – 意思是界面是1GB的。
4.如果运行界面之间没有10GB的界面,请看看所有的,包括不运行的界面。
ifconfig -a
输出如下:
eth0 Link encap:Ethernet HWaddr 0c:c4:7a:d9:db:fe
inet addr:92.223.xxx.xxx Bcast:92.223.xxx.255 Mask:255.255.255.0
inet6 addr: fe80::ec4:7aff:fed9:dbfe/64 Scope:Link
inet6 addr: 0a00:00c0:00::00/48 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:171247 errors:0 dropped:0 overruns:0 frame:0
TX packets:627 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10599299 (10.5 MB) TX bytes:80024 (80.0 KB)
Memory:fb520000-fb53ffff
eth1 Link encap:Ethernet HWaddr 0c:c4:7a:d9:db:ff
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:fb500000-fb51ffff
eth2 Link encap:Ethernet HWaddr a0:36:9f:a9:ac:d8
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth3 Link encap:Ethernet HWaddr a0:36:9f:a9:ac:da
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
5.激活所有预留的界面:
(i) 在CentOS界面的名称是 eno1, 在Debian界面的名称是 eth0。
ifconfig eth1 up
ifconfig eth2 up
ifconfig eth3 up
请检查,执行ifconfig命令以后界面是否激活了(已激活的界面应该显示出来)。 6.在已激活的界面之间找到10GB的界面。
ethtool eth1
ethtool eth2
ethtool eth3
输出如下:
Settings for eth2:
Supported ports: [ FIBRE ]
Supported link modes: 10000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: No
Advertised link modes: 10000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: Direct Attach Copper
PHYAD: 0
Transceiver: external
Auto-negotiation: off
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
"Link detected: yes"和"Speed: 10000Mb/s" – 意思是这个界面已经有10GB的连接。
7.现在在设置文件通过文本编辑器(我们在本说明使用nano文本编辑器)需要把1GB的界面换成10GB的界面。
Debian:
nano /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 92.223.xxx.xxx
netmask 255.255.255.x
network 92.223.xxx.x
broadcast 92.223.xxx.255
gateway 92.223.xxx.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
dns-search example.com
iface eth0 inet6 static
address 0a00:00c0:00::00
netmask 48
gateway 0a00:00c0:00::1
请把所有的eth0换成eth2。
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth2
iface eth2 inet static
address 92.223.xxx.xxx
netmask 255.255.255.0
network 92.223.xxx.x
broadcast 92.223.xxx.255
gateway 92.223.xxx.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
dns-search example.com
iface eth2 inet6 static
address 0a00:00c0:00::00
netmask 48
gateway 0a00:00c0:00::1
CentOS: 把网络设置复制到10Gbps界面(ifcfg-ens2f0)。如果你不需要1Gbps界面,关闭它。
nano /etc/sysconfig/network-scripts/ifcfg-eno1
nano /etc/sysconfig/network-scripts/ifcfg-ens2f0
8.请保存改变(Ctrl+X)并重新启动服务器(reboot)。
9.重新启动以后检查服务器:
ifconfig
输出如下:
eth2 Link encap:Ethernet HWaddr a0:36:9f:a9:ac:d8
inet addr:92.223.00.000 Bcast:92.223.00.255 Mask:255.255.255.0
inet6 addr: fe80::a236:9fff:fea9:acd8/64 Scope:Link
inet6 addr: 0a00:00c0:00::00/48 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11682 errors:0 dropped:0 overruns:0 frame:0
TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:705793 (705.7 KB) TX bytes:11804 (11.8 KB)
(i) 如果连接不到,有可能你一些步骤进行时发错了。试试通过IPMI连接并恢复你的服务器或者重新安装操作系统为了从头开始。如何在独立服务器用模板重新安装操作系统。