The Netstat command

netstat has many uses

Implementation and usage vary by OS

Some options:

    -I <int>  show stats for specific NIC
    -a        show 'server' socket state too
    -f inet   only show IPv4 info
    -n        don't do IP -> name (DNS) lookups
    -r        show system routing table

Viewing Network Activity with netstat

OpenBSD Config

Configure network interfaces with /etc/hostname.<int>

Configure a default route with /etc/mygate

    feanor % cat /etc/mygate

DHCP Client hints

The ifconfig Command

View network interface parameters

Configure network interface parameters

Resolving Hostnames

Hosts must be told how and from where

Sys-V hosts tend to look in /etc/nsswitch.conf

Client DNS Configuration

Client DNS is configured in /etc/resolv.conf

Static Routing

Use netstat to view system's route table

     % netstat -rn -f inet

IP routing decisions

Static routing is good for

Static routes are manipulated with the route command