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.
Error | HP-UX Tips & Tricks Site

Error

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /homepages/37/d228974590/htdocs/includes/common.inc:2567) in drupal_send_headers() (line 1207 of /homepages/37/d228974590/htdocs/includes/bootstrap.inc).
  • PDOException: SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT command denied to user 'dbo229817041'@'217.160.155.192' for table 'watchdog': INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => cron [:db_insert_placeholder_2] => Attempting to re-run cron while it is already running. [:db_insert_placeholder_3] => a:0:{} [:db_insert_placeholder_4] => 4 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://www.hpuxtips.es/?q=node/129 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 184.73.21.101 [:db_insert_placeholder_9] => 1484799730 ) in dblog_watchdog() (line 157 of /homepages/37/d228974590/htdocs/modules/dblog/dblog.module).
The website encountered an unexpected error. Please try again later.