Re: I probably have the wrong idea for NetworkManager...



Hi Dan...

On Sun, Jun 1, 2008 at 10:11 AM, Dan Williams <dcbw redhat com> wrote:
> On Fri, 2008-05-30 at 16:19 -0400, Rick Beldin wrote:
>> Ubuntu 8.04
>
> Ok; that means NM 0.6.6 which is somewhat limited in it's capability to
> control more complex connections.  0.7 is better here but Ubuntu isn't
> shipping it since it's not entirely released yet.  We've gotten pretty
> good results so far with 0.7 prerelease versions in Fedora 8 and Fedora
> 9 over the past 9 months though.
>
Exactly...

 dpkg -l network-manager
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  network-manage 0.6.6-0ubuntu5 network management framework daemon
rbeldin evonc6220:~/Linux/XenServer/2008-05-22-09-16-49-1-bugtool-wpg-xen-01/bu

>> I'll have to admit that I am rather old school when it comes to administering
>> my machines.   I usually like to take a more active approach than
>> letting a daemon make decisions for me.   I used to hack on
>> /etc/network/interfaces and /etc/resolv.conf to get what I wanted
>> done, and in some ways I am missing that level of control...
>>
>> I have an HP laptop with a wired and a wireless interface.   My
>> network usage falls into three models:
>>
>> - wireless,  no VPN, roaming
>> - wired, no wireless (in the office) DHCP on wired
>> - wireless, VPN, dhcp, no wired (tun0 interface created)
>>
>> I run into several issues with NetworkManager:
>>
>> - if I have been working at home, (wireless, WEP, VPN) and transition to
>>   the office,  I have to manually enable the wired interface.
>
> In the Ubuntu network control panel, have you made the wired device
> "roaming" or "manual" mode?  When it's in Manual mode, it's hidden from
> NM due to custom Ubuntu patches.
>
> What _should_ happen is that when you plug the wired cable into your
> laptop, NM will tear down the wireless connection and bring up the wired
> connection using DHCP as you've specified.  But if you've put your
> device in "manual" mode in ubuntu, then that's not to happen because
> you've chosen to control the device manually.
>
I ended up putting it in 'manual' mode because the periodic dhcp timeout
(my assumption here) on the wired interface would cause my vpn to drop
if I was using the wireless interface.   I ended up assigning a static IP
just to get it out of the way for now.   I would assume that nm looks at
the link-state before kicking things off again, but a flaky card could do
something.


>> - if I have been working in the office (wired, no VPN) and come home,
>>   I generally have to fiddle with enabling/disabling wireless and wired
>>   interfaces until I get a DHCP address from the wireless router.  I
>>   sometimes have to kill dhclient and clear out /var/lib/dhcp3 in order
>>   for NetworkManager to realize it has to go get a new ip.  The
>>   interface will be 'up' but no.  No errors from dhcp on router.
>
> Sounds like a flaky driver isn't associating to the AP.  What wireless
> card do you have?  Can you post some logs from /var/log/daemons to show
> what NM is doing during this time?  What sort of wifi configuration do
> you have at home?
>
This is an Intel card using the ipw2200 driver.   From lspci:

02:04.0 Network controller: Intel Corporation PRO/Wireless 2200BG
Network Connection (rev 05)

I'll dig up some logs after I come back home this afternoon.

The wired interface is:

10:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751M
Gigabit Ethernet PCI Express (rev 11)

dmesg shows
*[   52.757661] eth0: Tigon3 [partno(BCM95751M) rev 4101 PHY(5750)]
(PCI Express) 10/100/1000Base-T Ethernet 00:15:60:b1:92:68

In the current state, eth0 (wireless) up and eth1 (wired) inactive,
mii-tool shows:

# sudo ethtool eth0
Settings for eth0:
	Link detected: yes
# sudo ethtool eth1
Settings for eth1:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Half 1000baseT/Full
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Half 1000baseT/Full
	Advertised auto-negotiation: Yes
	Speed: Unknown! (65535)
	Duplex: Unknown! (255)
	Port: Twisted Pair
	PHYAD: 1
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: g
	Wake-on: g
	Current message level: 0x000000ff (255)
	Link detected: no

>> - if am working with the VPN (tun0) wireless and the little checkbox
>>   is ON next to the wired interface, I am *assured* that my connection
>>   will drop periodically.  Usually 5-10 minutes.  If I manage to get
>> NetworkManager to leave off the little checkbox, then it will stay up
>> indefinitely.
>
> That also sounds like bad drivers are telling NetworkManager that the AP
> has disconnected you.  What wireless card do you have again?
>
See above.

>> I've tried setting up profiles for this and this sometimes works.  I
>> still have to 'bounce' between profiles at time to get it to trigger
>> dhclient properly.   I typically NEVER suspend and resume - these are
>> cold boots.
>
> Hmm, NM wouldn't do "profiles" for your use-cases (0.6.x saves configs
> for wireless networks but not wired) so that's probably something
> Ubuntu-specific.
>
Good to know.  I won't waste time with it.

>> What is strange is if I revert to manual management of
>> /etc/network/interfaces, I get a high level of stability - switching
>> between wired and wireless is swift and certain.   I can control
>> whether dhcp runs or not on the wired interface.
>
> Right, because after configuring the interface, the tools exit and
> nothing is aware of any changes to the network situation, like cables
> being plugged in, the wifi AP going away, etc.  NM is set up to
> dynamically handle these sorts of events that manual control never can,
> but NM also depends on drivers to not suck and unfortunately many do...
>

This is helpful and helps understand a bit what is going on.   And it
could point out some problems when using this with my vpn.

The company policy is that any change to the active routes will drop
you completely off the vpn. This means that I can't have anything
messing with the routes, for example I can't start or stop VMware while
vpn'd on or the startup NAT'd network will cause me to drop.


>> All this leads me to think that I am not using this in the right way.
>> I think my needs are:
>>
>> - if I am wired, I don't care about the wireless interface
>
> Right, and if you're plugged into the wired interface, NM 0.6.6 won't
> connect the wireless interface.  So this should work.
>
Seems to be true,  though it seems to detect (iwlist eth0 scan) any
wireless nets around.

>> - if I am wireless, I don't want the wired interface to even be probed
>
> And if you don't have a cable plugged in, NM shouldn't be bringing up
> the wired interface, so this should also already work.
>
Ok.  Perhaps it is something else then.

> If both your devices are set to be managed by NetworkManager, this
> should result in the behavior you want already, so there must be a bug
> somewhere either in NM or drivers.
>

Ok.   Helpful to know.   I'll capture logs this afternoon when I
transition from
wireless->wired->wireless again.

R



-- 
Rick Beldin
Marietta, GA
rick beldin gmail com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]