Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm from paraguay, 22 years old, i'm new on linux. so sorry por any erros
recently i intalled fedora core 5 in a pentium 4 machine
i have 2 others with XP and a Hub to connect them.
all have the ip type 192.168.0.0 and the linux is 168.0.1, the others are 0.3. and 0.2
i have make the Samba server works on linux and the XP machines see it and share archives without problems.. but i can't make them to ping the linux machine.. between the XP machines i can ping.. but they don't reach the linux.. and the linux don't ping them.. i thin it's becose i dod't have a DNS server.. i want to make a lan DNS server.. without and internet conection or a IPS DNS Server.. i know it will be easy to make my ISP to be the DNS server..
it's that i'm new on linux and i want to know more about it.
There is no need to install / configure dns server just to ping the machines. You said that you have configured a samba server on linux machine and it can be used by $$$$$$$ ms machines.
just see if all of the machines share the same network (subnet) and check if you have configured firewall in such a manner that the server is dropping every packet except for samba
Can you ping by IP addresses? If you can, and since you have a small number of hosts with fixed IP addresses, you can enter the hostnames and IP addresses in the /etc/hosts file on the FC5 box, and the C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS files on the windows boxes.
If you do connect to the internet, you will need to enter the DNS (a.k.a nameserver) address from your ISP in your distro's networking setup. These nameservers wouldn't help you resolve the names of your computers on your lan, they are for resolving the names of hosts on the internet. Assuming you aren't using DHCP, you also need to supply the routers IP address as the default gateway address. If you are using DHCP, this information should be supplied to the DHCP client which makes the changes itself.
For a start, your problem has nothing to do with DNS. As you have the network running (Samba works), sounds like you have iptables blocking ICMP (ping). So, open a terminal window and become root. Enter the following 3 commands:
If you see this, your firewall is now gone. Try to ping 192.168.0.2 -- you should get an answer.
Assuming you do, the problem is with your iptables. Let me know if this works and I will help you with iptables rules that will work and let you add DNS server later.
says> the netmask does not make sence whit the ip given...
i lose again...
i added the forward_ipv4=yes on the etc/sysconfig/network file did not make a diference.. i can't ping..
added the line>
net.ipv4.ip_forward = 1 > nothing..
i don't understen whats happening.. why does not work the ping funtion..???
This is NOT a route / gateway issue. You are making it more difficult by going to other areas of the network topology. Route is for going OUTSIDE your network. You are not doing that. Stick with only one thing at a time.
Execute the following command (after restarting your machine AND resetting iptables (as above).
What is important is the line in eth0 -- "inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0"
You should see EXACTLY that, the rest will be different.
You MUST have the network interface reporting this. Let me know what happens after you restarted your machine, flushed your iptables, executed the /sbin/ifconfig AND /sbin/route. Post the results here.
but i don'd know way it does not ping the XP Machines..
i have disable the windows xp firewall but does not work either..
don't know what to do anymore...
This is all the config that i think is ok.. search for errors please..
Code:
[root@tekorei /]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:6E:2D:73:CF
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:6eff:fe2d:73cf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:41 dropped:0 overruns:0 frame:82
TX packets:472 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:48020 (46.8 KiB)
Interrupt:17 Base address:0x9800
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:3090 errors:0 dropped:0 overruns:0 frame:0
TX packets:3090 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7022136 (6.6 MiB) TX bytes:7022136 (6.6 MiB)
[root@tekorei /]# route -F -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
[root@tekorei sysconfig]# vi network
NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=tekorei
GATEWAY=192.168.0.1
[root@tekorei network-scripts]# vi ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.3
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
[root@tekorei network-scripts]# vi ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback
[root@tekorei sysconfig]# vi iptables-config
# Load additional iptables modules (nat helpers)
# Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers are
# stored in /etc/modprobe.conf.
IPTABLES_MODULES="ip_conntrack_netbios_ns"
# Unload modules on restart and stop
# Value: yes|no, default: yes
# This option has to be 'yes' to get to a sane state for a firewall
# restart or stop. Only set to 'no' if there are problems unloading netfilter
# modules.
IPTABLES_MODULES_UNLOAD="yes"
# Save current firewall rules on stop.
# Value: yes|no, default: no
# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets stopped
# (e.g. on system shutdown).
IPTABLES_SAVE_ON_STOP="no"
# Save current firewall rules on restart.
# Value: yes|no, default: no
# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets
# restarted.
IPTABLES_SAVE_ON_RESTART="no"
# Save (and restore) rule and chain counter.
# Value: yes|no, default: no
# Save counters for rules and chains to /etc/sysconfig/iptables if
# 'service iptables save' is called or on stop or restart if SAVE_ON_STOP or
# SAVE_ON_RESTART is enabled.
IPTABLES_SAVE_COUNTER="no"
# Numeric status output
# Value: yes|no, default: yes
# Print IP addresses and port numbers in numeric format in the status output.
IPTABLES_STATUS_NUMERIC="yes"
# Verbose status output
# Value: yes|no, default: yes
# Print info about the number of packets and bytes plus the "input-" and
# "outputdevice" in the status output.
IPTABLES_STATUS_VERBOSE="no"
# Status output with numbered lines
# Value: yes|no, default: yes
# Print a counter/number for every rule in the status output.
IPTABLES_STATUS_LINENUMBERS="yes"
[root@tekorei ~]# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.3 icmp_seq=1 Destination Host Unreachable
From 192.168.0.3 icmp_seq=2 Destination Host Unreachable
From 192.168.0.3 icmp_seq=3 Destination Host Unreachable
Last edited by Ronin_tekorei; 05-15-2006 at 06:04 PM.
Reason: specification
Your post is confusing. You state in post 1 (and 3) that the linux box is configured with an IP address of 192.168.0.1 and the winders box's are 0.2 and 0.3. But yet ifconfig shows eth0 is configured with an IP address of 192.168.0.3 (the same IP as one of the winders box). I'm surprised you are not seeing a "duplicate ip" error. So based on your last post, it looks like you are trying to ping an address that does not exist.
Try editing ifcfg-eth0 and change IPADDR=192.168.0.1 and see if you have better results after you restart the network. Also, you should change your GATEWAY statement in /etc/sysconfig/network to null or point it to a valid ip address of a gateway device on your network. If you don't have a valid gateway device, then just GATEWAY= will do.
Long pause: Also, remove GATEWAY= statement from ifcfg-eth0. Its not needed.
BTW: When I try to ping a non-existant ip address, I get the same error as you posted.
Code:
[root@excelsior log]# ping 192.168.8.33
PING 192.168.8.33 (192.168.8.33) 56(84) bytes of data.
From 192.168.8.2 icmp_seq=1 Destination Host Unreachable
From 192.168.8.2 icmp_seq=2 Destination Host Unreachable
From 192.168.8.2 icmp_seq=3 Destination Host Unreachable
It was interesting that the GATEWAY= statement was in both network and ifcfg-eth0 in the post. Scowles stated that it should be removed from ifcfg-eth0, yet using the Redhat setup tool, the GATEWAY= statement is populated in the ifcfg-eth0 and not in the network file, even though in other distros it is found in the network file, as I've seen. When I read the post, I added GATEWAY=192.168.0.1 to the network file, but later, after a reboot or two, noticed that it is also in ifcfg-eth0, as it still is, put there previously by Redhat setup. Having it just in ifcfg-eth0 was fine and it seems that the system doesn't care if it is both files, as I'm communicating through the gateway now. Any comments, what is correct, since Redhat's setup (run from cli) puts it in the /etc/sysconfig/network-script/ifcfg-eth0???
Hey Ronin, what happened, is your network fixed??? I didn't see that final post you promised, did you give up?
Can you ping by IP addresses? If you can, and since you have a small number of hosts with fixed IP addresses, you can enter the hostnames and IP addresses in the /etc/hosts file on the FC5 box, and the C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS files on the windows boxes.
I got XP and win2000 connect to linux without those modification
As you are on the same subnet (192.168.0.x) you do not need to concern yourself with the gateway. When you want to route packets/requests outside your subnet you need this. So not an issue here.
So, I suggest that you flush your iptables. To do this (as root) execute the following:
root>/sbin/iptables -P OUTPUT DROP
root>/sbin/iptables -F OUTPUT
root>/sbin/iptables -P INPUT DROP
root>/sbin/iptables -F INPUT
root>/sbin/iptables -P FORWARD DROP
root>/sbin/iptables -F FORWARD
root>/sbin/iptables -F
root>/sbin/iptables -X
root>/sbin/iptables -t nat -F
This should remove ALL iptables rules which may interfere with your ICMP ping. Let me know what happens after you do this. BTW, if ping works after this, next we need to review your firewall rules.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.