Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHCP Server #82

Open
fonsecazord23 opened this issue Jun 12, 2024 · 1 comment
Open

DHCP Server #82

fonsecazord23 opened this issue Jun 12, 2024 · 1 comment

Comments

@fonsecazord23
Copy link

I'm new to ixia.
In the visual part of ixia there is a Protocols parameter and underneath DHCP Server and DHCP/PD w/Auth , and by clicking I can change the VLANs . I haven't found any way to change this using this api. Can anyone help me?

@therkong
Copy link
Collaborator

Hi,
For VLAN-ID under DHCP Server, the code snip to set VLAN-ID is:
from ixnetwork_restpy import SessionAssistant
session_assistant = SessionAssistant(IpAddress='127.0.0.1',
LogLevel=SessionAssistant.LOGLEVEL_INFO,
ClearConfig=True)
ixnetwork = session_assistant.Ixnetwork

vlanidinfo = ixnetwork
.Vport.find()
.ProtocolStack.find()
.Ethernet.find()
.DhcpServerEndpoint.find()
.Range.find()
.VlanRange.find()
.VlanIdInfo.find()
print(vlanidinfo.FirstId)
vlanidinfo.FirstId = ''

For VLAN-ID under DHCP/PD w/Auth, the code to set VLAN ID is:
vlanidinfo = ixnetwork
.Vport.find()
.ProtocolStack.find()
.Ethernet.find()
.DhcpEndpoint.find()
.Range.find()
.VlanRange.find()
.VlanIdInfo.find()
print(vlanidinfo.FirstId)
vlanidinfo.FirstId = ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants