Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-08-2017, 02:52 AM   #1
Registered: May 2012
Posts: 111

Rep: Reputation: Disabled
How to rename "eth0.0.10" in kernel space?

Dear Sir.

I want to rename "eth0.0.10" to "LAN0" in kernel space.

"eth0.0.10" is vlan interface.

It is possible use the net/core/dev.c::dev_change_name()

  struct net_device *dev = dev_get_byname(&init_net, "eth0.0.10");

  dev_change_name(dev, "LAN0");
can rename "eth0.0.10" to "LAN0",

But occured the some Warning message. see below

[   57.702917] RTNL: assertion failed at net/ipv4/devinet.c (1218)
[   57.702923] Pid: 1694, comm: insmod Not tainted 3.4.74-nexg #41
[   57.702928] Call Trace:
[   57.702936]  [<ffffffff815fb53d>] ? inetdev_event+0x4bd/0x4f0
[   57.702945]  [<ffffffff818affdd>] ? dump_stack+0x69/0x6f
[   57.702954]  [<ffffffff8104ef26>] ? notifier_call_chain+0x46/0x70
[   57.702962]  [<ffffffff8155e239>] ? dev_change_name+0x189/0x1f0
[   57.702983]  [<ffffffffa00521e4>] ? rtl8367_init+0x1e4/0x2dd [nexg_driver_rtl836x_837x]
[   57.702991]  [<ffffffffa0052000>] ? 0xffffffffa0051fff
[   57.702999]  [<ffffffff810001c9>] ? do_one_initcall+0x39/0x170
[   57.703007]  [<ffffffff8106d5c0>] ? sys_init_module+0x90/0x1e0
[   57.703016]  [<ffffffff818b3362>] ? system_call_fastpath+0x16/0x1b
Are you have a another way to rename ethernet interface name???

Thank you.
Old 06-08-2017, 01:00 PM   #2
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 37
It's only possible to name the interface, all sub-interfaces will have to follow the naming convention. Also you have to take the interface down to rename it.

ifconfig eth0 down
ip link set eth0 name LAN
ifconfig LAN up

Then you would have LAN:0:1 or whatever you like.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Constant stream of "IPv4: martian source" and "FIREWALL:INPUT" after plugging eth0 in anon03 Linux - Networking 1 08-07-2015 07:38 AM
"cooperative multitasking" in user space versus "preemptive multitasking" in kernel? bayoulinux Programming 2 08-06-2012 05:44 AM
Debian / Wrong free space / "du" and "ls" show different space use brgsousa Linux - Software 3 02-25-2010 11:55 AM
rename "wlan0_rename" to "eth0" replica9000 Linux - Wireless Networking 11 03-28-2008 10:39 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:08 AM.

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