You are here

Basic network commands

FILES

* /etc/hosts - Hosts configuration file (resolve hosts and IPs)
* /etc/rc.config.d/netconf – IP address, routeing address and hostname stored in this file

SCRIPTS

* /etc/init.d/net start – Use to start, stop network service

HPUX Commands
(a) Display lan interface info:
# lanscan

(b) All in one lan configuration utility (lan0 is first Ethernet interface) to configure and view the system IP address:
# ifconfig lan0 - Display IP info such as IP address netmask etc.
# ifconfig lan0 up - Up network interface (allow traffic)
# ifconfig lan0 down - Down network interactive (deny traffc)
# ifconfig lan0 192.168.1.1 netmask 255.255.255.0 up - Setup/change IP adddress

(c) Displaying host name
# hostname

(d) Arp administration (cache)
# arp -a

(e) Display routing table/info:
# netstat -nr

(f) Define new route:
# route add default 192.168.1.254 1

(g) HP’s LAN diagnostic tool
# lanadmin

(h) Test a remote host connectivity
ping host.mycorp.com

(i) Setup various lan properties, dns client, NIS client configuration etc using GUI tool:
# sam
# set_parms

(j) Check dns connectivity:
$ nslookup www.google.co.uk

On 11.31 there is a new command to manage you network interfaces,as jmrey points out:

Regarding lanscan, in 11.31 is deprecated. Use nwmgr instead. It is much more powerfull than lanscan and as you can see in the example below, you can obtain a lot of more info about the network interfaces.

host# nwmgr

Name/ Interface Station Sub- Interface Related
ClassInstance State Address system Type Interface
============== ========= ============== ======== ============== ========
lan2 UP 0x001E0B45E09A igelan 1000Base-SX
lan0 UP 0x001E0B45E09C igelan 1000Base-SX
lan1 UP 0x001E0B45E09D igelan 1000Base-SX
lan3 UP 0x001E0B45E09B igelan 1000Base-SX

host# nwmgr -q info -c lan0
lan0:
Interface State =UP
MAC Address = 0x001E0B45E09C
Subsystem = igelan
Interface Type = 1000Base-SX
Hardware Path = 0/1/1/0
NMID = 2
Feature Capabilities = Physical Interface
IPV4 Recv CKO
IPV4 Send CKO
VLAN Tag Offload
64Bit MIB Support
IPV4 TCP Segmentation Offload
UDP Multifrag CKO
Feature Settings = Physical Interface
VLAN Tag Offload
64Bit MIB Support
MTU = 1500
Speed = 1 Gbps Full Duplex (Autonegotiation : On)

lan0 PCI properties:
PCI Sub-System ID = 0x1701

lan0 driver properties:
Driver Version = B.11.31.0803
Driver State = IGELAN_ONLINE

Unix Systems: 

Comments

Regarding lanscan, in 11.31 is deprecated. Use nwmgr instead. It is much more powerfull than lanscan and as you can see in the example below, you can obtain a lot of more info about the network interfaces.

host# nwmgr

Name/ Interface Station Sub- Interface Related
ClassInstance State Address system Type Interface
============== ========= ============== ======== ============== ========
lan2 UP 0x001E0B45E09A igelan 1000Base-SX
lan0 UP 0x001E0B45E09C igelan 1000Base-SX
lan1 UP 0x001E0B45E09D igelan 1000Base-SX
lan3 UP 0x001E0B45E09B igelan 1000Base-SX

host# nwmgr -q info -c lan0
lan0:
Interface State =UP
MAC Address = 0x001E0B45E09C
Subsystem = igelan
Interface Type = 1000Base-SX
Hardware Path = 0/1/1/0
NMID = 2
Feature Capabilities = Physical Interface
IPV4 Recv CKO
IPV4 Send CKO
VLAN Tag Offload
64Bit MIB Support
IPV4 TCP Segmentation Offload
UDP Multifrag CKO
Feature Settings = Physical Interface
VLAN Tag Offload
64Bit MIB Support
MTU = 1500
Speed = 1 Gbps Full Duplex (Autonegotiation : On)

lan0 PCI properties:
PCI Sub-System ID = 0x1701

lan0 driver properties:
Driver Version = B.11.31.0803
Driver State = IGELAN_ONLINE

JMR

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.