Bind multiple IP addresses to a single Nic In CentOS

Source: Internet
Author: User

Because it is in the same network segment of the Intranet, you only need to change IPADDR = XXXX. The details are as follows:

[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.255.128
NETWORK = 172.23.108.128
ONBOOT = yes
TYPE = Ethernet
[Root @ Web server 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.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 FIG: 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] #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.