3

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

  • What is the eth0: 1 interface? – jdwolf Nov 22 '17 at 07:42
  • 1
    Can you show your interface list with ip a? If your interface name is eth0: 1, you might need to add a quote around it. – MaxPlankton Nov 22 '17 at 07:44
  • @JohnKoch First of all it'd never be formatted like that, second even if it was ping still wouldn't work with that syntax. – jdwolf Nov 22 '17 at 07:46
  • 1
    eth0:1 (no space) is the old way before the current ip tool to indicate multiple IPv4 addresses. Make sure you don't use a space. You can also use ping -I 1.2.3.4 with the source address, it will pick the correct interface (and it will pick eth0 anyway as eth0:1 and eth0 are the same interface). – dirkt Nov 22 '17 at 07:51
  • You can edit here to add more information. – GAD3R Nov 22 '17 at 08:36
  • 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

    – user2563496 Nov 22 '17 at 09:00

0 Answers0