[[PageOutline]] [[TitleIndex(TipAndDoc/network,format=group)]] * [http://linux-ip.net/ Guide to IP Layer Network Administration with Linux (http://linux-ip.net/)] * [http://www.linux.or.jp/JF/JFdocs/Adv-Routing-HOWTO/lartc.kernel.obscure.html Linux Advanced Routing & Traffic Control HOWTO - あまり知られていない設定] * [http://hylom.net/2011/05/18/nuttcp_thruput_benchmarking/ nuttcpでネットワークスループットを測る « DailyHckr] = misc = * [http://muumoo.jp/news/2008/08/16/0proxifier.html NetShareの件はProxifier使ったら一発だった - むぅもぉ.jp] > このツールは、どうやら通信してるアプリを勝手に見つけて、その通信を奪って、指定したSocksプロキシを通してくれるらしい。なので、ブラウザ側の設定は何も変えなくていいし、そもそもブラウザがSocks5に対応してなくてもOKだし、ブラウザに限らずなんのソフトにでも使えるし、Proxifierを起動するかしないかだけなので、環境の切り替えも簡単。もちろんDNSとかも問題なくいける。WindowsもMacも使える。 = CIFS vs NFS = * 結論: Linux<=>Linux間のファイル共有はNFSが良い * 速度はNFSの方が高速 * dd if=10MB.cifs of=/mnt/temp/10MB.cifs {{{ 10485760 bytes (10 MB) copied, 28.8593 s, 363 kB/s }}} * dd if=10MB.nfs of=/mnt/dropbox/10MB.nfs {{{ 10485760 bytes (10 MB) copied, 12.9951 s, 807 kB/s }}} * ファイルのパーミッション等 * cifs => umaskの影響を受ける * デフォルトでは「-rwxr--r--」になる * nfs => 基本的にコピー元のまま * ファイル名の大文字小文字の区別 * cifs => 区別しない(元々別だったファイルが一つに上書きされてしまう) * nfs => 区別する * 認証 * cifs => 容易 * nfs => ホスト(IP)ベースの認証は楽。ユーザ名ベースの認証は不明(出来ない?) = get information = * NICの羅列 {{{ ip link | grep "^[1-9]" | cut -d : -f 2 | cut -d ' ' -f 2 | grep "^eth" }}} * IPの取得 {{{ ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' }}} {{{ ip addr | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1 }}} = SYN Cookies = * [http://ja.wikipedia.org/wiki/SYN_cookies SYN cookies - Wikipedia] * [http://lkml.org/lkml/2008/2/5/167 LKML: Andi Kleen: Re: [PATCH] Add IPv6 support to TCP SYN cookies] * [http://www.soi.wide.ad.jp/class/20060020/slides/11/26.html SYN Cookiesの動作] * to enable * sysctl -w net.ipv4.tcp_syncookies=1 * /etc/sysctl.conf > net.ipv4.tcp_syncookies=1 = calculate netmask = * ipcount <= perlのNet::IPモジュールに含まれる * aptitude install libnet-ip-perl * /usr/share/doc/libnet-ip-perl/examples/ipcount {{{ Usage: ipcount [-r] [-d ] address -r: Print Reverse Ranges -d : Cut down the original prefix in several prefixes The address range can be one of: ipcount IP + size ipcount IP1 - IP2 ipcount IP/len }}} * via [http://linux.mini13i.gotdns.org/?tool%2Fnetmask%B7%D7%BB%BB tool/netmask計算 - Linux Tips] = NICが活性化される順序 = #NIClinkOrder * CentOS * ifcfg? の数字が若い順に固定?(任意の順序に変更できるか不明) * Ubuntu * interfacesに記載された順の模様 = wakeonlan = * sudo aptitude install -R wakeonlan * デフォルトルートとは違うNICから送出したい場合 * wakeonlan -i 192.168.100.255 00:1D:60:XX:YY:ZZ {{{ Sending magic packet to 192.168.100.255:9 with 00:1D:60:XX:YY:ZZ }}} * tcpdump -np port 9 -i eth0 {{{ 11:30:32.420790 IP 192.168.100.254.34625 > 192.168.100.255.9: UDP, length 102 }}} = fix DNS server on DHCP network = * [http://ubuntuforums.org/showthread.php?t=491711 /etc/resolv.conf file troubles - Ubuntu Forums] * DHCP配下のネットワークで、DNSを固定する * デフォルトではIP割り当て時に/etc/resolve.confが自動で書き換わってしまう * man dhclient.conf {{{ OPTION MODIFIERS The supersede statement supersede [ option declaration ] ; If for some option the client should always use a locally-configured value or values rather than whatever is supplied by the server, these values can be defined in the supersede statement. }}} * /etc/dhcp3/dhclient.conf {{{ supersede domain-name-servers 127.0.0.1; }}} * => /etc/resolv.conf {{{ nameserver 127.0.0.1 }}} = tftp = * [[Image(tftp-win7.png, 33%)]] = Slepnir2 = * [http://d.hatena.ne.jp/barrackdo/20100312/1268408614 「起動時に前回終了時の状態を復元する」を復元する - (TooLab.)Lab. 研究日誌] * 2.9.5 on Windows 7 x64ではエラー[[br]][[Image(LastSessionBackup.png,33%)]] = ping = * 途中でstatisticsを見る方法 * Windows -> Ctrl+Pause or Ctrl+Break[[br]][[Image(ping-windows.png,33%)]] * Linux -> Ctrl+\ or Ctrl+4[[br]][[Image(ping-ubuntu.png,33%)]] * see wikipedia:SIGQUIT, twitter:mittyorz/status/48251240571875328, twitter:mittyorz/status/48251524085854208 = Pukiwiki = == locale == * [http://pukiwiki.cafelounge.net/plus/?%E8%B3%AA%E5%95%8F%E7%AE%B1%2F405 サーバのアップデートでナビゲートバーが英語になってしまいました。] * [http://pukiwiki.cafelounge.net/plus/?%E8%B3%AA%E5%95%8F%E7%AE%B1%2F247 別のサーバで動かしていたときは日本語になって いたのですが、このたびサーバを新調して新規インストール するとメニューやらメッセージが英語のままになってしまいます。] * [http://blog.jetspeed.jp/2006/07/ubuntulocale/ ubuntuでlocaleがない場合 | jetspeed blog] > {{{ > # apt-get install language-pack-ja > # dpkg-reconfigure locales > }}} * see also [http://slashdot.jp/~kubota/journal/37231 locale.alias - kubota の日記] > Linux システムにおいて、locale.alias というファイルは、GNU libc にも含まれるし、X Window System にも含まれる。これらのファイルには、ASCII ではない文字が含まれている。fran0xe7ais と bokm0xe5l のふたつだ。 = Network Bridge = * http://manpages.ubuntu.com/manpages/lucid/man8/brctl.8.html Ubuntu Manpage: brctl - ethernet bridge administration * [http://www.asterisk-works.jp/wiki/index.php/Ubuntu%E3%81%A7%E3%83%96%E3%83%AA%E3%83%83%E3%82%B8%E6%8E%A5%E7%B6%9A%E3%81%99%E3%82%8B Ubuntuでブリッジ接続する - Astarisk Works Wiki] * [http://hnakamur.blogspot.com/2009/08/ubuntu.html hnakamur’s blog: Ubuntuでネットワークブリッジを作成] * [http://tobysoft.net/wiki/index.php?Ubuntu%2FOpenVPN%2F%A5%ED%A1%BC%A5%AB%A5%EB%A4%CEVirtualBox%A4%CB%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB%A4%B7%A4%C6%BB%EE%A4%B7%A4%C6%A4%DF%A4%EB Ubuntu/OpenVPN/ローカルのVirtualBoxにインストールして試してみる - TOBY SOFT wiki]