再起動直後に外部のサーバ宛にpingが打てない。にもかかわらずifconfig ppp0では正しくIPアドレスが取得できている。
# ping google.com ping: unknown host google.com # ifconfig ppp0 ppp0 Link encap:Point-to-Point Protocol inet addr:***.***.***.237 P-t-P:***.***.***.*** Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1454 Metric:1 RX packets:548 errors:0 dropped:0 overruns:0 frame:0 TX packets:553 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:402213 (392.7 KiB) TX bytes:118841 (116.0 KiB)
これを解決するにはeth0を一回落として再度あげる。
# ifdown eth0; ifup eth0
これをした後の/var/log/messagesはこんな感じ
# tail -f /var/log/messages Jan 13 00:24:51 ****** pppd[2079]: Modem hangup Jan 13 00:24:51 ****** pppd[2079]: Connect time 1.3 minutes. Jan 13 00:24:51 ****** pppd[2079]: Sent 0 bytes, received 0 bytes. Jan 13 00:24:51 ****** pppd[2079]: Connection terminated. Jan 13 00:24:51 ****** kernel: [ 96.808301] ADDRCONF(NETDEV_UP): eth0: link is not ready Jan 13 00:24:51 ****** kernel: [ 96.812277] e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex Jan 13 00:24:51 ****** kernel: [ 96.813611] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
tailで確認を続けると何回か認証に失敗したあとに接続が回復する。
Jan 13 00:25:21 ****** pppd[2079]: PPP session is 31774 Jan 13 00:25:21 ****** pppd[2079]: Using interface ppp0 Jan 13 00:25:21 ****** pppd[2079]: Connect: ppp0 <--> eth0 Jan 13 00:25:24 ****** pppd[2079]: CHAP authentication failed: permission denied Jan 13 00:25:24 ****** pppd[2079]: Connection terminated. Jan 13 00:25:54 ****** pppd[2079]: PPP session is 31789 Jan 13 00:25:54 ****** pppd[2079]: Using interface ppp0 Jan 13 00:25:54 ****** pppd[2079]: Connect: ppp0 <--> eth0 Jan 13 00:26:07 ****** pppd[2079]: CHAP authentication failed: permission denied Jan 13 00:26:07 ****** pppd[2079]: Connection terminated. Jan 13 00:26:37 ****** pppd[2079]: PPP session is 31810 Jan 13 00:26:37 ****** pppd[2079]: Using interface ppp0 Jan 13 00:26:37 ****** pppd[2079]: Connect: ppp0 <--> eth0 Jan 13 00:26:41 ****** pppd[2079]: CHAP authentication failed: permission denied Jan 13 00:26:41 ****** pppd[2079]: Connection terminated. Jan 13 00:27:11 ****** pppd[2079]: PPP session is 31824 Jan 13 00:27:11 ****** pppd[2079]: Using interface ppp0 Jan 13 00:27:11 ****** pppd[2079]: Connect: ppp0 <--> eth0 Jan 13 00:27:14 ****** pppd[2079]: CHAP authentication failed: permission denied Jan 13 00:27:14 ****** pppd[2079]: Connection terminated. Jan 13 00:27:44 ****** pppd[2079]: PPP session is 31842 Jan 13 00:27:44 ****** pppd[2079]: Using interface ppp0 Jan 13 00:27:44 ****** pppd[2079]: Connect: ppp0 <--> eth0 Jan 13 00:27:48 ****** pppd[2079]: CHAP authentication failed: permission denied Jan 13 00:27:48 ****** pppd[2079]: Connection terminated. Jan 13 00:28:18 ****** pppd[2079]: PPP session is 31857 Jan 13 00:28:18 ****** pppd[2079]: Using interface ppp0 Jan 13 00:28:18 ****** pppd[2079]: Connect: ppp0 <--> eth0 Jan 13 00:28:21 ****** pppd[2079]: CHAP authentication failed: permission denied Jan 13 00:28:21 ****** pppd[2079]: Connection terminated. Jan 13 00:28:51 ****** pppd[2079]: PPP session is 31870 Jan 13 00:28:51 ****** pppd[2079]: Using interface ppp0 Jan 13 00:28:51 ****** pppd[2079]: Connect: ppp0 <--> eth0 Jan 13 00:28:55 ****** pppd[2079]: CHAP authentication succeeded Jan 13 00:28:55 ****** pppd[2079]: CHAP authentication succeeded Jan 13 00:28:55 ****** pppd[2079]: peer from calling number **:**:**:**:**:** authorized Jan 13 00:28:55 ****** pppd[2079]: local IP address ***.***.***.221 Jan 13 00:28:55 ****** pppd[2079]: remote IP address ***.***.***.*** Jan 13 00:28:55 ****** pppd[2079]: primary DNS address ***.***.***.*** Jan 13 00:28:55 ****** pppd[2079]: secondary DNS address ***.***.***.***
この操作の後は、外部サーバにpingが通るし、ppp0にも先ほどと異なるIPアドレスが割り振られている。
# ping google.com PING google.com (66.249.89.99) 56(84) bytes of data. 64 bytes from nrt04s01-in-f99.1e100.net (66.249.89.99): icmp_seq=1 ttl=55 time=8.46 ms 64 bytes from nrt04s01-in-f99.1e100.net (66.249.89.99): icmp_seq=2 ttl=55 time=7.71 ms 64 bytes from nrt04s01-in-f99.1e100.net (66.249.89.99): icmp_seq=3 ttl=55 time=7.22 ms 64 bytes from nrt04s01-in-f99.1e100.net (66.249.89.99): icmp_seq=4 ttl=55 time=9.33 ms ^C --- google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3010ms rtt min/avg/max/mdev = 7.229/8.186/9.337/0.804 ms # ifconfig ppp0 ppp0 Link encap:Point-to-Point Protocol inet addr:***.***.***.221 P-t-P:***.***.***.*** Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1454 Metric:1 RX packets:548 errors:0 dropped:0 overruns:0 frame:0 TX packets:553 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:402213 (392.7 KiB) TX bytes:118841 (116.0 KiB)