史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   網路軟硬體架設技術文件 (http://forum.slime.com.tw/f133.html)
-   -   SUN機器搜尋MAC位址的辦法 (http://forum.slime.com.tw/thread82763.html)

psac 2003-11-17 07:43 PM

SUN機器搜尋MAC位址的辦法
 
搜尋MAC位址的辦法
1 OK >banner
Sun (TM) Enterprise 250 (2 X UltraSPARC-II 296MHz), No Keyboard
OpenBoot 3.7, 1024 MB memory installed, Serial #9311264.
Ethernet address 8:0:20:8e:14:20, Host ID: 808e1420.
2 properties or .attributes
.properties用於SUN4U架構,.attributes用於SUN4M和SUN4C架構
ok show-nets //will give you the device path for the interface//
ok cd //change to device path//
ok .properties // this should show you the MAC address of that interface//

舉例 ( sun4u :
ok show-nets a) /pci@1f,0/pci@1/network@3
b) /pci@1f,0/pci@1/network@1
c) /pci@1f,0/pci@1/pci@4/network@0
d) /pci@1f,0/pci@1,1/network@1,1
q) NO SELECTION
Enter Selection, q to quit: q
ok cd /pci@1f,0/pci@1/network@3
ok .properties
assigned-addresses 82021810 00000000 00800000 00000000 00009060
local-mac-address 08 00 20 89 94 32
舉例 ( sun4m :
ok cd /io-unit@f,e0200000/sbi@0,0/SUNW,qfe@2,8c00000
ok .attributes
local-mac-address 08 00 20 8d 8d 64
3 showplatform 僅用於Sun Fire Servers
schostname:SC> showplatform -v
或者
schostname:SC> showplatform mac
MAC Address HostID
----------------- --------
Domain A 08:00:20:d8:a8:37 80d8a837
Domain B 08:00:20:d8:a8:38 80d8a838
Domain C 08:00:20:d8:a8:39 80d8a839
Domain D 08:00:20:d8:a8:3a 80d8a83a
SSC0 08:00:20:d8:a8:3b 80d8a83b
SSC1 08:00:20:d8:a8:3c 80d8a83c
4 prtconf
$ prtconf -pv |grep idprom(用於主機板自帶的le或hme)
idprom:
01800800.208d7e88.00000000.8d7e88a9.00000000.00000000.00000000.00000000
^^^^^^^^^^^^^
08:00:20:8d:7e:88

(對於後來安裝的網路卡 qfe
$ prtconf -pv |grep local-mac-address
local-mac-address?: 'true'
local-mac-address: 0800208d.7828
local-mac-address: 0800208d.7829
local-mac-address: 0800208d.782a
local-mac-address: 0800208d.782b
5 從啟動訊息裡面搜尋
# dmesg
或者
# more /var/adm/messages
Ethernet address = 8:0:20:87:b3:50
SUNW,qfe3: Local Ethernet address = 8:0:20:aa:dd:2b
SUNW,qfe3: Using local MAC addressEthernet address = 8:0:20:87:b3:50

6 ifconfig
# ifconfig hme0
hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.1 netmask ffffff00 broadcast 192.168.10.255
ether 8:0:20:9e:e7:95
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500
index 2
inet 192.148.12.11 netmask ffffff00 broadcast 129.148.12.255
ether 8:0:20:87:b3:50
ce0: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.148.12.8 netmask 0
ether 8:0:20:bc:d7:82

7 netstat -pn 或 arp -a
# netstat -pn |grep SP
hme0 192.168.10 255.255.255.255 SP 08:00:20:9e:e7:95
# arp -a |grep SP
hme0 hodware 255.255.255.255 SP 08:00:20:9e:e7:95
% /usr/sbin/ping 192.9.200.88
%/usr/sbin/arp –a
hme0 192.9.200.88 255.255.255.255 00:03:ba:36:22:8f


所有時間均為台北時間。現在的時間是 02:36 PM

Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2020, Jelsoft Enterprises Ltd.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1