Re: fqdn, dhclient.conf and networkmanager ?



Hi again,

I'm still stuck with the same problem, I've now gotten a step deeper and
started to dig around with strace. Ive also updated to fedora 10 to try
it out with the latest versions and give you the results from there.
I have totally disabled IPV6 and do not seem to have any of those
packets anymore when i look with wireshark. 
However, i still face the same behavior and my problem remains.  

I'm attaching parts of the strace logs from the
successful /sbin/dhclient and the unsuccessful /usr/sbin/NetworkManager,
and maybe you guys can figure it out why it acts different depending on
from where its called. 

Maybe i can raise the question somewhere else to, i have no idea where
thou ? 

Suggestions are more then welcome. 

Patrik Martinsson 
ITi
SMHI
Patrik Martinsson smhi se


On Wed, 2008-11-19 at 11:39 -0500, Dan Williams wrote:
> On Wed, 2008-11-19 at 15:49 +0100, Patrik.Martinsson wrote:
> > On Tue, 2008-11-18 at 11:08 -0500, Dan Williams wrote:
> > > On Tue, 2008-11-18 at 10:25 +0100, Patrik.Martinsson wrote:
> > > > Hello all !
> > > > 
> > > > I have a question regarding using NetworkManager and
> dhclient.conf, 
> > > > maybe i don't understand this right, but however. 
> > > > 
> > > > I would like to use NetworkManager but it seems like im not able
> to
> > > > apply the same commands to the dhcp server as with dhclient, is
> > > > NetworkManager using dhclient or does it gets its ip in some
> other
> > > > way ? 
> > > > 
> > > > I need the same behavior with NetworkManager as a have with
> dhclient,
> > > > regarding the options for dynamic update. This is how my
> dhclient.conf
> > > > looks today, and i need Networkmanagar to act the same, 
> > > > 
> > > > send fqdn.fqdn "hostname.";
> > > > send fqdn.encoded off;
> > > > send fqdn.server-update off;
> > > > append domain-search "foo.bar.com","foo2.bar.com";
> > > 
> > > domain-search can be configured in the 'searches' option in the
> UI,
> > > either with static or "Automatic (addresses only)".
> > > 
> > > So does the DHCP server no honor the send-hostname directive?
> That may
> > > be a Microsoft DNS only option, but I was under the impression
> that the
> > > ISC dhcp server supported that as well.
> > > 
> > > If not, maybe we need to send the other 3 as well, though the
> comment in
> > > 'man dhclient.conf' about encoded on/off doesn't sound very
> promising.
> > > 
> > > In the end, you should be able to put these options
> > > in /etc/dhclient-eth0.conf (or whatever the interface name is) and
> have
> > > them merged in by NetworkManager.
> > > 
> > > Dan
> > 
> > Hello, again !
> > 
> > I've spent almost 2 days on this particular problem now, and come up
> > with some conclusions about whats going on and why it's not behaving
> > like i want it to. 
> > 
> > I take this from beginning again shortly, just so we are on the same
> > side here. 
> > My problem is that, when i manually run dhclient from commandline,
> my
> > dns server gets updated, BUT when dhclient is invoked from
> > NetworkManager, my dns server DON'T get updated. 
> > 
> > First i thought the problem was that the fqdn options that I've
> > specified in my dhclient.conf didn't get to the dhclient when it was
> > invoked by the NetworkManager, this is, (of course i realize now in
> > after-hand) totally wrong.
> > 
> > It doesn't matter if we call it from commandline or trough
> > NetworkManager, the 
> > DHCPDISCOVER
> > DHCPOFFER,
> > DHCPREQUEST
> > DHCPACK 
> > packages looks EXACTLY the same (not timestamps of course, but the
> > relevant information). Ive checked this with wireshark and compared
> the
> > different results with vimdiff. 
> > They are the same ! Cool, at least the problem isn't there. 
> > 
> > However the problem comes after it gets its DHCPACK, when i call
> > dhclient from the commandline this gets done, logs from wireshark
> >
> ---------------------------------------------------------------------
> > Source      Destination  Protocol Info
> > XX.XX.X.XX  XXX.XX.X.XX  DNS      Standard query SOA
> myhostname.foo.bar
> > 
> > Source      Destination  Protocol Info
> > XXX.XX.X.XX XX.XX.X.XX   DNS      Standard query response
> > 
> > Source      Destination  Protocol Info
> > XX.XX.X.XX  XXX.XX.X.XX  DNS      Standard query NS foo.bar
> > 
> > Source      Destination  Protocol Info
> > XXX.XX.X.XX XX.XX.X.XX   DNS      Standard query response NS
> > dns1.foo.bar dns2.foo.bar dns3.foo.bar 
> > 
> > Source      Destination  Protocol Info
> > XX.XX.X.XX  XXX.XX.X.XX  DNS      Dynamic update SOA foo.bar
> >
> ----------------------------------------------------------------------
> > and my dns, as i stated earlier gets updated correctly. 
> > 
> > 
> > BUT, if invoked from the NetworkManager, this is what gets done, 
> >
> ----------------------------------------------------------------------
> > Source      Destination  Protocol Info
> > XX.XX.X.XX  XXX.XX.X.XX  DNS      Standard query AAAA dns3.foo.bar
> > 
> > Source      Destination  Protocol Info
> > XXX.XX.X.XX XX.XX.X.XX   DNS      Standard query response
> > 
> > Source      Destination  Protocol Info
> > XX.XX.X.XX  XXX.XX.X.XX  DNS      Standard query AAAA
> > dns3.foo.bar.foo.bar (No typo here) 
> > 
> > Source      Destination  Protocol Info
> > XXX.XX.X.XX XX.XX.X.XX   DNS      Standard query response, No such
> name
> >
> -----------------------------------------------------------------------
> > And this is not right. For some reason it tries with some IPV6
> query's?
> > and everything gets wrong, if i understand these logs right ? 
> 
> Looks like IPv6, yes, but NM doesn't explicitly do anything with IPv6,
> and there's a completely separate IPv6 DHCP client called dhcp6.  What
> options are you invoking dhclient with manually?  -4 perhaps?
> 
> We may want to force -4 anyway, because we'll have completely separate
> support for IPv6 later using dhcp6.
> 
> Dan
> 
> > Ive followed what i found about turning IPV6 off, i don't have such
> a
> > interface, modules aren't loaded and i have this in
> > my /etc/syconfig/network 
> > NETWORK_IPV6=NO 
> > and in my /etc/sysconfig/network-scritps/ifcfg-eth0
> > IPV6INIT=no
> > IPV6_AUTOCONF=no
> > 
> > NetworkManager does something with something to make it behave like
> > this, i have no idea why IPV6 is in the picture. 
> > Or maybe I'm totally off here ? What do guys think ? 
> > 
> > Ive looked around a bit and found this document about IPV6
> > http://v6fix.net/docs/wide-draft-v6fix.en
> > where they quite in the beginning have an intersting point that
> could
> > have something to do with this. 
> > 
> > 1.2.1 Looking up DNS with a given name
> > 
> >     When an application can use both IPv4 and IPv6, it should
> resolve
> >     both A RR and AAAA RR with a given name.
> > 
> >     A mis-implemented resolver resolves AAAA RR even if IPv6 is not
> >     available. (Since IPv6 cannot be used, the resolution of AAAA RR
> is
> >     wasting. Also it gives chances to make mistakes to
> applications.)
> > 
> >     The cause of this problem can be found in the DNS server side.
> For
> >     instance, when a query of AAAA RR is received, the DNS server
> >     replies with a wrong answer.
> > 
> > 
> > 
> > Any suggestions, tips, advices are welcome, I'm really trying to
> figure
> > this out. 
> > 
> > Best regards,
> > Patrik Martinsson, Sweden.
> > 
> > 
> > 
> 
> 
#######################################################
# strace /sbin/dhclient -v -d                         #
# starting from where dhclient gets bound to ipadress.#
# stops where it successfully adds forward map.       #
#######################################################

