CentOS单网卡绑定多IP
-
2023-04-04 05:27:21 - 来源:互联网
-
在手机上看
扫一扫立即进入手机端
因为是在内网同一网段,所以只需要更改IPADDR=XXXX就可以了,详情如下:
[root@webserver network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@webserver network-scripts]# cat ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
BROADCAST=172.23.108.255
HWADDR=00:0c:29:76:20:d1
IPADDR=172.23.108.203
NETMASK=255.255.255.128
NETWORK=172.23.108.128
ONBOOT=yes
TYPE=Ethernet
[root@webserver network-scripts]# cp ifcfg-eth0 ifcfg-eth0:1
[root@webserver network-scripts]# vi ifcfg-eth0:1
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0:1
BOOTPROTO=static
BROADCAST=172.23.108.255
HWADDR=00:0c:29:76:20:d1
IPADDR=172.23.108.220
NETMASK=255.255.255.128
NETWORK=172.23.108.128
ONBOOT=yes
TYPE=Ethernet
[root@webserver network-scripts]# service network restart
[root@webserver network-scripts]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:76:20:D1
inet addr:172.23.108.203 Bcast:172.23.108.255 Mask:255.255.255.128
inet6 addr: fe80::20c:29ff:fe76:20d1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15438968 errors:3 dropped:0 overruns:0 frame:0
TX packets:26674391 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1264636401 (1.1 GiB) TX bytes:136198354 (129.8 MiB)
Interrupt:75 Base address:0×2000
[root@webserver network-scripts]# ifconfig eth0:1
eth0:1 Link encap:Ethernet HWaddr 00:0C:29:76:20:D1
inet addr:172.23.108.220 Bcast:172.23.108.255 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:75 Base address:0×2000
[root@webserver network-scripts]#
相关资讯
更多-
centos6.4镜像(Linux操作系统)
中文|4.50G
-
centos6.8 iso
中文|695M
-
恐龙岛冒险模拟器游戏
中文|157.0M
-
EV视频剪辑软件
中文|28.6M
-
酷我聚星最新版本
中文|131.2M
-
猿编程客户端
中文|138.8M
-
恐龙岛冒险模拟器游戏
中文|157.0M
-
暴风影音5播放器电脑版
中文|115.8M
-
恐龙岛冒险模拟器游戏
中文|157.0M
-
恐龙岛冒险模拟器游戏
中文|157.0M
