Network confusion

Hello!

Anyone who knows how I setup my NetworkManager to use the correct host name on my system, if that is possible. NetworkManager ignores the specified hostname and uses ‘localhost’, which is a bit annoying.

Cheers

Anyone who could give me a hint? I have a physical conncetion to a lan NFS network which is defined by DNS names. After I started using a mobile broadband, which I occasionally do, localhost has a different name and I can not enter the NFS server.
I can change back to ifup, reset router and reboot but it would be better if I could manage to have NetworkManager using the ‘correct’ hostname.

I am not knowledgeable with network settings so if I obviously does something strange just point it out please.

On 12/08/2010 04:36 PM, F Sauce wrote:
>
> Anyone who could give me a hint? I have a physical conncetion to a lan
> NFS network which is defined by DNS names. After I started using a
> mobile broadband, which I occasionally do, localhost has a different
> name and I can not enter the NFS server.
> I can change back to ifup, reset router and reboot but it would be
> better if I could manage to have NetworkManager using the ‘correct’
> hostname.
>
> I am not knowledgeable with network settings so if I obviously does
> something strange just point it out please.

If you really are using mobile broadband, then more than your host name changed.
To confirm this, please post the output of /sbin/ifconfig for both types of
connections. In addition, please post the output of the command ‘df’ when you
have access to the NFS volumes.

If you change the wired connection to be “Started automatically on cable
connection”, then you will be able to switch between the two types merely by
plugging in the wired cable.

BTW, you may be connected to some NFS volumes, but it is not described as an NFS
LAN.

I managed to set hostname and domain in Yast. The system ignored the domain name that I set, but used the hostname.

I fixed the domain name problem by adding a line to “/etc/dhclient.conf”.

Perhaps you can do something similar.

olav@localhost:~> /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:1D:C6:65:19
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::224:1dff:fec6:6519/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1101 (1.0 Kb) TX bytes:5654 (5.5 Kb)
Interrupt:28 Base address:0xc000

hso0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:77.17.107.26 P-t-P:77.17.107.26 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1486 Metric:1
RX packets:119203 errors:0 dropped:0 overruns:0 frame:0
TX packets:134807 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:102382481 (97.6 Mb) TX bytes:9767311 (9.3 Mb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:188 errors:0 dropped:0 overruns:0 frame:0
TX packets:188 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13640 (13.3 Kb) TX bytes:13640 (13.3 Kb)

Does this give some valuable info ?

tail -30 /var/log/NetworkManager

Dec  9 03:33:07 DDAmt NetworkManager: <info>    nameserver '10.0.0.138'
Dec  9 03:33:07 DDAmt NetworkManager: <info>    domain name 'lan'
Dec  9 03:33:07 DDAmt NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...
Dec  9 03:33:07 DDAmt NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) complete.
Dec  9 03:33:07 DDAmt NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...
Dec  9 03:33:08 DDAmt NetworkManager: <info>  (eth0): device state change: 7 -> 8 (reason 0)
Dec  9 03:33:08 DDAmt NetworkManager: <debug> [1291861988.012132] run_netconfig(): Spawning '/sbin/netconfig modify --service NetworkManager'
Dec  9 03:33:08 DDAmt NetworkManager: <debug> [1291861988.013956] write_to_netconfig(): Writing to netconfig: DNSSEARCH='lan lan'#012
Dec  9 03:33:08 DDAmt NetworkManager: <debug> [1291861988.013995] write_to_netconfig(): Writing to netconfig: DNSSERVERS='10.0.0.138 130.67.15.198 193.213.112.4'#012
Dec  9 03:33:08 DDAmt NetworkManager: <info>  Clearing nscd hosts cache.
Dec  9 03:33:08 DDAmt NetworkManager: <info>  Policy set 'Auto eth0' (eth0) as default for routing and DNS.
Dec  9 03:33:08 DDAmt NetworkManager: <info>  Activation (eth0) successful, device activated.
Dec  9 03:33:08 DDAmt NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete.
Dec  9 03:33:08 DDAmt nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/autofs' exited with error status 1.
Dec  9 03:33:25 DDAmt NetworkManager: <info>  (eth0): carrier now OFF (device state 8)
Dec  9 03:33:25 DDAmt NetworkManager: <info>  (eth0): device state change: 8 -> 2 (reason 40)
Dec  9 03:33:25 DDAmt NetworkManager: <info>  (eth0): deactivating device (reason: 40).
Dec  9 03:33:25 DDAmt NetworkManager: <info>  eth0: canceled DHCP transaction, dhcp client pid 5234
Dec  9 03:33:25 DDAmt NetworkManager: <debug> [1291862005.310075] run_netconfig(): Spawning '/sbin/netconfig modify --service NetworkManager'
Dec  9 03:33:25 DDAmt NetworkManager: <debug> [1291862005.311337] write_to_netconfig(): Writing to netconfig: DNSSERVERS='130.67.15.198 193.213.112.4'#012
Dec  9 03:33:25 DDAmt NetworkManager: <info>  Clearing nscd hosts cache.
Dec  9 03:33:25 DDAmt NetworkManager: <WARN>  check_one_route(): (eth0) error -34 returned from rtnl_route_del(): Sucess#012
Dec  9 03:33:25 DDAmt NetworkManager: <debug> [1291862005.322358] run_netconfig(): Spawning '/sbin/netconfig modify --service NetworkManager'
Dec  9 03:33:25 DDAmt NetworkManager: <debug> [1291862005.331617] write_to_netconfig(): Writing to netconfig: DNSSERVERS='130.67.15.198 193.213.112.4'#012
Dec  9 03:33:25 DDAmt NetworkManager: <info>  Clearing nscd hosts cache.
Dec  9 03:33:25 DDAmt NetworkManager: <info>  Policy set 'New Cellular Connection' (hso0) as default for routing and DNS.
Dec  9 03:33:25 DDAmt nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/autofs' exited with error status 1.
Dec  9 03:33:28 DDAmt NetworkManager: <info>  Setting system hostname to '77' (from address lookup)
Dec  9 03:33:28 DDAmt nm-dispatcher.action: nm_dispatcher_action: Invalid connection: '(null)' / 'connection setting not found' invalid: 1
Dec  9 03:33:28 DDAmt nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/netcontrol_services' exited with error status 127.

On 12/08/2010 07:36 PM, F Sauce wrote:
>
> olav@localhost:~> /sbin/ifconfig
> eth0 Link encap:Ethernet HWaddr 00:24:1D:C6:65:19
> inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
> inet6 addr: fe80::224:1dff:fec6:6519/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:9 errors:0 dropped:0 overruns:0 frame:0
> TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:1101 (1.0 Kb) TX bytes:5654 (5.5 Kb)
> Interrupt:28 Base address:0xc000
>
> hso0 Link encap:UNSPEC HWaddr
> 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
> inet addr:77.17.107.26 P-t-P:77.17.107.26
> Mask:255.255.255.255
> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1486 Metric:1
> RX packets:119203 errors:0 dropped:0 overruns:0 frame:0
> TX packets:134807 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:10
> RX bytes:102382481 (97.6 Mb) TX bytes:9767311 (9.3 Mb)

Note that the IP number for the eth0 is 10.0.0.1, which is internal to your
network, while the broadband connection resolves to an address at
telenormobil.no. The only that broadband connection can address anything on your
private network will be over the Internet and back through the router attached
to the private network. Most small routers will let you direct a specific UDP or
TCPIP port to an internal address. I do this for an SVN server that holds files
for a project that I share with 2 other people. This mechanism would be rather
slow for any serious NFS file sharing.

No.

Thank you lwfinger!

I managed to access the server with the NW settings controlled with (K)NetworkManager, I changed ‘host_allowed’ on server from DNS to IP. But I can no longer have ifup configured to access server. I suspect that it has something to do with hostnames as I see ‘localhost’ has the first internal IP address while the defined hostname has the second. This was probably(?) altered when I changed the settings to NetworkManager the first time.

I prefer not to use NetworkManager as I can not have several connections available simultaneously, and usually I am connected to the internet through the router.

Do you know if there could be any inconsistencies if I manually edit the entries under Yast > Networkservices > Hostnames? Maybe I can solve something with changing the aliases?
I really would like to get rid of all these entries and have NetworkManager, when I need to use it, use the same hostname as I defined the system to use during installation.

The only that broadband connection can address anything on your
private network will be over the Internet and back through the router attached
to the private network

The hostname changes at boot time such as that I am logged in as olav on localhost not as olav on DDAmt which it should be, and the connection name in the router changes accordingly (if connected).