2004年10月24日日曜日

iproute2入門(その1)


iproute2 入門を見ながら勉強中。



ip にリンクを表示させる


shibata@his(4)$ ip link list
1: lo: mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:02:b3:28:33:47 brd ff:ff:ff:ff:ff:ff
3: eth1: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:a0:c9:0f:ee:70 brd ff:ff:ff:ff:ff:ff
4: eth2: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:a0:c9:0a:87:d2 brd ff:ff:ff:ff:ff:ff





ip に IP アドレスを表示させる

shibata@his(5)$ ip address show
1: lo: mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:02:b3:28:33:47 brd ff:ff:ff:ff:ff:ff
inet 219.99.179.188/26 brd 219.99.179.191 scope global eth0
3: eth1: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:a0:c9:0f:ee:70 brd ff:ff:ff:ff:ff:ff
inet 210.203.222.218/29 brd 210.203.222.223 scope global eth1
4: eth2: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:a0:c9:0a:87:d2 brd ff:ff:ff:ff:ff:ff
inet 192.168.200.188/24 brd 192.168.200.255 scope global eth2



ip に経路を表示させる


shibata@his(6)$ ip route show
210.203.222.216/29 dev eth1 proto kernel scope link src 210.203.222.218
219.99.179.128/26 dev eth0 proto kernel scope link src 219.99.179.188
192.168.200.0/24 dev eth2 proto kernel scope link src 192.168.200.188
default via 219.99.179.129 dev eth0

なるほど、『iproute は「リンク」と「IP アドレス」という二つの概念を切り離しています。』と言うのがわかる気がする表示だな。



��新潟近辺で強い地震があったみたいだな。

��大丈夫かな。


0 件のコメント:

コメントを投稿