Mac OS X中的虚拟网络接口 [英] Virtual network interface in Mac OS X

查看:282
本文介绍了Mac OS X中的虚拟网络接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以在Windows中创建虚拟网络接口(请参见此处),以及在Linux中,使用IP别名也很容易,但是Mac OS X是否存在类似的功能?我一直在寻找回送适配器,虚拟接口,但找不到一个好的解决方案.

I know that you can make a virtual network interface in Windows (see here), and in Linux it is also pretty easy with ip-aliases, but does something similar exist for Mac OS X? I've been looking for loopback adapters, virtual interfaces and couldn't find a good solution.

您可以基于现有接口在网络面板中创建一个新接口,但它不会充当真正的功能齐全的接口(如果原始接口处于非活动状态,则派生的接口也将处于非活动状态).

You can create a new interface in the networking panel, based on an existing interface, but it will not act as a real fully functional interface (if the original interface is inactive, then the derived one is also inactive).

在完全断开连接的情况下工作时需要这种情况.即使这样,在VMWare安装中运行服务器时,具有联网功能也是有意义的.即使我在这些虚拟机之一中运行DNS服务器,也可以通过其IP地址访问这些虚拟机,但不能通过其DNS名称访问.通过配置使用虚拟DNS服务器的接口,我认为我可以测试某些DNS方案.不幸的是,如果没有一个接口处于非活动状态,则没有接口会解析DNS名称...

This scenario is needed when working in a completely disconnected situation. Even then, it makes sense to have networking capabilities when running servers in a VMWare installation. Those virtual machines can be reached by their IP address, but not by their DNS name, even if I run a DNS server in one of those virtual machines. By configuring an interface to use the virtual DNS server, I thought I could test some DNS scenario's. Unfortunately, no interface is resolving DNS names if none of them are inactive...

推荐答案

环回适配器始终处于打开状态.

The loopback adapter is always up.

ifconfig lo0别名172.16.123.1 会将别名IP 172.16.123.1添加到回送适配器

ifconfig lo0 alias 172.16.123.1 will add an alias IP 172.16.123.1 to the loopback adapter

ifconfig lo0 -alias 172.16.123.1 将其删除

这篇关于Mac OS X中的虚拟网络接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