Share wireless connection to ethernet through switch?

Discussion in 'macOS' started by Bosep, Feb 8, 2010.

  1. Bosep macrumors regular

    Joined:
    Nov 11, 2008
    #1
    Hi, I'm trying to share my wireless internet connection from my mac to my PC, the mac is connected to a switch with a tp cable and my windows pc as well.

    The switch doesn't have dhcp so I had to manually type in the ip address:

    Mac:
    192.168.2.4
    255.255.255.0
    Gateway: 192.168.2.2

    PC
    192.168.2.5
    255.255.255.0
    Gateway: 192.168.2.2

    File sharing works between the two so I guess the connection is working :p

    The airport on the mac is connected to a wifi network: ip adress: 192.168.2.3.

    Now, sharing between the pc and mac is working through the switch, and I got a wireless internet connection on the mac.

    In sharing(on the mac) I checked "internet sharing" and shared from airport to computers that uses Ethernet.

    But... internet is not working on the pc... :( Can anyone help?
     
  2. r0k macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
    #2
    Where is the wifi coming from?

    internet ---- router/wifi - - - - - mac ----switch----pc

    ---- = ethernet
    - - - = wifi

    the above seems to me to make no sense

    internet ---- router/wifi-----switch----pc
    \- - - mac

    the above makes perfect sense and everybody benefits from dhcp done by your router. you can run a cable from the router to your switch, right?

    BTW, what brand of router are you using?
    Why don't you do the second topology above?
     
  3. chrismacguy macrumors 68000

    Joined:
    Feb 13, 2009
    Location:
    United Kingdom
    #3
    I think what the poster is doing is the first one, as you described. ie The OP wishes to create an ethernet bridge on the Mac between AirPort and his Switch (so DHCP etc goes through it). I actually have an identical system going the otherway around, with a PC acting as a Network Bridge (built-in to Windows 7 - Its the last task I need to move to a Mac before I can go Mac only at home), This is the only feasible way for some setups to be possible (due to my Wireless Router being 2 floors away and on the other side of the house). i.e my PC is sharing its Wi-Fi Connection to a 16-port Switch with my XBOX 360, PowerMac G4 and iMac G3 all hooked into it.
     
  4. Bosep thread starter macrumors regular

    Joined:
    Nov 11, 2008
    #4
    :p The wifi comes from a phone with wifi sharing :
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      80.2 KB
      Views:
      164
  5. r0k macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
  6. Bosep thread starter macrumors regular

    Joined:
    Nov 11, 2008
    #6
    Why? I think the only interesting here is that I want to share the macbook's wireless internet, where it comes from isnt really a problem ? Or do you mean a bridge between the pc and macbook? why is there a setting in internet share if this is needed?
     
  7. chrismacguy macrumors 68000

    Joined:
    Feb 13, 2009
    Location:
    United Kingdom
    #7
    What r0k means is that you want the Mac to act as an Ethernet Bridge - in that it "bridges" the Wireless and Wired connections to act as 1 connection (ie the Mac passes all the internet packets to and from the Cell Phone to the internet)
     
  8. PinkyMacGodess macrumors 601

    PinkyMacGodess

    Joined:
    Mar 7, 2007
    Location:
    Midwest America.
    #8
    So, the pc doesn't have a wireless card and the mac obviously does and you want to hook the ethernet ports of the two systems together and share the connection on the mac to the pc.

    The thing that could be messing with people's minds is that the wireless access point probably runs off ethernet, right? Does the access point have another ethernet port that you could run the pc from. It's harder to share a wireless connection than a wired connection and receivers generally aren't good at broadcasting, meaning the mac.

    A bridge does just like a bridge in real life does: It takes a network and 'bridges' it across some distance so that it can be used to support many computers again and helps manage traffic. Think of it as an extention or extender. Bridges aren't to expensive either but then neither is a simple USB wifi plugin for the pc. If it's in range. Problem solved. Network bridging

    I know on the Windows side, sharing a wireless internet connection is possible but the setup isn't something that I've done.

    I'm a believer in the 'KISS principle'. Keep It Simple Stupid. Getting a usb fob for the pc would be my suggestion...

    Cell phone? Who was talking cell phones?
     
  9. r0k macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
    #9
    I guess I'm just not a fan of OS-based sharing internet regardless of the OS. I prefer to use methods which don't require "box a" to be working in order for me to use "box b" on the net. To me the switch opens up the possibility of allowing other devices to use the 'net when the mac is off or sleep or not working quite right for internet sharing. Perhaps someone will come along who has used internet connection sharing on OS X. I'm a little suspicious of the way you have your gateway settings. I would be inclined to make the pc think the mac is its gateway (192.168.2.4) since it has do direct route to 192.168.2.2.
     
  10. PinkyMacGodess macrumors 601

    PinkyMacGodess

    Joined:
    Mar 7, 2007
    Location:
    Midwest America.
    #10
    You need some way to 'route' the connection. That gets into a whole different thing unless the connection sharing on the mac side supports it. It is also possible that the wireless may limit the number of connections. It's possible that the sharing doesn't support routing, although that would seem wierd not to be supported if 'sharing' is supported... (I can try this right now and see if it works)

    It sounds interesting... I've never tried doing this but am curious to see if it would work. What version of OSX do you have? What version of windows (although it shouldn't matter too much)?
     
  11. chrismacguy macrumors 68000

    Joined:
    Feb 13, 2009
    Location:
    United Kingdom
    #11
    Well all I can say is that my Windows based solution works flawlessly, but if there is a way to do it using a Mac I am incredibly interested (just because I want to ditch Windows completely). If there isnt I may end up having to do a quick Ethernet Bridge codeup in XCode for us all :)
     
  12. PinkyMacGodess macrumors 601

    PinkyMacGodess

    Joined:
    Mar 7, 2007
    Location:
    Midwest America.
    #12
    I have found some surprising limitations in some unfortunate places doing stuff like this.

    One idea: Try different addresses for the 'shared' and 'sharing' computers inside ports. Sometimes it makes a difference.

    Going to try this right now as I happen to have my MBP and a windows pc setup together on a table (both wireless at the moment).

    Let's see if it workes...
     
  13. PinkyMacGodess macrumors 601

    PinkyMacGodess

    Joined:
    Mar 7, 2007
    Location:
    Midwest America.
    #13
    It works fine. I'm posting this on the windows box with no problems.

    On the windows system, set it to get an address automatically and remove all gateway and DNS information. Reboot it and then you may need to go to the command prompt and release and renew the ethernet address for the hardwire port. If the windows system is powered on after the mac starts up and internet sharing starts, you shouldn't need to do this.

    Once 'Internet sharing' has been enabled on the mac do this on the windows system:
    Hit the windows key and r
    Type cmd in the box and click OK.
    Type ipconfig/release and hit enter.
    Type ipconfig/renew and hit enter.
    The connection *should* work after that...

    You have to make sure that the windows system has an address from the mac. This above makes sure that happens. I would let the mac generate the address rather than setting one on the windows system. It's easier and should work better.
     
  14. Bosep thread starter macrumors regular

    Joined:
    Nov 11, 2008
    #14
    I tried what you said, and the windows did get an ip from the mac. And network between the mac and pc is working, but the internet on the pc still doesn't :/ I don't understand, why is there an option for internet sharing if is doesn't work?
     
  15. rusty2192 macrumors 6502a

    Joined:
    Oct 15, 2008
    Location:
    Kentucky
    #15
    Internet Sharing works between two macs, not sure about windows

    Hmm, the Internet Sharing feature on my iMac works perfectly with my Power Mac (gigabit, no airport), but I don't think I have ever tried it with a windows machine on the downstream side. I may give it a shot tonight just to see if it works for me.

    Just as a note, I simply ran a cable between the two Ethernet ports and let the computers do their own switching.
     
  16. Bosep thread starter macrumors regular

    Joined:
    Nov 11, 2008
    #16
    Here is all my settings:

    And the internet sharing settings is of course active.
     

    Attached Files:

  17. r0k macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
    #17
    On the pc, run cmd and type
    ping yahoo.com

    You will probably get a dns error and may also get a destination unreachable error.

    If you don't get a dns error, that means your pc went to your mac and asked for the ip address of yahoo.com and your mac in turn asked your phone which in turn asked a nearby nameserver and returned the response. This would be a very good sign.

    I suggest you google for connection sharing and study the settings in detail. Don't waste any more time deleting plists. This should all be do-able without doing violence to your system settings.

    hope this helps...
     
  18. Denarius macrumors 6502a

    Denarius

    Joined:
    Feb 5, 2008
    Location:
    Gironde, France
    #18
    Right, first I'd have a different subnet for your share since the Mac is effectively connected to two networks.

    You've already set internet sharing on airport so that's good.

    Configure the mac and the PC on a different subnet, say 192.168.3.0/24 for the sake of argument.

    Mac ethernet.

    IP:192.168.3.1
    Mask:255.255.255.0
    Router:192.168.3.1
    DNS:Blank

    PC Ethernet

    IP: 192.168.3.2
    Mask: 255.255.255.0
    Gateway: 192.168.3.1
    DNS: 8.8.8.8, 8.8.4.4 (or the IP address of your router)
     
  19. Mctransporter macrumors newbie

    Joined:
    Apr 25, 2009
    #19
    Denarius,

    I've been looking all over for this solution. Seriously looked through 28 pages on google, and this completely did the trick!

    I understood the problem was that my airport and ethernet were using the same subnet, but I didn't know the IP's to put in.

    Thank you SO much!
     
  20. Denarius macrumors 6502a

    Denarius

    Joined:
    Feb 5, 2008
    Location:
    Gironde, France
    #20
    You're welcome. :)
     

Share This Page