net-tools-1.60
作成 : 2003/01/03
ifconfig や route を含むパッケージ net-tools をインストールする。
net-tools-1.60 の入手と展開
net-tools は www.tazenda.demon.co.uk/phil/net-tools/ から入手できる。 (linux.org から検索できる) /usr/local/src に置いて、展開。
# bzip2 -cd net-tools-1.60.tar.bz2 | tar xvf -
make config
展開した /usr/local/src/net-tools の中で、make config。 使用するプロトコルなどを Y/N で答える。 Y/N を指定しないで Enter を押すと、デフォルト値([]の中)が使用される。
# make config rm -f config.h Configuring the Linux net-tools (NET-3 Base Utilities)... * * * Internationalization * * The net-tools package has currently been translated to French, * German and Brazilian Portugese. Other translations are, of * course, welcome. Answer `n' here if you have no support for * internationalization on your system. * Does your system support GNU gettext? (I18N) [n] n * * * Protocol Families. * UNIX protocol family (HAVE_AFUNIX) [y] y INET (TCP/IP) protocol family (HAVE_AFINET) [y] y INET6 (IPv6) protocol family (HAVE_AFINET6) [n] y Novell IPX/SPX protocol family (HAVE_AFIPX) [y] n Appletalk DDP protocol family (HAVE_AFATALK) [y] n AX25 (packet radio) protocol family (HAVE_AFAX25) [y] n NET/ROM (packet radio) protocol family (HAVE_AFNETROM) [y] n Rose (packet radio) protocol family (HAVE_AFROSE) [n] n X.25 (CCITT) protocol family (HAVE_AFX25) [y] n Econet protocol family (HAVE_AFECONET) [n] n DECnet protocol family (HAVE_AFDECnet) [n] n Ash protocol family (HAVE_AFASH) [n] n * * * Device Hardware types. * Ethernet (generic) support (HAVE_HWETHER) [y] y ARCnet support (HAVE_HWARC) [y] n SLIP (serial line) support (HAVE_HWSLIP) [y] n PPP (serial line) support (HAVE_HWPPP) [y] n IPIP Tunnel support (HAVE_HWTUNNEL) [y] y STRIP (Metricom radio) support (HAVE_HWSTRIP) [y] n Token ring (generic) support (HAVE_HWTR) [y] n AX25 (packet radio) support (HAVE_HWAX25) [y] n Rose (packet radio) support (HAVE_HWROSE) [n] n NET/ROM (packet radio) support (HAVE_HWNETROM) [y] n X.25 (generic) support (HAVE_HWX25) [y] n DLCI/FRAD (frame relay) support (HAVE_HWFR) [y] n SIT (IPv6-in-IPv4) support (HAVE_HWSIT) [n] y FDDI (generic) support (HAVE_HWFDDI) [n] n HIPPI (generic) support (HAVE_HWHIPPI) [n] n Ash hardware support (HAVE_HWASH) [n] n (Cisco)-HDLC/LAPB support (HAVE_HWHDLCLAPB) [n] n IrDA support (HAVE_HWIRDA) [y] n Econet hardware support (HAVE_HWEC) [n] n * * * Other Features. * IP Masquerading support (HAVE_FW_MASQUERADE) [n] y Build iptunnel and ipmaddr (HAVE_IP_TOOLS) [n] y Build mii-tool (HAVE_MII) [n] y
make
make。 cc がないエラーになったので、CC=gcc をつけて実行。
# CC=gcc make
make install
make install。
# make install
/bin か /sbin に、ifconfig や route などがインストールされる。 make install のログをおいておく。
/etc/rc.d ディレクトリ
システム起動時に IP 設定を行うよう、/etc/rc.d ディレクトリのスクリプトに追加する。 どこでもいいけど、rc.local あたりに書いておく。 (フルインストールした場合は、rc.inet1 に記述される)
ifconfig lo 127.0.0.1 netmask 255.0.0.0 ifconfig eth0 192.168.0.100 netmask 255.255.255.0 route add default gw 192.168.0.1
ひとつ目は、ループバックの設定。 ふたつ目は、NIC に割り当てるアドレスの設定。 みっつ目は、デフォルトルートの設定。