Use the case of Linux Internet sharing settings-Linux Enterprise Application-Linux server application information. The following is a detailed description. Environment: A Linux machine has a single Nic, a window machine has a single Nic, and a four-port hub.
Background: The landlord only provides one network cable and limits that only one network card can be used to access the Internet (that is, the network card of my Linux machine ).
Objective: To bring the Windows machine into the network through Linux Internet sharing settings.
Method: Use a Linux machine as a DHCP server and a hub as a LAN. Then forward the IP request for this CIDR block.
1. Create a Linux DHCP server. For Ubuntu
# Apt-get install dhcpd
After the installation is complete, change the/etc/dhcpd. conf file and add:
You can write the preceding statement into a script. If necessary, the sharing function is enabled.
The window machine only needs to be set to automatically get the IP address (or set to 192.168.20.x network segment, and the gateway is 192.168.20.1 ). The physical connection is through the hub.
(All of the above actions have been searched and verified by the network. The situations vary and you can modify them as needed)
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