A temporary solution to IP deficiencies without changing the network topology

Source: Internet
Author: User
Tags get ip iptables

The general situation is as follows, the school Network Center is zoned to the school building an IP segment 192.168.101.0/24, each office to run the classroom has several network modules to connect the corridor switch, All through 192.168.101.254 access to other networks and the Internet, there are individual classrooms have dozens of computers, through the switch to the Wall network module, also use 192.168.101.254 as a gateway. This semester expansion of the experimental center, add 200 computers, and formally put into use, but the center of the routing equipment has not yet, all the total of more than 400 computers are in a network, and to the Internet, more than 200 IP is far from enough, there are nearly half of the computer can not get IP from the DHCP server and can not access the Internet situation.
Because more suddenly, too late to plan the intranet to solve the IP resource is not enough, so think of the use of iptables forwarding function, temporarily resolved a network of IP resources is not enough:
1, the network section of a software FTP to add an IP
Ifconfig eth0:1 192.168.0.1
2, open the Iptables service, and add the necessary modules
/etc/init.d/iptables start
Insmod Iptables_nat_ftp (remember not disgrace son, anyway is related to FTP forwarding module)
3. Add rules
Iptables-t nat-a postrouting-o eth0:1-j Masquerade
4, modify the DHCP server IP for 192.168.0.2, and new IP domain 192.168.0.0/24

Now OK, the original has been divided into the IP has 8 days of lease, plus the 192.168.0.0/24 section of more than 200 IP, temporarily resolved 400 machines of the internet problem.

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.