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 03-24-2003, 11:48 PM   #1
anil_von
LQ Newbie
 
Registered: Mar 2003
Posts: 10

Rep: Reputation: 0
internet connection


hi

I have 2 systems one with win-xp and the other with redhat 8.0
i have a cable modem and a router my isp doesnt support for linux
so how do i connect to internet through linux machine.

thank you
 
Old 03-25-2003, 12:11 AM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Does your router have mutiple ethernet ports (a hub) or just a single ethernet connection? If you have a hub you can just plug in both your boxes and setup dhcp like this: http://www.linuxquestions.org/questi...threadid=51554

If it only has one port you have 2 options:
A) Go buy a multiport ethernet router($60-80 USD) Linksys BEFSR41, etc
B) Setup some type of internet sharing

Option B is a little bit trickier, but definitely feasible:
Step 1)
Set the linux box up hardware-wise. You'll have to buy a second ethernet card for the linux box and a crossover-cable (not normal patch cable!) to have an internal LAN for the XP machine.

Step 2) Configure the linux box to do ip masquerading using iptables
There are a couple of how-tos to set this up at:
http://www.netfilter.org
http://www.tldp.org

Step 3) Configure the winXP machine to use a static internal network ip address (192.168.XXX.XXX or 10.10.XXX.XXX)

Step 4) Sit back, drink beer and enjoy the magic that is IP-masquerading.
 
Old 03-25-2003, 06:09 AM   #3
anil_von
LQ Newbie
 
Registered: Mar 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Hi

my router is a four port one
 
Old 03-25-2003, 08:50 AM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Alot of times ISPs will tell you that they don't support linux, but usually linux works just fine anyway. If your multi-port router can do dhcp, it's a snap to setup. Just plug in both boxes and configure them to use dhcp to get their ip adresses from the router. Redhat has a network configuration tool (start button->system settings->network). Just select the external interface (usually eth0), click edit, there will be a line that says " automatically obtain ip address settings with". Click the button in front of that line and select dhcp from the drop down menu. Make sure activate device on startup is selected as well. Click ok. You probably will need to reboot.
HTH
 
Old 03-25-2003, 12:32 PM   #5
anil_von
LQ Newbie
 
Registered: Mar 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Hi
I did that but it isnt working.
actually the sys with redhat has dual boot one win2K and redhat 8.0
the other sys is only win-xp
when i ping the redhat sys from xp its successful but the other isnt.
I hope you understood my problem.
Thank you
 
Old 03-25-2003, 01:43 PM   #6
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
So your XP machine is doing dhcp properly, right? First use network tool again and see if Redhat is getting an ip from the router properly. Compare it to the ip of the XP machine. If your router is doing dhcp properly, they should be similar (like 192.168.0.2 and 192.168.0.3).

Try turning off iptables using: service iptables stop and try pinging again
Also make sure you don't have ipchains on as well: chkconfig ipchains off

What brand of router is it? Are you pinging with the ip or hostname of the XP box? If you boot up the Windows partition on the RH8/Windows dual boot, can you ping then? What's the output the ifconfig comand on the Redhat box?
 
Old 03-25-2003, 02:26 PM   #7
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
It just clicked! Sounds like the old "no gateway/dns" problem. Check the gateway ip address and the dns server address that the working XP machine is configured to use. These should be correct because it is routing stuff properly (ie ping works for the XP box). Double check these with the settings in RH8. It's probably just got one of these misconfigured (ie ping can't resolve/route properly on RH box).
 
Old 03-25-2003, 02:35 PM   #8
anil_von
LQ Newbie
 
Registered: Mar 2003
Posts: 10

Original Poster
Rep: Reputation: 0
C:\>ping 192.168.254.3

Pinging 192.168.254.3 with 32 bytes of data:

Reply from 192.168.254.3: bytes=32 time<1ms TTL=64
Reply from 192.168.254.3: bytes=32 time<1ms TTL=64
Reply from 192.168.254.3: bytes=32 time<1ms TTL=64
Reply from 192.168.254.3: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.254.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
this is when i ping from xp to RH
 
Old 03-25-2003, 02:43 PM   #9
anil_von
LQ Newbie
 
Registered: Mar 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Hi
when i ping from win2K (ie dual boot with RH )to win-xp it works fine.but when i ping from Rh to win-xp it stays calm for some time and says failed.
The router i have is SIEMENS 4-port DSL/cable Router speed stream
 
Old 03-25-2003, 02:55 PM   #10
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Good, so the network hardware or topology isn't the problem. Check on the gateway and dns settings using the RH network tool, they should be the same as the settings in the WinXP box.
 
Old 03-25-2003, 02:57 PM   #11
anil_von
LQ Newbie
 
Registered: Mar 2003
Posts: 10

Original Poster
Rep: Reputation: 0
hi
do i need to give any dns settings
 
Old 03-25-2003, 03:07 PM   #12
anil_von
LQ Newbie
 
Registered: Mar 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Hi

Thanks a lot i havent entered dns settings once i did that it worked
once again thank you
 
Old 03-25-2003, 03:10 PM   #13
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
If dhcp is setup properly on the RH box, then no it will grab them from the router. But they should be the same as the Win2k machine otherwise something ain't workin' like it's supposed to.
 
  


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
Slow Internet Connection when Connecting to Internet on Browsers lennysokol Linux - Networking 8 04-09-2011 04:29 PM
Nic card -> cable internet modem no internet connection zeshan_b Mandriva 21 09-26-2004 11:48 AM
Messed up my internet settings (NO internet connection) :( Almazick Linux - Networking 2 09-08-2004 12:05 PM
My internet apps cannot detect my internet connection esthon_wood Mandriva 5 08-30-2004 08:38 PM
i can get internet connection in windows but in LINUX there is no connection ruzvay Linux - Networking 2 06-08-2004 07:02 PM

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

All times are GMT -5. The time now is 03:04 PM.

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