Debian dual-nic fixed IP Address Configuration DHCP instance

Source: Internet
Author: User

Operating System: Linux/Debian

Network Access to China Telecom ADSL fixed IP Address

Two NICs are: eth0 (Egress) eth1 (connected to vswitch)

Eth0: Public Network 220.172.238.241

Eth1: 192.168.0.1

Iptables

Iptables-T Nat-A postrouting-O eth0-j snat -- to-source 220.172.238.241

DHCP starts

1) apt-Get install DHCP

2) configure the/etc/DHCPD. conf file as follows:

Option domain-name "fugue.com ";
Option domain-name-servers 202.98.192.68;

Option subnet-mask limit 255.0;
Default-lease-time 600;
Max-lease-time 7200;

# The other subnet that shares this physical network
Subnet 192.168.0.0 netmask 255.255.255.0 {
Range dynamic-BOOTP 192.168.0.30 192.168.0.254;
Option broadcast-address 192.168.0.255;
Option routers 192.168.0.1;
}

3) Personal Experience: for a single network card, you can directly/etc/init. d/DHCP restart

However, for dual NICs, You have to specify the input interface. Here, all Nat requests come from eth1 (haha, because eth1 is connected to the switch.

So execute/usr/sbin/DHCPD eth1

 

 

 

 

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.