- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 Azure 中有一个虚拟机,带有 Ubuntu 19.04 和 4 个网卡,每个网卡都附加了一个公共(public) IP,作为示例,这是第二个网卡:
如您所见,它的公共(public) IP 为 191.234.186.19。
我的目标是能够从具有不同 IP 地址的每个 NIC 访问互联网,但在虚拟机内部我只能使用第一个网络 eth0
访问它。
查看#route -n
我得到以下输出:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.1 0.0.0.0 UG 100 0 0 eth0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
168.63.129.16 10.0.0.1 255.255.255.255 UGH 100 0 0 eth0
169.254.169.254 10.0.0.1 255.255.255.255 UGH 100 0 0 eth0
我尝试使用以下命令为其他网卡添加路由:
sudo ip route add default via 10.0.0.1 dev eth1 metric 101
sudo ip route add default via 10.0.0.1 dev eth2 metric 102
sudo ip route add default via 10.0.0.1 dev eth3 metric 103
但我仍然无法使用这些网卡连接到互联网,只能使用 eth0
。
我错过了什么吗?我是否需要更改/配置其他任何内容才能使其正常工作?
为了完整起见,我使用此命令来测试连接:
curl --interface eth1 api.ipify.org?format=json -w "\n"
我的虚拟机与本文中的虚拟机相同:article
最佳答案
我怀疑你可能需要1) 为第二个、第三个和第四个接口(interface)定义新的路由表,2)将默认路由添加到这些表中3) 并定义规则以确保返回数据包始终路由回原始数据包发送的同一接口(interface)。
我只想指出几点,在针对您的具体情况进行设置时可能会有所帮助: iproute
允许您维护多个路由表。要指示操作系统使用不同的路由表,您需要定义 rules
在最简单的形式中,将强制使用与发起连接的接口(interface)相对应的路由表。
关于azure - 使用 Azure 中的第二个(或多个)NIC 访问互联网,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59112745/
最近两年,互联网+的概念可谓十分火爆。所谓“互联网+”,其实质就是把互联网大平台和各行各业进行有机结合,建立一个新的商业生态,对于传统企业来说,互联网+的第一步就是有一个企业网站,将自己推广出去
我的大学分两步运行他们的 wifi 身份验证。首先您连接到 wifi 网络,然后当您打开网络浏览器时,您必须输入一些关于您自己的附加信息才能访问互联网。 1)大学系统有一些方法可以检测设备之前是否已经
有没有办法监控每个应用程序使用了多少数据(互联网)? 如果我无法监控应用程序,是否有办法获取所有互联网请求信息?(获取传递的数据、url 等) (我想在为 iPhone 开发的应用程序中使用此信息)
我想从我的 MTI RFID ME Gen2 Internet 中读出一些标签: http://www.mti.com.tw/rfidme/ 这是一个 USB Dongle,现在我想用 c# 在 VS
我正在开发一个应用程序。其中,我想在一段时间内禁止使用互联网,尤其是在他有作业的情况下。如何禁用互联网? 最佳答案 要以编程方式启用/禁用数据连接,请检查此 post 要禁用/启用 wi-fi,请参阅
在我的应用程序中,我只需要知道设备是否连接到 wifi 网络。我认为此功能适用于模拟器但不适用于真实设备。 public static boolean wifiInternet(Context c)
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 12 年前。 Improve th
设想一种情况,我的 PC 有两个网卡,一个连接到互联网,另一个连接到本地网络,我如何用 C# 检测连接到互联网的 IP? 最佳答案 试试这个: static IPAddress getInternet
我的 firebase 应用程序在我的 android 设备上运行完美,无需添加 permission.INTERNET 标志。我直接从 gradle 安装了 Firebase。我知道通过 andro
最近我开始考虑一种解决方案,通过 Internet 向我的订阅客户发布消息。我们的系统是用 C# 开发的。 我们尝试使用 Redis,它在速度和准确性方面非常好,但在安全性方面非常糟糕,每个人都可以订
国内公司普遍不注重基础设施建设,这也是可以理解的。吃饭都吃不饱,就别提什么荤素搭配,两菜一汤了。但也不能全说是这样,还是有很多公司投入大量的人力物力去做好公司的基建,比如很多阿里和美团的小伙伴对公司
我有几个 Azure Functions(高级计划),它们可以执行一些操作并将结果加载到存储 blob。与存储帐户的连接受到 v-net 的限制,因此无法公开访问存储帐户,但是,我检查并发现我的 (H
我正在我的家庭有线网络上解析 ICMPv6 数据报,但在特定的 RFC 中找不到对位排序约定的明确提及。 多字节字段是网络顺序,但是一个字节内的位呢? 机器是字节可寻址的,但网络硬件将位序列化。在图表
我如何在笔记本电脑上配置以太网或 wifi,我遵循了这个 tutorial我的以太网正常启动,但我仍然无法从 ping 8.8.8.8 dns 收到任何数据包,我的笔记本电脑上有以太网和 wifi .
我在 Genymotion 模拟器上运行的应用程序需要互联网。网上好像不能用Genymotion模拟器。我试图通过打开浏览器来确认这一点,这就是我得到的: 我在笔记本电脑上运行 Windows 7 并
我目前正在学习 docker 和 kubernetes。我遇到的问题之一是将我的 nginx pod 暴露在公共(public)互联网上。我想从我的网络浏览器访问我的 serverIP 并查看 ngi
是否可以为 ImageSpan 指定 Internet url 并使用 TextView 显示它?我已经尝试了很多版本 String mockContent = ""; myTextView.setT
例子。 我在 Google 主页上做了一些 CSS 更改。我想保存 CSS(某处)并在每次加载页面时都具有相同的外观。 欢迎使用任何浏览器插件或任何其他方法。 最佳答案 如果使用谷歌浏览器,有一个名为
我正在构建一个旨在加载到 Wii Internet Channel(本质上是 Opera 9.3)的 Web 应用程序。 它支持 SVG,但它们似乎无法缩放。无论宽度和高度设置为多少,图形始终以其“最
我安装了 python 2.7.5,它工作正常。 然后我安装scrapy(我认为,它在内部使用了twisted)。我的爬虫蜘蛛也工作正常。 我安装了扭曲: sudo apt-get install p
我是一名优秀的程序员,十分优秀!