Sharing an Internet Connection (come network gurus)

Posted:
in Genius Bar edited January 2014
I have Jaguar dialing in to the Internet. I want to be able to plug in a PC via Ethernet to the mac and share this connection.



I turned on "internet sharing" on the mac and setup a basic DHCP on the PC. It gets an IP address from the Mac (192.168.2.2



Problem is I can't connect to the Internet on the PC. (am I doing something wrong? I tried with a crossover cable also. I can ping the Macs IP address on the PC, (not the one from the ISP, I'm talking about the private IP of 192.168.2.1)



I know that if I put a modem in the PC you can switch it around and plug in the Mac to connect (somehow) but since I don't have a modem in this PC.....



Anywho... I could really use some advice. If ANYBODY has ANY experience sharing a dialup via Ethernet twix computers let me know.



Dunno if it helps but I have a nice iMac which I will be plugging in (via ethernet instead of the PC) which I will try and setup also.



Oh yeah, one more thing, no firewall software on either side (thought of that already)



Good luck, please help!!!!

Comments

  • Reply 1 of 19
    enaena Posts: 667member
    Have you entered the correct values for the router on the PC?



    Also, is the connection going through the X Box to the Internet? I'm assuming you have two cards in the Mac.





    EDIT



    duh, I just read the rest of your post---you should use a crossover if you are going straight to the mac. If the "internet sharing" is adding a route from one interface to the other (from the ethX to the ppp interface) then with a router address entered correctly on the PC then it should work.



    other wise goto a terminal window and type



    route add --net DEFUALT GW 192.168.1.1



    One big disclaimer: I've only done this command in linux, but the principle should be the same. You may have to play with it a bit.
  • Reply 2 of 19
    thuh freakthuh freak Posts: 2,664member
    i'm about 70% sure that the wire from the peecee to your mac should be a patch cable (not a crossover).
  • Reply 3 of 19
    enaena Posts: 667member
    It just occured to me that will have to set up the PC manually (unless "internet sharing" supplies a DHCP server.)
  • Reply 4 of 19
    Quote:

    Originally posted by ena

    It just occured to me that will have to set up the PC manually (unless "internet sharing" supplies a DHCP server.)



    If I do need to setup things 'manually' what IPs etc do I need (for both the mac/ pc)



    I tried teh route add --net DEFAULT GW 192.168.1.1 command but it says I need to be root. How do i do that?



    (man, this is frustrating stuff)
  • Reply 5 of 19
    enaena Posts: 667member
    on the pc, just give yourself a 192.198.1.2 with a subnet mask of 255.255.255.0. For the router use the 192.168.1.1 of the X box. You don't need the WINS stuff. Also, look at your control panel on the mac and give yourself at least one DNS server, if you can't find one use 206.191.191.1.



    If Apple is serious about the "internet sharing" I'll bet they have added that route already. Use the crossover cable too.



    If that doesn't work....



    On the root thing, I don't know---maybe if you type su it would ask for the password and then let you in that way. I lost patience with OSX when I couldn't get in as root, I have heard there is a way to enable the root access but I never bothered.
  • Reply 6 of 19
    thuh freakthuh freak Posts: 2,664member
    `su` will effectively log you in as root (within that terminal). if you dont want to stay as root (and you shouldn't really stay too long), you can do `sudo [commandName]` to get temporary root access. either command will ask for your password, and log you as root. the sudo version will only stay root for that command. also, you can do `sudo -s` which is like su, in that it stays as root. you may have to enable yourself in the /etc/sudoers file, but i dont remember the particulars of dealing with that file.
  • Reply 7 of 19
    enaena Posts: 667member
    Quote:

    Originally posted by thuh Freak

    `su` will effectively log you in as root (within that terminal). if you dont want to stay as root (and you shouldn't really stay too long), you can do `sudo [commandName]` to get temporary root access. either command will ask for your password, and log you as root. the sudo version will only stay root for that command. also, you can do `sudo -s` which is like su, in that it stays as root. you may have to enable yourself in the /etc/sudoers file, but i dont remember the particulars of dealing with that file.



    ugh!! That sounds like a pain in the buttocks.



    (but then again the amount of damage that the users could unintentionaly inflict on themselves is almost comical)
  • Reply 8 of 19
    I got in as root, (no prob)



    PS, this is a windows XP box and not an Xbox.



    I setup IPs as directed. I am still getting nothing.

    It won't ping though.



    I guess the problem is that the PPP isn't bridging over onto the Ethernet. I know the Ethernet is connected (with the crossover or straight) because I can get the DHCP to pick up an IP from the mac.



    But the PC still can't ping to the IP that the mac is getting from my ISP (nor anywhere else for that matter).



    More help? That command said something to the effect of "entry already exists...." ???? (I feel like neo says "help?")



    (response from terminal)



    [Our-Computers-Computer:~] root# add -net default gw

    add: Command not found.

    [Our-Computers-Computer:~] root# route add -net default gw 192.165.1.1

    route: bad address: gw

    [Our-Computers-Computer:~] root# route

    usage: route [-dnqtv] command [[modifiers] args]

    [Our-Computers-Computer:~] root# route add -net defaultgw 192.168.1.1

    route: bad address: defaultgw

    [Our-Computers-Computer:~] root# route add -net default 192.168.1.1

    route: writing to routing socket: File exists

    add net default: gateway 192.168.1.1: File exists

    [Our-Computers-Computer:~] root#
  • Reply 9 of 19
    enaena Posts: 667member
    I'm sorry, when when I siad X box I meant the Jaguar box.





    Networking IS SUCH A BITCH!!!



    .....okay, it looks like the "share internet" is pretty advanced, doing DHCP AND there is an entry for that route out to the PPP interface.





    ...goes to check XP machine....



    okay if you go to the "network connections" page and get properties bla, bla, bla....then if once you are in where you "obtian an IP automatically" hit the Advanced tab---in next window at the bottom window "Add" a default gateway and give it the "private network" address of you Mac's ethernet (192.168.1.1, or what ever the address is.)



    ...another thing, if you are getting an address on the XP machine that isn't in the 192.168.1.xxx range then it may be timing out and giving itself a garbage address.



    Once you have the a good address on the XP machine, with a gateway (router) address entered, you should be able to ping that mac's private address ( the address of the ethernet card on your mac) if you can do that and still not get out to the internet......I dunno the share network feature on the mac seems to have thought of everything.











    EDIT



    <removed bad advice>



    (although I'll bet the share network has already handled that.)



    good luck--I've lost handfuls of hair this crud
  • Reply 10 of 19
    alcimedesalcimedes Posts: 5,486member
    you might want to check your firewall settings on the Mac and PC if applicable.
  • Reply 11 of 19
    enaena Posts: 667member
    Quote:

    Originally posted by alcimedes

    you might want to check your firewall settings on the Mac and PC if applicable.



    that's a good point---you could be bouncing off that---be sure to try to ping the private address so you know you're connected first, though.
  • Reply 12 of 19
    enaena Posts: 667member
    <removed bad advice>
  • Reply 13 of 19
    Still no luck. I have tried the following now.



    PC

    Gateway set to 192.168.1.1

    IP Set to DHCP (it obtains 192.168.2.3 from the MAC)



    Mac

    Gateway set to 192.168.1.1

    IP Set to 192.168.1.1



    No firewalls (triple checked)

    Both crossover and straight cables.



    (losing mind here)



    I am trying every combination of IPs and gateways.... still nada.



    this should NOT be this bloody hard. I work for an ISP for gods sake and do this kind of stuff ALL day. WHY isn't it working this way?
  • Reply 14 of 19
    enaena Posts: 667member
    Quote:

    Originally posted by Not Unlike Myself

    Still no luck. I have tried the following now.



    PC

    Gateway set to 192.168.1.1

    IP Set to DHCP (it obtains 192.168.2.3 from the MAC)



    Mac

    Gateway set to 192.168.1.1

    IP Set to 192.168.1.1



    No firewalls (triple checked)

    Both crossover and straight cables.



    (losing mind here)



    I am trying every combination of IPs and gateways.... still nada.



    this should NOT be this bloody hard. I work for an ISP for gods sake and do this kind of stuff ALL day. WHY isn't it working this way?






    I'd say to set the getway on the mac to whatever the phone comspany tells you.....but since you can connect to the interent that shouldn't be the problem--that is a bit strange.



    Can you ping the address of the mac from the pc ( the 192.168.1.1 address)?



    also, it's "netstat -r" to check your IP tables---since it's BSD the route command is prabably different as well.



    the worst thing about this is that it's probably some thing VERY simple.





    AHHH!



    *Over my head----Offically shutting up.*
  • Reply 15 of 19
    enaena Posts: 667member
    I think this might be reaching but:



    ---is the MTU on the XP machine too high? You could be getting your head chopped off and not even know it.



    *shutting up for good*
  • Reply 16 of 19
    paulpaul Posts: 5,278member
    you are hitting "apply now" in all these dialog boxes, right? sometimes the smallest details get overlooked...
  • Reply 17 of 19
    alcimedesalcimedes Posts: 5,486member
    ok, let's see what we have here.



    1. you CAN ping to the Mac from the PC, so we know for a fact that the PC's network card is fine, and we know the network cable is fine. that's two bits of hardware out.



    2. the Mac can get online just fine, so we know it's not the hardware on that end.



    3. theoretically, you Mac is working as a DHCP server, and should assign an IP address to your PC. your PC should be set to DHCP only, and should get all additional info from the Mac. (although it may need a router)



    have you tried the following:



    go to the command line on your PC



    type



    ipconfig /all



    ipconfig /release



    ipconfig /renew



    that should give you a new IP address from the Mac. it's possible that for some reason the IP address that your PC has been assigned is not going through for some reason, i've seen weirder.



    can your PC ping outside IP addresses, or only the Mac? (i think you answered this already)



    i'm still thinking this is some strange software problem, although if it's not the firewall, i don't know what it would be.
  • Reply 18 of 19
    ast3r3xast3r3x Posts: 5,012member
    i didn't see that you are using a crossover cable for sure, perhaps i missed it in your post (probably i was scanning pretty quickly) so make sure u have that



    i've recently done this only the mac had internet by ethernet instead of dialup



    the PC shoudl automatically look thigns up on DHCP



    i would just go and have the PC relase the IP and everything before you try this again





    once i get back on my mac, i'll check for you more indepth of anythign special i have...perhaps i'll provide screenshots
  • Reply 19 of 19
    gargoylegargoyle Posts: 660member
    Not Unlike Myself, I have my PC conneced via my mac (not PPP tho). If you can join "appleinsider" on iChat I will be able to give you some advice.



    Some notes to point out tho...



    1.)

    You say your PC is getting 192.168.2.3 from the mac. Is your subnet mask set to 255.255.0.0 ?? Cos if its not your mac and your PC are actually on different subnets - Which wont help too much.



    2.)

    You should be able to use internet sharing without having to manually edit the routing tables (the route -add command others are telling you to use.) Dial up the internet, and then turn on sharing.



    3.)

    Set your ethernet up on both machines to manual, the following should work.



    Mac:

    IP Address: 192.168.1.1

    Subnet Mask: 255.255.255.0

    Default Gateway: Not Needed.

    DNS Servers: Not Needed.



    PC.

    IP Address: 192.168.1.2

    Subnet Mask: 255.255.255.0

    Default Gateway: 192.168.1.1

    DNS Servers: You will have to get these from your isp. Most of them publish them on their homepage somewhere.



    ** Also, make sure to start with that your proxy address (under tools->options->connections from the IE menu) for the PC is not set, unless your isp requires you to use one.



    4.)

    You should test FROM the pc as follows:-

    a.) Click start->run

    b.) Type "cmd" in the box and hit return.

    c.) in the DOS window type "ping 192.168.1.1" - This test the PC can connect to the mac.

    d.) Type "ping <some known internet address in the internet that you know answers to ping, a lot of web servers will not>" eg. I would test with "ping 212.67.212.1".

    c.) then "ping <some hostname to check DNS>" eg. "ping www.pmcnetworks.com" (the same host ast that IP above.) this checks that your PC can resolve hostnames.



    If that lot works then you should be able to load IE and surf away.
Sign In or Register to comment.