Re: [smartos-discuss] DHCP for zones
On Tue, May 6, 2014 at 2:59 AM, Nahum Shalman smartos-discuss@lists.smartos.org wrote: On 05/04/2014 12:23 PM, Robert Mustacchi wrote: The dhcp option in vmadm today does not, to my limited knowledge, ask dhcp for resolvers. Though someone should look at snoop output for dhcp and verify what it is and what it isn't sending. It's even easier than using snoop. The dhcp client still knows what you received. see dhcpinfo(1) ( online at http://illumos.org/man/1/dhcpinfo ) The info is definitely there: [root@test01 ~]# dhcpinfo 6 192.168.10.1 Basically you'll want to set up something that at zone boot time does something sort of like: echo -e domain $(/sbin/dhcpinfo 15)\n$(/sbin/dhcpinfo 6| sed 's/^/nameserver /') /etc/resolv.conf Is there a /etc/rc.local equivalent for smartos? Or ideally is there a ifup/ifdown script that runs on a network interface change. Doing this update purely on reboot is potentially only partially useful. That said servers are meant to be some what more static. However if you have a hundred nodes, and want to change a DNS services, being forced to reboot all the nodes may be a pain. While you can use the resolvers and maintain_resolvers properties that you mention, that's obviously not the best way. Looking into this is pretty low on our priority list because we actually never use dhcp at Joyent. If folks could dig into this and figure out whether or not we're actually requesting DNS servers or not or if it's being clobbered for some reason, than we can go from there. I theory one could imagine a vmadm field that says to use the resolvers from the dhcp server that would alter the zone behavior, but as it's low on Joyent's priorities, you might have to write it yourself or find someone in the community to write it and get it upstream. It's not a super urgent feature. It's good to know that it's effectively not working at the moment. Saves me time trying to out some configuration knob that doesn't exist. --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
Re: [smartos-discuss] DHCP for zones
On 05/04/2014 12:23 PM, Robert Mustacchi wrote: The dhcp option in vmadm today does not, to my limited knowledge, ask dhcp for resolvers. Though someone should look at snoop output for dhcp and verify what it is and what it isn't sending. It's even easier than using snoop. The dhcp client still knows what you received. see dhcpinfo(1) ( online at http://illumos.org/man/1/dhcpinfo ) Basically you'll want to set up something that at zone boot time does something sort of like: echo -e domain $(/sbin/dhcpinfo 15)\n$(/sbin/dhcpinfo 6| sed 's/^/nameserver /') /etc/resolv.conf While you can use the resolvers and maintain_resolvers properties that you mention, that's obviously not the best way. Looking into this is pretty low on our priority list because we actually never use dhcp at Joyent. If folks could dig into this and figure out whether or not we're actually requesting DNS servers or not or if it's being clobbered for some reason, than we can go from there. I theory one could imagine a vmadm field that says to use the resolvers from the dhcp server that would alter the zone behavior, but as it's low on Joyent's priorities, you might have to write it yourself or find someone in the community to write it and get it upstream. -Nahum --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
Re: [smartos-discuss] DHCP for zones
Sorry for the delay in getting back to this thread. On 04/22/2014 09:50 PM, Nicholas Lee wrote: So, everything except for the resolver seems to be set correctly from the dhcp server. Is this the default action? Do I need to manually edit /etc/resolv.conf? The dhcp option in vmadm today does not, to my limited knowledge, ask dhcp for resolvers. Though someone should look at snoop output for dhcp and verify what it is and what it isn't sending. While you can use the resolvers and maintain_resolvers properties that you mention, that's obviously not the best way. Looking into this is pretty low on our priority list because we actually never use dhcp at Joyent. If folks could dig into this and figure out whether or not we're actually requesting DNS servers or not or if it's being clobbered for some reason, than we can go from there. Thanks, Robert --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
Re: [smartos-discuss] DHCP for zones
On Wed, Apr 9, 2014 at 2:30 AM, R.P. Ross rpro...@gmail.com wrote: I've spent a couple of days trying to figure out how to make smartos zones behave with an external DHCP server (pfSense). I'm trying to keep the JSON manipulation to a minimum. It seems nothing in the DHCP config sticks except the IP address. The zone doesn't register a hostname; the gateway, dns search and resolvers don't populate; no NTP, etc. I've scoured the wiki, github and Google, even Solaris threads, and have come up with nothing sustainable on this topic. If the captive DHCP server is the only way, then shouldn't there be a config in the global zone that would accommodate something like dnsmasq or some local resolution scheme? Looking for help/ideas. Thanks. Robert Finally got some time to learning how the smartos vmadm zone creation mechanism works. Planning to setup a joyent dovecot archive imap vm as a test. Anyway, running into a similar issue. Create a domain with: [root@00-15-17-20-9d-de ~]# vmadm create -f test-20140423.json Successfully created VM 7ae12a18-526c-4e48-ab65-c4cd3271f449 [root@00-15-17-20-9d-de ~]# cat test-20140423.json { brand: joyent, image_uuid: ff86eb8a-a069-11e3-ae0e-4f3c8983a91c, alias: test01, hostname: test01, max_physical_memory: 512, nics: [ { nic_tag: external, ip: dhcp, vlan_id: 216 } ] } [root@00-15-17-20-9d-de ~]# vmadm get 7ae12a18-526c-4e48-ab65-c4cd3271f449 | grep resol resolvers: [], The DHCP server on external is a Windows 2003 Server box. [root@00-15-17-20-9d-de ~]# zlogin 7ae12a18-526c-4e48-ab65-c4cd3271f449 ... root@test01 ~]# ipadm show-addr ADDROBJ TYPE STATEADDR lo0/v4static ok 127.0.0.1/8 net0/?dhcp ok 192.168.10.100/24 lo0/v6static ok ::1/128 [root@test01 ~]# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface - - -- - default 192.168.10.1 UG1 0 net0 127.0.0.1127.0.0.1UH3 22 lo0 192.168.10.0 192.168.10.100 U 2 0 net0 [root@test01 ~]# cat /etc/resolv.conf search local So, everything except for the resolver seems to be set correctly from the dhcp server. Is this the default action? Do I need to manually edit /etc/resolv.conf? I note that the vmadm man page talks about maintain_resolvers and resolvers. These seem to imply some manual process of /etc/resolv.conf is required with ip: dhcp. Is there a way to get the resolvers setup automatically from dhcp? Nicholas --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com