LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-09-2003, 03:15 PM   #1
thepez
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Rep: Reputation: 0
Linux router -Mac connects -WinPC doesnt


I just built a linux router (gateway?) it is using IP MASQ to allow my network to use one cable modem connection. It also hosts my webserver and firewall.
My roommates Mac (most current OS) connects thru to the internet no problem. Both a Win XP sp1 and Win98SE machine can NOT ping the router. (The WinXP machine was just to test and doesnt need to be connected.)
I tried switching the Win machine to ethernet card the Mac is on and restarting everything and it still didn't help. If I reset the Win98se machine to dhcp I can connect directly to the internet thru the cable modem.

Here's my linux info (all linux ethernet cards are linksys lne100tx 5.1):
Eth0=cable modem (DHCP)
Eth1=Mac (192.168.0.1)
Eth2=Win98SE (192.168.1.1)

***ifconfig:
eth0 Link encap:Ethernet HWaddr 00:04:5A:8D:[xx:xx]
inet addr:24.169.228.[xx] Bcast:255.255.255.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:281537 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:2683 dropped:0 overruns:0 carrier:5355
collisions:0 txqueuelen:100
RX bytes:18828907 (17.9 Mb) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x5000

eth1 Link encap:Ethernet HWaddr 00:06:25:07:[xx:xx]
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2399 errors:0 dropped:0 overruns:0 frame:0
TX packets:2503 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:337299 (329.3 Kb) TX bytes:2015178 (1.9 Mb)
Interrupt:10 Base address:0x9000

eth2 Link encap:Ethernet HWaddr 00:0C:41:26:[xx:xx]
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:4 dropped:0 overruns:0 carrier:8
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0x9000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:700 (700.0 b) TX bytes:700 (700.0 b)

***Route -n: (why is there 2 eth2s? 169.254.0.0 anywhere)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
24.169.228.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 24.169.228.1 0.0.0.0 UG 0 0 0 eth0

***iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
LOG all -- anywhere anywhere LOG level warning

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Lokkit-0-50-INPUT (0 references)
target prot opt source destination
ACCEPT udp -- clmboh1-dns5.columbus.rr.com anywhere udp spt:domain dpts:1025:65535
ACCEPT udp -- dtw-dns-amp-02.twmi.rr.com anywhere udp spt:domain dpts:1025:65535
ACCEPT udp -- dtw-dns-amp-01.twmi.rr.com anywhere udp spt:domain dpts:1025:65535
ACCEPT tcp -- anywhere anywhere tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:nfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:0:1023 reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:nfs reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpts:x11:6009 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:xfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable

***WIN98SE machine
route print:
Network Address Netmask Gateway Address Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.2 all are 1s
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1
192.168.1.0 255.255.255.0 192.168.1.2 192.18.1.2
192.168.1.2 255.255.255.255 127.0.0.1 127.0.0.1
192.168.1.255 255.255.255.255 192.168.1.2 192.168.1.2
224.0.0.0 224.0.0.0 192.168.1.2 192.168.1.2
255.255.255.255 255.255.255.255 192.168.1.2 192.168.1.2

***ipconfig /all:
host name: H7C6[XX]
DNS Servers:
Node Type: Broadcast
NetBIOS Scope ID:
IP Routing Enabled: No
WINS Proxy Enabled: No
NetBIOS Resolution Uses DNS: No

0 Ethernet Adapter:
Description: 3Com Etherlink PCI
Physical Address: 00-01-02-68-[XX-XX]
DHCP Enabled: No
IP Address: 192.168.1.2
Subnet mask: 255.255.255.0
Default Gateway: 192.168.1.1
Primary Wins:
2ndary Wins:
lease obtained:
lease expires:


I figure it has to be my win98se setup since the mac connects but I just don't know... PLEASE HELP!
 
Old 09-09-2003, 05:56 PM   #2
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
Tell me if I read you right.

The subnet mask for a private network is "255.255.255.0". You then have a maximum of 252 actual IP addresses available to you. The 192.168.123.0-255 with 0,1 and 255 reserved for each subset of numbers.

The third set of digits (123) really can be 2-254 as long as they are consistent. The ONLY ADDRESSES YOU ASSIGN in an individual private subnet domain are the ones in the last set of digits (192.168.consistent number.assign these). The number 1 is generally assigned to the root of the domain or unused.

The 192.168.xxx.2-to-254 numbers were reserved for personal use. Any change to the third set of numbers (the xxx) indicates a different domain (A different sub-network). This means another gateway or network bridge (router).
 
