Re: strange wireless problem that I don't understand

This is a discussion on Re: strange wireless problem that I don't understand within the Linux General forums, part of the Linux Forums category; At Sun, 29 Jun 2008 21:53:54 -0700 (PDT) zhengquan <zhang.zhengquan@gmail.com> wrote: > > ...


Go Back   Usenet Forums > Linux Forums > Linux General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-30-2008
Robert Heller
 
Posts: n/a
Default Re: strange wireless problem that I don't understand

At Sun, 29 Jun 2008 21:53:54 -0700 (PDT) zhengquan <zhang.zhengquan@gmail.com> wrote:

>
> Hello,
> My interfaces file looks like this
>
> auto
> lo
> iface lo inet loopback
>
> auto eth0
> iface eth0 inet static
> address 192.168.2.4
> netmask 255.255.255.0
> gateway 192.168.2.1
>
> auto wlan0
> iface wlan0 inet dhcp
>
> 1 I connect the net cable and boot the computer,
> I have network connection, I can ping 192.168.2.1 and I can connect to
> the internet.
>
> 2 I disconnect the net cable and sudo /etc/init.d/networking restart
> the system tells me that it receives a dhcp offer and got ip
> 192.168.2.5 for wlan0(the wireless card). After this, I try to ping
> 192.168.2.1(the router), I got unreachable
> message. and it shows that my ip is still 192.168.2.4(static ip of
> eth0).
>
> 3 I sudo ifdown eth0
> and everything is ok, I can ping 192.168.2.1 and I can connect to the
> internect.
>
>
> What confuses me is that why do I have to ifdown eth0 to change the
> computer ip to the wireless ip?


You don't *have* to take eth0 down, what you do have to do is change
your default route. When you take eth0 down, you remove the route that
uses it, leaving the route via wlan0.

Also *conputers* don't have IP addresses -- network interfaces have IP
addresses.

>
> Thanks.
> Zhengquan
>
>
>


--
Robert Heller -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
heller@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk

Reply With Quote
  #2 (permalink)  
Old 06-30-2008
zhengquan
 
Posts: n/a
Default Re: strange wireless problem that I don't understand

On Jun 30, 6:16 am, Robert Heller <hel...@deepsoft.com> wrote:
> At Sun, 29 Jun 2008 21:53:54 -0700 (PDT) zhengquan <zhang.zhengq...@gmail.com> wrote:
>
>
>
>
>
> > Hello,
> > My interfaces file looks like this

>
> > auto
> > lo
> > iface lo inet loopback

>
> > auto eth0
> > iface eth0 inet static
> > address 192.168.2.4
> > netmask 255.255.255.0
> > gateway 192.168.2.1

>
> > auto wlan0
> > iface wlan0 inet dhcp

>
> > 1 I connect the net cable and boot the computer,
> > I have network connection, I can ping 192.168.2.1 and I can connect to
> > the internet.

>
> > 2 I disconnect the net cable and sudo /etc/init.d/networking restart
> > the system tells me that it receives a dhcp offer and got ip
> > 192.168.2.5 for wlan0(the wireless card). After this, I try to ping
> > 192.168.2.1(the router), I got unreachable
> > message. and it shows that my ip is still 192.168.2.4(static ip of
> > eth0).

>
> > 3 I sudo ifdown eth0
> > and everything is ok, I can ping 192.168.2.1 and I can connect to the
> > internect.

>
> > What confuses me is that why do I have to ifdown eth0 to change the
> > computer ip to the wireless ip?

>
> You don't *have* to take eth0 down, what you do have to do is change
> your default route. When you take eth0 down, you remove the route that
> uses it, leaving the route via wlan0.
>
> Also *conputers* don't have IP addresses -- network interfaces have IP
> addresses.
>
>
>
> > Thanks.
> > Zhengquan

>
> --
> Robert Heller -- Get the Deepwoods Software FireFox Toolbar!
> Deepwoods Software -- Linux Installation and Administrationhttp://www.deepsoft.com/ -- Web Hosting, with CGI and Database
> hel...@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk


Thanks, Bill and Robert, So is there any automatic way to switch from
wired to wireless?

Thanks.
Zhengquan
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:15 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0