QuestionQ546
Network FundamentalsRefer to the exhibit. Drag the code snippets into the code blanks to enable keepalive for the FastEthernet 2/0 interface. Not every option is used.

Drag & Drop
interface_data = crud.update(provider, interface)
interface.keepalive = True
interface_data = crud.read(provider, interface)
interface = model.Native.Interface.FastEthernet()
interface.FastEthernet.keepalive_settings.keepalive = True
interface = model.Native.Interface()
from ydk.services import CRUDService from ydk.providers import NetconfServiceProvider as nc from ydk.models.cisco_ios_xe import Cisco_IOS_XE_native as model ip = '10.10.20.48' prtcl = 'ssh' user = 'developer' psw = 'P@$$w0rD' port = 830 provider = nc(address=ip, port=port, username=user, password=psw, protocol=prtcl) crud = CRUDService() interface.name = '2/0' if interface_data: print('Keepalive is enabled.') else: print('Keepalive is not enabled.')
Community Discussion