bound to 10.64.4.89 -- renewal in 100902 seconds.) = 49
write(2, "\n"..., 1
)                    = 1
open("/var/run/dhclient.pid", O_WRONLY|O_CREAT|O_TRUNC, 0644) = 7
fcntl(7, F_GETFL)                       = 0x8001 (flags O_WRONLY|O_LARGEFILE)
fstat(7, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f20aebfb000
lseek(7, 0, SEEK_CUR)                   = 0
write(7, "4031\n"..., 5)                = 5
close(7)                                = 0
munmap(0x7f20aebfb000, 4096)            = 0
select(7, [5 6], [], [], {0, 659386})   = 0 (Timeout)
open("/etc/resolv.conf", O_RDONLY)      = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=98, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f20aebfb000
read(7, "; generated by /sbin/dhclient-scr"..., 4096) = 98
read(7, ""..., 4096)                    = 0
close(7)                                = 0
munmap(0x7f20aebfb000, 4096)            = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 7
connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.0.40")}, 16) = 0
sendto(7, "\256m\1\0\0\1\0\0\0\0\0\0\7nrlx038\3dyn\4smhi\2se\0"..., 37, 0, NULL, 0) = 37
select(8, [7], NULL, NULL, {1, 0})      = 1 (in [7], left {0, 998000})
recvfrom(7, "\256m\205\200\0\1\0\0\0\1\0\1\7nrlx038\3dyn\4smhi\2se\0"..., 512, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.0.40")}, [16]) = 108
close(7)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 7
connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.0.40")}, 16) = 0
sendto(7, "\256n\1\0\0\1\0\0\0\0\0\0\3dyn\4smhi\2se\0\0\2\0\1"..., 29, 0, NULL, 0) = 29
select(8, [7], NULL, NULL, {1, 0})      = 1 (in [7], left {1, 0})
recvfrom(7, "\256n\205\200\0\1\0\3\0\0\0\3\3dyn\4smhi\2se\0\0\2\0\1\300\f\0\2"..., 512, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.0.40")}, [16]) = 140
close(7)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 7
connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.0.40")}, 16) = 0
sendto(7, "\256o(\0\0\1\0\1\0\2\0\0\3dyn\4smhi\2se\0\0\6\0\1\7nrl"..., 112, 0, NULL, 0) = 112
select(8, [7], NULL, NULL, {1, 0})      = 1 (in [7], left {1, 0})
recvfrom(7, "\256o\250\7\0\1\0\1\0\2\0\0\3dyn\4smhi\2se\0\0\6\0\1\7nrl"..., 512, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.0.40")}, [16]) = 112
close(7)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 7
connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.0.40")}, 16) = 0
sendto(7, "\256p(\0\0\1\0\1\0\2\0\0\3dyn\4smhi\2se\0\0\6\0\1\7nrl"..., 112, 0, NULL, 0) = 112
select(8, [7], NULL, NULL, {1, 0})      = 1 (in [7], left {0, 999000})
recvfrom(7, "\256p\250\0\0\1\0\1\0\2\0\0\3dyn\4smhi\2se\0\0\6\0\1\7nrl"..., 512, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.0.40")}, [16]) = 112
close(7)                                = 0
sendto(3, "<30>Nov 21 12:52:35 dhclient: Add"..., 91, MSG_NOSIGNAL, NULL, 0) = 91
write(2, "Added new forward map from nrlx03"..., 61Added new forward map from nrlx038.dyn.smhi.se. to 10.64.4.89) = 61
write(2, "\n"..., 1
)                    = 1
select(7, [5 6], [], [], {86400, 991457}^C <unfinished ...>

#######################################################
# strace /usr/sbin/NetworkManager --no-daemon         #
# starting from where dhclient gets bound to ipadress.#
# stops where it failes to update forward map.        #
#######################################################

read(7, bound to 10.64.4.89 -- renewal in 107795 seconds.
"l\4\1\0015\0\0\0,\0\0\0\211\0\0\0\1\1o\0\25\0\0\0/org/free"..., 2048) = 402
read(7, 0x10c9e40, 2048)                = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN|POLLPRI}, {fd=7, events=POLLIN}], 3, 0) = 0 (Timeout)
writev(2, [{"NetworkManager: <info>  DHCP: dev"..., 73}], 1NetworkManager: <info>  DHCP: device eth0 state changed preinit -> bound
) = 73
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 93, MSG_NOSIGNAL, NULL, 0) = 93
writev(2, [{"NetworkManager: <info>  Activatio"..., 87}], 1NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) scheduled...
) = 87
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 107, MSG_NOSIGNAL, NULL, 0) = 107
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN|POLLPRI}, {fd=7, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN|POLLPRI}, {fd=7, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN|POLLPRI}, {fd=7, events=POLLIN}], 3, 0) = 0 (Timeout)
writev(2, [{"NetworkManager: <info>  Activatio"..., 85}], 1NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) started...
) = 85
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 105, MSG_NOSIGNAL, NULL, 0) = 105
writev(2, [{"NetworkManager: <info>    address"..., 45}], 1NetworkManager: <info>    address 10.64.4.89) = 45
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 65, MSG_NOSIGNAL, NULL, 0) = 65
writev(2, [{"NetworkManager: <info>    prefix "..., 50}], 1NetworkManager: <info>    prefix 16 (255.255.0.0)) = 50
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 70, MSG_NOSIGNAL, NULL, 0) = 70
writev(2, [{"NetworkManager: <info>    gateway"..., 44}], 1NetworkManager: <info>    gateway 10.64.0.1) = 44
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 64, MSG_NOSIGNAL, NULL, 0) = 64
writev(2, [{"NetworkManager: <info>    nameser"..., 51}], 1NetworkManager: <info>    nameserver '172.16.0.40') = 51
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 71, MSG_NOSIGNAL, NULL, 0) = 71
writev(2, [{"NetworkManager: <info>    nameser"..., 51}], 1NetworkManager: <info>    nameserver '172.16.0.36') = 51
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 71, MSG_NOSIGNAL, NULL, 0) = 71
writev(2, [{"NetworkManager: <info>    domain "..., 48}], 1NetworkManager: <info>    domain name 'smhi.se') = 48
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 68, MSG_NOSIGNAL, NULL, 0) = 68
writev(2, [{"NetworkManager: <info>  Activatio"..., 90}], 1NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...) = 90
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 110, MSG_NOSIGNAL, NULL, 0) = 110
writev(2, [{"NetworkManager: <info>  Activatio"..., 84}], 1NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) complete.) = 84
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 104, MSG_NOSIGNAL, NULL, 0) = 104
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN|POLLPRI}, {fd=7, events=POLLIN}], 3, 0) = 0 (Timeout)
writev(7, [{"l\4\1\1\6\3\0\0g\0\0\0\233\0\0\0\1\1o\0-\0\0\0/org/free"..., 176}, {"\376\2\0\0\0\0\0\0\7\0\0\0Options\0\5a{sv}\0\0\346\2\0\0\16"..., 774}], 2) = 950
writev(7, [{"l\4\1\1N\0\0\0h\0\0\0\243\0\0\0\1\1o\0002\0\0\0/org/free"..., 184}, {"F\0\0\0\0\0\0\0\v\0\0\0Dhcp4Config\0\1o\0\0-\0\0\0/"..., 78}], 2) = 262
writev(2, [{"NetworkManager: <info>  Activatio"..., 88}], 1NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...) = 88
sendto(3, "<13>Nov 21 12:49:34 NetworkManage"..., 108, MSG_NOSIGNAL, NULL, 0) = 108
sendmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\26\0\5\3i\240&I\206\17 \0\0\0\0\0"..., 20}], msg_controllen=0, msg_flags=0}, 0) = 20
recvmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\2\0i\240&I\206\17 \0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1\10"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 48
recvmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0i\240&I\206\17 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
sendmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\22\0\5\3j\240&I\206\17 \0\0\0\0\0"..., 20}], msg_controllen=0, msg_flags=0}, 0) = 20
recvmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\360\0\0\0\20\0\2\0j\240&I\206\17 \0\0\0\4\3\1\0\0\0I\0\1\0\0\0\0\0\7"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 1232
recvmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0j\240&I\206\17 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
sendmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\5\4k\240&I\206\17 \0\2\20\0\0\2\0\0\0\10\0\2\0\n@\4Y\10"..., 48}], msg_controllen=0, msg_flags=0}, 0) = 48
recvmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"$\0\0\0\2\0\0\0k\240&I\206\17 \0\0\0\0\0000\0\0\0\24\0\5\4k\240&I\206"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 36
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {0x7f55a5865e20, [], SA_RESTORER|SA_RESTART|SA_NOCLDSTOP, 0x7f55a44050f0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, Unable to add forward map from nrlx038.dyn.smhi.se. to 10.64.4.89: connection refused


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