LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Sharing broadband between WinXP and MDK 9.2 using Planet ADSL 4 port Modem Router (https://www.linuxquestions.org/questions/linux-networking-3/sharing-broadband-between-winxp-and-mdk-9-2-using-planet-adsl-4-port-modem-router-184449/)

cwchia 05-22-2004 07:36 AM

Sharing broadband between WinXP and MDK 9.2 using Planet ADSL 4 port Modem Router
 
Hi,

I've been using Linux for about 2 years, starting with Suse, Mandrake, Red Hat then tried FC1 and eventually settled down with MDK 9.2.

I have a laptop running primarily Win XP Home and dualbooting to FC1 which I only use for Gnucash. There is another PC in my office that is on MDK 9.2.

Both machines have built in ethernet card.

Just got a Planet ADE-4000 ADSL Modem Router and the Win XP laptop is happily surfing using it. I would like to:

a) let the MDK box use the adsl connection, irrespective of whether the XP laptop is connected or not to the router;

b) have print and file sharing on these 2 machines. I once have samba running and the connection between these 2 machines works just fine until I have mess it up somehow. Also there was a recent harddisk failure on the MDK, forcing me to reinstall MDK on a new harddisk and the setting are gone.

Some basic facts:-

Router ip 10.0.0.2

XP ip is 10.0.0.3 with subnet mask 255.0.0.0 and default gateway 10.0.0.2 and the network cable is plugged into the 1st LAN port of the Router. XP is happily surfing.

Tried to plug the MDK into the 2nd LAN port and set the mdk box's ip to 10.0.0.5 and gateway 10.0.0.2 and netmask 255.0.0.0 using the Network applet in the Mandrake Control Center. It is shown there that eth0 is up and running. When I ty to click on the Connect... button on that applet, after a few seconds, eth0 will be down and I have to reactivate it.

I have also tried to ping 10.0.0.2 (ie the router) and 10.0.0.3 (XP box) form MDK and are not reachable.

What goes wrong? Can someone give me some pointer please.

TIA.

spuzzzzzzz 05-22-2004 04:52 PM

Open up an xterm and log in as root. Now type
Code:

ifconfig
. You should see two devices, lo and eth0. There should NOT be a ppp0. If there is, remove it by typing
Code:

ifconfig ppp0 down
. Now type
Code:

route -n
to look at your routing table. It should have two entries:
Destination Gateway OtherStuff
10.0.0.0 0.0.0.0 blah
127.0.0.0 127.0.0.1 blah

If your table has extra rules, remove them with
Code:

route del <destination address>
Now try pinging your router and the WinXP box. Some firewalls silently drop pings, so it might not work.

Now you need to connect to the internet. Since the WinXP box has already logged in to your ISP, you don't want to connect the normal way. All you need to do is tell the kernel that your default internet gateway is the router:
Code:

route add default gw 10.0.0.2

webwiznz 05-22-2004 06:04 PM

Yes, the whole point of the ADSL Router is that it is a router as well as a modem, ie it handles both the routing (NAT) and the ppp login process. So the router pumps out pure tcp ethernet. Just set the gateway as above and youre away.

P

cwchia 05-23-2004 10:29 PM

Thanks spuzzzzzzz and webwiznz

Quote:

Originally posted by spuzzzzzzz
Open up an xterm and log in as root. Now type
Code:

ifconfig
. You should see two devices, lo and eth0. There should NOT be a ppp0. If there is, remove it by typing
Code:

ifconfig ppp0 down
.


Yes I only have eth0 and lo. Eth0 is 10.0.0.5 netmask 255.0.0.0 and lo is 127.0.0.1 netmask 255.0.0.0 Both devices are up and running.

Quote:

Now type
Code:

route -n
to look at your routing table. It should have two entries:
Destination Gateway OtherStuff
10.0.0.0 0.0.0.0 blah
127.0.0.0 127.0.0.1 blah

If your table has extra rules, remove them with
Code:

route del <destination address>

the output is:-

Kernel IP routing table
Destination_Gateway_Genmask____Flags__Metric___Ref___Use__Iface
10.0.0.0____0.0.0.0___255.0.0.0___U_____0_______0____0____eth0
127.0.0.0___0.0.0.0___255.0.0.0___U_____0_______0____0____lo
0.0.0.0_____10.0.0.2__0.0.0.0_____UG____0_______0____0____eth0

Few things noted:

a) the second routing destination has a different Gateway. You specify 127.0.0.1 but my routing table has 0.0.0.0. What to do?

b) as there is an 'alien' destination not specified by you, I try delete it by route del 0.0.0.0 and got an error message saying that there is no such process. After reading the man page, I then bravely give the command route to find out the symbolic host name then proceeded to route del default. Now the process is gone.

Quote:

Now try pinging your router and the WinXP box. Some firewalls silently drop pings, so it might not work.
Still cannot ping the modem router nor the XP box. Both ping returning 'Host Unreacheable'.

Quote:

Now you need to connect to the internet. Since the WinXP box has already logged in to your ISP, you don't want to connect the normal way. All you need to do is tell the kernel that your default internet gateway is the router:
Code:

route add default gw 10.0.0.2

After issuing the command, I realised that it adds the default route that I just deleted and the routing table returns to the old setting. It that correct?

Now I smell something fishy,... would it be a hardware/cable problem? Will try to switch cable and get back to you guys. Thanks

cwchia 05-23-2004 11:51 PM

Just in case these numbers are important
 
These are from the modem's status running under XP:

Route Table

Destination_______NetMask__________Gateway______Interface
0.0.0.0___________0.0.0.0___________#.#.#.147____ppp1
10.0.0.0__________255.0.0.0_________10.0.0.2______br0
127.0.0.1_________255.0.0.0_________127.0.0.1_____lo0
#.#.#.177________255.255.255.255___#.#.#.147____ppp1

#.#.#.# from my isp (dynamic ip), so I just ignore them, only to show the last group as there are diferrences.

Got hold of another network cable and plugged it into port #1 of the router and connect to the XP box. XP box working. Use the cable that was originally linking the XP box to the modem and connect the port #2 of router and link to MDK box.

Restart X, ping - same error.
Reboot MDK, ping - same error.:( :( :(

TIA

webwiznz 05-24-2004 12:29 AM

The route commands are only stick until reboot. The place to set the permanant defualt gateway on my machine is in

/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0

as wellas ip adresses hostnames bla bla bla etc

cwchia 05-24-2004 12:54 AM

Quote:

Originally posted by webwiznz
The route commands are only stick until reboot. The place to set the permanant defualt gateway on my machine is in

/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0

as wellas ip adresses hostnames bla bla bla etc

That is strange, I can see that the rout table was amended immediately after I deleted that default destination. Also I tried to restart X and also reboot then ping again, but to avail.

Bjorkli 05-24-2004 03:22 AM

I have a Billion 746 Modem router, and had similar problems, but I fixed it by trying different Linux distr. until one worked. After trying redhat 9, SuSE, United, Mandrake, I found out that only Redhat Fedora Core 1 worked with the router without having to configure anything. Could leave it as a last option if no one else can give you a better solution.

spuzzzzzzz 05-24-2004 05:23 PM

Quote:

After issuing the command, I realised that it adds the default route that I just deleted and the routing table returns to the old setting. It that correct?
Yes. The reason I asked you to delete any different rules was because you might have had unnecessary rules messing up your table. The 127.0.0.1 was a typo. 127.0.0.0 is correct.

Quote:

These are from the modem's status running under XP:
Does that mean that those stats are from the router or from the WinXP box's network card?

cwchia 05-25-2004 06:40 AM

These are the number gathered from my router by logging into the router at 10.0.0.2:

Route Table

Destination_______NetMask__________Gateway______Interface
0.0.0.0___________0.0.0.0___________#.#.#.147____ppp1
10.0.0.0__________255.0.0.0_________10.0.0.2______br0
127.0.0.1_________255.0.0.0_________127.0.0.1_____lo0
#.#.#.177________255.255.255.255___#.#.#.147____ppp1


Still no luck to ping the router nor the XP box from MDK. Same old error:-

PING 10.0.0.2 (10.0.0.2) 58(84) bytes of data
FROM 10.0.0.5 icomp_seq=1 Destination Host Unreachable
FROM 10.0.0.5 icomp_seq=1 Destination Host Unreachable
FROM 10.0.0.5 icomp_seq=1 Destination Host Unreachable
FROM 10.0.0.5 icomp_seq=1 Destination Host Unreachable
ping: sendmsg: Operation not permitted
FROM 10.0.0.5 icomp_seq=1 Destination Host Unreachable
ping: sendmsg: Operation not permitted
FROM 10.0.0.5 icomp_seq=1 Destination Host Unreachable
ping: sendmsg: Operation not permitted
FROM 10.0.0.5 icomp_seq=1 Destination Host Unreachable
.....<snip>


TIA

cwchia 05-27-2004 06:02 AM

After reading one of the thread in this forum, I decided to shut down my fire wall altogether (as I do not know how to selectively shut them down and yet not affecting my email, browsing, samba etc). The I ping from mdk (10.0.0.5) to the router (10.0.0.2) and XP box (10.0.0.3) and viola!. (Stupid me for not checking the firewall setting earlier).

To the kind souls out there, a few more questions:-

1. At the moment I'm disabling firewall on my MDK altogether, as I'm not sure which service shall I block and which port ect. I need to run samba, I need to surf, I need to do ftp to my website hosted by a hosting company... and the options available in the firewall applet under Mandrake Control Centre list just about those that I need. So if I were to restrict any of which (eg ftp) then I presume that my ftp client would not be able to access my web hosting server, right? But on the other hand if I were to allow it, am I also opening up my main door to the MDK box to anyone on the internet?

2. The router though can be ping from MDK but I just got a loooooooong wait trying to log in to it from any web browser within MDK by pointing to http://10.0.0.2/ and the page never get loaded nor am I asked to key in user name and password like it use to do when I point to the address from my XP box.

3. The web browser in MDK although can access web pages by key in the actual address in numeric form like 216.239.39.99 but never know what is www.google.com. So my little knowlede about name server tells me that it must one of the problem there, but frankly I do not know how to fix it.

TIA

Bjorkli 05-27-2004 06:40 AM

Try http://firestarter.sourceforge.net/download.php firestarter firewall. It is graphical (gnome, and probably KDE too), very easy to use. It will also notify you if a service or person is trying to use a closed port, so you can analyse and open if necessary.

cwchia 05-27-2004 11:01 PM

Thanks.


All times are GMT -5. The time now is 11:54 AM.