[[PageOutline]] = iproute2 = * attachment:ip-cref.pdf * [http://www.policyrouting.org/iproute2-toc.html IPROUTE2 Utility Suite Documentation] * http://hp.vector.co.jp/authors/VA027424/iproute2.html = iproute2を使ったマルチホーム = * [http://www.physics.umd.edu/rgroups/pnce/pcs-docs/Glue/linux-route-hack.html Linux Route Hacks] * [http://www.monochrome.jp/~katsuwo/debian/tips/iproute2.html iproute2 と複数インターネット接続(2002.1203)] * [http://www.aconus.com/~oyaji/router/multihoming.htm マルチホ-ミングの設定方法] * [http://search.luky.org/linux-users.8/msg04062.html linux-users:84062 1台のルータで複数の外部接続(Re: 複数の接続回線の併用。)] * [http://search.luky.org/linux-users.8/msg06780.html linux-users:86777 Re: 2 回線に同じWeb 、FTP サーバを公開したいのですが] * [http://flatray.com/linux/multihome/ Linuxでマルチホーム (複数のISPの同時利用)] * [http://d.hatena.ne.jp/kokutoto/20090325/p1 debianでiproute2を使ったルーティングを設定する - 黒糖々日記/kokutoto diary] = misc = * 全てのtable IDのrouting tableを列挙する * ip route show table all * キャッシュされたrouting tableを表示する * ip route show table cache * キャッシュの破棄 * ip route flush cache = sample script = * source:/lab.git/TipAndDoc/iproute == [source:/lab.git/TipAndDoc/iproute/setroute.sh setroute.sh] == * for Ubuntu * デフォルトGWの設定状況に関わりなく、ethNから入ってきたパケットはetnNから返す設定にするスクリプト * NIC活性化時に自動で呼び出して使用 * /etc/network/interfaces にて以下のようにして使う {{{ auto eth2 iface eth2 inet dhcp post-up /root/setroute.sh post-up /sbin/ip route del default dev eth2 post-down /root/setroute.sh auto eth1 iface eth1 inet dhcp post-up /root/setroute.sh post-down /root/setroute.sh }}} * 「post-up ip route del default dev eth2」については => [../defaultgw#Ubuntu] == [source:/lab.git/TipAndDoc/iproute/setroute-rhel.sh setroute-rhel.sh] == * for CentOS/Ubuntu * RHEL系については、interfacesの様なNIC活性化時の自動呼び出し+デバイス名自動取得の方法が不明なので、設定するデバイス名を指定する必要がある * ex) $ sudo /root/setroute-rhel.sh eth1 [192.168.1.254]