ICMP宛先到達不能メッセージコード一覧表
コード | メッセージ |
0 | Network Unreachable |
1 | Host Unreachable |
2 | Protocol Unreachable |
3 | Port Unreachable |
4 | Fragmentation Needed and Don't Fragment was Set |
5 | Source Route Failed |
6 | Destination Network Unknown |
7 | Destination Host Unknown |
8 | Source Host Isolated |
9 | Communication with Destination Network is Administratively Prohibited |
10 | Communication with Destination Host is Administratively Prohibited |
11 | Destination Network Unreachable for Type of Service |
12 | Destination Host Unreachable for Type of Service |
ICMPメッセージタイプ一覧表
タイプ | メッセージ |
0 | エコー応答(Echo Reply |
3 | 宛先到達不能(Destination Unreachable) |
4 | 始点制御(Source Quench) |
5 | ルート変更(Redirect) |
8 | エコー要求(Echo Request) |
9 | Router Advertisement |
10 | Router Selection |
11 | Time Exceeded |
12 | Parameter Probrem |
13 | Timestamp |
14 | Timestamp Reply |
15 | Infomation Request |
16 | Information Reply |
17 | Address Mask Request |
18 | Address Mask Reply |
30 | Traceroute |
37 | Domain Name Request |
38 | Domain Name Reply |
上位層プロトコルタイプ
IPヘッダ上位層プロトコルタイプ(linux/in.h)
/* Standard well-defined IP protocols. */ enum { IPPROTO_IP = 0, /* Dummy protocol for TCP */ IPPROTO_ICMP = 1, /* Internet Control Message Protocol */ IPPROTO_IGMP = 2, /* Internet Group Management Protocol */ IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */ IPPROTO_TCP = 6, /* Transmission Control Protocol */ IPPROTO_EGP = 8, /* Exterior Gateway Protocol */ IPPROTO_PUP = 12, /* PUP protocol */ IPPROTO_UDP = 17, /* User Datagram Protocol */ IPPROTO_IDP = 22, /* XNS IDP protocol */ IPPROTO_RSVP = 46, /* RSVP protocol */ IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */ IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */ IPPROTO_PIM = 103, /* Protocol Independent Multicast */ IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */ IPPROTO_AH = 51, /* Authentication Header protocol */ IPPROTO_COMP = 108, /* Compression Header protocol */ IPPROTO_RAW = 255, /* Raw IP packets */ IPPROTO_MAX };
Ethernetヘッダ上位層プロトコルタイプ(linux/if_ehter.h)
/* * These are the defined Ethernet Protocol ID's. */ #define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ #define ETH_P_PUP 0x0200 /* Xerox PUP packet */ #define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ #define ETH_P_IP 0x0800 /* Internet Protocol packet */ #define ETH_P_X25 0x0805 /* CCITT X.25 */ #define ETH_P_ARP 0x0806 /* Address Resolution packet */ #define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ #define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ #define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ #define ETH_P_DEC 0x6000 /* DEC Assigned proto */ #define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ #define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ #define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */ #define ETH_P_LAT 0x6004 /* DEC LAT */ #define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ #define ETH_P_CUST 0x6006 /* DEC Customer use */ #define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ #define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ #define ETH_P_ATALK 0x809B /* Appletalk DDP */ #define ETH_P_AARP 0x80F3 /* Appletalk AARP */ #define ETH_P_IPX 0x8137 /* IPX over DIX */ #define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ #define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */ #define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */ #define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ #define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport over Ethernet */
ヘッダ構造体メモ
Ethernetヘッダ(DIX規格)
- linux/if_ehter.h
struct ethhdr { unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ unsigned char h_source[ETH_ALEN]; /* source ether addr */ unsigned short h_proto; /* packet type ID field */ };
IPv4ヘッダ
- netinet/ip.h
struct iphdr { #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned int ihl:4; unsigned int version:4; #elif __BYTE_ORDER == __BIG_ENDIAN unsigned int version:4; unsigned int ihl:4; #else # error "Please fix <bits/endian.h>" #endif u_int8_t tos; u_int16_t tot_len; u_int16_t id; u_int16_t frag_off; u_int8_t ttl; u_int8_t protocol; u_int16_t check; u_int32_t saddr; u_int32_t daddr; /*The options start here. */ };
IPv6ヘッダ
- netinet/ip6.h
struct ip6_hdr { union { struct ip6_hdrctl { uint32_t ip6_un1_flow; /* 4 bits version, 8 bits TC, 20 bits flow-ID */ uint16_t ip6_un1_plen; /* payload length */ uint8_t ip6_un1_nxt; /* next header */ uint8_t ip6_un1_hlim; /* hop limit */ } ip6_un1; uint8_t ip6_un2_vfc; /* 4 bits version, top 4 bits tclass */ } ip6_ctlun; struct in6_addr ip6_src; /* source address */ struct in6_addr ip6_dst; /* destination address */ }; #define ip6_vfc ip6_ctlun.ip6_un2_vfc #define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow #define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen #define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt #define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim #define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
ICMPヘッダ
- netinet/ip_icmp.h
struct icmp { u_int8_t icmp_type; /* type of message, see below */ u_int8_t icmp_code; /* type sub code */ u_int16_t icmp_cksum; /* ones complement checksum of struct */ union { u_char ih_pptr; /* ICMP_PARAMPROB */ struct in_addr ih_gwaddr; /* gateway address */ struct ih_idseq /* echo datagram */ { u_int16_t icd_id; u_int16_t icd_seq; } ih_idseq; u_int32_t ih_void; /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */ struct ih_pmtu { u_int16_t ipm_void; u_int16_t ipm_nextmtu; } ih_pmtu; struct ih_rtradv { u_int8_t irt_num_addrs; u_int8_t irt_wpa; u_int16_t irt_lifetime; } ih_rtradv; } icmp_hun; #define icmp_pptr icmp_hun.ih_pptr #define icmp_gwaddr icmp_hun.ih_gwaddr #define icmp_id icmp_hun.ih_idseq.icd_id #define icmp_seq icmp_hun.ih_idseq.icd_seq #define icmp_void icmp_hun.ih_void #define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void #define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu #define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs #define icmp_wpa icmp_hun.ih_rtradv.irt_wpa #define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime union { struct { u_int32_t its_otime; u_int32_t its_rtime; u_int32_t its_ttime; } id_ts; struct { struct ip idi_ip; /* options and then 64 bits of data */ } id_ip; struct icmp_ra_addr id_radv; u_int32_t id_mask; u_int8_t id_data[1]; } icmp_dun; #define icmp_otime icmp_dun.id_ts.its_otime #define icmp_rtime icmp_dun.id_ts.its_rtime #define icmp_ttime icmp_dun.id_ts.its_ttime #define icmp_ip icmp_dun.id_ip.idi_ip #define icmp_radv icmp_dun.id_radv #define icmp_mask icmp_dun.id_mask #define icmp_data icmp_dun.id_data };
UDPヘッダ
- netinet/udp.h
struct udphdr { u_int16_t uh_sport; /* source port */ u_int16_t uh_dport; /* destination port */ u_int16_t uh_ulen; /* udp length */ u_int16_t uh_sum; /* udp checksum */ };
struct udphdr {
__u16 source;
__u16 dest;
__u16 len;
__u16 check;
};
TCPヘッダ
- netinet/tcp.h
struct tcphdr { u_int16_t source; u_int16_t dest; u_int32_t seq; u_int32_t ack_seq; # if __BYTE_ORDER == __LITTLE_ENDIAN u_int16_t res1:4; u_int16_t doff:4; u_int16_t fin:1; u_int16_t syn:1; u_int16_t rst:1; u_int16_t psh:1; u_int16_t ack:1; u_int16_t urg:1; u_int16_t res2:2; # elif __BYTE_ORDER == __BIG_ENDIAN u_int16_t doff:4; u_int16_t res1:4; u_int16_t res2:2; u_int16_t urg:1; u_int16_t ack:1; u_int16_t psh:1; u_int16_t rst:1; u_int16_t syn:1; u_int16_t fin:1; # else # error "Adjust your <bits/endian.h> defines" # endif u_int16_t window; u_int16_t check; u_int16_t urg_ptr; };
OpenFlowについて調査中
http://www.computerworld.jp/news/net/125689.html
OpenFlowの機能は、通常のトラフィックに影響を与えることなく、トラフィックのフローを定義し、ネットワーク上の経路を決定するというものだ。経路を決定するためのポリシーを作成し、“帯域幅の大きな経路”や“遅延の小さい経路”、“経由するルータが少なく消費電力の小さい経路”などを必要に応じて選ぶこともできる。
どこまで現在動いていて、きちんとスケールするのかが気になるところ。
ここにいくつかドキュメントがあるのできちんと読んでみようと思います。
OpenFlow資料
仮想化インフラ勉強会というのも開かれているみたいですね。
機会があれば参加したいと思います。
第一回仮想化インフラ勉強会
最近どうもパッとしない学会
僕も最近学会についてはなんだかなぁと思うことが多いのだが、以下のエントリに「まさに!」と思えるほどうまくまとめられている。
非常に共感しました!
http://effy.jp/2008/11/web20-vs-institute
しかし、最近どうもパッとしない。私としては全国大会等に参加する意義を感じられなくなってきている。みんながみんな私のように思っているかどうかはわからないが、実際のところ学会としても発表の質の低下や参加者数の減少等は危機的状況にあると認識しており、頭を悩ませているのが現状だ。
学会発表の場で闊達な議論をしあっていた人たちはどこへ行ってしまったのか。時代とともに技術を熱く語る人たちはいなくなってしまったのだろうか。いや、いなくなったわけではない。場所を変えただけだ。むしろ、より熱い議論が繰り広げられている。
今の学会は(私の知るところの)議論されている内容は、ここ数年あまり変わっているようには思わない。
反面、ベンチャー企業などを中心とした勉強会では人も熱いし、議論されるトピックも熱い。
学会のほうはもう賞味期限がきれたのばっかり・・・
しかしすべてが勉強会で賄われるという時代はあまり想像できない。学会での論文発表と、個人主催の勉強会のそれぞれがお互いに補完しあいながら存在していくことになると思う。たとえば、学会は積極的に勉強会をサポートし、勉強会の成果を論文よりもラフな技術メモのような形で登録し引用できるシステムを構築するなどの方法をとり、会員種別も増やしてとにかく研究に関するコンテンツを集約することで価値を高める方法もあるだろう。
まさに、そのとおりで、勉強会と学会が相互に補完しあう形になれば望ましいと思う。
今は、ほぼ切り分けられているけどこれがうまく絡み合うと相乗効果でよいものがどんどんでてくるんじゃないかなぁ。。