简体   繁体   English

无法ping通辅助接口专用IP

[英]Could not ping secondary interface private IP

I have attached a secondary interface to Debian EC2 instance. 我已将辅助接口附加到Debian EC2实例。 I attached the same security group that primary interface has and it allows ping on it. 我附加了与主接口相同的安全组,并允许对其执行ping操作。 Problem is after attaching the second network interface I am not able to ping the Secondary interface private IP. 问题是连接第二个网络接口后,我无法ping通辅助接口专用IP。

eth0      Link encap:Ethernet  HWaddr 0a:65:1c:fd:cd:f0  
          inet addr:10.195.0.76  Bcast:10.195.0.95  Mask:255.255.255.224
          inet6 addr: fe80::865:1cff:fefd:cdf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
          RX packets:1494 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1158 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:164133 (160.2 KiB)  TX bytes:185670 (181.3 KiB)

eth1      Link encap:Ethernet  HWaddr 0a:2d:a1:fc:f5:d4  
          inet addr:10.195.0.82  Bcast:10.195.0.95  Mask:255.255.255.224
          inet6 addr: fe80::82d:a1ff:fefc:f5d4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
          RX packets:274 errors:0 dropped:0 overruns:0 frame:0
          TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:24474 (23.9 KiB)  TX bytes:2948 (2.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Ngrep result pinging from other interface: Ngrep结果从其他接口执行ping操作:

root@ip-10-195-0-76:/home/admin# ngrep -d eth1 -Wbyline
interface: eth1 (10.195.0.64/255.255.255.224)
#
I fe80::81a:8eff:fe7b:e6a9 -> ff02::1 134:0
@.............
..{....@.............*....to.........
#
I 10.195.1.30 -> 10.195.0.82 8:0
\......[.....X
..................... !"#$%&'()*+,-./01234567
#
I 10.195.1.30 -> 10.195.0.82 8:0
\......[......
..................... !"#$%&'()*+,-./01234567

Debian in AWS does provide ec2-net-utils but the scripts on EC2 does not add the routes for the secondary interface. AWS中的Debian确实提供了ec2-net-utils,但EC2上的脚本未添加辅助接口的路由。 To solve this i followed the following to add the routes for the interface. 为了解决这个问题,我遵循以下步骤为接口添加路由。

#echo "200 out" >>/etc/iproute2/rt_tables
# ip route add default via 10.195.0.65 dev eth1 table out
#ip route show table out
#ip rule add from 10.195.0.82/32 table out
#ip rule add to 10.195.0.82/32 table out

And after that i am able ping the network interface. 之后,我可以ping通网络接口。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在我的私有IP上运行的辅助私有IP上配置服务 - Configuring service on secondary private IP which was running on my private IP 将弹性 IP 地址与辅助私有 IPv4 地址相关联 - Associating an Elastic IP Address with the Secondary Private IPv4 Address 为什么即使我可以ping通私有IP也不能通过公共IP ping aws实例? - Why can't I ping an aws instance by public IP even though I can ping the private IP just fine? 从计算机ping RDS端点时,它显示RDS的专用IP - When I ping the RDS endpoint from my computer it shows the Private IP of the RDS 无法从同一 VPC 中的其他实例 ping 我的实例私有 IP - can't ping my instance private IP from other instance in the same VPC 我可以在VPC子网中使用任何辅助私有IP到我的linux ec2实例吗 - can I use any secondary private ip in VPC subnet to my linux ec2 instance 亚马逊AWS - 如何更改链接到RDS的网络接口的专用IP - Amazon AWS - How can I change the Private IP of a Network Interface linked to RDS EC2实例如何仅通过一个网络接口同时拥有私有IP和公共IP - How does an EC2 instance have both a private and a public IP with only one network interface 无法通过站点到站点 VPN 和 DMS 源数据库端点测试连接从本地 ping DMS 复制实例的私有 IP - Unable to ping Private IP of DMS Replication Instance from on-premises over Site-to-Site VPN & DMS source DB endpoint test connection fails Docker Private Registry:ping尝试失败 - Docker Private Registry: ping attempt failed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM