Configure multiple IP addresses for a single NIC in linux

Source: Internet
Author: User
Linux single Nic configuration multiple IP1, by copying a ifcfg-eth0: 1 configuration file implementation: cp/etc/sysconfig/network-scripts/ifcfg-eth0/etc/sysconfig/network-scripts/ifcfg-eth0: 1www. 2cto. comvi/etc/sysconfig/netwo
Linux single Nic configuration multi IP 1, by copying a ifcfg-eth0: 1 configuration file implementation: cp/etc/sysconfig/network-scripts/ifcfg-eth0/etc/sysconfig/network-scripts/ifcfg-eth0: 1 www.2cto.com vi/etc/sysconfig/network-scripts/ifcfg-eth0: 1 # Intel Corporation 82566DC Gigabit Network ConnectionDEVICE = eth0BOOTPROTO = noneBROADCAST = protocol = 00: 19: d1: 34: 2d: b8IPADDR = 218.95.37.250NETMASK = 255.255.255.192NETWORK = 218.95.37.192ONBOOT = yesGATEWAY = 21 8.95.37.193TYPE = Ethernet ifconfig eht0: 1 up 2. temporary mode (lost after restart): ifconfig eth0: 1 192.168.0.2 netmask 255.255.255.0 up www.2cto.com 3. script implementation :#! /Bin/sh eth01 =/etc/sysconfig/network-scripts/ifcfg-eth0: 1 touch $ eth01 echo DEVICE = eth0: 1 >>>$ eth01echo BOOTPROTO = none >>$ eth01echo IPADDR = 192.168.40.76 >>$ eth01echo NETMASK = 255.255.255.0 >$ eth01echo ONBOOT = yes >>$ eth01/etc/init. d/network restart author wang7dao
Related Article

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.