I am doing some experiments with wireless protocols on ns-3. What I want to ask is how can I hide MAC address/IP address, because I need it for my experiments? Is it possible to use encryption on these addresses when broadcasting?
No, in order for network traffic to be handled correctly, it needs to have MAC and IP addresses. Encrypting these would prevent switches and routers from sending responses to the broadcasts back to the broadcaster.
However, you can use a VPN, which will allow you to connect to a different network, with a different IP address, but an outside observer will only be able to see the IP address on the IPsec traffic, not the IP address of the network you connect to.
On a side note, you can also change your MAC address on a per-network basis. While this doesn't encrypt the MAC, it will prevent MAC address tracking between networks.