LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-16-2016, 08:08 AM   #1
bfedyk
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Rep: Reputation: Disabled
Help with configuring IPv6 routing


Hi, I am still a newbie to LinuxQuestions, and to Linux. Also I have limited knowledge of IPv6 networking in Linux. Hence my question may appear trivial. I am much more confident with Windows and Windows networking.

I support a solution at a telco company, which comprises of Windows servers and a single Ubuntu platform. I want to be able to set up a default route from the Ubuntu server back to one of the Windows server, all in IPv6.

The Ubuntu platform effectively acts as a "gateway" to the customer's network, where I want to be able to ping certain target points. The Ubuntu platform basically accepts IPv6 traffic from the Windows server, does source address NAT, forwards to the network, receives response from network, does destination address NAT, then forwards back to the Windows server. It is this last bit I am having a problem with.

The problem is, while I can run ping6 from command line specifying the interface on the Ubuntu server, which works, I cannot get to specify a default route, such that I do not need to specify the Ubuntu interface. Is this possible?

Here is the 'route -6' output on the Ubuntu server:

Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
fe80::/64 :: U 256 0 0 p2p2
fe80::/64 :: U 256 6 22 em2
fe80::/64 :: U 256 2 12 em3
fe80::/64 :: U 256 13 9093 em1
::/0 :: !n -1 1 9938 lo
::1/128 :: Un 0 27 217 lo
fe80::46a8:42ff:fe39:3f0b/128 :: Un 0 11 148 lo
fe80::46a8:42ff:fe39:3f0c/128 :: Un 0 4 23 lo
fe80::46a8:42ff:fe39:3f0d/128 :: Un 0 3 30 lo
fe80::a236:9fff:fe6f:ce05/128 :: Un 0 1 0 lo
ff00::/8 :: U 256 1 1 p2p2
ff00::/8 :: U 256 12 11111 em2
ff00::/8 :: U 256 15 10753 em3
ff00::/8 :: U 256 15281457 em1
::/0 :: !n -1 1 9938 lo


We have four interfaces. Of these interface 'p2p2' points towards the customer's network, so is not relevant in this discussion. The other three interfaces 'em1', 'em2' and 'em3' all point back to the customer's internal network, where the Windows server resides.

We do not have static IPv6 addressing, only link-local addressing, since the Windows and Ubuntu servers are on the same subnet.

Here is the output of 'ip -6 route' on the Ubuntu server:
fe80::/64 dev p2p2 proto kernel metric 256
fe80::/64 dev em2 proto kernel metric 256
fe80::/64 dev em3 proto kernel metric 256
fe80::/64 dev em1 proto kernel metric 256


On the Windows server, one of the interfaces has an IPv6 link-local address fe80::8d2a:b456:44e9:1c44/128.

From the Ubuntu platform I can ping back to the Windows server with either:

ping6 -I <if> fe80::8d2a:b456:44e9:1c44

or with:

ping6 fe80::8d2a:b456:44e9:1c44%<if>

So I can specify for example interface em1, em2 etc.

But I want to be able to do just:

ping6 fe80::8d2a:b456:44e9:1c44

and it knows how (which interface) to route out.

I have looked up route command but nothing I try works.

I presume this is possible in Linux, after all I managed to set a specific IPv6 route on the Windows server, where the gw address specified is one of the interfaces on the Ubuntu platform. This works, as I can see from Wireshark my test traffic arrive at the Ubuntu server.

I'm sure there is a very simple solution to this, which I have overlooked, but can someone give me pointers?

Thanks
 
Old 11-16-2016, 07:48 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,341

Rep: Reputation: Disabled
Quote:
Originally Posted by bfedyk View Post
On the Windows server, one of the interfaces has an IPv6 link-local address fe80::8d2a:b456:44e9:1c44/128.

From the Ubuntu platform I can ping back to the Windows server with either:

ping6 -I <if> fe80::8d2a:b456:44e9:1c44

or with:

ping6 fe80::8d2a:b456:44e9:1c44%<if>

So I can specify for example interface em1, em2 etc.

But I want to be able to do just:

ping6 fe80::8d2a:b456:44e9:1c44

and it knows how (which interface) to route out.
I'm afraid that isn't possible, and shouldn't be possible.

Link-local addresses are by definition non-unique. Although due to the host part of the address being 64 bits long, it's extremely unlikely that you'll ever see two nodes with the exact same link-local IPv6 address, it is indeed possible and would constitute a valid IPv6 setup.

In other words, one cannot to determine the location of a host with a link-local address like fe80::8d2a:b456:44e9:1c44 by looking it up in a routing table. The address could be literally anywhere, possibly in multiple locations simultaneously, belonging to different hosts. That's why one has to specify the interface name when communicating with a link-local address.

If you need unique (and hence routable) addresses, you could assign unique local addresses as defined by RFC 4193, or you could get a /48 block of global addresses from your ISP or a tunnel provider. It's usually free.
 
  


Reply

Tags
configuration, networking, ubuntu 14.04



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Another IPv6 Crash Course For Linux: Real IPv6 Addresses, Routing, Name Services LXer Syndicated Linux News 0 04-21-2011 07:40 AM
Will ipv6 use the same routing protocols as v4? resetreset Linux - Networking 2 01-24-2011 11:22 AM
Problem with ipv6 routing p-static Linux - Networking 4 07-11-2004 07:02 PM
IPv6 routing (another problem :D) Titou_FT Linux - Networking 0 06-09-2004 05:09 AM
ipv6 routing thejayjay Linux - Networking 1 06-09-2004 03:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration