Interface física:
root@ubuntu:~# ip addr show enp1s0
2: enp1s0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:e0:4c:68:3b:6f brd ff:ff:ff:ff:ff:ff
inet 172.20.0.204/24 brd 172.20.0.255 scope global enp1s0
valid_lft forever preferred_lft forever
inet6 fe80::2e0:4cff:fe68:3b6f/64 scope link
valid_lft forever preferred_lft forever
Comandos emitidos:
ip link set dev enp1s0 promisc on
ip link add link enp1s0 address 02:cd:ab:00:10:02 wan0 type macvlan
ip link set dev wan0 up
dhclient wan0
Voila:
10: wan0@enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1
link/ether 02:cd:ab:00:10:02 brd ff:ff:ff:ff:ff:ff
inet 172.20.0.119/24 brd 172.20.0.255 scope global wan0
valid_lft forever preferred_lft forever
inet6 fe80::cd:abff:fe00:1002/64 scope link
valid_lft forever preferred_lft forever
Agora, faça as mesmas coisas com a interface WiFi:
root@ubuntu:~# ip addr show wlp3s0
4: wlp3s0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 74:e5:f9:30:c4:ec brd ff:ff:ff:ff:ff:ff
inet 192.168.3.111/24 brd 192.168.3.255 scope global wlp3s0
valid_lft forever preferred_lft forever
inet6 fe80::76e5:f9ff:fe30:c4ec/64 scope link
valid_lft forever preferred_lft forever
Comandos emitidos:
ip link set dev wlp3s0 promisc on
ip link add link wlp3s0 address 02:cd:ab:00:10:01 wan1 type macvlan
ip link set dev wan1 up
dhclient wan1
O dhclient fica por um tempo e registra: "Nenhum DHCPOFFERS recebido", o que me deixa com este resultado final insatisfatório:
9: wan1@wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1
link/ether 02:cd:ab:00:10:01 brd ff:ff:ff:ff:ff:ff
inet6 fe80::cd:abff:fe00:1001/64 scope link
valid_lft forever preferred_lft forever
Alguma idéia de por que a interface WiFi virtual com seu próprio MAC exclusivo não consegue obter uma atribuição de endereço IP? Como isso difere do cartão com fio?
Cumprimentos e agradecimentos