
IPv6
虾虾林
这个作者很懒,什么都没留下…
展开
-
linux下获取本机IPv6地址、前缀、网关
获取本机IPv6信息命令:cat /proc/net/if_inet6root@IT-PC-135:/home/user1/# cat /proc/net/if_inet6 fe80000000000000922b34fffe4e70f4 02 40 20 80 eth020010f80075400000000000000000050 02 40 00 80 eth00...原创 2018-10-09 10:27:05 · 29133 阅读 · 1 评论 -
Linux 获取IPv6网关
基于hisi3536实现的,ubuntu下只要找到对应的配置文件(ipv6_route)即可#include <stdio.h>#include <unistd.h>#include <pthread.h>#include <stdlib.h>#include <string.h>#include <sys/prct...原创 2018-10-09 10:32:21 · 5901 阅读 · 0 评论 -
IPv6 Scope:Link连接问题
Linux中设置的IPv6地址有两种类型,一种是Scope:Global,另一种为Scope:Link。后者是有MAC地址通过一定的格式转换出来的全球唯一的本地链路地址。~ # ifconfigeth0 Link encap:Ethernet HWaddr 1C:C3:16:63:B1:72 inet addr:192.168.9.51 Bcast...原创 2018-10-09 10:31:55 · 18990 阅读 · 0 评论 -
hisi 配置静态IP地址
静态IP地址配置文件路径 /etc/network/interfacesinterfaces格式#设置单个ipv4地址The loopback interfaceauto loiface lo inet loopback auto eth0iface eth0 inet staticaddress 192.168.9.51netmask 255.255.252....原创 2018-10-09 10:47:52 · 1368 阅读 · 0 评论 -
ubuntu下IPv6查询相关命令
查询默认网关 /sbin/ip -6 route show dev eth0/bin/ip -6 route show dev eth0/bin/ip route show dev eth0/sbin/ip route show dev eth0ip -6 addr show eth0 添加网关route -A inet6 add default gw 2001:f...原创 2018-10-09 10:55:17 · 2898 阅读 · 0 评论 -
c语言判断格式是否IPv6
int net_is_validipv6(const char *hostname){ struct sockaddr_in6 addr; if (!hostname) return -1; if (strchr(hostname, '.')) return -1;//暂时排除::ffff:204.152.189.116 if (inet_pton(AF_INET6, hostna...原创 2018-10-25 08:49:16 · 2988 阅读 · 1 评论 -
海思3536&3798 DHCPv6移植
1.源码地址https://download.youkuaiyun.com/download/y7u8t6/10758248 2.交叉编译一、libnl 1.11.解压libnl-1.1.tar.gz 到指定目录下 ../libnl_pro2.修改libnl_pro内的文件 **** .../libnl_pro/lib/route/link/vlan.c **** #i...原创 2018-11-01 15:58:52 · 1546 阅读 · 0 评论