Posted on May 1, 2019 7:13 pm
 |  Asked by Abhijeet Bhapkar
 |  68 views
0
0
Print Friendly, PDF & Email

I have mac I’d of compute which is directly connected to switch even I have done basic troubleshooting on physical layer and when I execute sh mac address pipe in 84cg but unable to showing mac. So anyone have idea how to find mac I’d in fedora Linux

0
Posted by Roberto Salazar
Answered on May 1, 2019 7:33 pm

You can run “ifconfig” on the linux cli prompt, it should give you the hardware address of all NIC that the Linux know about. See attached screen capture of example output.

0
Posted by Alexandru
Answered on May 1, 2019 7:52 pm
84cg is not a valid MAC address. MAC address must contain 0-9 a-f. g is not a valid character.
On a fedora box you can use the following commands to get the MAC addresses:
[asuciu@Bellicose tests]$ ifconfig
docker0: flags=4163 mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:42ff:fec4:efba prefixlen 64 scopeid 0x20
ether 02:42:42:c4:ef:ba txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20 bytes 1496 (1.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s3: flags=4163
mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::f33c:47d0:68d3:4bfd prefixlen 64 scopeid 0x20
ether 08:00:27:4f:f2:6c txqueuelen 1000 (Ethernet)
RX packets 161603 bytes 37560076 (35.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 130533 bytes 88458016 (84.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73
mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethafa0c45: flags=4163 mtu 1500
inet6 fe80::2c0e:45ff:feeb:fd84 prefixlen 64 scopeid 0x20
ether 2e:0e:45:eb:fd:84 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 40 bytes 2992 (2.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[asuciu@Bellicose tests]$ ip link show
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:4f:f2:6c brd ff:ff:ff:ff:ff:ff
3: docker0:
mtu 1500 qdisc noqueue state UP mode DEFAULT group default
link/ether 02:42:42:c4:ef:ba brd ff:ff:ff:ff:ff:ff
5: vethafa0c45@if4:
mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default
link/ether 2e:0e:45:eb:fd:84 brd ff:ff:ff:ff:ff:ff link-netnsid 0
[asuciu@Bellicose tests]$ cat /etc/fedora-release
Fedora release 29 (Twenty Nine)
Probably there are other ways to get the MAC address of an interface but the above two should help.

Post your Answer

You must be logged in to post an answer.