linux主机一般查看IP命令为ifconfig。可是这个命令到了hp-unix上不灵了。折腾许久,问了老大才知道:hp-unix与其它不同。
hp-unix的接口是lin0 \lin1表示
用ifconfig命令 需要加上接口名称。
netstat -in \查看所有接口IP命令
ifconfig lanX \查看某个指定接口命令
例:
HPUNIX#[/]netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan2* 1500 none none 0 0 0 0 0
lan1:1 1500 10.3.5.0 10.3.5.9 2588118715 0 1957576718 0
0
lan1 1500 10.3.5.0 10.3.5.11 4162840830 0 2056432708 0
0
lan0 1500 192.168.1.0 192.168.1.1 68101712 0 132858587 0 0
lo0 4136 127.0.0.0 127.0.0.1 266955267 0 266955271 0 0
HPUNIX#[/]
HPUNIX#[/]ifconfig lan0
lan0: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.252
HPUNIX#[/]ifconfig lan1
lan1: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
inet 10.3.5.11 netmask ffffffc0 broadcast 10.3.5.63
HPUNIX#[/]ifconfig lan1:1
lan1:1: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
inet 10.3.5.9 netmask ffffffc0 broadcast 10.3.5.63
HPUNIX#[/]
hp-unix的接口是lin0 \lin1表示
用ifconfig命令 需要加上接口名称。
netstat -in \查看所有接口IP命令
ifconfig lanX \查看某个指定接口命令
例:
HPUNIX#[/]netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan2* 1500 none none 0 0 0 0 0
lan1:1 1500 10.3.5.0 10.3.5.9 2588118715 0 1957576718 0
0
lan1 1500 10.3.5.0 10.3.5.11 4162840830 0 2056432708 0
0
lan0 1500 192.168.1.0 192.168.1.1 68101712 0 132858587 0 0
lo0 4136 127.0.0.0 127.0.0.1 266955267 0 266955271 0 0
HPUNIX#[/]
HPUNIX#[/]ifconfig lan0
lan0: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.252
HPUNIX#[/]ifconfig lan1
lan1: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
inet 10.3.5.11 netmask ffffffc0 broadcast 10.3.5.63
HPUNIX#[/]ifconfig lan1:1
lan1:1: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
inet 10.3.5.9 netmask ffffffc0 broadcast 10.3.5.63
HPUNIX#[/]