FreeBSD IPv6Basic configuration
From Teknologisk videncenter
Contents
Config
/etc/rc.conf
ipv6_ifconfig_em1="2001:16D8:DD85:4::16/64"
ipv6_defaultrouter="2001:16D8:DD85:4::20"
keymap="danish.iso"
#Enable ssh
inetd_enable="YES"
ipv6_enable="YES"
Status
Check af status på IPv6
[root@mars openospfd]#<input>ifconfig em1</input>
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 00:07:e9:40:0a:bf
inet6 fe80::207:e9ff:fe40:abf%em1 prefixlen 64 scopeid 0x2
inet 172.16.4.16 netmask 0xffffff00 broadcast 172.16.4.255
inet6 2001:16d8:dd85:4::16 prefixlen 64
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
[root@mars openospfd]#<input>netstat -r -f inet6</input>
Routing tables
Internet6:
Destination Gateway Flags Netif Expire
:: localhost UGRS lo0 =>
default 2001:16d8:dd85:4:: UGS em1
localhost localhost UHL lo0
::ffff:0.0.0.0 localhost UGRS lo0
2001:16d8:dd85:4:: link#2 UC em1
2001:16d8:dd85:4:: 00:07:e9:40:0a:bf UHL lo0
2001:16d8:dd85:4:: 00:19:e7:51:08:c0 UHLW em1
fe80:: localhost UGRS lo0
fe80::%em0 link#1 UC em0
fe80::207:e9ff:fe4 00:07:e9:40:0a:be UHL lo0
fe80::%em1 link#2 UC em1
fe80::207:e9ff:fe4 00:07:e9:40:0a:bf UHL lo0
fe80::219:e7ff:fe5 00:19:e7:51:08:c0 UHLW em1
fe80::128c:cfff:fe 10:8c:cf:96:f7:6f UHLW em1
fe80::%vr1 link#4 UC vr1
fe80::250:baff:feb 00:50:ba:b1:85:ca UHL lo0
fe80::%lo0 fe80::1%lo0 U lo0
fe80::1%lo0 link#6 UHL lo0
ff01:1:: link#1 UC em0
ff01:2:: link#2 UC em1
ff01:4:: link#4 UC vr1
ff01:6:: localhost UC lo0
ff02:: localhost UGRS lo0
ff02::%em0 link#1 UC em0
ff02::%em1 link#2 UC em1
ff02::%vr1 link#4 UC vr1
ff02::%lo0 localhost UC lo0
Commands
Ping6
[root@mars ~]#ping6 -n 2607:fcd0:1337:4b::2
PING6(56=40+8+8 bytes) 2001:16d8:dd85:4::16 --> 2607:fcd0:1337:4b::2
16 bytes from 2607:fcd0:1337:4b::2, icmp_seq=0 hlim=53 time=167.913 ms
16 bytes from 2607:fcd0:1337:4b::2, icmp_seq=1 hlim=53 time=157.059 ms
16 bytes from 2607:fcd0:1337:4b::2, icmp_seq=2 hlim=52 time=158.015 ms
16 bytes from 2607:fcd0:1337:4b::2, icmp_seq=3 hlim=52 time=156.887 ms
16 bytes from 2607:fcd0:1337:4b::2, icmp_seq=4 hlim=52 time=157.017 ms
16 bytes from 2607:fcd0:1337:4b::2, icmp_seq=5 hlim=52 time=159.266 ms
Traceroute6
[root@mars ~]#traceroute6 -n 2607:fcd0:1337:4b::2
traceroute6 to 2607:fcd0:1337:4b::2 (2607:fcd0:1337:4b::2) from 2001:16d8:dd85:4::16, 64 hops max, 12 byte packets
1 2001:16d8:dd85:4::1 0.929 ms 0.792 ms 0.731 ms
2 2001:16d8:dd00:10a::1 6.974 ms 6.980 ms 6.855 ms
3 2001:16d8:aaaa:5::1 7.599 ms 7.605 ms 7.605 ms
4 2001:16d8:1:1308::70 18.594 ms 18.597 ms 18.849 ms
5 2001:7f8:1::a500:6939:1 19.224 ms 19.216 ms 19.113 ms
6 2001:470:0:3f::1 26.456 ms 26.336 ms 26.346 ms
7 2001:470:0:3e::1 94.057 ms 94.295 ms 97.928 ms
8 2001:470:0:10e::1 155.764 ms 155.885 ms 157.916 ms
9 2001:504:0:3:0:2:2298:1 155.995 ms 156.255 ms 160.763 ms
10 2607:fcd0::a 156.384 ms 156.518 ms 158.418 ms
11 2607:fcd0::12 157.988 ms 158.502 ms 156.554 ms
12 2607:fcd0:1337:4b::2 164.697 ms 157.247 ms 176.789 ms