编写一个简单的C#代码来请求并接受来自我的DHCP服务器的IP地址 [英] Write a simple C# code to request and accept an IP address from my DHCP server
问题描述
嗨。
我有一个小型的c#DHCP服务器,现在正在运行。它设法为微软环回测试网卡分配一个IP地址。
我现在想编写一个简单的C#程序来请求一个IP地址。与任何其他设备一样,并接受IP地址,但是,这只能在我的C#程序中完成,因此它是一种虚拟硬件,软件程序可以请求和接受IP地址。
我将从哪里开始?
我使用DHCP服务器管理但似乎编码一个简单的虚拟客户端证明了更多很难。
提前谢谢。
我尝试了什么:
我设法让我的DHCP服务器工作但不知道从哪里开始使用虚拟客户端来请求和接受IP地址
Hi.
I have a small c# DHCP server that is now working. It manages to allocate an IP address to a Microsoft loop-back test network card.
I would now like to write a simple C# program that requests an IP address in the same way as any other device would, and accept the IP address, however, this would just be done in my C# program, so it is kind of a virtual hardware, software program that would request and accept an IP address.
Where would I start?
I managed with the DHCP server but it seems coding a simple virtual client is proving more difficult.
Thank you in advance.
What I have tried:
I have managed to get my DHCP server to work but son't know where to start with a "virtual" client that will request and accept an IP address
推荐答案
谷歌搜索是一个很好的起点:
* dhcp服务器c# - 谷歌搜索 [ ^ ]
* dhcp客户端c# - Google搜索 [ ^ ]
这两个搜索为您提供了大量的C#代码示例服务器端和客户端都可以使用。
Google Search is a good place to start:
* dhcp server c# - Google Search[^]
* dhcp client c# - Google Search[^]
These two searches gives you lots of C# code examples for both the server side and the client side to work with.
这篇关于编写一个简单的C#代码来请求并接受来自我的DHCP服务器的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!