LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-26-2016, 11:16 PM   #1
mothergoose729
Member
 
Registered: Aug 2008
Distribution: Ubuntu x64
Posts: 118

Rep: Reputation: 19
Can't ping server but can DHCP?


I have a DHCP server running isc-dhcp on ubuntu server 14.04LTS. I am configuring the machine as a gateway.

My client machine is connect directly to the ethernet interface via a crossover cable. I have the server NIC set to a static IP address and my client NIC set to dynamic.

When on my server, I can see the interface is up and I can ping it on my server. When on my client machine I cannot ping the interface. I know the client machine is connecting to the server, however, because the DHCP portion is definitely working.

I have tried manually assigning and IP address, netmask, and default gateway and it still doesn't work. I am confident I configured it correctly because it was working the other day.

The only thing I changed was I assigned static IP address, netmask, and broadcast address to two additional NICs. I noticed that my dhcp server was assigning an IP address to my internal NICs, so I configured my dhcp server to assign a static lease to all of my NIC. When I run ifconfig all of my NIC are up and assigned the correct static address.

I have no idea where I went wrong - the only thing I know how to do is uninstall the isc-dhcp and start over. Anyone have any tips or suggestions? Would very much appreciate it thanks.
 
Old 01-27-2016, 02:22 AM   #2
GunFighT
Member
 
Registered: May 2014
Location: Romania
Distribution: Debian/Ubuntu, Rocky Linux
Posts: 53

Rep: Reputation: Disabled
Did you activated ip_forward?
Try with those commands at root then test:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
or
Code:
sudo sysctl -w net.ipv4.ip_forward=1
 
Old 01-27-2016, 12:37 PM   #3
mothergoose729
Member
 
Registered: Aug 2008
Distribution: Ubuntu x64
Posts: 118

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by GunFighT View Post
Did you activated ip_forward?
Try with those commands at root then test:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
or
Code:
sudo sysctl -w net.ipv4.ip_forward=1
Yes I did that. I have the necessary NAT rules in IPtables as well.
 
Old 01-28-2016, 02:15 AM   #4
GunFighT
Member
 
Registered: May 2014
Location: Romania
Distribution: Debian/Ubuntu, Rocky Linux
Posts: 53

Rep: Reputation: Disabled
Well, in this case, can you write the IP and Subnet Mask for both NICs server and client?
 
Old 01-28-2016, 09:11 AM   #5
hidalgo_socorro
LQ Newbie
 
Registered: Jan 2016
Location: Miami
Distribution: Ubuntu
Posts: 4

Rep: Reputation: Disabled
You should also use Wireshark or tcpdump to check that the DHCP packet is going out and that the client is receiving it. Maybe some kind of broadcast issue ?
 
Old 01-31-2016, 08:16 PM   #6
mothergoose729
Member
 
Registered: Aug 2008
Distribution: Ubuntu x64
Posts: 118

Original Poster
Rep: Reputation: 19
So after trying a lot of things, I finally seemed to have fixed it.

I still don't know how my dhcp server was blocking packet forwarding on my lan interfaces. When I removed isc-dhcp-server I was able to get connected on one of my interfaces immediately.

I figured out in my /etc/network/interfaces I had my NIC configured incorrectly. I had all three of them configured with static IPs on the same network, in the same subnet, with the same broadcast. What I think was happening is that ntcl was able to configure one of the network interfaces the way I wanted and then not able to on any of the others. When I moved each NIC into a different subnet I was able to get packet forwarding working on all of my interfaces.

I eventually installed bridge utils and bridged all of my lan interfaces into one bridged interface, but it only seemed to work after I had completely reinstalled ubuntu server and then did a full aptitude safe-upgrade, and then reconfigured everything. I installed isc-dhcp-server again and configured it with much the same options, and everything is working. This dhcp server does not appear to be assigning dynamic IPs to my LAN cards like it did before.

There is still a lot I don't understand. If someone has some ideas as to what might have gone wrong I would love to hear it, even if only to learn something. Otherwise my solution was basically to start over and try again, only better this time :P.

Last edited by mothergoose729; 01-31-2016 at 08:18 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to ping outside of DHCP server on Suse Linux Enterprise dmitrii.md Linux - Newbie 2 05-19-2013 03:12 PM
Slackware PXE - cannot ping the dhcp server. Lockywolf Linux - Networking 3 08-16-2011 10:37 PM
Problem on acquiring IP addr. on client from dhcp server through dhcp relay server haariseshu Linux - Server 5 08-10-2009 02:20 AM
dhcp client can't ping gateway but can ping other local hosts dirty_forks Linux - Networking 7 10-08-2004 11:54 AM
I get all my DHCP details through, but can't ping the server palpatine Linux - Networking 0 01-17-2002 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration