LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Internet connection via windows xp network (rj45 cable) on Linux (https://www.linuxquestions.org/questions/linux-networking-3/internet-connection-via-windows-xp-network-rj45-cable-on-linux-393134/)

itz2000 12-15-2005 08:34 AM

Internet connection via windows xp network (rj45 cable) on Linux
 
Well I've summed it all up in the subject.
I've used to had a dialer, but the ISP has blocked the option of connecting from same username in 2 computers (the modem has 2 connections).
Anyway, Now I have to use to connect via XP-network.
Well Infact, it was quite simple thing in (my comp xp) all I did was open firefox + detect network settings automatically and bang. internet is on.

How can I do the same at my linux?


Little graph so you can understand


comp1 :
Windows XP, Direct internet connection --> On.


comp2:
Windows XP, connected to comp1 via network and got its internet access. --> on.
Linux Fedora FC4 (Boot Loader) : --> How do I set up this internet connection via comp1?


Thanks alot guys.

nvargas 12-15-2005 09:01 AM

You need to route traffic using the Windows PC. Then you just configure your own network interface's route, something like this:

route add default gw xxx.xxx.xxx.xxx

The xxx are of course the Windows internal IP number.

itz2000 12-15-2005 09:31 AM

Quote:

Originally Posted by nvargas
You need to route traffic using the Windows PC. Then you just configure your own network interface's route, something like this:

route add default gw xxx.xxx.xxx.xxx

The xxx are of course the Windows internal IP number.

and after it, when I get a router, will I be able to cancel this?

Thanks.

nvargas 12-15-2005 09:56 AM

Of course, just use

route del default gw xxx.xxx.xxx.xxx

Also you can just modify the Windows PC LAN IP number and configure the router to the IP address defined previously as default gateway.

itz2000 12-17-2005 09:16 AM

Code:

Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.

C:\DOCUME~1\NIR>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

        Media State . . . . . . . . . . . : Media disconnected

Ethernet adapter Local Area Connection 2:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.0.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Ethernet adapter Local Area Connection 5:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 172.23.237.55
        Subnet Mask . . . . . . . . . . . : 255.255.224.0
        Default Gateway . . . . . . . . . : 172.23.224.1

PPP adapter 012:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 84.94.135.12
        Subnet Mask . . . . . . . . . . . : 255.255.255.255
        Default Gateway . . . . . . . . . : 84.94.135.12

C:\DOCUME~1\NIR>

I've done this

Code:

#root: route add default gw 192.168.0.1
but when I started firefox and changed in tools --> connections to detect automatically, it still didn't surf.


any advises?

thanks

nvargas 12-17-2005 09:26 AM

Please send your Linux ifconfig output

michaelk 12-17-2005 10:57 AM

I assume that you have comp1 configure for internet connection sharing. This automatically configures the ethernet adapter you specified for the LAN with an IP address of 192.168.0.1. I assume the ipconfig output you posted was from comp1.

Configure comp2 for DHCP and set the gateway IP address to 192.168.0.1.

itz2000 12-17-2005 11:21 AM

Quote:

Originally Posted by nvargas
Please send your Linux ifconfig output

ohhh myyy godddd


I've tryed those route stuff and then, when I switched cables to the direct connect to the internet cable via modem, it didn't want to connect

so I've done
ifdown eth1
ifup eth1

so far all good

done
cable-start

connected.

but couldn't surf somehow (none at all, not firefox problem but gaim didn't work aswell etc) although cable-status said that I'm connected.

I've done cable-stop

switched back cables
then tryed to add again the 192.168.0.1 as my gw (in route add) and it didn't work since "network is unreachable"
done ifdown eth1
then ifup eth1 and it couldn't resolv ip for it,
also after restart, I cannot set up the eth1 now... OH MY GOD


shall I format? :(

itz2000 12-17-2005 11:22 AM

Quote:

Originally Posted by michaelk

Configure comp2 for DHCP ,.,,,,

how can I do that?
:newbie:

itz2000 12-17-2005 11:33 AM

Quote:

Originally Posted by itz2000
ohhh myyy godddd


I've tryed those route stuff and then, when I switched cables to the direct connect to the internet cable via modem, it didn't want to connect

so I've done
ifdown eth1
ifup eth1

so far all good

done
cable-start

connected.

but couldn't surf somehow (none at all, not firefox problem but gaim didn't work aswell etc) although cable-status said that I'm connected.

I've done cable-stop

switched back cables
then tryed to add again the 192.168.0.1 as my gw (in route add) and it didn't work since "network is unreachable"
done ifdown eth1
then ifup eth1 and it couldn't resolv ip for it,
also after restart, I cannot set up the eth1 now... OH MY GOD


shall I format? :(

I can do ifup eth1 only when I'm directly connected to the modem.

but when I switch to the other computer, what shall I do?

blahh

michaelk 12-17-2005 11:58 AM

To setup your internet connection via GUI
From the main menu:
Applications > system controls > Network Device Control

Select configure and click on edit in the control panel. Select DHCP. Since the XP box is acting as a DHCP sever the gateway and DNS info will be automatically updated on the linux box.

And activate the device

itz2000 12-17-2005 12:24 PM

Quote:

Originally Posted by michaelk
To setup your internet connection via GUI
From the main menu:
Applications > system controls > Network Device Control

Select configure and click on edit in the control panel. Select DHCP. Since the XP box is acting as a DHCP sever the gateway and DNS info will be automatically updated on the linux box.

And activate the device

when u say

Quote:

And activate the device
do u mean ifup eth1?

ifso, shouldn't I do the route add default gw 192.168.0.1? would it work?

:newbie:


Thanks

michaelk 12-17-2005 12:35 PM

There is button in the GUI configuration box that will activate the eth1.
Since the ethernet adpater is configured for DHCP the gateway should automatically be configured.

This should be the easist method.

itz2000 12-18-2005 07:52 AM

Quote:

Originally Posted by michaelk
There is button in the GUI configuration box that will activate the eth1.
Since the ethernet adpater is configured for DHCP the gateway should automatically be configured.

This should be the easist method.

did it, but still no connection.

maybe cause i messed up my default gw :S


can\t connect directly aswell now cause he says "something is fishy with your route table"

michaelk 12-18-2005 09:33 AM

So what does your route table look like now? Post the output of the route command.


All times are GMT -5. The time now is 09:35 AM.