Share internet connection via Ethernet and WiFi

74

Solution 1

I'm going to start by strongly recommending simply buying an ISR instead of doing it the way you wish, it'll be so much less hassle, and better performance and convenience to boot (that and they're not too expensive). That said, what you want can be done.

You'll need an Ethernet crossover cable:

A crossover cable is the same as the standard cabling you're used to (probably cat5 UTP), but with one change. In a standard "Straight-through" cable, on the inside, there are 8 wires going from end to end. The same is true of a crossover cable, but instead wires are crossed in such a manner that the wires meant for sending traffic and receiving traffic synch up on each end. See the Wikipedia article for more info, if you care.

enter image description here

Note that the colours in this picture do actually match up to real life. Take a close look at the rj-45 connector on your Ethernet cable, if it is transparent, you will be able to see by the order of coloured wires what kind of cable it is!

Which you can purchase from pretty much any computer shop, or make yourself.

  1. First off, make sure both computers are in the same workgroup. Windows xp: Right click "My Computer" -> Properties, then click the "Computer name" tab. Click "Change" and name a workgroup. Reboot. Win7: Use the start menu search to find the change workgroup name dialogue, and set it to the same as the XP box. Reboot.

  2. Now hook the two machines together using the Ethernet crossover cable.

  3. Next, share the internet connection: On the Win 7 box, search in the start menu for "View network connections". Right click on the internet connection, and select "properties", followed by clicking the "sharing" tab. Check "Allow other network users to connect through this computer’s Internet connection" and click OK.

Now both machines should be able to share files and an internet connection. As for the wireless, I've never done it - I'm not actually sure that you can use a wireless NIC as an access point.

Solution 2

Connectify for windows 7 might help.

Share:
74

Related videos on Youtube

Steven
Author by

Steven

Updated on September 17, 2022

Comments

  • Steven
    Steven over 1 year

    I am writing for a bigger project a system that different classes registers there commands in one CommandHandler. The Commands are Classes with the Code to Execute.
    My Problem: The CommandHandler needs some informations over the Classes, the name, the permissions and the usage.

    I have tried already with @interfaces but this gives me always null. Should i do this in an other way or could i fix this?

    Code: The register in the CommandHandler

     public void register(Class<? extends Command> c) {
        CommandInfo info = c.getAnnotation(CommandInfo.class);
        if (info == null) return;
    
        try {
            commands.put(info.pattern(), c.newInstance());
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
    

    The @CommandInfo

    @Retention(RetentionPolicy.RUNTIME)
    public @interface CommandInfo
     {
    /**
     * The actual name of the command. Not really used anywhere.
     */
    public String name();
    
    /**
     * A regex pattern that allows minor oddities and alternatives to the
     * command name.
     */
    public String pattern();
    
    /**
     * The usage message, i.e. how the command should be used.
     */
    public String usage();
    
    /**
     * A description of what the command does.
     */
    public String desc();
    
    /**
     * The permission required to execute this command.
     */
    public String permission();
    }
    

    And one Command:

    public class SetPortPoint implements Command
    {
        @CommandInfo(
            name = "setportpoint",
            pattern = "setportpoint|spp",
            usage = "/maa setportpoint <arena> <wavenumber>",
            desc = "set a Port point for a Arena at a given Wave",
            permission = "mobarenaaddon.porter.setportpoint"
        )   
        public boolean execute(){
            //The Code to do
        }
    }
    
  • David Harris
    David Harris about 14 years
    As a note, some, I stress some, ethernet ports can automatically use a straight-through as a crossover cable. I have done this before with varied success. It seems the more modern ethernet controllers have this ability.
  • David Harris
    David Harris almost 14 years
    Why was this downvoted?
  • Steven
    Steven over 11 years
    I have found a way over Fields and Methods so that SetPortPoint have the fields name, pattern etc. and over an abstract class the methods to get them so now i have 1 Interface and 1 abstract class. So it's a little bit diferent of what you say. Thank you