Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: Sharing files and Internet connection w/crossover cable & Win XP client

  1. #11
    Join Date
    Dec 2009
    Location
    Panama City, FL, USA
    Beans
    543
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    Try running this command in Ubuntu:
    Code:
    sudo ifconfig eth0 up 10.0.0.1 netmask 255.255.255.0

  2. #12
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,525
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    Quote Originally Posted by adam814 View Post
    Try running this command in Ubuntu:
    Code:
    sudo ifconfig eth0 up 10.0.0.1 netmask 255.255.255.0
    +1, Yes, try this. You can see from your ifconfig results you actually don't have 10.0.0.1 set to eth0.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  3. #13
    Join Date
    Oct 2007
    Beans
    668
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    After running that command, here's the ifconfig output:
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:22:15:2f:4f:11  
              inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
              inet6 addr: fe80::222:15ff:fe2f:4f11/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:279 errors:0 dropped:0 overruns:0 frame:0
              TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:25802 (25.8 KB)  TX bytes:12502 (12.5 KB)
              Interrupt:18 
    
    eth1      Link encap:Ethernet  HWaddr 00:22:15:2f:4e:b5  
              inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::222:15ff:fe2f:4eb5/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:3476 errors:0 dropped:0 overruns:0 frame:0
              TX packets:3133 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:3922421 (3.9 MB)  TX bytes:649948 (649.9 KB)
              Interrupt:19 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:244 errors:0 dropped:0 overruns:0 frame:0
              TX packets:244 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:18880 (18.8 KB)  TX bytes:18880 (18.8 KB)
    The WinXP machine still can't get to the Internet. Trying to browse the Web in Firefox yields only "Server not found" error pages. Windows Firewall is turned off. Firefox is in "no proxy" (aka direct Internet connection) mode. Is the Ubuntu machine perhaps blocking the connection?

    The good news is that the Ubuntu machine is now showing up in a Windows workgroup on the Windows XP machine. I can't access anything on the Ubuntu machine, probably just because I haven't set up Samba shares. So it looks like the connection is working to some degree.

    The Win XP machine still doesn't show up in Nautilus on the Ubuntu machine.

  4. #14
    Join Date
    Dec 2009
    Location
    Panama City, FL, USA
    Beans
    543
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    It sounds like you need to manually specify your DNS server on the XP machine. To confirm this run "nslookup ubuntu.com" in the Windows Command Prompt. If you get an IP address for ubuntu.com I'm wrong. If you don't get one right-click the connection you're using in Network Connections and go to Properties > TCP/IP settings and manually specify either your ISP DNS server or if you don't have it handy right now use 8.8.8.8 (Google DNS).

  5. #15
    Join Date
    Oct 2007
    Beans
    668
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    I already had the OpenDNS servers for the 2 DNS options, but it still couldn't reach anything.

    What should I have in the "Subnet mask" field on the WinXP machine? Right now it says "255.255.255.0" and the Gateway is "10.0.0.1".

    Another problem I noticed: I'm now having to manually connect to eth1 each time I boot Ubuntu. How do I make it connect automatically, every time I log in?

  6. #16
    Join Date
    Dec 2009
    Location
    Panama City, FL, USA
    Beans
    543
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    Your netmask is the same on both machines, so you should be alright there.

    The short answer for how to make it set up automatically is you'd make an entry for it in /etc/network/interfaces. Personally I'd worry about getting it to work once before worrying about making it permanent though.

    Try this:
    Code:
    sudo sysctl net.ipv4.ip_forward=1
    That will enable kernel forwarding. It seems like everything else you need is getting set up, but you'll never reach a DNS server if your Ubuntu machine isn't forwarding packets.

  7. #17
    Join Date
    Oct 2007
    Beans
    668
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    Quote Originally Posted by adam814 View Post
    Your netmask is the same on both machines, so you should be alright there.

    The short answer for how to make it set up automatically is you'd make an entry for it in /etc/network/interfaces.

    Personally I'd worry about getting it to work once before worrying about making it permanent though.
    I can do it every time - by manually clicking on "Auto eth1" in the NetworkManager applet. What does the entry in /interfaces need to look like?

    Quote Originally Posted by adam814;8719194Try this:
    [code
    sudo sysctl net.ipv4.ip_forward=1[/code]
    That will enable kernel forwarding. It seems like everything else you need is getting set up, but you'll never reach a DNS server if your Ubuntu machine isn't forwarding packets.
    That command broke my networking completely. I rebooted several times trying to get it to work again. I was only able to reach the Internet again after I disconnected the eth0 connection (the crossover cable to the Windows XP machine) in NetworkManager. I think my Ubuntu machine was trying to reach the Internet through the eth0 connection for some reason, even though that doesn't go anywhere.

    FWIW, I am now seeing the Win XP machine detect the eth0 connection come up every time I restart the Ubuntu machine. Also, I can ping back and forth, either from Ubuntu machine to Win XP machine, or the other way around. So packets are going back and forth; they're just not getting past my Ubuntu machine to the Internet.

    Of course, now that I have to disconnect eth0 to get to the Internet at all, I have no hope of getting to the Internet from the Windows XP machine.
    Last edited by Objekt; January 25th, 2010 at 05:09 AM.

  8. #18
    Join Date
    Dec 2009
    Location
    Panama City, FL, USA
    Beans
    543
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    Nothing you can do with sysctl persists past a boot unless you add it to (or uncomment it in) /etc/sysctl.conf, so while I don't doubt that your networking broke at around the same time I can't see how it could possibly break your networking. If you run it without the "=1" on the end it just displays the current status. If it's set to 0 you won't be able to use it as a gateway (which you're trying to do).

    Your entry for /etc/network/interfaces would look like this:
    Code:
    iface eth0 inet static
            address 10.0.0.1
            netmask 255.255.255.0
            network 10.0.0.0
            broadcast 10.0.0.255
            gateway 10.0.0.1
    In theory that should also cause NetworkManager to stop managing eth0 and stop trying to use your XP machine as a gateway. After adding that you should be able to restart your networking with "sudo service networking restart" and you should be ok.

    If that doesn't work you could configure eth1 in /etc/network/interfaces too and bypass NetworkManager altogether. For that you'd add:
    Code:
    iface eth1 inet dhcp
    This would only leave NetworkManager in charge of any other interfaces you have (wireless for example).

  9. #19
    Join Date
    Oct 2007
    Beans
    668
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    Wow, that REALLY broke things! After doing that I could not connect to anything, and I had to comment out the changes in /etc/network/interfaces. I also had to reboot the system to get it fixed. I thought you were supposed to be able to change various settings in Linux without having to reboot, but apparently not.

    The command "sudo service networking restart" does nothing in Ubuntu 9.10, returning only the error message "restart: Unknown instance: ". I think you meant "sudo /etc/init.d/networking restart".

    Entirely by accident, I found that issuing the command "sudo ifconfig eth0 up 10.0.0.1 netmask 255.255.255.0" re-enabled the connection over the crossover cable (eth0), while still allowing me access to the Internet over eth1. I hope that is also the case after the next restart. For some reason, NetworkManager thinks eth0 is disconnected, although it clearly isn't (ping tests work from both ends).

    So we're back to the way it was before: the eth0 link is obviously live, and will pass packets for a ping test, but I cannot get any farther than that. I double checked - yes, forwarding is enabled, courtesy "sudo sysctl net.ipv4.ip_forward=1"

    What is stopping the packets from eth0 from getting any further?
    Last edited by Objekt; January 25th, 2010 at 06:24 AM.

  10. #20
    Join Date
    Dec 2009
    Location
    Panama City, FL, USA
    Beans
    543
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Sharing files and Internet connection w/crossover cable & Win XP client

    That's bizarre...although "service" usually just calls the script in /etc/init.d it definitely worked for me on 9.10. I'm not sure why it wouldn't have worked for you.

    Which one didn't work? The line for eth1 in the interfaces file? What you're doing with ifconfig is exactly what the entry for eth0 was supposed to do for you.

    NetworkManager probably will say an interface is disconnected if you have it configured in your interfaces file.

    If you're able to ping back and forth but not beyond your Ubuntu machine from XP the only thing left is that there's no NAT going on (also called IP Masquerading). Here's a pretty good guide for that:
    http://linux.about.com/od/ubusrv_doc/a/ubusg18t03.htm

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

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