Home > OS >  Linux binding IP segment
Linux binding IP segment

Time:09-29

1. In the first place you want to make sure the manufacturer said, check test
2. The implementation of the time, since it is already in use of the machine, before that IP is added, should be on the machine, the continuation of that have confirmed that the available solution, and then in the above change,





Let's open a, you will find a this range9 on that is 109.71.255.0 the C

Then according to the online to see you, you see see understand, how should be increased, right? [in]

Write a script, maintain, at that time do not operate

At this time to think about it, how do I take effect, must let you restart the network online, this influence is too big, may also be yourself even, can separate application this script,
by reducing the impact to the minimum?
The first step is to add files: # vi/etc/sysconfig/network - scripts/ifcfg - eth0 - range0 (eth0 is the name of the network card, according to the actual situation to decide)
Editor for the following:
IPADDR_START=write minimum available IP
IPADDR_END=write maximum available IP
CLONENUM_START=6 (such as from eth0:6 start eth0:7, eth0:8)
NETMASK=255.255.255.0 (fill in the corresponding subnet mask)

The second step is to restart # reboot



Is such, IP manufacturer should be added, but I don't have, do you think that his own script, after the restart, can start before manufacturer, ifcfg - eth0 - range0

Is this, this will be new eth0 on eth0:0 ~ eth0: n virtual LAN, and equipped with virtual IP

But because you of that period, the factory has been added, so IP up and manufacturers configuration conflict

Lead to manufacturers of script eth0.2524 this virtual network card does, so eth0.2524:0 ~ eth0.2524: n virtual IP, 6 C IP cannot take effect,

I now move that you lost, you restart the machine, and then try all under test period,
Increase in the IP to the agent should be added to a configuration, this chat for a while, I have something


Detailed ifcfg - eth0 configuration,

Through the check information and to summarize in the work:

DEVICE="eth1"

Nic name
NM_CONTROLLED="yes"

The parameters of the network mamager, whether can by NNetwork Manager managed

HWADDR=

MAC address
TYPE=Ethernet

Type

The PREFIX=24

Subnet mask 24

DEFROUTE=yes

Whether is the default route, the eth is set to the default routing

ONBOOT=yes

Set to yes, boot automatically enabled network connection
IPADDR=

IP address
BOOTPROTO=none

Set to none to ban the DHCP, set to static static IP address, set to DHCP open DHCP service
NETMASK=255.255.255.0

Subnet mask
DNS1=8.8.8.8

First the DNS server

BROADCAST

Radio

UUID

A unique identifier

TYPE=Ethernet

Network type: Ethernet

BRIDGE=

Set up the bridge card

GATEWAY=

Set the gateway
DNS2=8.8.4.4 #

The second DNS server
IPV6INIT=no

Ban IPV6
USERCTL=no

Whether to allow the root user to control the device, set to no, can only use the root user to change
NAME="System eth1
"
This is a network connection name

MASTER=bond1

Specify the name of the Lord

SLAVE

Specifies that the interface is a joint interface components,

The NETWORK

The network address

ARPCHECK=yes
Test

PEERDNS

Whether to allow DHCP obtained by DNS override local DNS

PEERROUTES

Whether from the DHCP server is used to define the default gateway interface information routing table entry

IPV6INIT

Whether to enable IPv6 interface,

IPV4_FAILURE_FATAL=yes

If ipv4 configuration to disable the device failure

IPV6_FAILURE_FATAL=yes

If ipv6 configuration failure to disable the device
  • Related