Eu percebi que no Mac a exibição dessas informações de rede são um tanto confusa, inclusive, fiquei com algumas dúvidas. Por exemplo, na minha máquina foram exibidas as seguintes infos com o comando ifconfig
, e os campos que correspondem ao IP da minha máquina é 192.168.1.3, e a máscara de rede é 0xffffff00 que é o correspondente a 255.255.255.0, mas a info correspondente ao gateway eu não achei com o ifconfig
, só consegui acessando as configurações de rede no system preferences, ai sim eu vi e consegui acessar a página do provedor usando o IP 192.168.1.254. Existe algum outro comando no Mac melhor que o ifconfig
?
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether 4c:32:75:90:90:3d
inet6 fe80::1465:e27b:4247:3451%en0 prefixlen 64 secured scopeid 0x4
inet6 2804:d41:c2be:3200:4cc:d889:108b:2cbc prefixlen 64 autoconf secured
inet6 2804:d41:c2be:3200:e034:c277:8766:b7f prefixlen 64 autoconf temporary
inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:13:1f:ba:b0:c0
media: autoselect <full-duplex>
status: inactive
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:13:1f:ba:b0:c1
media: autoselect <full-duplex>
status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 82:13:1f:ba:b0:c0
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 5 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 6 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: <unknown type>
status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
options=400<CHANNEL_IO>
ether 0e:32:75:90:90:3d
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
options=400<CHANNEL_IO>
ether 76:24:66:c1:ff:10
inet6 fe80::7424:66ff:fec1:ff10%awdl0 prefixlen 64 scopeid 0x9
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether 76:24:66:c1:ff:10
inet6 fe80::7424:66ff:fec1:ff10%llw0 prefixlen 64 scopeid 0xa
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::cbb5:a42:5dea:c62b%utun0 prefixlen 64 scopeid 0xb
nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::3e7c:be98:539d:4a58%utun1 prefixlen 64 scopeid 0xc
nd6 options=201<PERFORMNUD,DAD>
utun2: flags=8050<POINTOPOINT,RUNNING,MULTICAST> mtu 1400
inet 10.216.6.123 --> 10.216.6.123 netmask 0xffffffff