How to Set up DHCP-Linux Enterprise Application-Linux server application information. Set DHCP
Don't think that I am talking so complicated in "Network basics? But isn't it complicated to set DHCP in Linux? All of you
Only one file is required? /Etc/dhcpd. conf.
Below? I used my own settings file to explain how to modify this file?
Default-lease-time 259200;
Max-lease-time 777600;
Option domain-name "siyongc ";
I put these lines at the beginning of the file. The first and second rows define
be uncommented.# Authoritative;# Use this to send dhcp log messages to a different log file (you also# Have to hack syslog. conf to complete the redirection ).Log-facility local7;# No service will be given on this subnet, but declaring it helps# DHCP server to understand the network topology.Subnet 10.152.187.0 netmask 255.255.255.0 {}# This is a very basic subnet declaration.Subnet 10.254.239.0 netmask ha
run the following command:# Ifconfig eth0 218.197.93.115 netmask 255.255.255.0Edit the/etc/sysconfig/network-scripts/ifcfg-eth0 file to make the address disappear after the computer is no longer restarted,DEVICE = eth0ONBOOT = yesBROADCAST = 218.197.93.255NETWORK = 218.197.93.0NETMASK = 255.255.255.0IPADDR = 218.197.93.115Add a static route:# Route add-net 218.197.93.0 netmask 255.255.255.0Next, configure
192.168.1.1 0.0.0.0 UG 0 0 0 eth0
Configure Static Routing
Route command
You can use the route command to set and view route tables. The command format of the kernel route table is as follows:
# Route [add | del] [-net |-host] target [netmask Nm] [gw Gw] [[dev] If]
Where:
* Add: add a routing rule.
* Del: delete a routing rule.
* Net: the destination address is a network.
* Host: the destination address is a host.
* T
)
Line 2: IP address, subnet, and mask of the NIC
Row 3: Up (indicating that the network card is enabled) running (indicating that the network card is connected) multicast (supporting Multicast) MTU: 1500 (maximum transmission unit): 1500 bytes
4. Five Elements: Statistics on received and sent data packets
Row 7: number of bytes of received and sent data.
(1) configure the IP address of eth0 and activate the device.
# Ifconfig eth0 192.168.1.10 ne
access the host through this IP
eth1:192.168.220.100: The IP of this network card can access the external network, or it can be accessed by the external network. Gateway for eth1:192.168.220.1.以下是设置的eth0 ip信息,[[emailprotected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE="eth0"BOOTPROTO="static"HWADDR="00:0C:29:3E:4A:4F"ONBOOT="yes"TYPE="Ethernet"IPADDR="192.168.100.10"NETMASK="255.255.255.0"====================================以下是设置
In the previous article, I briefly explained the differences between NTFS file sharing and FAT32 file sharing in Windows XP. In the second half, I will not talk nonsense, directly paste the key code that sets the read and write permissions for file sharing.
First, set the folder as the shared code:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->// Set a folder for net share
NET_API_STATUS AddNetShare (LPSTR sharedFolderPath, LPSTR shareName)
{
D
1. ifconfigYou can use the ifconfig command to configure and view the network interface configuration.
For example:
(1) configure the IP address of eth0 and activate the device.
# Ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
(2) configure the IP address of the eth0 alias device eth0: 1 and add a route.
# Ifconfig eth0 192.168.1.3
# Route add-host 192.168.1.3 dev eth0: 1
(3) activate the device.
# Ifconfig eth0 up
(4) disable the device.
# Ifcon
Modifying TCP/IP configurations in the Solaris system is cumbersome.
Local Machine name/etc/Hostname. Pcn0Point to/etc/inet/hosts soft link, record the ing between IP address and machine name/etc/Hosts Point to the soft link of/etc/inet/netmasks, and record the ing between the network address and subnet mask/etc/Netmasks Default Gateway/etc/Defaultrouter
# Cd/etc # Ls host * Hostname. ce0 hosts # More hostname * J ** DB # More hosts ## Internet host table#127.0.0.1 localhost192.168.1
Linux
Cluster-
LVS (DR) + heartbeat
LVS + heartbeat
Lvs1AndLvs2The configuration script is the same for the same job. The only difference is thatHeartbeatConfiguration FileHa. cfThe heartbeat address is different.
AuthenticWeb,MySQL,FTP...... Same Configuration
LVSConfiguration
#! /Bin/bash
###### LVS ######
Ifconfig eth0: 0 222.90.88.88 broadcast 222.90.88.88 netmask 255.255.255 up
Route add-host 222.90.88.88 Dev eth
Option classless-static-routes code 121 = array of unsigned integer 8; # define routes based on option 121 RFC 3442)
Set vendor-string = option vendor-class-identifier; # enable to see the device ID option 60 in the lease file)
Shared-network DHCPnet {# define a DHCP network for wide-area sharing
Subnet 192.168.1.0 netmask 255.255.255.0 {}# this subnet is the subnet where the IP address of the NIC where you enable the dhcpd service is located, for ex
Set and cancel Nic mixed mode in Linux
1. Several Common Nic modes in Linux:Broadcast mode: In this mode, the NIC can receive broadcast information in the network.Multicast mode: Set the NIC in this mode to receive multicast data.Direct mode: In this mode, only the target Nic can receive the data.Hybrid mode: In this mode, the network adapter can receive all data through it, regardless of whether the data is
2. View, add, and cancel the hybrid modeA. View Nic Mode[Root @ zabbix ~] # Ifconfig-Ens
Use the following command to configure the Ethernet
1. ifconfig
You can use the ifconfig command to configure and view the network interface configuration.
For example:
1) configure the IP address of eth0 and activate the device.
# Ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
2) configure the IP address of eth0: 1 and add a route.
# Ifconfig eth0: 1 192.168.1.3
# Route add-host 192.168.1.3 dev eth0: 1
3) activate the device.
# Ifconfig eth0: 1
Windows Route table command
Display and modify entries in the local IP address routing table.
SyntaxRoute [-f] [-p] [Command [Destination] [mask Netmask] [Gateway] [metric Metric] [if Interface]
Parameters-FClear all routes that are not the primary route (the network mask is 255.255.255.255), back-to-network route (the target is 127.0.0.0, and the network mask is 255.255.255.0), or Multicast Route (the target is 224.0.0.0, the route table of the rout
How to set up DHCP in LinuxIt's not complicated to set up DHCP under Linux, all you have to do is just one file:/etc/dhcpd.conf. below, I use my own settings file to say how to modify this file: Default-lease-time 259200; Max-lease-time 777600; option Domain-name "SIYONGC"; I put these lines at the beginning of the document. First and second lines I define the default period and the maximum period for the lease,values are calculated in seconds, i.e. ' three days ' and ' nine days '. Then I s
192.168.0.8 netmask 255.255.255.255 0 0Conduit permit ICMP any anyConduit permit TCP host 61.144.51.43 eq www anyConduit permit UDP host 61.144.51.43 eq domain any------provide domain-name service with 61.144.51.43 This IP address, and only allow external users to access the UDP port of domainRoute outside 0.0.0.0 0.0.0.0 61.144.51.61 1------External Gateway 61.144.51.61Timeout xlate------After an internal device has been translated (global) to an ex
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.