[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sharing the internet connection with XP



On 7/27/05, Björn Johansson <bjorn.johansson@4a-consulting.com> wrote:
> At 13:57 2005-07-27, you wrote:
> >On 7/27/05, Björn Johansson <bjorn.johansson@4a-consulting.com> wrote:
> > > At 00:03 2005-07-27, you wrote:
> > > >On 7/26/05, Björn Johansson <bjorn.johansson@4a-consulting.com> wrote:
> > > > >
> > > > > I can't afford to buy a router right now,
> > so that's out of the question.
> > > > > I have made progress! Now I can transfer files
> > > > > through ftp from the pc to mac at the
> > > > > same time as the pc has access to the internet.
> > > > >
> > > > > To make the mac share the internet through
> > > > the pc, to make that work, people
> > > > > have told me that I should use the pc as
> > a gateway. So perhaps I need to
> > > > > create an static ip for gateway on the pc and
> > > > then I tell the mac to use that
> > > > > gateway address in the network.
> > > > >
> > > >
> > > >What IP does the network card in the PC have now?
> > > >
> > > > From your previous mail I see that the Mac is on 192.168.0.246 with
> > > >netmask 255.255.255.0. Since you can already "talk" to the PC, that
> > > >means the PC's card is on 192.168.0.???. That is the IP you want to
> > > >set as the gateway on your Mac! To test this, use "route":
> > > >
> > > >route add default gw 192.168.0.??? dev eth0
> > > >
> > > >Now you should be able to reach the Internet... try:
> > > >
> > > >ping 194.109.137.218
> > > >
> > > >which is www.debian.org.
> > > >
> > > >If it doesn't work, check the connection sharing options in Windows XP.
> > > >
> > > >Once this basic connection works, you can set it all up proper in
> > > >/etc/network/interfaces.
> > > >
> > > >cheers,
> > > >Christian
> > >
> > > Since I can ftp both ways. Right now I know
> > that I can't access the pc through
> > > the mac because I don't have an ftp server
> > running on the pc, but that's easy
> > > to fix, so I assume this is working also. Ftp
> > from the pc to the mac, there I
> > > am 100% sure it works!
> > >
> >
> >This is good, it means that your local network is configured right.
> >Now "all" that
> >is left to do is to set up propper routing...
> >
> > > Do I haveto install a special program or something so that the WindowsXP
> > > system can allow the mac to use the PC modem to access the internet? :-/
> > >
> >
> >Technically, you don't want to allow the Mac to use the PC modem, you want
> >your Mac to use the PC as a router. The Mac
> >doesn't care at all about the modem.
> >
> >This functionality is included in Windows XP. I can't tell you exactly
> >how to set it up since I don't have Windows here, but I remember it
> >was easy to find and use. Just look around some more... I'll see my
> >brother next Tuesday, if it is still an issue then i'll check his
> >computer to see how exactly it was done...
> >
> >cheers,
> >Christian
> 
> The route command:
> 
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
> default         jupiter2.mshome 0.0.0.0         UG    0      0        0 eth0
> 

Looks good.

> 
> # The loopback network interface
> auto lo
> iface lo inet loopback
> 
> iface NIL inet static
> name Ethernet LAN card
> address 192.168.0.2
> netmask 255.255.255.0
> broadcast 172.20.255.255
> network 172.20.0.0
> 
> auto NIL
> 

Hmm, where is eth0? Where is it configured to 192.168.0.246? Manually
with ifconfig?
What is NIL all about? Also broadcast and network for NIL seem wrong...

I would use a file like this:

---------------------------
auto lo eth0

iface lo inet loopback

iface eth0 inet static
    address 192.168.0.10 
    netmask 255.255.255.0
    gateway 192.168.0.1
---------------------------

Still, your eth0 seems to be configured correctly since you can FTP, so 
maybe just leave it alone and keep doing what you do for now ;-)

> 
> # The resolv.conf file
> search mshome.net
> nameserver 192.168.0.1
> 

Seems to work since ping resolves the host correctly.

Don't know much about DNS though, my resolv.conf 
is controlled by pppd (or manually).


Basically it looks like you're good to go on the Linux side.

cheers,
Christian



Reply to: