You are not logged in.

#1 2010-11-26 14:23:30

shashilx
Member
Registered: 2009-06-02
Posts: 14

How to rename interface name?

I have working adsl setup but I need to make some changes for now. I need that after start /etc/rc.d/adsl I've need that my interface will be named as pppoe0 not ppp0. Is that possible and if possible - how?

Thanks for your replies!

Offline

#2 2010-11-26 17:53:52

hexanol
Member
From: Canaduh
Registered: 2009-08-04
Posts: 95

Re: How to rename interface name?

If you need to change the ifname after boting:

ip link set ppp0 down
ip link set ppp0 name pppoe0
ip link set pppoe5 up

I don't know if the down/up process will make you lose your connection.

Else, if you want to set your interface name at boot (and not after booting) look at /etc/udev/rules.d/75-persistent-net-generator.rules. There's an article on the wiki on something related.

Offline

#3 2010-11-26 18:35:26

shashilx
Member
Registered: 2009-06-02
Posts: 14

Re: How to rename interface name?

your renaming works fine but after link set down / up it lost internet sad
and i don't need it at boot i need it after using one of these ways to up pppoe connection up:

1. /etc/rc.d/adsl start
2. pon provider
3. pppd call provider
4. NETWORKS=(pppoe) in rc.conf and using daemon net-profiles

I need that after any of these commands I've get pppoe0 and not ppp0 interface. May be there way to set interface name in configs?

Offline

#4 2011-07-18 14:13:24

martopopov
Member
Registered: 2011-07-18
Posts: 2

Re: How to rename interface name?

Hi,

you must to definite   a defaut gateway

ip link set ppp0 down
ip link set ppp0 name pppoe0
ip link set pppoe0 up

route add default pppoe0

Offline

#5 2011-07-18 14:15:44

martopopov
Member
Registered: 2011-07-18
Posts: 2

Re: How to rename interface name?

A new default route is necessary since the old default routing via ppp0
went away when the interface was taken down.

Offline

Board footer

Powered by FluxBB