Modify

Opened 9 years ago

Closed 8 years ago

#1727 closed enhancement (fixed)

Bring up interface aliases on interface hotplug event

Reported by: camh <openwrt@…> Owned by: developers
Priority: normal Milestone: Kamikaze 8.09 RC1
Component: packages Version:
Keywords: Cc:

Description

It would be nice to be able to define interface aliases in /etc/config/network to give additional IP addresses to an interface.

The attached patch lets you define a new interface config stanza using the alias format for the interface name (iface:n).

The patched hotplug script brings up all aliases of a freshly "plugged" interface.

The patched config script prevents some harmless errors from being output when an alias interface is setup.

A sample configuration is:

#### Loopback configuration
config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface loopback_1
        option ifname   lo:1
        option proto    static
        option ipaddr   127.53.0.1
        option netmask  255.0.0.0

#### LAN configuration
config interface lan
        option type     bridge
        option ifname   eth0.0
        option proto    static
        option ipaddr   10.0.0.1
        option netmask  255.255.255.0
 
config interface lan_1
        option ifname   br-lan:1
        option proto    static
        option ipaddr   10.0.0.2
        option netmask  255.255.255.0

Attachments (4)

openwrt-interface-alias.patch (2.3 KB) - added by camh <openwrt@…> 9 years ago.
Patch to base-files package to support interface aliases
openwrt-interface-alias.2.patch (2.3 KB) - added by camh <openwrt@…> 9 years ago.
Fixed a broken substitution
interface-alias.diff (2.5 KB) - added by anonymous 8 years ago.
base-files--interface-aliases (2.8 KB) - added by camh <openwrt@…> 8 years ago.
Updated patch for trunk @11305

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by camh <openwrt@…>

Patch to base-files package to support interface aliases

Changed 9 years ago by camh <openwrt@…>

Fixed a broken substitution

comment:1 Changed 9 years ago by nbd

  • Milestone changed from Kamikaze to Kamikaze 7.07

Changed 8 years ago by anonymous

Changed 8 years ago by camh <openwrt@…>

Updated patch for trunk @11305

comment:2 Changed 8 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

interface aliases implemented in r12241

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.