Solaris11.4 ipadmコマンドでネットワーク設定確認方法

環境
Oracle Solaris11.4

操作手順
1.アドレス情報を取得する

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
root@solaris:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/v4 dhcp ok 192.168.44.132/24
lo0/v6 static ok ::1/128
net0/v6 addrconf ok fe80::20c:29ff:fe83:2398/10
root@solaris:~# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4 dhcp ok 192.168.44.132/24 lo0/v6 static ok ::1/128 net0/v6 addrconf ok fe80::20c:29ff:fe83:2398/10
root@solaris:~# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/v4           dhcp     ok           192.168.44.132/24
lo0/v6            static   ok           ::1/128
net0/v6           addrconf ok           fe80::20c:29ff:fe83:2398/10

2.インタフェースに関するステータス情報を取得する

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
root@solaris:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
net0 ip ok yes --
root@solaris:~# ipadm show-if IFNAME CLASS STATE ACTIVE OVER lo0 loopback ok yes -- net0 ip ok yes --
root@solaris:~# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --
net0       ip       ok       yes    --

3.IP 経路制御テーブルを表示します。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
root@solaris:~# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 192.168.44.2 UG 1 0 net0
127.0.0.1 127.0.0.1 UH 2 386 lo0
192.168.44.0 192.168.44.132 U 4 154 net0
Routing Table: IPv6
Destination/Mask Gateway Flags Ref Use If
--------------------------- --------------------------- ----- --- ------- -----
::1 ::1 UH 2 24 lo0
fe80::/10 fe80::20c:29ff:fe83:2398 U 2 0 net0
root@solaris:~# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ---------- --------- default 192.168.44.2 UG 1 0 net0 127.0.0.1 127.0.0.1 UH 2 386 lo0 192.168.44.0 192.168.44.132 U 4 154 net0 Routing Table: IPv6 Destination/Mask Gateway Flags Ref Use If --------------------------- --------------------------- ----- --- ------- ----- ::1 ::1 UH 2 24 lo0 fe80::/10 fe80::20c:29ff:fe83:2398 U 2 0 net0
root@solaris:~# netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface
-------------------- -------------------- ----- ----- ---------- ---------
default              192.168.44.2         UG        1          0 net0
127.0.0.1            127.0.0.1            UH        2        386 lo0
192.168.44.0         192.168.44.132       U         4        154 net0

Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use    If
--------------------------- --------------------------- ----- --- ------- -----
::1                         ::1                         UH      2      24 lo0
fe80::/10                   fe80::20c:29ff:fe83:2398    U       2       0 net0

4.データリンクの物理属性を表示します。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
root@solaris:~# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 1000 full e1000g0
root@solaris:~# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 1000 full e1000g0
root@solaris:~# dladm show-phys
LINK            MEDIA         STATE      SPEED  DUPLEX    DEVICE
net0            Ethernet      up         1000   full      e1000g0

5.システム内の既存のデータリンクを表示します。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
root@solaris:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
root@solaris:~# dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 up --
root@solaris:~# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net0                phys      1500   up       --

6.ルートー情報を表示します
root@solaris:~# route -p show

Solaris

Posted by arkgame