adding virtual interfaces / ifconfig

Home Page Forums Network Management Networking adding virtual interfaces / ifconfig

This topic contains 2 replies, has 0 voices, and was last updated by  rixon 9 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42094

    rixon
    Member

    My ultimate goal is to set my ZeroShell router to pull additional IP addresses via DHCP from my Cable Modem provider to be used by other hosts on a DMZ. I was hoping to set up additional sub-interfaces on my WAN interface and use the clientID parameter to dhcp for each additional lease request.

    When trying to do this from the shell by hand, I first create a sub-interface with a random IP:

    ifconfig ETH01:00 1.2.3.4 netmask 255.255.255.0
    ifconfig ETH01:00 up

    In dhclient.conf, I added:

    interface “ETH01:00” {
    send dhcp-client-identifier “router-ETH01:00”;
    }

    So now when I run dhclient ETH01:00, I get a few errors and then the virtual interface is gone! Here are the errors:
    SIOCSIFFLAGS: Cannot assign requested address
    (That one appears twice immediately on execution.)
    Bind socket to interface: No such device
    (This one appears about 5 seconds later, when it exits.)

    Any idea what’s happening here? Also, I can anticipate another problem that will manifest itself when I get this part figured out. When DHCP renews the lease on ETH01, it will kill all the sub-interfaces. Thus, the DHCP lease on the main interface will need to be moved to a subinterface as well.

    -Paul

    #49266

    ppalias
    Member

    You will need to check the scripts involved in dhcp functions, as well as a look in the dmesg to see what is wrong.

    #49267

    rixon
    Member

    Strange, I thought I replied to this. But…

    Where are these scripts at?

    dmesg doesn’t give any further information from what I posted in the first message. All I’m getting are the Cannot assign… message and the No such device message from stderr.

    #49268

    ppalias
    Member

    The scripts usually are in

    /root/kerbynet.cgi/scripts/

    I’ve done some troubleshooting on your problem and my guess is that you cannot get multiple DHCP ip addresses because your subinterfaces use the same mac-address. Take a look in my bridged interface with 2 IPs.

    BRIDGE00  Link encap:Ethernet  HWaddr 00:15:E9:DA:38:49
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:20431625 errors:0 dropped:0 overruns:0 frame:0
    TX packets:25589030 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:2920572699 (2785.2 Mb) TX bytes:911292642 (869.0 Mb)

    BRIDGE00: Link encap:Ethernet HWaddr 00:15:E9:DA:38:49
    inet addr:10.14.149.1 Bcast:10.14.149.63 Mask:255.255.255.192
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

    BRIDGE00: Link encap:Ethernet HWaddr 00:15:E9:DA:38:49
    inet addr:172.16.0.1 Bcast:172.16.0.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.