完全手動 ネットワーク設定
Posted: 15/11/19(木) 02:21
frisbee も効かないときがあります(precise)。
そんな時は 「完全手動 ネットワーク設定」です。
これは 知ってる方には 釈迦に説法なのですが。
router のアドレスが192.168.100.254として
# ifconfig eth0 192.168.100.49
# ping 192.168.100.254
PING 192.168.100.254 (192.168.100.254): 56 data bytes
64 bytes from 192.168.100.254: seq=0 ttl=64 time=0.833 ms
64 bytes from 192.168.100.254: seq=1 ttl=64 time=0.517 ms
64 bytes from 192.168.100.254: seq=2 ttl=64 time=0.339 ms
64 bytes from 192.168.100.254: seq=3 ttl=64 time=0.525 ms
^C
--- 192.168.100.254 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.339/0.553/0.833 ms
と確認
# route add default gw 192.168.100.254
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.: 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=52 time=205.681 ms
64 bytes from 8.8.8.8: seq=1 ttl=52 time=65.481 ms
64 bytes from 8.8.8.8: seq=2 ttl=52 time=65.367 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 65.367/112.176/205.681 ms
# cat /etc/resolv.conf
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line
nameserver 8.8.8.8
# ping -c 3 http://www.google.com <----後日記載 -c 3 は ping は3回だけという意味です
PING http://www.google.com (216.58.197.4): 56 data bytes
64 bytes from 216.58.197.4: seq=0 ttl=51 time=58.388 ms
64 bytes from 216.58.197.4: seq=1 ttl=51 time=58.206 ms
64 bytes from 216.58.197.4: seq=2 ttl=51 time=58.138 ms
--- http://www.google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 58.138/58.244/58.388 ms
でおしまい。
シェルスクリプトにしておくと さらに簡単で frisbee 使うよりお手軽。
(以下3行のシェルスクリプトも 後日記載: frisbee が起動しない時の***非常時***用 )
ifconfig eth0 192.168.100.49
route add default gw 192.168.100.254
echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
wifiの場合は ドライバーが手に入ってても 難しくてちょと自分は無理です
そんな時は 「完全手動 ネットワーク設定」です。
これは 知ってる方には 釈迦に説法なのですが。
router のアドレスが192.168.100.254として
# ifconfig eth0 192.168.100.49
# ping 192.168.100.254
PING 192.168.100.254 (192.168.100.254): 56 data bytes
64 bytes from 192.168.100.254: seq=0 ttl=64 time=0.833 ms
64 bytes from 192.168.100.254: seq=1 ttl=64 time=0.517 ms
64 bytes from 192.168.100.254: seq=2 ttl=64 time=0.339 ms
64 bytes from 192.168.100.254: seq=3 ttl=64 time=0.525 ms
^C
--- 192.168.100.254 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.339/0.553/0.833 ms
と確認
# route add default gw 192.168.100.254
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.: 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=52 time=205.681 ms
64 bytes from 8.8.8.8: seq=1 ttl=52 time=65.481 ms
64 bytes from 8.8.8.8: seq=2 ttl=52 time=65.367 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 65.367/112.176/205.681 ms
# cat /etc/resolv.conf
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line
nameserver 8.8.8.8
# ping -c 3 http://www.google.com <----後日記載 -c 3 は ping は3回だけという意味です
PING http://www.google.com (216.58.197.4): 56 data bytes
64 bytes from 216.58.197.4: seq=0 ttl=51 time=58.388 ms
64 bytes from 216.58.197.4: seq=1 ttl=51 time=58.206 ms
64 bytes from 216.58.197.4: seq=2 ttl=51 time=58.138 ms
--- http://www.google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 58.138/58.244/58.388 ms
でおしまい。
シェルスクリプトにしておくと さらに簡単で frisbee 使うよりお手軽。
(以下3行のシェルスクリプトも 後日記載: frisbee が起動しない時の***非常時***用 )
ifconfig eth0 192.168.100.49
route add default gw 192.168.100.254
echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
wifiの場合は ドライバーが手に入ってても 難しくてちょと自分は無理です