Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.