Old 09-10-2003, 12:15 AM   #3
thepez
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Original Poster
Rep: Reputation: 0
yes I had two different internal third level domains 192.168.0.x and 192.168.1.x.
I changed it so now I have eth1 = 192.168.0.3 (connecting mac is 192.168.0.4) and eth2 = 192.168.0.5 (connecting win98se is 192.168.0.6)
As always Mac connects fine after reboot and PC doesn't ping and hell the link lights dont light up on either eth2 or win98se machine.
 
Old 09-10-2003, 12:32 AM   #4
65_289
Member
 
Registered: May 2002
Distribution: Ubuntu 5.04, Kanotix
Posts: 163

Rep: Reputation: 30
Is the cable to the win box good?
 
Old 09-10-2003, 05:42 AM   #5
WhiteChedda
Member
 
Registered: Aug 2003
Location: Florida
Distribution: Mandrake 9.1 for now
Posts: 205

Rep: Reputation: 30
Looking through the win98 config, it seems that it thinks its the gateway, this is not the case, your Linux box is the gateway. If someone manaully configured that, they need to fix it. If DHCP is doing that, then there is a problem there.

If you are not using DHCP on the linux box, I suggest setting it up as a DHCP server that's gonna be the easiest method.
 
Old 09-11-2003, 12:30 PM   #6
thepez
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Original Poster
Rep: Reputation: 0
A) cable is good. I tested it and used other working cables in its place.
B) If win98 thinks its the gateway how do I change that?
C) failing that i would use DHCP. Problem is... Im a newbie. I have redhat 9.0 text only (no gui) all the faqs and doco I have found talk about adding new packages with the gui interface. I didnt install DHCP. How do install new packages from the install disk for redhat 9.0 text interface? I tried upgrading and it didnt work. did I do something wrong or is it only for updating current packages?
 
Old 09-11-2003, 05:35 PM   #7
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
I hate to tell you this, but before you go any further, check your Win98 NIC. I never had a NIC go bad--until two weeks ago. I had been messing around with the network and figured I screwed up settings somewhere. 20>hours later, I tried a different NIC. If there is power to it and a cable connected, the led should be on--even if the settings are hosed.

Just remember to put the entries in all of the computer's "hosts" files.

Yes, windows has a hosts file C:\WINDOWS\Hosts.sam

Copy that and call it Hosts.txt Read the stuff in there to be sure of what you are doing. After editing, rename it Hosts without an extension. You probably want to do this before setting a GateWay address in entries below.

Start->settings->network->Tcp-IP->Properties->

->IPAddress gives you a button to select a static IP and a place to enter it. We already covered the Mask.

->GateWay put in the IP Address and hit the add button.

The easiest way to configure a SOHO, or home network is to use all static addresses.

Later on, when you get good at this, you can teach me how to write all of the scripts to use dhcp.


Last edited by Eqwatz; 09-11-2003 at 06:05 PM.
 
Old 09-11-2003, 06:12 PM   #8
Modorf
LQ Newbie
 
Registered: Jul 2003
Location: Brooklyn, NY
Distribution: Slackware
Posts: 25

Rep: Reputation: 15
cross over cable??

might help to post the complete set of settings / specs of the Apple (thinking that the Apple has NIC with built in cross over sensing).
Thinking that might lead some where.

Are you connecting the computers directly to eachother? No hubs / switches?


/---------Windows
Linux
\ --------Mac


Other hypothis: thinking there is something wierd happening with the IPMasq / NAT happening. Didn't look carefully at the config files, but thinking that eth2 isn't forwarding properly to eth0.

You talked about hooking win box to eth1 and still having trouble. Thinking that you will need a cross over cable.

Last edited by Modorf; 09-11-2003 at 06:15 PM.
 
Old 09-11-2003, 06:44 PM   #9
thepez
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Original Poster
Rep: Reputation: 0
NIC is good. I can connect to the internet if I go driectly to the modem.
Btw no need to rename Shift-Right click and then choose "Open With" and select notepad. that should save you some time in the future. Make sure to unclick "Always open using this application" (I dont think anything bad could happen but better safe thann sorry!).
I already trying with a static IP to connect to a gateway (which has been added.)
I don't know what to put in the host file though. I think that file is just a space for numeric ip address and their associated name.
And I dont think it has anything to do with not being able to ping.
 
Old 09-11-2003, 06:46 PM   #10
thepez
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Original Poster
Rep: Reputation: 0
No hub.

Internet
||
Cable modem
||
(Eth0)
Linux box (eth2)-> Win98se
(eth1)
||
Mac

I am not using a crossover cable normally I would use one for a direct link between 2 win machines without a hub but for some reason it seems like not the right thing to do. Anyway I have my own cable cripper and tester and spare cable so what the heck I'll give it a try!

Last edited by thepez; 09-12-2003 at 11:01 AM.
 
Old 09-12-2003, 09:13 AM   #11
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
You need X-over cable-otherwise the LED on the 98se NIC would be lit.

You are in over my head. Does this mean you have two NICS in the win98se box+ 2 NICS in the Linux box? Instead of the Linux box containing all of the X-tra NICS?

The layout you show above would be to set-up internet connection shariing/network_bridge between the Mac and windows98se. With Linux the default_gateway for 98se, and 98se the default_gateway for the Mac.

(I don't know how to set up win98se to run two NICs either, I've never done that.)

Then the win98se would end-up doing NAT for the Mac box, and the linux box would be doing NAT for the Win98se box.

Different animal altogether. Different set-up.

Or, if you have run out of PCI slots in the linux box, get a cheap network SWITCH (not a router). An ethernet switch just makes it possible to run all of the cables together--it still requires a host for the network--which would be your linux box. Then the whole thing becomes alot easier. E-switches are roughly the cost of 3 pci ethernet cards. The linux would still require two NICs.

[Unless you set-up multi-homing, which makes virtual second NIC which would host the network and the eth0 which would connect through the same Switch through the cable modem--again something I haven't done. Not really an issue because you would have an extra NIC left over--not a bad thing, an extra NIC.]

[I wish I was as clever as Modorf. I couldn't figure out how to make a diagram which made sense with the white-space stripped out of it.][ O-o-o-o. The second one is better, I LIKE that. Hopefully I'll remember it.]

Last edited by Eqwatz; 09-12-2003 at 09:50 AM.
 
Old 09-12-2003, 09:30 AM   #12
Modorf
LQ Newbie
 
Registered: Jul 2003
Location: Brooklyn, NY
Distribution: Slackware
Posts: 25

Rep: Reputation: 15
Quote:
Originally posted by Eqwatz

[I wish I was as clever as Modorf. I couldn't figure out how to make a diagram which made sense with the white-space stripped out of it.]
Better diagram explaining the network setup

cable modem
||
||
eth0
Linux box
eth1 .... eth2
|| ............. ||
|| ............. ||
Mac .... Win

thepez
Is this correct?
Which Mac does your roomate have, full model specs, (ie iMac 17" G4, 800, with superdrive). As I mentioned before I think newer Apple computers have built in auto cable sensing port. which acts like a built in cross over cable. you need a cross over cable between the windows machine and windows box. Random thought, if you have a spare hub / switch laying around, try plugging that between your linux box and windows box and see if you have a connection. If that works, then you know that you need a cross over cable.

Last edited by Modorf; 09-12-2003 at 09:32 AM.
 
Old 09-12-2003, 11:21 AM   #13
thepez
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Correct the linux box has all the extra ethernet cards. Mac and Win have 1 each. The diagram made sense when I made it but it stripped the white space out. I re-edited to eliminate confusion.

I made a crossover cable but I think I have messed with the settings so much its not working (I have been trying to set-up a DHCP server) I have backups of the original files on CD so I'll change them back and let you know how it works.

Oh yeah my roommate moved out today so the Mac is no longer on the network. but I felt it was important to know that it worked fine (at least I know it works....)

So my network is now

cable modem
||
(eth0)
Linux (eth1) -> Win98SE
(eth2)
||
Whats in the Box?
Nothing. ABSOLUTELY NOTHING.

Anyway gotta go stand in the unemployment line...
 
  


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
WPC54G Connects to the router but not the net worldgnat Linux - Wireless Networking 7 07-11-2005 09:10 PM
intermittent failure winPC connect internet thru ipmasq linux gateway takahaya Linux - Networking 0 05-13-2005 06:35 PM
Connects to router, but no internet Lee_B_H Linux - Wireless Networking 4 01-08-2005 08:54 PM
linux router must grant internet acces based on MAC adresses YNets269 Linux - Networking 6 07-15-2004 05:56 AM
weird...wireless connects to router but not internet apu95 Linux - Wireless Networking 4 04-24-2004 10:24 PM


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