Build a simple ping program to run on top of this.
The local address is a site-local-use address:
FEC0:0000:0000:0000:0000:ip1ip2:ip3ip4:udp1udp2
FEC0:0000:0000:0000:0000:xk1xk2:xk3xk4:xk5xk6
pe = getprotobyname("udp"); if (pe == NULL) error("getprotobyname"); s = socket(AF_INET, SOCK_DGRAM, pe->pproto))bzero (&sin, sizeof (sin)); sin.sinfamily = AFINET; bcopy(ipv4addr, &(sin.sinaddr), 4); sin.sinport = htons(portnumber);
sent = sendto(s, msg, len, 0, &sin, sizeof(sin)); if (sent != len) error ("send");
rcvd = recvfrom(s, buf, buflen, 0, &sin, &alen);
IPv6 addresses are 128 bits (16 bytes, 4 words) long:
AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:GGGG:HHHH
Prefix | Use | |
0000 001 | NSAP superset | |
0000 010 | IPX superset | |
010 | Provider based | |
100 | Geographic based | |
1111 1110 10 | (0xFE8) | Link local |
1111 1110 11 | (0xFEC) | Site local |
1111 1111 | Multicast | |
Routes to all three kinds, through transit AS.
Each AS is represented by a BGP speaker; each AS also has one or more border gateways.
Reachability advertized as a sequence of ASs to reach a certain AS (neither link state nor distance vector).