Find the answer to your Linux question:
Results 1 to 5 of 5
I tried to connet my pc (S.O. Lunux Slackeware) to internet using as a gateway another pc with Windows Xp.The second one is connet to the net with a Cable ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2004
    Posts
    5

    Sharing connection Linux Windows


    I tried to connet my pc (S.O. Lunux Slackeware) to internet using as a gateway another pc with Windows Xp.The second one is connet to the net with a Cable modem.

    I configurated my net card (eth0) with ifconfig but an error occured when i tried to config the netmask.
    Then when i tried to ping the gateway or another ip the return was
    Net unreacheable.

    Ther is a solution to thid problem thanks.

  2. #2
    Linux Engineer Nerderello's Avatar
    Join Date
    Apr 2003
    Location
    North East England
    Posts
    1,190
    Poletto
    can I just confirm that this is the setup :-

    Linux PC -- Ethernet-- WinXP PC -- Cabel Modem-- Internet

    If so, you have two TCP/IP networks. One is an ethernet network with both PCs as the only hosts, while the other has your WinXP and a router (possiblly the cable modem or possibly the ISP's gateway router). Each of the networks will have a different network address. The local network (Linux - WinXP) can have any TCP/IP address you like to give it. The other will have addresses set by your ISP.

    You WinXP PC will have to act as a router (don't know WinXP so can't tell youi how or even if this is possible). It will have to receive packets from Linux and pass them to your ISP. This means that your ISP will have to be told that there is another network "behind" your WinXP PC. Don't know how this is done, suggest that you talk to your ISP.

    Nerdello

    Use Suse 10.1 and occasionally play with Kubuntu
    Also have Windows 98SE and BeOS

  3. #3
    Just Joined!
    Join Date
    May 2004
    Location
    Malta
    Posts
    41
    For this configuration to work, your cable modem must be an ethernet modem as usually the USB one don't work well in internet connection sharing scenarios (but am not 100% sure about this one).

    You have to plug the modem in your Windows XP box and then enable internet connection sharing on that box (this one is pretty easy and can be done through a wizard). In windows, internet connection sharing automatically enables the DHCP service.

    On your linux box, which will be connected to the other network interface of the windows box, all you have to do is set its network adapter to be automatically configured using DHCP.

    Hope this helped.

    Josef

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2004
    Posts
    5
    At the startup i recieved a message like

    DHCP brocasting recieved

    So if i enable on my pc the DHCP it sould work but ,how can i do that?

    P.S

    yes the second machine is connect with a ethernet bus to the modem

    thanks for everything

  6. #5
    Just Joined!
    Join Date
    May 2004
    Location
    Malta
    Posts
    41
    Edit the file "/etc/sysconfig/network-scripts/ifcfg-eth0" (if the network adapter you are trying to configure is not eth0, then change the file name accordingly). You should be root to do this.

    Then in this file make sure that you have the following two lines:
    Code:
    BOOTPROTO=dhcp
    ONBOOT=yes
    If any one of them is missing, add them and reboot.

    Josef

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •