eth1 を使ってみる
/etc/network/interfaces の変更
tswxl:~# cd /etc/network
tswxl:/etc/network# mv interfaces{,.eth0}
tswxl:/etc/network# cp interfaces{.eth0,}
tswxl:/etc/network# vi interfaces
:
:
tswxl:/etc/network# !cp:s/cp/diff -c/
diff -c interfaces{.eth0,}
*** interfaces.eth0 Sun Mar 7 11:54:02 2010
--- interfaces Sat May 15 10:41:52 2010
***************
*** 17,19 ****
--- 17,27 ----
netmask 255.255.255.0
broadcast 192.168.2.255
gateway 192.168.2.1
+
+ auto eth1
+ iface eth1 inet static
+ address 192.168.1.4
+ network 192.168.1.0
+ netmask 255.255.255.0
+ broadcast 192.168.1.255
+ gateway 192.168.1.1
tswxl:/etc/network#
eth1 の起動
tswxl:/etc/network# ifup eth1
tswxl:/etc/network# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1d:73:e7:23:b3
inet addr:192.168.2.70 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:864 errors:0 dropped:0 overruns:0 frame:0
TX packets:544 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:56137 (54.8 KiB) TX bytes:46058 (44.9 KiB)
Interrupt:40
eth1 Link encap:Ethernet HWaddr 00:1d:73:e7:23:b4
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:44
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
tswxl:/etc/network#
UP !
確認
別のマシンから、確認
[yasunari@ns yasunari]$ telnet 192.168.1.4
Trying 192.168.1.4...
Connected to 192.168.1.4.
Escape character is '^]'.
Linux 2.6.22.18-mv78100 (ns.yamasita.jp) (pts/1)
tswxl login: yasunari
Password:
Last login: Sat May 15 19:35:16 JST 2010 from x31l.yamasita.jp on pts/0
Linux tswxl 2.6.22.18-mv78100 #134 Thu Feb 4 11:14:40 JST 2010 armv5tejl
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
yasunari@tswxl:~$
good job!
Copyright (C) 2003-2010 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp
山下康成@京都府向日市