Configure TCP/IP HOWTO
From Genunix
phani writes: > I successfully installed the Landriver for AMD64 VIA. But I want the complete details how to configure my TCP/IP. > I am unable to configure my TCP/IP network.. > plese anyone help me
The short answer is "do sys-unconfig, reboot, and answer the questions."
If you prefer to hack around with it:
- Use "ifconfig -a plumb ; ifconfig -a" to get an idea of what interfaces are available.
- If you're using a statically-configured address, put it in /etc/hostname.$IF, where "$IF" is one of the interfaces determined above.
- If you're using DHCP instead, then just touch /etc/hostname.$IF and /etc/dhcp.$IF.
- Next, you may need to figure out how to get routes. If you're using a static default router, put it in /etc/defaultrouter. If you're using statically configured arbitrary routes, use /usr/sbin/route and the "-p" option. If you're using DHCP, then the server may give you a default route and that may be enough. If you're using RIP, OSPF, or ICMP router discovery, see the routeadm command.
- Next, set up the name services. If you use DHCP, this should be automatic. Otherwise, copy /etc/nsswitch.dns to /etc/nsswitch.conf and edit if necessary. Put any static definitions you need in /etc/hosts. Set up /etc/resolv.conf with your name servers and domain (if any).
- Next, you might need a local host name. This is true if you're not using DHCP, or if your DHCP server doesn't offer a host name (many simple ones do not). Use /etc/nodename to set that.
You can then use:
- "ping -n $IPADDR" (with some external IP address) to test routing. Start with $IPADDR set to your local default router.
- "nslookup" to test DNS itself (the /etc/resolv.conf file).
- "getent hosts $NAME" to test name services (/etc/nsswitch.conf and the underlying resolver, such as DNS).
