Convert Mac Address and IP Address to byte araay of specific size

Dim ipArray As Byte() = Dns.GetHostEntry(Dns.GetHostName()).AddressList.Where(Function(a As IPAddress) a.AddressFamily =2).First().GetAddressBytes