o-s

Network Administration on Linux / UNIX

September 1, 2010

TCP/IP Networking

origin: ARPANET by the United States Defense Advanced Research Projects Agency (DARPA), 1969

TCP/IP protocol suite

ARP, IP, ICMP, UDP, TCP

SLIP and PPP

Socket Library

Networking Hardware Configuration

hardware: Ethernet, serial line (RS-232), point-to-point, parallel port

device drivers:

Ethernet: 3Com, Novell, WD/SMC, HP, D-Link, DEC, …

SLIP:

dial in: /dev/ttyS0, /dev/ttyS1, …

dial out: /dev/cua0, /dev/cua1, …

CSLIP

PPP

PLIP

interface (Linux Network Device):

local loopback: lo

Ethernet: eth0, eth1, …

D-Link DE-600: dl0, dl1, …

SLIP: sl0, sl1, …

PPP: ppp0, ppp1, …

PLIP: plip0, plip1, …

TCP/IP network configurations

 /sbin/netconfig can do all the tricks for you

(0)    hostname and IP address

hostname: hostname <name> à/etc/HOSTNAME

IP address: ifconfig <interface> <ip-address> à/etc/hosts

(2)    netmask: ifconfig <interface> <ip-address> netmask <mask>

à/etc/rc.d/rc.inet1

(3)    gateway: /etc/rc.d/rc.inet1

adding routes:

route add <target host>

route add -net <target net>

Routing through a Gateway:

route add -net <target net> gw <gateway>

route add default gw <gateway>

network address: /etc/networks

(4)    DNS (Domain Name Systems Server):

/etc/host.conf :

order [hosts/bind/nis]

multi [on/off]

nospoof [on/off]

alert [on/off]

trim [<domain>]

/etc/resolv.conf

nameserver <ip address 1, 2, 3>

domain <domain name>

search <domain 1, 2, …>

(5)    other network related configuration files: /etc/rc.d/rc.inet2, /etc/hosts.allow, /etc/hosts.deny, …

Utilities for Checking Network Status

arp -a                  : to display the ARP entry for all hosts

ping <host/ip>    : to send ICMP echo request

traceroute            : to trace the path between host and destination (using ICMP)

netstat -nr            : to display the routing table (route –n)

netstat -I              : to display interface statistics

netstat -[tuwx]a   : to display active TCP, UDP, RAW, or UNIX socket connections

nslookup              : to lookup hostname/IP address in name server

Internet Server Installation and Configuration

Linux Servers (daemons):

1. Standalone servers

2. daemon managed by the inetd Super Server: /etc/inetd.conf

  • /etc/services, /etc/protocols

www.bestitdocuments.com