I have this problem, I have assigned an IP address to my eth0
interface, I would like to assign an IP address in the eth0: 1
interface.
Now I try to ping with source eth0: 1
but it returns this error:
ping -I eth0:1 <IP address>
ping: invalid source address eth0:1
ping -I <IP eth0:1> <IP address>
ping: unknown iface**
How can I fix it?
I rewrite my problem:
Sorry but I do not know how to use the site. I tell you what to do, I would like to simulate the traffic created by an external entity. My Laptop has only one network adapter configured with an IP/30 attached to a Firewall, what I would like to do is configure another card (eth0:1 or Lo:xx) with an IP/24. In this way I would like to simulate virtual source traffic with the source. Can this be done? Thank you
ip a
? If your interface name iseth0: 1
, you might need to add a quote around it. – MaxPlankton Nov 22 '17 at 07:44eth0:1
(no space) is the old way before the currentip
tool to indicate multiple IPv4 addresses. Make sure you don't use a space. You can also useping -I 1.2.3.4
with the source address, it will pick the correct interface (and it will picketh0
anyway aseth0:1
andeth0
are the same interface). – dirkt Nov 22 '17 at 07:51In this way I would like to simulate virtual source traffic with the source. Can this be done? Thank you
– user2563496 Nov 22 '17 at 09:00