def test_prefix_delegation_multiple_PD_and_IA_advertise_fail(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.config_srv_prefix('2001:db8:1::', 0, 90, 92) srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_NA') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.generate_new('IA') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 13) srv_msg.response_check_suboption_content(13, 3, 'statuscode', 2)
def test_prefix_delegation_multiple_PD_and_IA_advertise_fail(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.config_srv_prefix('2001:db8:1::', '0', '90', '92') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_NA') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.generate_new('IA') srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '2')
def test_prefix_delegation_onlyPD_renew_nobinding_new_IA_PD(): # this tests will be disabled after RFC 7550 tests will be added misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.config_srv_prefix('2001:db8:1::', '0', '90', '92') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('RENEW') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '25', None, 'statuscode', '3') references.references_check('RFC')
def test_prefix_delegation_onlyPD_renew_nobinding_new_IA_PD(): # this tests will be disabled after RFC 7550 tests will be added misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.config_srv_prefix('2001:db8:1::', '0', '90', '92') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('RENEW') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '25', None, 'statuscode', '3') references.references_check('RFC')
def _get_advertise(): misc.test_procedure() srv_msg.generate_new("Client_ID") srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE')
def test_v6_statuscode_noaddravail_request(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('server-id') srv_msg.client_requests_option('7') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_requests_option('7') srv_msg.generate_new('IA') srv_msg.generate_new('client') srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '2') references.references_check('RFC3315')
def test_v6_statuscode_noaddravail_request(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('server-id') srv_msg.client_requests_option('7') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_requests_option('7') srv_msg.generate_new('IA') srv_msg.generate_new('client') srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '2') references.references_check('RFC3315')
def test_v6_statuscode_noaddravail_solicit(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.generate_new('client') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 13) srv_msg.response_check_suboption_content(13, 3, 'statuscode', 2) references.references_check('RFC3315')
def test_v6_multipleIA_addresses_release_success(): # Testing server ability to parse multiple IA's included into message # and release included addresses. # Client Server # SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # include all IA'a RELEASE --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # Status code 'success' misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(13) srv_msg.response_check_option_content(13, 'status-code', 0)
def test_v6_multipleIA_addresses_release_partial_success(): # Testing server ability to parse multiple IA's included into message # and release included addresses. One of the IA's are released twice. # first time: success, next: NoBinding # Client Server # SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # include last IA_NA RELEASE --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # Status code 'success' # # include all IA_NA's RELEASE --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # IA_NA option # IA_Address with status code: NoBinding misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(13) srv_msg.response_check_option_content(13, 'status-code', 0) misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(13) # Response option 13 MUST contain status-code 0. IS IT TRURE? RFC 3315 is not clear about that. srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 13) srv_msg.response_check_suboption_content(13, 3, 'statuscode', 3)
def test_prefix_delegation_assign_saved_iapd(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') # two prefixes - 3000::/91; 3000::20:0:0/91; srv_control.config_srv_prefix('2001:db8:1::', '0', '90', '91') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '25') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') # 1st prefix srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '26') misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '25') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_save_option('IA_PD') srv_msg.client_add_saved_option('DONT ') # 2nd prefix srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '26') # both prefixes assigned. misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.config_srv_prefix('2001:db8:1::', '0', '80', '95') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '25') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '26') srv_msg.response_check_suboption_content('Response', '26', '25', None, 'prefix', '2001:db8:1::20:0:0') references.references_check('RFC')
def test_v6_statuscode_nobinding_release(): # Testing server ability server ability perform RELEASE - REPLY message exchange. # Message details Client Server # SOLICIT --> # <-- ADVERTISE # REQUEST --> # <-- REPLY # Generate new IA # RELEASE --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # client-id # server-id # IA_NA with suboption status-code with code NoBinding misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '1') srv_msg.response_check_include_option('Response', None, '2') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_save_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '1') srv_msg.response_check_include_option('Response', None, '2') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.generate_new('IA') srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '1') srv_msg.response_check_include_option('Response', None, '2') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '3') references.references_check('RFC3315')
def test_v6_multipleIA_addresses_multiple_pools(): # Testing server ability to parse and allocate addresses # when multiple IA option are included in one message. # Server is configured with multiple pools within single subnet # Client Server # SOLICIT --> # save IA_NA <-- ADVERTISE # SOLICIT --> # save IA_NA <-- ADVERTISE # SOLICIT --> # save IA_NA <-- ADVERTISE # include all IA's REQUEST --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # IA-NA # IA-Address with 3000::1 address # IA-Address with 3000::2 address # IA-Address with 3000::3 address misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.new_pool('3000::2-3000::2', '0') srv_control.new_pool('3000::3-3000::3', '0') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_requests_option('7') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_requests_option('7') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::1') srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::2') srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::3')
def test_v6_statuscode_nobinding_release_advertise(): # Testing server ability server ability perform RELEASE - REPLY message exchange. # That's 'double check' after v6.statuscode.nobinding-release test, # to make sure that lease weren't released. # # Message details Client Server # SOLICIT --> # <-- ADVERTISE # REQUEST --> # <-- REPLY # Generate new IA # RELEASE --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # client-id # server-id # SOLICIT --> # <-- ADVERTISE # Pass Criteria: # REPLY MUST include option: # client-id # server-id # IA_NA with suboption status-code with code NoAddrAvail misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(1) srv_msg.response_check_include_option(2) srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_save_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(1) srv_msg.response_check_include_option(2) srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.generate_new('IA') srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(1) srv_msg.response_check_include_option(2) misc.test_procedure() srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(1) srv_msg.response_check_include_option(2) srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 13) srv_msg.response_check_suboption_content(13, 3, 'statuscode', 2) references.references_check('RFC3315')
def test_v6_multipleIA_addresses_rebind_partial_success(): # Testing servers ability to rebind two IA form three received # One IA_NA released before. # Client Server # SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # include last IA_NA RELEASE --> # <-- REPLY # include all IA_NA's REBIND --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # IA_NA option (for T1/T2) # IA_Address (for lifetimes) # IA_Address (for lifetimes) # One status code/error? RFC is not clear # abut what should happen in such case. misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '13') srv_msg.response_check_option_content('Response', '13', None, 'status-code', '0') misc.test_procedure() srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REBIND') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
def test_v6_multipleIA_addresses_noaddravail(): # Testing server ability to assign two addresses and # send one status code: NoAddrAvail in one message. # Client Server # SOLICIT --> # save IA_NA <-- ADVERTISE # new IA SOLICIT --> # save IA_NA <-- ADVERTISE # new IA SOLICIT --> # save IA_NA <-- ADVERTISE # with all IA_NA's REQUEST --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # IA_NA option # IA_Address with address 3000::1 # IA_Address with address 3000::2 # IA_NA with status code: NoAddrAvail misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::2') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_requests_option('7') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_requests_option('7') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::1') srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::2') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '2')
def test_prefix_delegation_noprefixavail(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.config_srv_prefix('2001:db8:1::', 0, 90, 91) # pool of two prefixes srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(25) misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(25) misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) # both prefixes assigned. misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 13) srv_msg.response_check_suboption_content(13, 25, 'statuscode', 6) references.references_check('RFC')
def test_prefix_delegation_noprefixavail(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.config_srv_prefix('2001:db8:1::', '0', '90', '91') # pool of two prefixes srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '25') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '26') misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '25') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '26') # both prefixes assigned. misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '25', None, 'statuscode', '6') references.references_check('RFC')
def test_v6_multipleIA_addresses_multiple_pools(): # Testing server ability to parse and allocate addresses # when multiple IA option are included in one message. # Server is configured with multiple pools within single subnet # Client Server # SOLICIT --> # save IA_NA <-- ADVERTISE # SOLICIT --> # save IA_NA <-- ADVERTISE # SOLICIT --> # save IA_NA <-- ADVERTISE # include all IA's REQUEST --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # IA-NA # IA-Address with 3000::1 address # IA-Address with 3000::2 address # IA-Address with 3000::3 address misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.new_pool('3000::2-3000::2', 0) srv_control.new_pool('3000::3-3000::3', 0) srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::1') srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::2') srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::3')
def test_v6_multipleIA_addresses_rebind_partial_success(): # Testing servers ability to rebind two IA form three received # One IA_NA released before. # Client Server # SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # include last IA_NA RELEASE --> # <-- REPLY # include all IA_NA's REBIND --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # IA_NA option (for T1/T2) # IA_Address (for lifetimes) # IA_Address (for lifetimes) # One status code/error? RFC is not clear # abut what should happen in such case. misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(13) srv_msg.response_check_option_content(13, 'status-code', 0) misc.test_procedure() srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REBIND') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5)
def test_prefix_delegation_multiple_PD_and_IA_request(): misc.test_setup() srv_control.config_srv_subnet('3000::/32', '3000::1-3000::4') srv_control.config_srv_prefix('2001:db8:1::', 0, 32, 34) # pool for 4 addresses and 4 prefix, all 8 with success srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('IA_PD') srv_msg.generate_new('IA') srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('IA_PD') srv_msg.generate_new('IA') srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('IA_PD') srv_msg.generate_new('IA') srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('IA_PD') srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::1') srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::2') srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::3') srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::4') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) srv_msg.response_check_suboption_content(26, 25, 'prefix', '2001:db8:1::') srv_msg.response_check_suboption_content(26, 25, 'prefix', '2001:db8:4000::') srv_msg.response_check_suboption_content(26, 25, 'prefix', '2001:db8:8000::') srv_msg.response_check_suboption_content(26, 25, 'prefix', '2001:db8:c000::') references.references_check('RFC')
def test_prefix_delegation_multiple_PD_and_IA_request_partial_success(): misc.test_setup() srv_control.config_srv_subnet('3000::/32', '3000::1-3000::2') srv_control.config_srv_prefix('2001:db8:1::', '0', '32', '33') # pool for 2 addresses and 2 prefix, half success srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('IA_PD') srv_msg.generate_new('IA') srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('IA_PD') srv_msg.generate_new('IA') srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('IA_PD') srv_msg.generate_new('IA') srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('IA_PD') srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::1') srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::2') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '2') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '26') srv_msg.response_check_suboption_content('Response', '26', '25', None, 'prefix', '2001:db8:1::') srv_msg.response_check_suboption_content('Response', '26', '25', None, 'prefix', '2001:db8:8000::') srv_msg.response_check_suboption_content('Response', '26', '25', None, 'prefix', '2001:db8:8001::') srv_msg.response_check_suboption_content('Response', '13', '25', None, 'statuscode', '6') references.references_check('RFC')
def test_v6_statuscode_nobinding_release(): # Testing server ability server ability perform RELEASE - REPLY message exchange. # Message details Client Server # SOLICIT --> # <-- ADVERTISE # REQUEST --> # <-- REPLY # Generate new IA # RELEASE --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # client-id # server-id # IA_NA with suboption status-code with code NoBinding misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '1') srv_msg.response_check_include_option('Response', None, '2') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_save_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '1') srv_msg.response_check_include_option('Response', None, '2') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.generate_new('IA') srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '1') srv_msg.response_check_include_option('Response', None, '2') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '3') references.references_check('RFC3315')
def test_v6_multipleIA_addresses_noaddravail(): # Testing server ability to assign two addresses and # send one status code: NoAddrAvail in one message. # Client Server # SOLICIT --> # save IA_NA <-- ADVERTISE # new IA SOLICIT --> # save IA_NA <-- ADVERTISE # new IA SOLICIT --> # save IA_NA <-- ADVERTISE # with all IA_NA's REQUEST --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # IA_NA option # IA_Address with address 3000::1 # IA_Address with address 3000::2 # IA_NA with status code: NoAddrAvail misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::2') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::1') srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::2') srv_msg.response_check_option_content(3, 'sub-option', 13) srv_msg.response_check_suboption_content(13, 3, 'statuscode', 2)
def test_v6_multipleIA_addresses_release_success(): # Testing server ability to parse multiple IA's included into message # and release included addresses. # Client Server # SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # include all IA'a RELEASE --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # Status code 'success' misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '13') srv_msg.response_check_option_content('Response', '13', None, 'status-code', '0')
def test_prefix_delegation_IA_and_PD_multiple_request_release(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.config_srv_prefix('2001:db8:1::', 0, 90, 91) # pool of two prefixes srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(25) misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_copy_option('IA_NA') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.client_copy_option('IA_PD') srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(13) # tests MUST NOT include 'NoBinding'... misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(25) misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_copy_option('IA_NA') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(25) srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) references.references_check('RFC')
def test_v6_multipleIA_addresses_release_partial_success(): # Testing server ability to parse multiple IA's included into message # and release included addresses. One of the IA's are released twice. # first time: success, next: NoBinding # Client Server # SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # new IA SOLICIT --> # <-- ADVERTISE # REQUEST --> # save IA_NA <-- REPLY # include last IA_NA RELEASE --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # Status code 'success' # # include all IA_NA's RELEASE --> # <-- REPLY # Pass Criteria: # REPLY MUST include option: # IA_NA option # IA_Address with status code: NoBinding misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') misc.test_procedure() srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_copy_option('IA_NA') srv_msg.client_copy_option('server-id') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '13') srv_msg.response_check_option_content('Response', '13', None, 'status-code', '0') misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('RELEASE') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '13') # Response option 13 MUST contain status-code 0. IS IT TRURE? RFC 3315 is not clear about that. srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '3')
def test_prefix_delegation_assign_saved_iapd(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') # two prefixes - 3000::/91; 3000::20:0:0/91; srv_control.config_srv_prefix('2001:db8:1::', 0, 90, 91) srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(25) misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') # 1st prefix srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) misc.test_procedure() srv_msg.generate_new('IA_PD') srv_msg.client_does_include('Client', 'IA-PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(25) misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_save_option('IA_PD') srv_msg.client_add_saved_option('DONT ') # 2nd prefix srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) # both prefixes assigned. misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::3') srv_control.config_srv_prefix('2001:db8:1::', 0, 80, 95) srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_add_saved_option(None) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(25) misc.test_procedure() srv_msg.client_copy_option('server-id') srv_msg.client_copy_option('IA_PD') srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(25) srv_msg.response_check_option_content(25, 'sub-option', 26) srv_msg.response_check_suboption_content(26, 25, 'prefix', '2001:db8:1::20:0:0') references.references_check('RFC')
def test_prefix_delegation_multiple_PD_and_IA_request_partial_fail(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::2') srv_control.config_srv_prefix('2001:db8:1::', '0', '90', '92') srv_control.build_and_send_config_files('SSH', 'config-file') srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.generate_new('IA') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_does_include('Client', None, 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE') misc.test_procedure() srv_msg.client_save_option('IA_NA') srv_msg.client_does_include('Client', None, 'IA-PD') srv_msg.client_copy_option('server-id') srv_msg.client_add_saved_option('DONT ') srv_msg.client_does_include('Client', None, 'client-id') srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') srv_msg.response_check_include_option('Response', None, '3') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5') srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::1') srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::2') srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13') srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '2') srv_msg.response_check_include_option('Response', None, '25') srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '26') srv_msg.response_check_suboption_content('Response', '26', '25', None, 'prefix', '2001:db8:1::') references.references_check('RFC')