| IP アドレス | 192.168.2.45 |
| 接続するネットワークアドレス | 192.168.2.0 |
| 接続するネットワークのネットマスク | 255.255.255.0 |
| 接続するネットワークのブロードキャストアドレス | 192.168.2.255 |
| デフォルトゲートウェイ | 192.168.2.1 |
| ネームサーバの IP アドレス | 192.168.1.2 |
| ホスト名 | mini |
hackkit:/etc/network# cat interfaces
######################################################################
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# See the interfaces(5) manpage for information on what options are
# available.
######################################################################
# We always want the loopback interface.
#
auto lo
iface lo inet loopback
# To use dhcp:
#
# auto eth0
# iface eth0 inet dhcp
# Static IP setup: (broadcast and gateway are optional)
#
auto eth0
iface eth0 inet static
address 192.168.2.45
network 192.168.2.0
netmask 255.255.255.0
broadcast 192.168.2.255
gateway 192.168.2.1
hackkit:/etc/network#
hackkit:/etc/network# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain 192.168.2.45 mini # The following lines are desirable for IPv6 capable hosts # (added automatically by netbase upgrade) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts hackkit:/etc/network#
hackkit:/etc/network# cat /etc/resolv.conf nameserver 192.168.1.2 hackkit:/etc/network#
hackkit:/etc/network# cat /etc/hostname mini hackkit:/etc/network#こんなところか。
hackkit:/etc/network# shutdown -r now :
mini:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1D:73:4C:A6:78
inet addr:192.168.2.45 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:512
RX bytes:712 (712.0 b) TX bytes:340 (340.0 b)
Interrupt:21
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)
mini:~# hostname
mini
mini:~# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.2.1 0.0.0.0 UG 0 0 0 eth0
mini:~#
いけてそう。
|
|
← debian 化(10)md0 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ debian 化(12)パッケージリストのアップデート |