1

I'm trying to get my Windows 8 laptop to use my Linux's internet connection. I'm pretty far from my router (other side of the house) and since my Linux computer uses a lan cable, it doesn't experiance any of the connection issues my laptop does from the distance.

I have a wifi card in my Linux PC, and I've setup an ad-hoc network on it, I can get the Windows laptop to connect to the ad-hoc network, however, I am unable to get it internet access.

My Linux PC's Ethernet connection info: IPv4 IP Address: 192.168.1.152 Broadcast Address: 192.168.1.255 Subnet Mask: 255.255.255.0 Default Route: 192.168.1.1 Primary DNS: 192.168.1.1

The Linux wifi ad-hoc connection info: IPv4 IP Address: 10.42.0.1 Broadcast Address: 10.42.0.255 Subnet Mask: 255.255.255.0

The windows network details when connected to the ad-hoc: IP Address: 192.168.1.153 Subnet Mask: 255.255.255.0 Default Gateway: 192.168.1.1 Primary DNS: 8.8.8.8

However, when I ping 192.186.1.1 from the windows machine, I get: pinging 192.168.1.1 with 32bytes of data: Reply from 192.168.1.153: Destination host unreachable. Reply from 192.168.1.153: Destination host unreachable. Reply from 192.168.1.153: Destination host unreachable. Reply from 192.168.1.153: Destination host unreachable.

Ping statistics for 192.168.1.1: Packets: Sent: 4, Recieved: 4, Lost: 0 (0% loss),

I suspect this is due to the ad-hoc info on the Linux machine being 10.42.1 instead of 192.168.1 but I am unsure how to correct this, or if this is the real problem.

I'm not a 100% linux noob, but I have very little experience with networking. Any help would be great.

If it helps narrow down the solution; I'm running on Fedora 22 with the MATE desktop.

2 Answers 2

0

It seems that the Linux machine is acting as a gateway. In order for the Windows machine to communicate on the other side of the Linux machine, it first has to know the IP address of the Linux machine. It also can only communicate if it is in the same subnet.

Therfore...

The windows machine needs to be somewhere in between 10.42.0.2 and 10.42.0.254 with its gateway set to the IP of the linux machine.

8
  • On Windows machine: IP Address: 10.42.0.2 Subnet mask: 255.255.255.0 Default Gateway: 10.42.0.1 Didn't work, same problem. Network connection state says "No Network access" Jan 29, 2016 at 7:27
  • did you try pinging 10.42.0.1 from your windows machine?
    – adgelbfish
    Jan 29, 2016 at 7:29
  • ping 10.42.0.1 Request timed out. Request timed out. Request timed out. Request timed out. Jan 29, 2016 at 7:32
  • What happens you set your IP setting to DHCP?
    – adgelbfish
    Jan 29, 2016 at 7:34
  • it doesn't give the windows any ip or gateway information at all Jan 29, 2016 at 7:34
0

The thing is when you connect to linux machine .. your windows should be getting the ip between 10.42.0.2 and 10.42.0.254 so that they can be in same networks then only you can have connection with the linux add hoc. Now what you can do is after connecting to add hoc in your windows machine's command prompt type

>ip release and enter

>ip renew and enter

This command will ask for new ip address from the host machine ;i.e linux machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .