LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 11-18-2003, 01:39 PM   #16
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33

iainr

I set both network cards for DHCP. Then I typed "service network restart"

Here is my address according to ifconfig:

eth0: 192.168.1.103
eth1: 192.168.1.102

These are DHCP addresses, because the DHCP server gives out addresses in the range 192.168.1.100 to 192.168.1.199

I ping each of those addresses from Windows ME:

Code:
Pinging 192.168.1.102 with 32 bytes of data:

Reply from 192.168.1.102: Destination port unreachable.
Reply from 192.168.1.102: Destination port unreachable.
Reply from 192.168.1.102: Destination port unreachable.
Reply from 192.168.1.102: Destination port unreachable.

Ping statistics for 192.168.1.102: 
Packets: sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip time in milliseconds:
Minimum = 0 ms, Maximum = 0 ms, Average = 0 ms
If I ping the router from the server:

Code:
[root@localhost] # ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) from 192.168.1.103 : 56(84) bytes of data.

--- 192.168.1.1 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
[root@localhost] #
Same if I ping the windows ME computer.

DANG, how am I getting an IP address then!!!
 
Old 11-18-2003, 01:48 PM   #17
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33
Here are the contents of those files I see other people asking for:

cat /etc/sysconfig/network
NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=localhost.localdomain

DOMAINNAME=localdomain

# Gateway configuration
GATEWAYDEV=eth1
GATEWAY=

cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp

cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp
 
Old 11-18-2003, 03:26 PM   #18
iainr
Member
 
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631

Rep: Reputation: 30
Have you tried rebooting the box? That will reload the kernel and, since everything looks OK but still doesn't work, that is definitely something worth trying at this stage.
 
Old 11-18-2003, 10:02 PM   #19
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33
Hi iainr,

The server is always switched off when I'm not using it, because it's very noisy and I work in a cubicle. So it's been rebooted several times.

Could ICMP be disabled somehow? How can I test to see if other protocols are working? I can get an IP after all...
 
Old 11-19-2003, 01:42 AM   #20
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Quote:
Could ICMP be disabled somehow? How can I test to see if other protocols are working? I can get an IP after all...
Yes ICMP could be turned off. There is a file in /proc/net I think you do a echo "1">/proc/net/somefile but I cant find it on my system right now. I'll look some more.
 
Old 11-19-2003, 01:58 AM   #21
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
cat /proc/sys/net/ipv4/icmp_echo_ignore_all
0

If you get a 1 then you will ignore all icmp pings. So you should do this:
echo "0" >/proc/sys/net/ipv4/icmp_echo_ignore_all
 
Old 11-19-2003, 08:59 AM   #22
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33
/bin/bash

I appreciate all your help! please don't give up

I already modified this file (previous page)... it gave me the ability to ping 127.0.0.1 and my own IP. Before that i couldn't even ping myself, but now I can.

Still can't ping anyone else though. What puzzles me is how can I get an IP address from the router but not be able to ping it? And I can not access the Linux server from Windows using https:?
 
Old 11-19-2003, 09:36 AM   #23
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33
Could it be related to iptables? it could be rejecting all outgoing and incoming traffic? what can I type to find out?
 
Old 11-19-2003, 04:07 PM   #24
DaveG
Member
 
Registered: Nov 2001
Location: London, UK
Distribution: Fedora
Posts: 161

Rep: Reputation: 43
I'd suggest job #1 is to disable the NIC you intend to use for the ADSL modem, and get the Linux box working as an ordinary network client. Something like "ifconfig eth1 down". That should also kill any forwarding for now. To eliminate all possible confusion you could go as far as removing the card from the server.

Only after the Linix machine can play ball with the XP boxes, without sulking, would it be safe to use it as a firewall/router.

The job it will need to do is to convince all the XP machines that IT is an ADSL modem/router. That means it must provide the same services: DHCP and routing/NAT.

It is difficult tracking down problems on a live network, so always try to isolate and identify each problem. Make things a simple as possible. I see the second NIC as a continual source of uncertainty, so I'd suggest removing it until it's needed.
 
Old 11-19-2003, 07:29 PM   #25
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Sorry for not paying attention. I have read this whole thread but I have read several more just like it and I sometimes forget the specifics of what has and hasn't been done.

You could try tcpdump. Here is what it might look like if you sent one ping out to your router on eth0:

# tcpdump -i eth0
tcpdump: listening on eth0
20:11:27.276087 arp who-has jimmyneutron tell spongebob
20:11:27.276509 arp reply jimmyneutron is-at 0:65:5:df:f4:5e
20:11:27.276533 spongebob > jimmyneutron: icmp: echo request (DF)
20:11:27.277193 jimmyneutron > spongebob: icmp: echo reply



Quote:
1. Here is how my network is currently set up. I have 20 Windows XP Professional workstations. Currently, they are cabled into a 3Com hub in a shared server room. The hub is connected to the DSL modem which also acts as a router AND a DHCP server for 192.168.1.1XX. Most of my XP computers are set up to use DHCP from the router.
Is this still how the routing table looks because if so then your default route is wrong.
Code:
[root@localhost ]# netstat -r
Kernel IP routing table
Destination --- Gateway --- Genmask --------Flags - MSS window - irtt - Iface
192.168.2.0 -- * -------------255.255.255.0 -- U -----40 0--------------0 - -eth1
192.168.1.0 -- * -------------255.255.255.0 --U ----- 40 0 -------------0 - -eth0
127.0.0.0 ----- * -------------255.0.0.0 ---------U ----- 40 0 -------------0 - - lo
default -------- 192.168.2.1 - 0.0.0.0 ---------- UG ---40 0 -------------0 - - eth1
You have eth1 -> 192.168.2.1 = default gateway and I think it should be eth0. You could try changing GATEWAYDEV=eth1 to eth0 in /etc/sysconfig/network .
 
Old 11-20-2003, 10:16 AM   #26
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33
OK here's what I did:

- netconfig -d eth1 ip=192.168.1.99 (was 192.168.1.2)
- service network restart
- ifconfig eth0 down
- ifconfig:
eth1: Link encap:Ethernet HWaddr: 00:09:6B:63:15:4F
----- inet addr: 192.168.1.66 Bcast: 192.168.1.255 Mask: 255.255.255.0
----- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
----- RX packets:1 errors:0 dropped:0 overruns:0 frame:0
----- TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
----- collisions:0 txqueuelen:100
----- RX bytes:64 (64.0 b) TX bytes:64 (64.0 b)
----- Interrupt:25 Memory:fbfe0000-fbff0000

lo: Link encap: Local loopback
----- inet addr:127.0.0.1 Mask:255.255.255.0
(etc)

- ping -I eth1 192.168.1.1
PING 192.168.1.1 (192.168.1.1) from 192.168.1.66 eth1: 56(84) bytes of data.
(pause) CTRL+C
--- 192.168.1.1 ping statistics ---
8 packets transmitted, 0 packets received, 100% packet loss

- tcpdump -i eth1
tcpdump: listening on eth1
10:50:53.813121 arp who-has 192.168.1.2 (1:71:0:50:4:e0) tell 192.168.1.1
10:50:53.818516 arp who-has 192.168.1.2 (1:71:0:50:4:e0) tell 192.168.1.1
10:50:54.013607 arp who-has 192.168.1.2 (1:71:0:50:4:e0) tell 192.168.1.1
10:50:55.209587 arp who-has 192.168.1.2 (1:71:0:50:4:e0) tell 192.168.1.1
10:50:55.220135 arp who-has 192.168.1.2 (1:77:0:35:4:15) tell 192.168.1.1
10:50:55.308127 arp who-has 192.168.1.2 (24:fa:4:e0:0:50) tell 192.168.1.1
10:50:56.536855 arp who-has 192.168.1.2 (1:71:0:50:4:e0) tell 192.168.1.1
10:50:56.550740 arp who-has 192.168.1.2 (1:71:0:50:4:e0) tell 192.168.1.1
10:50:57.748643 arp who-has 192.168.1.2 (b1:7c:4:e4:0:50) tell 192.168.1.1
(later)
>>> NBT UDP PACKET (137): QUERY; POSITIVE; RESPONSE; UNICAST
11:04:47.937319 192.168.1.122.netbios-dgm > 192.168.1.209.netbios.dgm:
>>> NBT UDP PACKET (138) Res=0x1002 ID-0x99 IP=192 (0xc0).168 (0xa8).1 (0x1).122 (0x7a) Port=138 (0x8a) Length=171 (0xab) Res2=0x0
SOURCE NAME=IBMFB1L0DH Name Type=0x20 (Server)
DestName=
WARNING: Short packet. Try increasing the snap length
etc.... CTRL+C

17 packets received by filter
0 packets dropped by kernel

- route -n
Kernel IP routing table
Destination -- Gateway -- Genmask ------- Flags Metric Ref Iface
192.168.1.0 - 0.0.0.0 ---- 255.255.255.0 - - U - - 0 - - - 0 - eth1
127.0.0.1 ---- 0.0.0.0 ---- 255.0.0.0 - - - - - -U - - -0 - - - 0 - -lo
0.0.0.0 ----- 192.168.1.1 - 0.0.0.0 - - - - - - -UG - -0 - - - 0 - eth1

(note, the routing table changes every time I change my IP addresses or what not. But I've never been able to get a gateway entry for eth0)
 
Old 11-20-2003, 10:23 AM   #27
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33
Additionally

(found this command in another thread) nmap -sP 192.168.1.0/24
says "Host (192.168.1.XXX) appears to be up"

Nmap run completed -- 256 IP addresses (20 hosts up) scanned in 6 seconds

AND, I have both shorewall and what seems to be a huge iptables file. Could these be interfereing with my connectivity somehow? How can I disable/test this?
 
Old 11-20-2003, 10:56 AM   #28
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33
Interesting

I tried running a tcpdump, and then while it was listening, to ping the Linux box from Windows ME.

Here's the result:

11:45:44.757229 arp who-has 192.168.1.66 tell 192.168.1.122
11:45:44.757247 arp reply 192.168.1.66 is-at 0:9:6b:63:15:4f
11:45:44.757496 192.168.1.122 > 192.168.1.66: icmp: echo request
11:45:44.757744 192.168.1.66 > 192.168.1.122: icmp: 192.168.1.66 protocol 1 port 16220 unreachable (DF) [tos 0xc0]
11:45:45.762476 192.168.1.122 > 192.168.1.66: icmp: echo request
11:45:45.762525 192.168.1.66 > 192.168.1.122: icmp: 192.168.1.66 protocol 1 port 15964 unreachable (DF) [tos 0xc0]
11:45:46.757343 192.168.1.122 > 192.168.1.66: icmp: echo request
11:45:46.757392 192.168.1.66 > 192.168.1.122: icmp: 192.168.1.66 protocol 1 port 15708 unreachable (DF) [tos 0xc0]
11:45:47.762253 192.168.1.122 > 192.168.1.66: icmp: echo request
11:45:47.762297 192.168.1.66 > 192.168.1.122: icmp: 192.168.1.66 protocol 1 port 15452 unreachable (DF) [tos 0xc0]
11:45:48.867112 192.168.1.122.1580 > 216.239.57.104.http: R 1945308827:1945308827(0) win 0 (DF)
11:45:49.755858 arp who-has 192.168.1.122 tell 192.168.1.66
11:45:49.756143 arp reply 192.168.1.122 is-at 0:50:ba:45:2c:5b

21 packets received by filter
0 packets dropped by kernel
 
Old 11-20-2003, 03:17 PM   #29
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33
OK well i solved the mystery.

I had to disable shorewall:

[root@localhost ]# shorewall stop

enable icmp

[root@localhost ]# echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all

and delete, remove executable, and flush IP tables (after backing up onto floppy of course

[root@localhost ]# cd /etc/rc.d/init.d
[root@localhost ]# rm iptables
[root@localhost ]# chmod -x iptables // yes it makes another one
[root@localhost ]# iptables -F (get rid of all the default rulse
[root@localhost ]# iptables -P INPUT ACCEPT
[root@localhost ]# iptables -P OUTPUT ACCEPT
[root@localhost ]# iptables -P FORWARD ACCEPT

finally!!!

[root@localhost ]# ping 192.168.1.1
PING 192.168.1.1 from 192.168.1.66 : 56(84) bytes of data
64 bytes from 192.168.1.1: icmp_seq=0 ttl=128 time=726 usec
64 bytes from 192.168.1.1: icmp_seq=1 ttl=128 time=403 usec
64 bytes from 192.168.1.1: icmp_seq=2 ttl=128 time=402 usec

--- 192.168.1.1 ping statistics
3 packets transmitted, 3 packets received, 0% packet loss

*YAY*

Of course, i now have no firewall and no protection. But at least i can function better. Yeesh.
 
Old 11-21-2003, 05:12 AM   #30
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
[root@localhost ]# cd /etc/rc.d/init.d
[root@localhost ]# rm iptables
[root@localhost ]# chmod -x iptables // yes it makes another one
[root@localhost ]# iptables -F (get rid of all the default rulse
[root@localhost ]# iptables -P INPUT ACCEPT
[root@localhost ]# iptables -P OUTPUT ACCEPT
[root@localhost ]# iptables -P FORWARD ACCEPT

You could replace all that with this:
service iptables stop
/sbin/chkconfig --level 12345 iptables off


Quote:
post #2
Posted by DaveG
Check to see if your firewall is blocking your outgoing or incoming ICMP echo requests and replies.
 
  


Reply



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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
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
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 09:10 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM
DHCP and missing PING echoking Slackware 6 09-03-2003 04:57 PM

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

All times are GMT -5. The time now is 05:34 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