Ubuntu dialing and route Switching

Source: Internet
Author: User
Address172.30.60. **** # *** is the last three netmasknames of my IP addresses 255.0gateway172.30.60.1/etc/init. d/networkrestart ---------------- after simple settings, the laptop and the server can access the Internet normally, and dhcp is configured, And the ip address is bound to the mac. I always don't like changing the ip address in the lan. In Ubuntu, change the ppp

Address 172.30.60. **** # *** is the last three digits of my IP address.
Netmask 255.255.255.0
Gateway 172.30.60.1
/Etc/init. d/network restart
------------------
After simple settings, laptops and machines can access the Internet normally, dhcp is configured, And the ip address is bound to the mac. I always don't like changing the ip address in the lan.

In Ubuntu, it took a little time to change pppoe to route the internet.
Because the home Telecom broadband virtual dialing bound the NIC mac address of an old machine to an Internet account, pppoe changed the mac address when accessing the Internet, this must be changed back (mac-clone is performed on the vro, And the mac address of the route is the same as that of the server, which causes communication barriers ), the same settings are also made in windows.

In Ubuntu, you only need to set the previously written pre-up ifconfig eth0 hw in/etc/network/interfaces.

Delete xx: xx. Who knows that it must be restarted, or the mac address remains unchanged, so that the router cannot be pinged. After a while, restart Ubuntu, and everything is normal.

------------------------------------------------------------
1. install required software

Run the following command to install dhcpd:

Sudo apt-get install dhcp

Configure the DHCP server on Ubuntu

Run the following command:

Sudo mv/etc/dhcpd. conf/etc/dhcpd. conf. bakup # back up the original configuration file
Sudo vi/etc/dhcpd. conf

Add the following configuration lines (you can delete the content of the original file or modify some parameters ):

Ddns-update-style none; # dynamic update without DHCP DNS
Default-lease-time 600; # default IP lease period
Max-lease-time 700; # maximum IP lease period
Option subnet-mask limit 255.0; # subnet mask
Option broadcast-address 192.168.18.255; # broadcast address
Option routers 192.168.18.1; # Default Gateway
Option domain-name-servers 202.96.107.27, 202.96.107.28; # domain name Server
Option domain-name "zlfaigo.com"; # default domain name

Subnet 192.168.18.0 netmask 255.255.255.0 {# Set the IP address pool
Range 192.168.18.2 192.168.18.100;
}

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.