LinuxQuestions.org
Help answer threads with 0 replies.
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 03-26-2024, 07:51 AM   #1
jithin
LQ Newbie
 
Registered: Mar 2024
Posts: 1

Rep: Reputation: 0
Smile Allocate dst to localhost (/128) unicast IPv6 address is different between linux 2.6.35.9 and 4.19.183.


I am a newbie to linux kernel and working on a custom dataplane kernel module. While porting linux kernel from 2.6.35.9 to 4.19.183 i did observe a
difference in how kernel set out interface to localhost unicast IPv6 address.

On older linux kernel 2.6.35.9 localhost dst are mapped to lo "Loopback" outinterface. While on 4.19.183 localhost dst are mapped to "vlan_id".
This impacts how dataplane populates route table as "lo" value in RTA_OIF is compared to check if its localhost or not.

Dataplane only track main route table (RT_TABLE_LOCAL/RT_TABLE_MAIN). Dataplane extracts below attributes to build route table from kernel.
1) RTA_DST
2) RTA_OIF
3) RTA_GATEWAY
4) RTA_PREFSRC

IPv6 address is obtained successfully using SLAAC server.

Any help on this would be of great help. Could anyone please help me with this problem?

Please find below linux kernel route table output:

----------------
Linux 2.6.35.9:
----------------
route -A inet6
Kernel IPv6 routing table
Destination Next Hop Flags Metric Ref Use Iface
2004:10:1:1::/64 :: UA 256 11192 3 vlan101
fe80::/64 :: U 256 0 0 pkt0
fe80::/64 :: U 256 0 0 vlan101
::/0 fe80::b6c7:99ff:fedd:4532 UG 1024 0 0 vlan101
::1/128 :: U 0 57 1 lo
2004:10:1:1:7667:f7ff:fe9a:55c0/128 :: U 0 0 1 lo
fe80::7667:f7ff:fe9a:55c0/128 :: U 0 0 1 lo
fe80::7667:f7ff:fe9a:55c0/128 :: U 0 46721 1 lo
ff00::/8 :: U 256 0 0 pkt0
ff00::/8 :: U 256 0 0 vlan101



root # ip -6 a
1: lo: <LOOPBACK,UP,10000> mtu 16436
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: pkt0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qlen 1000
inet6 fe80::7667:f7ff:fe9a:55c0/64 scope link
valid_lft forever preferred_lft forever
7: vlan101@pkt0: <BROADCAST,MULTICAST,UP,10000> mtu 1500
inet6 2004:10:1:1:7667:f7ff:fe9a:55c0/64 scope global dynamic
valid_lft 2592000sec preferred_lft 604800sec
inet6 fe80::7667:f7ff:fe9a:55c0/64 scope link
valid_lft forever preferred_lft forever

Dataplane Route Table:
more dataplane/router6/routes
2004:10:1:1:7667:f7ff:fe9a:55c0/128 -> local on lo
2004:10:1:1:0:0:0:0/64 -> neighbor on vlan101
fe80:0:0:0:0:0:0:0/64 -> link local unicast
ff00:0:0:0:0:0:0:0/8 -> multicast
0:0:0:0:0:0:0:0/0 -> fe80:0:0:0:b6c7:99ff:fedd:4532 via vlan101



-------------------------------------
Linux 4.19.183
-------------------------------------
/root # route -A inet6
Kernel IPv6 routing table
Destination Next Hop Flags Metric Ref Use Iface
2005::/64 :: UA 256 0 243 vlan401
fe80::/64 :: U 256 0 1 eth0
fe80::/64 :: U 256 0 1 pkt0
fe80::/64 :: U 256 0 1 wl0
fe80::/64 :: U 256 0 1 vlan401
::/0 fe80::424a:388e:b4b9:bd79 UG 1024 0 1 vlan401
::1/128 :: U 0 0 4 lo
2005::b227:cfff:fe80:3740/128 :: U 0 0 2 vlan401
fe80::b227:cfff:fe80:3740/128 :: U 0 0 6 eth0
fe80::b227:cfff:fe80:3740/128 :: U 0 0 2 pkt0
fe80::b227:cfff:fe80:3740/128 :: U 0 0 6 vlan401
fe80::b227:cfff:fe80:3741/128 :: U 0 0 2 eth1
fe80::b227:cfff:fe80:3750/128 :: U 0 0 2 wl0
ff00::/8 :: U 256 0 1 vlan5
ff00::/8 :: U 256 0 5 vlan401
ff00::/8 :: U 256 0 1 eth0
ff00::/8 :: U 256 0 1 pkt0
ff00::/8 :: U 256 0 1 wl0


/root # ip -6 a
1: lo: <LOOPBACK,UP,10000> mtu 65536 qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
6: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1824 qlen 1000
inet6 fe80::b227:cfff:fe80:3740/64 scope link
valid_lft forever preferred_lft forever
7: eth1: <BROADCAST,MULTICAST,UP,10000> mtu 1824 qlen 1000
inet6 fe80::b227:cfff:fe80:3741/64 scope link
valid_lft forever preferred_lft forever
8: pkt0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qlen 1000
inet6 fe80::b227:cfff:fe80:3740/64 scope link
valid_lft forever preferred_lft forever
14: vlan401@pkt0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qlen 1000
inet6 2005::b227:cfff:fe80:3740/64 scope global dynamic
valid_lft 86397sec preferred_lft 14397sec
inet6 fe80::b227:cfff:fe80:3740/64 scope link
valid_lft forever preferred_lft forever



Dataplane Route Table:
more dataplane/router6/routes
2005:0:0:0:b227:cfff:fe80:3740/128 -> 0:0:0:0:0:0:0:0 via vlan401
2005:0:0:0:0:0:0:0/64 -> neighbor on vlan401
fe80:0:0:0:0:0:0:0/64 -> link local unicast
ff00:0:0:0:0:0:0:0/8 -> multicast
0:0:0:0:0:0:0:0/0 -> fe80:0:0:0:424a:388e:b4b9:bd79 via vlan401
 
  


Reply



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
Deleting global unicast ipv6 addresses on an interfaces does not remove neigbors/direct connect ipv6 hosts from kernel nd_tbl haldermi Linux - Networking 1 06-07-2016 02:28 PM
LXer: mintCast 183 – Python, Twitter, and Pi LXer Syndicated Linux News 0 11-17-2013 11:42 AM
Why RTTs of unicast are different to the RTTs of broadcast? Zyndarius Linux - Networking 6 06-17-2010 05:15 AM
LXer: The Internet is 183 million big, and that is official LXer Syndicated Linux News 0 06-03-2009 11:51 PM
What is this -> SRC=0.0.0.0 DST=255.255.255.255 LEN=328 TOS=0x00 PREC=0x00 TTL=128 ID carves Linux - Networking 5 08-17-2008 09:26 PM

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

All times are GMT -5. The time now is 05:06 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