Bug 221446 - add net default: gateway [IPv6 gateway] fib 0: route already in table
Summary: add net default: gateway [IPv6 gateway] fib 0: route already in table
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-12 15:33 UTC by Vladyslav V. Prodan
Modified: 2017-08-15 19:29 UTC (History)
1 user (show)

See Also:


Attachments
/boot/loader.conf (358 bytes, text/plain)
2017-08-12 15:33 UTC, Vladyslav V. Prodan
no flags Details
/etc/sysctl.conf (861 bytes, text/plain)
2017-08-12 15:34 UTC, Vladyslav V. Prodan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladyslav V. Prodan 2017-08-12 15:33:32 UTC
Created attachment 185322 [details]
/boot/loader.conf

In the continuation of Bug ID 221445.

After a little tuning in /boot/loader.conf and /etc/sysctl.conf I get in the logs:

...
Aug 12 18:00:50 tank1 kernel: em0: link state changed to UP
Aug 12 18:00:50 tank1 kernel: Starting Network: lo0 em0.
Aug 12 18:00:50 tank1 kernel: lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
Aug 12 18:00:50 tank1 kernel: options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
Aug 12 18:00:50 tank1 kernel: inet6 ::1 prefixlen 128
Aug 12 18:00:50 tank1 kernel: inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
Aug 12 18:00:50 tank1 kernel: inet 127.0.0.1 netmask 0xff000000
Aug 12 18:00:50 tank1 kernel: nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Aug 12 18:00:50 tank1 kernel: groups: lo
Aug 12 18:00:50 tank1 kernel: em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
Aug 12 18:00:50 tank1 kernel: options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
Aug 12 18:00:50 tank1 kernel: ether 00:22:4d:ad:ff:dc
Aug 12 18:00:50 tank1 kernel: hwaddr 00:22:4d:ad:ff:dc
Aug 12 18:00:50 tank1 kernel: inet6 2001:41d0:e:340::1 prefixlen 128
Aug 12 18:00:50 tank1 kernel: inet6 fe80::222:4dff:fead:ffdc%em0 prefixlen 64 scopeid 0x1
Aug 12 18:00:50 tank1 kernel: nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
Aug 12 18:00:50 tank1 kernel: media: Ethernet autoselect (100baseTX <full-duplex>)
Aug 12 18:00:50 tank1 kernel: status: active
Aug 12 18:00:50 tank1 kernel: Starting devd.
Aug 12 18:00:50 tank1 kernel: Starting dhclient.
Aug 12 18:00:50 tank1 kernel: DHCPREQUEST on em0 to 255.255.255.255 port 67
Aug 12 18:00:50 tank1 kernel: DHCPACK from 5.196.XX.XXX
Aug 12 18:00:50 tank1 kernel: bound to 5.196.XX.XXX -- renewal in 300 seconds.
Aug 12 18:00:50 tank1 kernel: add host 127.0.0.1: gateway lo0 fib 0: route already in table
Aug 12 18:00:50 tank1 kernel: add host ::1: gateway lo0 fib 0: route already in table
Aug 12 18:00:50 tank1 kernel: add net fe80::: gateway ::1
Aug 12 18:00:50 tank1 kernel: add net ff02::: gateway ::1
Aug 12 18:00:50 tank1 kernel: add net ::ffff:0.0.0.0: gateway ::1
Aug 12 18:00:50 tank1 kernel: add net ::0.0.0.0: gateway ::1
Aug 12 18:00:50 tank1 kernel: add host 2001:41d0:000e:03ff:ff:ff:ff:ff: gateway em0
Aug 12 18:00:50 tank1 kernel: add net default: gateway 2001:41d0:000e:03ff:ff:ff:ff:ff fib 0: route already in table
Aug 12 18:00:50 tank1 kernel: ipfw2 (+ipv6) initialized, divert loadable, nat loadable, default to deny, logging disabled
...

# uname -a
FreeBSD tank1.storage.com 11.1-STABLE FreeBSD 11.1-STABLE #0 r322164: Mon Aug  7 15:33:19 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

cat /etc/rc.conf:

...
ifconfig_em0="DHCP"

ipv6_default_interface="em0"
ifconfig_em0_ipv6="inet6 accept_rtadv 2001:41d0:e:XXX::1/128"

ipv6_static_routes="ipv6gw"
ipv6_route_ipv6gw="-host 2001:41d0:000e:03ff:ff:ff:ff:ff -iface em0"

ipv6_defaultrouter="2001:41d0:000e:03ff:ff:ff:ff:ff"
ipv6_activate_all_interfaces="YES"
...

# netstat -rn6
Routing tables

Internet6:
Destination                       Gateway                       Flags     Netif Expire
::/96                             ::1                           UGRS        lo0
default                           fe80::12bd:18ff:fee5:ff80%em0 UG          em0
::1                               link#2                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
2001:41d0:e:XXX::/56              link#1                        U           em0
2001:41d0:e:XXX::1                link#1                        UHS         lo0
2001:41d0:e:3ff:ff:ff:ff:ff       00:22:4d:ad:ff:dc             UHS         em0
fe80::/10                         ::1                           UGRS        lo0
fe80::%em0/64                     link#1                        U           em0
fe80::222:4dff:fead:ffdc%em0      link#1                        UHS         lo0
fe80::%lo0/64                     link#2                        U           lo0
fe80::1%lo0                       link#2                        UHS         lo0
ff02::/16                         ::1                           UGRS        lo0


I was helped by manual commands to restore Ipv6:
route delete -6 default
route add -6 default 2001:41d0:000e:03ff:ff:ff:ff:ff
Comment 1 Vladyslav V. Prodan 2017-08-12 15:34:57 UTC
Created attachment 185324 [details]
/etc/sysctl.conf
Comment 2 Andrey V. Elsukov freebsd_committer freebsd_triage 2017-08-12 18:49:58 UTC
Since you have enabled accepting RA, some router has sent RA, and SLAAC has occurred.
Comment 3 Vladyslav V. Prodan 2017-08-12 19:13:16 UTC
(In reply to Andrey V. Elsukov from comment #2)

Then look Bug ID 221445.
Without the accept_rtadv option, ipv6 stops working.