Ubuntu > ルーティングテーブルの設定

更新日 2013-02-04
広告
ルーティングテーブルのエントリを追加する例を示します。
$ sudo route -v add -net 192.168.0.0 netmask 255.255.255.0 eth1
ルーティングテーブルを見てみます。
$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
宛先が192.168.0.0/24の場合、インターフェースeth1を使うように設定されました。 エントリを削除する例を示します。
route del -net 192.168.0.0 net mask 255.255.255.0
広告
お問い合わせは sweng.tips@gmail.com まで。
inserted by FC2 system