d702 freebsd 7.1 default ipv6 gateway problem - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Networking

Networking Network related discussions (including general TCP/IP stuff, routing, etc).

Reply
 
Thread Tools Display Modes
  #1  
Old June 5th, 2009, 14:41
yavuzg yavuzg is offline
Junior Member
 
Join Date: Jun 2009
Location: Turkey
Posts: 24
Thanks: 3
Thanked 2 Times in 2 Posts
Default freebsd 7.1 default ipv6 gateway problem

Hi,

I have network consists of 2 computers(say A and B) and a router.

When I use rtsol in A, I can get the global scope ipv6 address and the default gateway properly.

But when I send fake router advertisement messages from B, A accepts advertisements and makes fake address as default gateway. İs this the expected behaviour?

What is the procedure for selecting default router?

thanks in advance...

before I send fake messages from B

Code:
# netstat -finet6 -rn

Routing tables
Internet6:
Destination                       Gateway                       Flags      Netif Expire
default                           fe80::***:cb0(real gateway)  UG         fxp0
after I send fake messages from B,

Code:
# netstat -finet6 -rn

Routing tables
Internet6:
Destination                       Gateway                       Flags      Netif Expire
default                           fe80::***:a(fake gateway)  UG         fxp0
my configuration is:

Code:
# sysctl -a | grep ip6
net.inet6.ip6.forwarding: 0
net.inet6.ip6.redirect: 1
net.inet6.ip6.hlim: 64
net.inet6.ip6.maxfragpackets: 4112
net.inet6.ip6.accept_rtadv: 1
net.inet6.ip6.keepfaith: 0
net.inet6.ip6.log_interval: 5
net.inet6.ip6.hdrnestlimit: 15
net.inet6.ip6.dad_count: 1
net.inet6.ip6.auto_flowlabel: 1
net.inet6.ip6.defmcasthlim: 1
net.inet6.ip6.gifhlim: 30
net.inet6.ip6.kame_version: FreeBSD
net.inet6.ip6.use_deprecated: 1
net.inet6.ip6.rr_prune: 5
net.inet6.ip6.v6only: 1
net.inet6.ip6.rtexpire: 3600
net.inet6.ip6.rtminexpire: 10
net.inet6.ip6.rtmaxcache: 128
net.inet6.ip6.use_tempaddr: 0
net.inet6.ip6.temppltime: 86400
net.inet6.ip6.tempvltime: 604800
net.inet6.ip6.auto_linklocal: 1
net.inet6.ip6.prefer_tempaddr: 0
net.inet6.ip6.use_defaultzone: 0
net.inet6.ip6.maxfrags: 4112
net.inet6.ip6.mcast_pmtu: 0
my system:
Code:
# uname -a
FreeBSD pcname 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
Reply With Quote
  #2  
Old June 5th, 2009, 14:50
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,725
Thanks: 47
Thanked 2,023 Times in 1,862 Posts
Default

Quote:
Originally Posted by yavuzg View Post
I have network consists of 2 computers(say A and B) and a router.

When I use rtsol in A, I can get the global scope ipv6 address and the default gateway properly.

But when I send fake router advertisement messages from B, A accepts advertisements and makes fake address as default gateway. İs this the expected behaviour?
Unfortunately, yes.

Quote:
What is the procedure for selecting default router?
Running a properly setup rtadvd on the gateway or use dhcp6.

NB fe80:: addresses are link-local, non-routable addresses.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #3  
Old June 5th, 2009, 14:50
yavuzg yavuzg is offline
Junior Member
 
Join Date: Jun 2009
Location: Turkey
Posts: 24
Thanks: 3
Thanked 2 Times in 2 Posts
Default

Quote:
What is the procedure for selecting default router?
According to RFC 2461 "6.3.6. Default Router Selection" section, I think there is no need to update default router in my case.
Reply With Quote
  #4  
Old June 5th, 2009, 15:44
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,725
Thanks: 47
Thanked 2,023 Times in 1,862 Posts
Default

I've been playing with IPv6 for some time now and I see no reason why a client wouldn't pick up any 'new' router advertisements. How would the client know the gateway was changed? What if there appeared a 'better' route? As far as I understood it the purpose of using rtsol/rtadvd is to make the whole network more dynamic. The downside of this would be rogue router advertisements ruining it.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #5  
Old June 9th, 2009, 08:10
yavuzg yavuzg is offline
Junior Member
 
Join Date: Jun 2009
Location: Turkey
Posts: 24
Thanks: 3
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by SirDice View Post
How would the client know the gateway was changed? What if there appeared a 'better' route? As far as I understood it the purpose of using rtsol/rtadvd is to make the whole network more dynamic. The downside of this would be rogue router advertisements ruining it.
Thanks for the answer. You are true, a client has to accept rtadvd messages in some manner. I want to learn the exact mechanism behind the router selection of freebsd network implementation.

in rfc 2461, section 6.3.6 says that:
Quote:
The policy for selecting routers from the Default Router List is as
follows:

1) Routers that are reachable or probably reachable (i.e., in any
state other than INCOMPLETE) SHOULD be preferred over routers
whose reachability is unknown or suspect (i.e., in the
INCOMPLETE state, or for which no Neighbor Cache entry exists).
An implementation may choose to always return the same router or
cycle through the router list in a round-robin fashion as long
as it always returns a reachable or a probably reachable router
when one is available.
I think freebsd use round-robin fashion and this is the reason of my router change...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] tunneling X through 7.1 intermediate gateway johnea Web & Network Services 3 May 5th, 2009 20:33
Gateway help rowinms Networking 5 April 29th, 2009 16:19
[Solved] FreeBSD does not boot in default SIFE General 3 April 9th, 2009 17:31
about freebsd ipv6 isatap server setup ? testking Networking 5 April 3rd, 2009 06:15
IPv6 DAD disables IPv6 Traffic, how to turn IPv6 back on? benzh512 Networking 6 March 10th, 2009 16:57


All times are GMT +1. The time now is 00:40.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0