LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 08-28-2012, 02:13 AM   #1
shams
Member
 
Registered: Jan 2004
Posts: 396

Rep: Reputation: 30
Cannot ping the local domains with ip 191.168.1.1?


Note: sorry the subject ip is 192.168.1.1
I have debian wheezy with resolvconf, dnsmasq and apache2 running web server for my local domains, i have dynamic ip so the script updates the "/etc/hosts" on each new dialup connection for the new ip.
The problem is i can ping the global net and the local domain with the ip address 127.0.0.1 like one from the /etc/hosts the "me.example.net" but cannot ping the domains with the ip address 192.168.1.1 like domains from the /etc/hosts.dnsmasq:
Quote:
# ping example.dynet.com
PING example.dynet.com (192.168.1.1) 56(84) bytes of data.
^C
--- example.dynet.com ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 5999m
Quote:
# ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.119 ms
64 bytes from 127.0.0.1: icmp_req=2 ttl=64 time=0.105 ms
64 bytes from 127.0.0.1: icmp_req=3 ttl=64 time=0.115 ms
^C
--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.105/0.113/0.119/0.005 ms
These are the some configuration files related to this issue, this is the /etc/dnsmasq.conf:
Quote:
resolv-file=/etc/resolv.dnsmasq
resolv-file=/etc/resolv.conf
resolv-file=/etc/ppp/resolv.conf

#server=/localnet/192.168.0.1
server=208.67.222.123

#local=/localnet/
local=/localnet/192.168.1.1
local=/example.dynet.com/192.168.1.1
local=/example.linkpc.net/192.168.1.1

#address=/double-click.net/192.168.1.1
address=/example.dynet.com/192.168.1.1
address=/example.linkpc.net/192.168.1.1

interface=ppp0
interface= eth0

addn-hosts=/etc/hosts.dnsmasq
#no-hosts
/etc/resolv.conf:
Quote:
nameserver 127.0.0.1
/etc/resolv.dnsmasq:
Quote:
nameserver 68.105.28.11
nameserver 68.105.29.11
/etc/hosts:
Quote:
127.0.0.1 localhost
117.104.228.40 me.example.net example.net
/etc/hosts.dnsmasq:
Quote:
127.0.0.1 localhost
192.168.1.1 me.example.net example.dynet.com example.linkpc.net
/etc/nsswitch.conf:
Quote:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
/etc/avahi/avahi-daemon.conf:
Quote:
domain-name=local
browse-domains=me.example.net, example.dynet.com, example.linkpc.net
/etc/avahi/hosts:
Quote:
# 2001::81:1 test.local
192.168.1.1 example.dynet.com.local
192.168.1.1 example.linkpc.net.loca

Last edited by shams; 08-28-2012 at 02:49 AM.
 
Old 08-28-2012, 02:25 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,376

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
DNS clearly works, as you've converted the name to the right, so nothing you've posted there is of any use. You'd do well to take the time to appreciate what is relevant and what is not.

Does that destination IP even exist?
 
Old 08-28-2012, 10:05 AM   #3
shams
Member
 
Registered: Jan 2004
Posts: 396

Original Poster
Rep: Reputation: 30
Thanks for the reply, your are right the destination IP doesn't exist let me help to configure the network interface what i did is:

/etc/network/interfaces:
Quote:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 208.67.222.123
now this is the output of ifconfig:
Quote:
eth1 Link encap:Ethernet HWaddr 00:07:e9:a8:ea:93
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:51065 errors:0 dropped:0 overruns:0 frame:0
TX packets:51065 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22756279 (21.7 MiB) TX bytes:22756279 (21.7 MiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:117.104.229.38 P-t-P:117.104.228.3 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:271 errors:0 dropped:0 overruns:0 frame:0
TX packets:273 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
Quote:
# /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
117.104.228.3 0.0.0.0 255.255.255.255 UH 0 0 0 ppp
 
Old 08-28-2012, 12:49 PM   #4
shams
Member
 
Registered: Jan 2004
Posts: 396

Original Poster
Rep: Reputation: 30
Thanks for the help the problem solved, the problem was misconfiguration of the network interface which is eth1 but it was configured as eth0.
 
  


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
my server can't ping other boxes on private network (192.168.0.0) bweaver Linux - Networking 5 07-28-2011 03:20 PM
[SOLVED] iptables 192.168.1.x server, can't ping by 192.168.0.x momok Linux - Security 2 06-02-2011 01:32 AM
can't ping local IP address but can ping remote hosts rob_xx17 Linux - Networking 4 12-02-2006 08:39 AM
FC4 won't ping 127.0.0.1 or the internet, but will ping local computers jalsk Linux - Networking 4 11-22-2005 05:59 PM
dhcp client can't ping gateway but can ping other local hosts dirty_forks Linux - Networking 7 10-08-2004 10:54 AM


All times are GMT -5. The time now is 08:26 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration