Announcement

Collapse
No announcement yet.

Define network connection

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Define network connection

    Hello all

    I have a lap top that connect via 2 method
    1) Wireless
    2) LAN

    i would like to surf the internet via wireless and use the LAN whenever I need to gain access to LAN resources such as files, computers etc.

    How can I tell if I'm accessing the internet via the wireless connection and not the LAN interface?

    Thanks a lot for your help.

  • #2
    Re: Define network connection

    What OS is on the laptop?
    If it is Windows, it will be difficult - you could try static IPs with no DG for the LAN connection, but that won't stop it using the WiFi to access LAN resources

    Why do you need to do this?
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Define network connection

      Hi Ossian, thanks for your reply.

      1st i have windows xp on my laptop

      my wireless connection is working simultaneous with the LAN so i have 2 ip addresses, 1 issued by my domain (192.168.x.x) and 1 issued by my router 10.0.0.x).
      The 2 networks have no connections between them and they r separated.

      The reason i need to do this is because my LAN connection to the internet is very slow and DL files in 30KBs, and the ADSL is much faster.

      I still need to keep using the DHCP.

      thanks for all help

      Comment


      • #4
        Re: Define network connection

        OK, in that case removing the DG on your LAN connection would work
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          Re: Define network connection

          Windows normally does select this automatically. The LAN adaptor does normally take priority as it has a higher Metric value.

          See if this helps http://www.howtogeek.com/howto/27994...ds-in-windows/

          ** I have known this not be be very consistent in certain scenarios though.
          Caesar's cipher - 3

          ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

          SFX JNRS FC U6 MNGR

          Comment


          • #6
            Re: Define network connection

            Originally posted by Tasuooooo View Post
            How can I tell if I'm accessing the internet via the wireless connection and not the LAN interface?
            For Windows XP you can use the command Route print. It shows the available gateways on the first lines, and it shows the actual Default gateway at the end of the list. (usualy it is the default gateway from the nic that has most recently started/updated a network connection)

            Maybe you also can tell by the public address which connection is used?

            sample batch:
            Code:
            @echo off
            
            :: you can use use one of the urls below to get your public ip addres
            Set "url=myip.dnsomatic.com"
            Set "url=automation.whatismyip.com/n09230945.asp"
            Set "url=www.checkip.altervista.org/ip.php"
            
            for /f "delims=/" %%! in ('echo.%url%') do set "dom=%%!"
            title -  http://%url%  -  [%dom%]  -
            
            
            :: get internal IPs
            for /f "tokens=1,* delims=1" %%a in (
               'pathping %dom% -4 -n -p 1 -q 1 -w 1 -h 1 ^|findstr /rc:"^ *[0-1] *[0-9]*\.[0-9]*\.[0-9]*\.[0-9]* *$"'
               ) do call:IP %%b
            
            :: get public IP
            for /f %%! in (
               'wget-1.14.exe -q -O - %url%'
               ) do call:PublicAddres %%!
            
            :: show results
            echo.----------------------------------
            echo.Current internet connection via...
            echo.
               Set MyIP
               Set DefaultGateway
               set PublicAddres
            echo.----------------------------------
            
            echo.&pause>nul
            goto:EOF + + +
            :IP
               If 9%n%==9 Set "MyIP=%*"
               If 9%n%==91 Set "DefaultGateway=%*"
               set /a n= %n% +1
               exit /b 0
            :PublicAddres
               Set "PublicAddres=%*"
               exit /b 0
            goto:EOF + + +
            Download: wget-1.14.exe


            /Rems
            Last edited by Rems; 18th October 2012, 16:56.

            This posting is provided "AS IS" with no warranties, and confers no rights.

            __________________

            ** Remember to give credit where credit's due **
            and leave Reputation Points for meaningful posts

            Comment


            • #7
              Re: Define network connection

              OK, in that case removing the DG on your LAN connection would work
              thanks Ossian, delete the DG did work. but as i was saying i still need to use the DHCP, and i would like to do this without the need to configure the DHCP.

              Windows normally does select this automatically. The LAN adaptor does normally take priority as it has a higher Metric value.
              thanks L4ndy, i will try the priority metric thing
              i will let you know

              Comment

              Working...
              X