I am trying to get two external ip addresses(both ip assigned by DHCP) on single NIC. I added one macvlan device
vir1 with its own mac address bounded to the primary NIC
eth0 to promiscuous mode.
eth0 get its own ip address, I intend to use both of the ip address at the same time.
When I ping from an external host to
eth0 ip address, I can get a ping response, but when I ping to
vir1 ip address, there isnt any reply. tcpdump shows that both
eth0 get the ping request when I ping to
I want both ip address can be used by client to access my web service, the computer is connected to the internet directly with ethernet cable from isp
Any help would be appreciated!
# Primary interface auto eth0 iface eth0 inet dhcp up ip link set dev eth0 promisc on # Macvlan interfaces auto vir1 iface vir1 inet dhcp pre-up ip link add link eth0 address 02:cd:ab:00:10:01 vir1 type macvlan post-down ip link delete vir1
eth0 Link encap:Ethernet HWaddr 8c:73:6e:b7:c7:10 inet addr:188.8.131.52 Bcast:184.108.40.206 Mask:255.255.252.0 inet6 addr: fe80::8e73:6eff:feb7:c710/64 Scope:Link UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 vir1 Link encap:Ethernet HWaddr 02:cd:ab:00:10:01 inet addr:220.127.116.11 Bcast:18.104.22.168 Mask:255.255.252.0 inet6 addr: fe80::cd:abff:fe00:1001/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1