Networking – Important file formats (Linux)
NIC Device Names
/dev/eth0, eth1, eth2, etc.
/etc/hosts
127.0.0.1 localhost localhost.localdomain
64.220.31.150 rabid rabid.adprotech.com
64.220.31.111 web-inn01 web-inn01.web-inn.com
64.220.31.100 hootie hootie.golden-hamster.com
64.220.31.240 sonofhootie sonofhootie.golden-hamster.com
/etc/sysconfig/network
NETWORKING=yes
FORWARD_IPV4=false
HOSTNAME=hostname.domain.com
GATEWAY=64.220.31.1
GATEWAYDEV=eth0
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=64.220.31.150
NETMASK=255.255.255.0
NETWORK=64.220.31.0
BROADCAST=64.220.31.255
ONBOOT=yes
Or –
for DHCP hosts:
BOOTPROTO=DHCP
ONBOOT=yes
/etc/resolv.conf
search golden-hamster.com gh-interactive.com adprotech.com ip2.com
nameserver 64.220.31.150
nameserver 64.220.31.1
Restart and
re-configure all network settings
/etc/rc.d/init.d/network restart
Networking – Important file formats (Solaris and Most
other UNIX Flavors)
NIC Device Names
/dev/hme0 or /dev/le0, depending on the type of NIC in the system
/etc/hostname.<nic device name> (e.g. /etc/hostname.hme0)
Place the hostname of your computer, as it appears in the /etc/hosts file
/etc/defaultrouter
Place the address of your default gateway in this file.
/etc/hosts
Place an entry for your hosts in this file – The hostname in this file MUST match the hostname placed in /etc/hostname.<nic-device-name> above
Networking – Important Commands (All Unix Flavors)
View Current IP
Address Settings
/sbin/route
View Routing
Information
/sbin/route