• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 436
  • Last Modified:

DHCP

i need help on setting up my dhcp on my linux...

i have static ip from isp which is 214.123.121.210, netmask 255.255.255.252, gateway 214.123.121.209

in my linux i have 2 network card where eth0 is connect to the modem

and eth1 is connect to router . i want to enable the dhcp for eth1

here is my dhcp setting...could you check what is wrong here?

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;


subnet 192.168.1.0 netmask 255.255.255.0 {


# --- eth1
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;

      option nis-domain            "mydomain.com";
      option domain-name            "mydomain.com";
      option domain-name-servers      192.168.1.1;

      option time-offset            -18000;

      range dynamic-bootp 192.168.1.2 192.168.1.254;

      }



0
lilie795
Asked:
lilie795
  • 2
  • 2
1 Solution
 
lilie795Author Commented:
and after i use cross cable to connect to a single pc from eth1, the sending packet is bigger than receiving ( in network status of the pc which is installed XP)...why is that?
0
 
jlevieCommented:
With two network interfaces in a machine and only a single subnet declaration in dhcpd.conf you'll need to restrict dhcpd to only use your inside interface. This is done by  specifying the interface(s) the dhcpd should use as arguments to the dhcpd command (dhcpd eth1).  On a RedHat system or similar editing /etc/sysconfig/dhcpd and setting "DHCPDARGS=eth1" will cause the service to start with that restriction. Other systems would require an edit to the boot time init script in /etc/rc.d/init.d.

I have no idea what you are talking about in your comment.
0
 
lilie795Author Commented:
the problem is...from eth1 to a single pc in my LAN, i connect it by using cross cable...but the connection in lan is slow. for example in lan i check the network traffic. and i see the sent packet is bigger size than recieve packet. which part is the problem actually...any idea?
0
 
jlevieCommented:
It isn't unusual to have a link mode negotitation problme when using a cross-over cable. What happens there is that one end of the link is running in Half Duplex and the other in Full Duplex. Such a link will work, but transfer speeds will be very slow, perhaps in the 10's of Kb/sec rather than the normal 10Mb/sec  (for a 100Mpbs link). Placing a hub or switch in between the two will usually solve the problem, or you can force each end of the link to the same mode.  On the Linux system many of the NIC's one might use can be interrogated or set with mii-tool.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now