Set up network for gaming

My friend and I have MBPs and want to set up a network so we can play against each other in XP. Can anyone tell me how we do this?

HI Maakr,
First you want to enable the Switch to Layer3 mode as explained below:
Upgrade the firmware to 1.1.2.0.Use the below link to download the firmware.
http://www.cisco.com/cisco/software/release.html?mdfid=283019686&softwareid=282463181&release=1.1.2.0&relind=AVAILABLE&rellifecycle=&reltype=latest
Configure the switch with below commands to change form Layer 2 to 3
The set system mode Privileged EXEC mode command puts the device into
switch mode (Layer 2 mode) or router mode (Layer 3 mode).
Syntax
set system mode {router | switch}
Parameters
• router—Specifies that the device functions as a switch-router.
• switch—Specifies that the device functions as a switch.
Default Configuration
The default configuration is switch mode (Layer 2).
Command Mode
Privileged EXEC mode
User Guidelines
After executing the command, the Startup Configuration file is deleted and the
device is rebooted. It is highly recommended to back up the Startup Configuration
file before executing this command.
Example
The following example configures the device to function as a switch-router (Layer
3), with QoS and Policy based VLANs.
switchxxxxxx# set system mode router
After this
Kindly check the Menu--->IP configuration--->IPV4 interface---->you add the SVI interfaces for multi vlans.
regards
Moorthy

Similar Messages

  • How do I set up networking for DNS resolution?

    I am setting up a brand new iMac (10.9.4). I've put the two internal DNS servers into the network configuration (Windows Servers running DNS). However pinging by hostname and FQDN doesn't work
    Matts-iMac:~ mattgeorge$ ping victor.rafmuseum.local
    ping: cannot resolve victor.rafmuseum.local: Unknown host
    Interestingly, nslookup is fine:
    Matts-iMac:~ mattgeorge$ nslookup victor.rafmuseum.local
    Server: 172.16.0.11
    Address: 172.16.0.11#53
    Name: victor.rafmuseum.local
    Address: 172.16.0.15
    And pinging the IP address works correctly too. Windows servers appear in the finder and I can connect to them from there but the Connect to Server option again will not resolve a DNS address. Also in researching this I note that Directory Access no longer appears in Applications.
    Tim

    This is the chowder-headed default value that's arises from older Windows Server installations.   Microsoft fixed this in more recent versions.  Folks that didn't know DNS and that chose to take the default top-level domain from older Windows Server installations were led into a morass, unfortunately. 
    You're basically going to have to run parallel DNS services until you can reconfigure those Windows Server DNS servers over into a valid top-level domain — when Microsoft specified this default of .local, .local was not a reserved top-level domain — or otherwise limp along here.   This because .local is a reserved domain now, as it's used for Bonjour/mDNS. 
    The usual fix is to move into a real and registered domain, which is obviously a pain now, but only tends to get worse over time.
    The usual workaround is to set up parallel DNS services, to add "local" to the list of search domains within network preferences (haven't tried this recently, but it was the old workaround for this case, see Mac OS X v10.4, 10.5, 10.6: How to look up ".local" hostnames via both Bonjour and standard DNS) and then incrementally migrate preferably to a real-and-registered domain over time, and/or to otherwise avoid using the .local domain where that's feasible. 
    FWIW, rafmuseum.net is currently available for registration, and you can use a subdomain of one you already have — if one of those other existing registrations is associated with your organization — and there are a gazillion other new top-level domains now or coming online to choose from — though you can't have .local here, as that's RFC-reserved for Bonjour/mDNS activity.

  • Set up network for Windows Vista PC and MacBook

    Hey guys. I am trying to share files and a printer connected to my Windows Vista PC. Yesterday I could see the Widnows "public" folders and be able to take files from them, but couldn't put files in the folders. Then I went and set up an account on both computer with the same exact user name and password (I saw thatw as necessary somewhere). However I can't print from my Mac through the PC. Somietimes when I go to add Windows printer under system prefs printers, I see the printer and sometimes I don't. Even when I see it, I can't get it to add correctly and work. I NEED HELP. I have no idea what I am doing wrong. The name of the wrokgroup on my PC is WORKGROUP. How can I check and make sure that is the same on my MacBook? Any help would be GREATLY appreciated. I have file and printer sharing on on both computers obviously

    I tried these steps here:
    http://articles.techrepublic.com.com/5100-10878_11-6174105.html
    However I don't have a selection called share Windows in my sharing prefs, nor do I have a Utility called Directory Access

  • Need hlp setting up router for gaming

    First let me say that im not terribly tech savvy so please remember this if you post a response (thnx)  I play Star was Galaxies online and i have wired 2 desktops and one wireless laptop connected to a wrt54gs router  and its hooked up yo my modem. my internet works fine. heres the problem  awful lag and 10-50 percent packet loss in the game. Gameplay is impossible. I contacted the games tech support and ran a pathping and tracert. after viewing this info the tech support told me that my router firewall was interfering and i should set it up to work with the game.  the thing is  i dont know how to do that (Doh!) In there response there was mention of configuring ports that the game uses  but thats all greek to me.  any  help would be appreciated or possibly a link to a step by step to doing this   thnx

    Check this. http://portforward.com/

  • Setting up Bridge for multiple users on a network

    New Bridge user here
    Can anyone give me some advice on how to set up Bridge for use by multiple users over a network / server?
    We have a large image bank stored on a server and ideally if any one user adds keywords or other metadata to an image I would like the rest of the users to be able to view that data and be able to use it in searches. AS more than one user could add keywords at any time I was wondering is it possible to set up a central keyword file or cache so any updates are available to all users.
    Do I set up a shared cache? What happens if it becomes corrupted and has to be rebuilt, do the keywords disappear as well?
    Are the keywords associated with that particular cache or are they stored in a separate file?
    Thanks,
    Hazel

    Curt
    how do you know if your using the
    Central cache all distributed cache ?
    and are they both stored in the same place ?

  • Recently bought 4S, it keeps searching for network, reads invalid SIM, keeps searching for network, have switched the handset on and off several times, have tried 2 new micro chips, re set the network too ! nothing seems to be working !!! Iam in Delhi

    recently bought 4S, it keeps searching for network, reads invalid SIM, keeps searching for network, have switched the handset on and off several times, have tried 2 new micro chips, re set the network too ! nothing seems to be working !!! Iam in Delhi

    Obvious question... where did you buy your 4S and is factory unlocked?

  • Setting iOS DNS for All WiFi Networks

    This article describes how to set the DNS for WiFi connections on iOS:
    http://techinch.com/blog/change-your-dns-settings-on-iphone-ipod-touch-and-ipad
    The problem is that it specifies DNS for an individual network
    connection, not for all connections.
    Does anyone know a way to change iOS DNS for all WiFi networks in one
    fell swoop?

    I have my ios devices DNS set via DHCP
    You'd have to move to an MDM solution if you want over the air, push profile configuration setting to the devices
    such as osx server Profie Manager. You may be able to do it with custom settings, I haven't tried it myself
    The basic wifi setting in OSX server PM only allow settings for wifi SSID password etc
    no DNS settings ip address etc. alternative MDM solutions may give you more options

  • Authentication is required to set the network proxy used for downloading packages

    hello all,
    we bought a Sun X3-2 and our reseller installed OL6.5 and SRS 5.4.2. When user logs in, a window occurs regularly, displaying this message.
    Authentication is required to set the network proxy used for downloading packages
    After click on Cancel, the window re-appears then minutes after. It seems that it is related to polkit:
    /usr/libexec/polkit-gnome-authentication-agent-1
    Can i stop this service? Are there any hints to tune Oracle Linux when using sunrays? users don't need to update packages because the server is managed.
    thanks in advance for help,
    gerard

    i'm not fully agree with you, this problem arises because i'm using sunray. But you're right, i found the solution when searching on the net, not in oracle forums.
    The solution is to create
    .config/autostart/*.desktop
    with:
    X-GNOME-Autostart-enabled=false
    it seems ok, even if i have other problems, for instance, firefox and thunderbird crashing regularly, even if i'm up to date with packages (uln too).
    In the past, i used to use sunrays with solaris 10, it existed a document to tune gnome when using sunrays, i don't find the same thing with oracle linux.
    thanks for your reply,
    gerard

  • I want to set up security for my linksys network.  I foll...

    I want to set up security for my linksys network.  I followed the directions outlined on the linksys web site.  I get through the process, create a password (key) and I save the settings.   When I try to log on from my laptop, I am asked for a password, however when I type the password in, the statement says "invalid number of caracters.  How do I get the password process to work so that I am able to secure my network.  Also, without security, can someone break into my laptop and corrupt my files.

    With WEP, you must enter WEP "key 1"  (found in the router)  into your computer, not the WEP password or passphase.
    However, you should be using WPA2, or at least WPA, and a strong password.
    If you use an unsecured wireless router, anyone within range can login and use your Internet connection. At a minumum, this means that they will be using your bandwidth. At worst, they could be uploading copyrighted music, sending spam email, distributing viruses, or downloading child pornography --- all from an account with your name on it!   Additionally, once someone is on your wireless network, they are in a very convenient spot to start attacking your computer.  They  have immediate access to all your shared files, and they could corrupt, steal, or delete them.  With some work, they could likely get to your other files also.  So my advice is --- secure your wireless network.
    To set up wireless security, you must use a computer that is wired to the router.
    Where to find the router settings: The router's login password is usually on one of the "Administration" pages. The other settings are all found in the "Wireless" section of the router's setup pages, located at 192.168.1.1
    First, give your router a unique SSID. Don't use "linksys".
    Make sure "SSID Broadcast" is set to "enabled".
    Next, leave the router at its default settings (except for the unique SSID), and then use your pc to connect wirelessly to the router. Test your wireless Internet connection and make sure it is working correctly. You must have a properly working wireless connection before setting up wireless security.
    To implement wireless security, you need to do one step at a time, then verify that you can still connect your wireless computer to the router.
    Next, encrypt your wireless system using the highest level of encryption that all of your wireless devices will support. Common encryption methods are:
    WEP - poor (see note below)
    WPA (sometimes called PSK, or WPA with TKIP) - good
    WPA2 (sometimes called PSK2, or WPA with AES) - best
    WPA and WPA2 sometimes come in versions of "personal" and "enterprise". Most home users should use "personal". Also, if you have a choice between AES and TKIP, and your wireless equipment is capable of both, choose AES. With any encryption method, you will need to supply a key (sometimes called a "password" ).
    The wireless devices (computers, printers, etc.) that you have will need to be set up with the SSID, encryption method, and key that matches what you entered in the router.
    Retest your system and verify that your wireless Internet connection is still working correctly.
    And don't forget to give your router a new login password.
    Picking Passwords (keys): You should never use a dictionary word as a password. If you use a dictionary word as a password, even WPA2 can be cracked in a few minutes. When you pick your login password and encryption key (or password or passphrase) you should use a random combination of capital letters, small letters, and numbers, but no spaces. A login password, should be 12 characters or more. WPA and WPA2 passwords should be at least 24 characters. Note: Your key, password, or passphrase must not have any spaces in it.
    Most home users should have their routers set so that "remote management" of the router is disabled. If you must have this option enabled, then your login password must be increased to a minumum of 24 random characters.
    One additional issue is that Windows XP requires a patch to run WPA2. Go to Microsoft Knowledge base, article ID=917021 and it will direct you to the patch.
    Sadly, the patch is not part of the automatic Windows XP updates, so lots of people are missing the patch.
    Note:
    WEP is no longer recommended. The FBI has demonstrated that WEP can be cracked in just a few minutes using software tools that are readily available over the Internet. Even a long random character password will not protect you with WEP. You should be using WPA or preferably WPA2 encryption.

  • Setting up guest networks for AX

    I have the older style AX (round, white one) and I want to be able to set up a guest network for a rental property in my basement. I am using airport utility obviously. But I dont see any way to add networks.
    Any ideas?
    Thanks

    If you want to create a separate wireless network where guests would have Internet access by not to your wireless network's assets, then replacing your AEBS with a newer dual-band version would be the way to go. Otherwise, it may be possible to create a "guest" network separate of your AEBS, but it will require additional networking equipment to do so ... and if you go that route, you might as well invest in the dual-band model.

  • Best Connection with Airport Express for gaming

    Can anyone help me with how I can get the strongest connection from my Airport Express to my PS3 for gaming.
    I recently upgraded my old Airport Extreme to an Airport express and everything is great.  My internet speeds from the wall are around 90mbps and ruining my laptop and devices from my Airport Express are around 70mbps which I can live with.
    When my PS3 is connected it only received around 10mbps which is a massive decrease.
    Can anyone help with the best settings for the PS3 to speed it up.  My old Airport Extreme used to connected at around 45mbps which was great.
    Anyone????????????????

    Julie Kruyne wrote:
    I am trying to do the exact same thing and am having some difficulties.
    It was easier for "WiseJD" because he was using two Apple base stations, instead of your AT&T router.
    I select Manual Setup, it just sits there thinking - I can't get into the actual set up.
    So you see the Express in AirPort Utility, but when you select it and select "Manual Setup", nothing happens?
    When setting up the Express to extend my existing wireless network (AT&T 2WIRE modem and Airport Extreme), do I initially connect the Express, via Ethernet cable, to the modem or the Extreme?
    I'll guess that the AT&T device is connected to your broadband connection. Is the 2WIRE device either without Wi-Fi support or is that turned off? How is the Extreme configured, in particular in the AirPort/Wireless panel "Wireless Mode" setting and in the Internet/Internet Connection panel, "Connection Sharing" setting?
    If anyone could provide a step by step process on exactly how to set up the Express to extend my existing network, I would be grateful.
    I have very little experience with mixed-vendor home networking, but someone should be able to help.

  • Extending Network and Gaming Consoles

    I have a airport extreme set up in my office. Downstairs I have 4 gaming consoles, which require fast internet speeds other wise it effects game play. The signal where 2 of my consoles are do not get great reception. So I know I can use an airport express, plug it in where I get reception downstairs and have it extend the range of my network.
    However, I have 2 questions about this:
    1) I have my extreme set up for N and my gaming consoles are G. The extreme is backwards compatible, but will the same hold true if I add an Express to the network? Will my G consoles still work?
    2) In my head I think this would slow down the speed. I would think my console would have to go through an express, then the express sends up to my extreme, then finally out to the internet. Would adding an express slow the connection at all because now it has one extra point it travels through?
    Thanks,
    Andrew

    1) I have my extreme set up for N and my gaming consoles are G. The extreme is backwards compatible, but will the same hold true if I add an Express to the network? Will my G consoles still work?
    The 802.11n AirPort Express Base Station (AXn) can be added to your network configuration to extend the wireless range of the 802.11n AirPort Extreme Base Station (AEBSn). If you configure the overall extended network for the "802.11n (802.11b/g compatible)" radio mode, your "g" game consoles should be able to connect.
    2) In my head I think this would slow down the speed. I would think my console would have to go through an express, then the express sends up to my extreme, then finally out to the internet. Would adding an express slow the connection at all because now it has one extra point it travels through?
    The bottom line ... yes, extending the network and support for "g" clients will reduce the overall bandwidth available for the wireless network. If bandwidth performance is critical, you may want to consider switching to an all Ethernet-based solution.

  • How do I set proxy settings for a Java app behind a corporate server?

    I have the source code of a Download Manager program written in Java. It has to be run within my college network in which we use the "Corporate Client" server to access the internet. The HTTP proxy is 172.16.68.6 and Port number is 3128. How do I define these parameters in my java program so that it can download files from the internet?
    The source code for the program is:
    There are four classes:
    1. DownloadManager.java
    2. Download.java
    3. DownloadTable.java
    4. ProgressRenderer.java
    /*__DownloadManager.java__*/
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    // The Download Manager.
    public class DownloadManager extends JFrame
            implements Observer {
        // Add download text field.
        private JTextField addTextField;
        // Download table's data model.
        private DownloadsTableModel tableModel;
        // Table listing downloads.
        private JTable table;
        // These are the buttons for managing the selected download.
        private JButton pauseButton, resumeButton;
        private JButton cancelButton, clearButton;
        // Currently selected download.
        private Download selectedDownload;
        // Flag for whether or not table selection is being cleared.
        private boolean clearing;
        // Constructor for Download Manager.
        public DownloadManager() {
            // Set application title.
            setTitle("Download Manager");
            // Set window size.
            setSize(640, 480);
            // Handle window closing events.
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    actionExit();
            // Set up file menu.
            JMenuBar menuBar = new JMenuBar();
            JMenu fileMenu = new JMenu("File");
            fileMenu.setMnemonic(KeyEvent.VK_F);
            JMenuItem fileExitMenuItem = new JMenuItem("Exit",
                    KeyEvent.VK_X);
            fileExitMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionExit();
            fileMenu.add(fileExitMenuItem);
            menuBar.add(fileMenu);
            setJMenuBar(menuBar);
            // Set up add panel.
            JPanel addPanel = new JPanel();
            addTextField = new JTextField(30);
            addPanel.add(addTextField);
            JButton addButton = new JButton("Add Download");
            addButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionAdd();
            addPanel.add(addButton);
            // Set up Downloads table.
            tableModel = new DownloadsTableModel();
            table = new JTable(tableModel);
            table.getSelectionModel().addListSelectionListener(new
                    ListSelectionListener() {
                public void valueChanged(ListSelectionEvent e) {
                    tableSelectionChanged();
            // Allow only one row at a time to be selected.
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            // Set up ProgressBar as renderer for progress column.
            ProgressRenderer renderer = new ProgressRenderer(0, 100);
            renderer.setStringPainted(true); // show progress text
            table.setDefaultRenderer(JProgressBar.class, renderer);
            // Set table's row height large enough to fit JProgressBar.
            table.setRowHeight(
                    (int) renderer.getPreferredSize().getHeight());
            // Set up downloads panel.
            JPanel downloadsPanel = new JPanel();
            downloadsPanel.setBorder(
                    BorderFactory.createTitledBorder("Downloads"));
            downloadsPanel.setLayout(new BorderLayout());
            downloadsPanel.add(new JScrollPane(table),
                    BorderLayout.CENTER);
            // Set up buttons panel.
            JPanel buttonsPanel = new JPanel();
            pauseButton = new JButton("Pause");
            pauseButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionPause();
            pauseButton.setEnabled(false);
            buttonsPanel.add(pauseButton);
            resumeButton = new JButton("Resume");
            resumeButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionResume();
            resumeButton.setEnabled(false);
            buttonsPanel.add(resumeButton);
            cancelButton = new JButton("Cancel");
            cancelButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionCancel();
            cancelButton.setEnabled(false);
            buttonsPanel.add(cancelButton);
            clearButton = new JButton("Clear");
            clearButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionClear();
            clearButton.setEnabled(false);
            buttonsPanel.add(clearButton);
            // Add panels to display.
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(addPanel, BorderLayout.NORTH);
            getContentPane().add(downloadsPanel, BorderLayout.CENTER);
            getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
        // Exit this program.
        private void actionExit() {
            System.exit(0);
        // Add a new download.
        private void actionAdd() {
            URL verifiedUrl = verifyUrl(addTextField.getText());
            if (verifiedUrl != null) {
                tableModel.addDownload(new Download(verifiedUrl));
                addTextField.setText(""); // reset add text field
            } else {
                JOptionPane.showMessageDialog(this,
                        "Invalid Download URL", "Error",
                        JOptionPane.ERROR_MESSAGE);
        // Verify download URL.
        private URL verifyUrl(String url) {
            // Only allow HTTP URLs.
            if (!url.toLowerCase().startsWith("http://"))
                return null;
            // Verify format of URL.
            URL verifiedUrl = null;
            try {
                verifiedUrl = new URL(url);
            } catch (Exception e) {
                return null;
            // Make sure URL specifies a file.
            if (verifiedUrl.getFile().length() < 2)
                return null;
            return verifiedUrl;
        // Called when table row selection changes.
        private void tableSelectionChanged() {
        /* Unregister from receiving notifications
           from the last selected download. */
            if (selectedDownload != null)
                selectedDownload.deleteObserver(DownloadManager.this);
        /* If not in the middle of clearing a download,
           set the selected download and register to
           receive notifications from it. */
            if (!clearing) {
                selectedDownload =
                        tableModel.getDownload(table.getSelectedRow());
                selectedDownload.addObserver(DownloadManager.this);
                updateButtons();
        // Pause the selected download.
        private void actionPause() {
            selectedDownload.pause();
            updateButtons();
        // Resume the selected download.
        private void actionResume() {
            selectedDownload.resume();
            updateButtons();
        // Cancel the selected download.
        private void actionCancel() {
            selectedDownload.cancel();
            updateButtons();
        // Clear the selected download.
        private void actionClear() {
            clearing = true;
            tableModel.clearDownload(table.getSelectedRow());
            clearing = false;
            selectedDownload = null;
            updateButtons();
      /* Update each button's state based off of the
         currently selected download's status. */
        private void updateButtons() {
            if (selectedDownload != null) {
                int status = selectedDownload.getStatus();
                switch (status) {
                    case Download.DOWNLOADING:
                        pauseButton.setEnabled(true);
                        resumeButton.setEnabled(false);
                        cancelButton.setEnabled(true);
                        clearButton.setEnabled(false);
                        break;
                    case Download.PAUSED:
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(true);
                        cancelButton.setEnabled(true);
                        clearButton.setEnabled(false);
                        break;
                    case Download.ERROR:
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(true);
                        cancelButton.setEnabled(false);
                        clearButton.setEnabled(true);
                        break;
                    default: // COMPLETE or CANCELLED
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(false);
                        cancelButton.setEnabled(false);
                        clearButton.setEnabled(true);
            } else {
                // No download is selected in table.
                pauseButton.setEnabled(false);
                resumeButton.setEnabled(false);
                cancelButton.setEnabled(false);
                clearButton.setEnabled(false);
      /* Update is called when a Download notifies its
         observers of any changes. */
        public void update(Observable o, Object arg) {
            // Update buttons if the selected download has changed.
            if (selectedDownload != null && selectedDownload.equals(o))
                updateButtons();
        // Run the Download Manager.
        public static void main(String[] args) {
            DownloadManager manager = new DownloadManager();
            manager.show();
    This example shows how to create a simple download manager in Java. It contains four classes in foru Java source files:
    Download.java: Contains Download class which downloads a file from a URL.
    DownloadManager.java: Contains the main class for download manager application.
    DownloadsTableModel.java: Contains the class which manages the download table's data.
    ProgressRenderer.java: Contains the class which is responsible to render a JProgressBar in a table cell.
    The contents of the listed files are written below.
    /*__Download.java__*/
    import java.io.*;
    import java.net.*;
    import java.util.*;
    // This class downloads a file from a URL.
    class Download extends Observable implements Runnable {
        // Max size of download buffer.
        private static final int MAX_BUFFER_SIZE = 1024;
        // These are the status names.
        public static final String STATUSES[] = {"Downloading",
        "Paused", "Complete", "Cancelled", "Error"};
        // These are the status codes.
        public static final int DOWNLOADING = 0;
        public static final int PAUSED = 1;
        public static final int COMPLETE = 2;
        public static final int CANCELLED = 3;
        public static final int ERROR = 4;
        private URL url; // download URL
        private int size; // size of download in bytes
        private int downloaded; // number of bytes downloaded
        private int status; // current status of download
        // Constructor for Download.
        public Download(URL url) {
            this.url = url;
            size = -1;
            downloaded = 0;
            status = DOWNLOADING;
            // Begin the download.
            download();
        // Get this download's URL.
        public String getUrl() {
            return url.toString();
        // Get this download's size.
        public int getSize() {
            return size;
        // Get this download's progress.
        public float getProgress() {
            return ((float) downloaded / size) * 100;
        // Get this download's status.
        public int getStatus() {
            return status;
        // Pause this download.
        public void pause() {
            status = PAUSED;
            stateChanged();
        // Resume this download.
        public void resume() {
            status = DOWNLOADING;
            stateChanged();
            download();
        // Cancel this download.
        public void cancel() {
            status = CANCELLED;
            stateChanged();
        // Mark this download as having an error.
        private void error() {
            status = ERROR;
            stateChanged();
        // Start or resume downloading.
        private void download() {
            Thread thread = new Thread(this);
            thread.start();
        // Get file name portion of URL.
        private String getFileName(URL url) {
            String fileName = url.getFile();
            return fileName.substring(fileName.lastIndexOf('/') + 1);
        // Download file.
        public void run() {
            RandomAccessFile file = null;
            InputStream stream = null;
            try {
                // Open connection to URL.
                HttpURLConnection connection =
                        (HttpURLConnection) url.openConnection();
                // Specify what portion of file to download.
                connection.setRequestProperty("Range",
                        "bytes=" + downloaded + "-");
                // Connect to server.
                connection.connect();
                // Make sure response code is in the 200 range.
                if (connection.getResponseCode() / 100 != 2) {
                    error();
                // Check for valid content length.
                int contentLength = connection.getContentLength();
                if (contentLength < 1) {
                    error();
          /* Set the size for this download if it
             hasn't been already set. */
                if (size == -1) {
                    size = contentLength;
                    stateChanged();
                // Open file and seek to the end of it.
                file = new RandomAccessFile(getFileName(url), "rw");
                file.seek(downloaded);
                stream = connection.getInputStream();
                while (status == DOWNLOADING) {
            /* Size buffer according to how much of the
               file is left to download. */
                    byte buffer[];
                    if (size - downloaded > MAX_BUFFER_SIZE) {
                        buffer = new byte[MAX_BUFFER_SIZE];
                    } else {
                        buffer = new byte[size - downloaded];
                    // Read from server into buffer.
                    int read = stream.read(buffer);
                    if (read == -1)
                        break;
                    // Write buffer to file.
                    file.write(buffer, 0, read);
                    downloaded += read;
                    stateChanged();
          /* Change status to complete if this point was
             reached because downloading has finished. */
                if (status == DOWNLOADING) {
                    status = COMPLETE;
                    stateChanged();
            } catch (Exception e) {
                error();
            } finally {
                // Close file.
                if (file != null) {
                    try {
                        file.close();
                    } catch (Exception e) {}
                // Close connection to server.
                if (stream != null) {
                    try {
                        stream.close();
                    } catch (Exception e) {}
        // Notify observers that this download's status has changed.
        private void stateChanged() {
            setChanged();
            notifyObservers();
    /*__DownloadTableModel.java__*/
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    // This class manages the download table's data.
    class DownloadsTableModel extends AbstractTableModel
            implements Observer {
        // These are the names for the table's columns.
        private static final String[] columnNames = {"URL", "Size",
        "Progress", "Status"};
        // These are the classes for each column's values.
        private static final Class[] columnClasses = {String.class,
        String.class, JProgressBar.class, String.class};
        // The table's list of downloads.
        private ArrayList downloadList = new ArrayList();
        // Add a new download to the table.
        public void addDownload(Download download) {
            // Register to be notified when the download changes.
            download.addObserver(this);
            downloadList.add(download);
            // Fire table row insertion notification to table.
            fireTableRowsInserted(getRowCount() - 1, getRowCount() - 1);
        // Get a download for the specified row.
        public Download getDownload(int row) {
            return (Download) downloadList.get(row);
        // Remove a download from the list.
        public void clearDownload(int row) {
            downloadList.remove(row);
            // Fire table row deletion notification to table.
            fireTableRowsDeleted(row, row);
        // Get table's column count.
        public int getColumnCount() {
            return columnNames.length;
        // Get a column's name.
        public String getColumnName(int col) {
            return columnNames[col];
        // Get a column's class.
        public Class getColumnClass(int col) {
            return columnClasses[col];
        // Get table's row count.
        public int getRowCount() {
            return downloadList.size();
        // Get value for a specific row and column combination.
        public Object getValueAt(int row, int col) {
            Download download = (Download) downloadList.get(row);
            switch (col) {
                case 0: // URL
                    return download.getUrl();
                case 1: // Size
                    int size = download.getSize();
                    return (size == -1) ? "" : Integer.toString(size);
                case 2: // Progress
                    return new Float(download.getProgress());
                case 3: // Status
                    return Download.STATUSES[download.getStatus()];
            return "";
      /* Update is called when a Download notifies its
         observers of any changes */
        public void update(Observable o, Object arg) {
            int index = downloadList.indexOf(o);
            // Fire table row update notification to table.
            fireTableRowsUpdated(index, index);
    /*__ProgressRenderer.java__*/
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    // This class renders a JProgressBar in a table cell.
    class ProgressRenderer extends JProgressBar
            implements TableCellRenderer {
        // Constructor for ProgressRenderer.
        public ProgressRenderer(int min, int max) {
            super(min, max);
      /* Returns this JProgressBar as the renderer
         for the given table cell. */
        public Component getTableCellRendererComponent(
                JTable table, Object value, boolean isSelected,
                boolean hasFocus, int row, int column) {
            // Set JProgressBar's percent complete value.
            setValue((int) ((Float) value).floatValue());
            return this;
    }

    Thank you for the quick reply! But the solution provided by you, it seems, has still not been able to address my issue. I ran the program at command prompt with your said parameters, but the download still gave an error in the App window.
    Also, is there some way of defining these parameters in the source code? I am keen in using NetBeans to run the program.
    Cheers!

  • Need help setting up MoCa for superior speed for upstair room in house

    Hey guys i need some help. I just upgraded my plan to the 50/20 Fios and now i really want that speed upstairs to my gameroom. Before i had the 10/2 plan where wireless was sufficient (i could get 9mpbs download speed wirelessly everywhere i needed internet using the mi424wr)
    But now this crappy (no offense ) router is just not sufficient for the 50mbps download speed. Even if my laptop is RIGHT NEXT to the router, i only get max speed of 20 - 23mpbs download. Whereas if im connected via ethernet, i get the full 50+Mbps download speed. For some reason the upload speed is fine at over 20mpbs. (Anyone has any explanation for this? If other 2.4ghz devices were causing interferences, shouldnt the upload speed be affected also?) And Yes, i have changed the channel to 11 (every other wifi network is on 6)
    I also have this hawking high gain antenna connected to the router: http://www.newegg.com/Product/Product.aspx?Item=N82E16833164156
    In any case i feel that MoCa would be a much cheaper and more reliable approach to achieve better speeds compared to buying a wireless n dual band router & adapter
    Currently i have the ONT connect to the WAN Router VIA Coax
    I also have Dish network for Tv services with the STB upstairs (same room where i want the Ethernet from MoCa to connect to PC,PS3). Not sure if relevent, but the dish is set up so that my downstair tv has acces to Dish tv VIA the coax connected to the STB upstairs. So ONE STB provides TV upstairs AND TV downstairs with dish services via Coax.
    From the various articles i have read, this is my understanding of what i should do but of course im a newbie so i need your suggestions. I should add splitter the coax coming out of the ONT and connect one split to the router and the other split to the wall? then upstairs add a splitter to the coax connection from the wall and split one for dish STB and split one for MoCa actiontec which will then be connect to the internet and i could run ethernet from MoCa actiontec to ps3 and PC.
    Is that anywhere even close to a working solution or im just dreaming that it would this easy? lol
    Thanks for all the help!

    mominn8266 wrote:
    The actiontec router is b/g mode only and I've changed it from mixed to g only. I wish they had upgraded my router with the services but nope still have the crappy actiontec router.
    If you read my post I've already changed the channel most appropriate for me.
    I've also read that post about interferences but if im literally ONE feet away from the router, I should atleast get above 40 mbps download speed. Why is my upload speed above 20mbps but Download speed can't exceed 23mbps?
    Is there a possible solution for moca to coexist with dish services? A special splitter to seperate both lines? Or is powerline my only option?
    Keep in mind, with Wireless you're limited by the fact that it is also a Half Duplex connection by design (can only send OR receive on a radio, can't do both like you can on Full Duplex Wired connections) which reduces speeds, and also protocol overhead which increases as you add additional devices to an access point.and increase traffic in a broad scale. So, if you're getting 22-25Mbps on Wireless G, that's about all you're going to get from it. 54Mbps is a theoretical limit with the assumption you've cut down all overhead, have a full duplex connection and are not encountering noise.
    I recall seeing something on DSLReports about using MoCa with a Satellite TV provider, and it involved a lot of filtering within the coaxial to work. Ideally, you're best using a dedicated line for Coaxial if you're going to use MoCa to cut down on the complexity and risks caused by using a satellite system's coax.
    ========
    The first to bring me 1Gbps Fiber for $30/m wins!

  • New Macbook Pro 2014 for Gaming / casual use

    Hello there! I currently have a 2011 13" Macbook Pro with
    Intel HD Graphics 3000 512 MB
    16GB RAM
    500GB Harddrive
    and a 2.4 GHz Intel Core i5
    I really like to play video games but with this current setup ^ its very sluggish and I get very low FPS
    I'm considering getting the  13-inch MacBook Pro with Retina display and with the 3.0GHz Dual-core Intel Core i7, Turbo Boost up to 3.5GHz 
    My questions:
    Will this computer be able to handle a constant 60fps in most games? (Borderlands 2, portal 2, Bioshock Infinite)
    And I've heard other places that this computer also has a Nividia graphics card that it switches over to when you play anything that requires more than the Intel 4000 that it comes with.
    Thanks for the help!

    Hi there!
    No it wont.
    Macbook Pro's hardware are mediocre for gaming. In your specific case, the 13" does not offer the possibility of a dedicated graphics card, only comes with Intel Iris. The 15" one does, the NVIDIA GT 750M with 2gb, yet it's weak for gaming above 40-50 fps, also dual-core processors are not very powerful these days either and you will most likely experience heating issues on intensive gaming sessions. If you like gaming Mac is not very efficient for it, unless you get a mac pro, but of course you would loose portability. The 27" iMac can be set with the GT 780m, it has 4gb but its still weak since its a mobile graphic chip as well, even the 5k iMac uses almost identical hardware setup than the regular iMac but with an AMD chip (also 4gb ram), while the 5k looks great with such hardware it is unable to handle smooth gaming on that resolution as well.
    Dont get me wrong, I'm not here to trash Apple, at the office we work with around 8 to 10 macbook pros but none of them, not even high end ones are able to game smoothly, in fact, some games run better on windows via bootcamp than OS X.
    Hope it helps.

Maybe you are looking for

  • Magic Mouse Scroll Idea for Apple

    I love using the new Magic Mouse and the Scroll feature is wonderful. Having said that, it creates havoc in Photoshop as any movement of your fingertip when a zoomed window size creates scroll bars makes the cursor jump. So when using Photoshop, I op

  • Stuck at BIOS splash screen

    I own a lenovo b570e model 20713. I was trying to install Ubuntu 14.04 on it, and after installation I rebooted. Now the computer is stuck at boot splash screen, will not let me press f2 or f12. Just hangs there at the splash screen. Any suggestions?

  • Can some one please tell me what is the problem in the below pl/sql block

    Hi, I have problem with the following pl/sql block, I need this with bulk operation. -- Assume the following scenario, we are validating dept (master) and emp(child) which are my temporary tables and updating the status back to -- dept ( for all the

  • Value add with G-ATP

    Hi we currently have DP and SNP , we are looking on to add value with G-ATP, can any one list out points for what value addition can be done by implementing G-ATP.

  • My iPod Classic won't restore

    I have a 160 gb iPod Classic that I recieved last month as a replacement for my previous one which was having the same problem. It was working fine until yesterday and songs started to skip, so I plugged it in to my computer which is running on OS X