Home Page › Forums › Network Management › Networking › adding virtual interfaces / ifconfig
- This topic is empty.
-
AuthorPosts
-
December 9, 2009 at 6:07 pm #42094
rixon
MemberMy 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 upIn 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
December 9, 2009 at 9:05 pm #49266ppalias
MemberYou will need to check the scripts involved in dhcp functions, as well as a look in the dmesg to see what is wrong.
December 16, 2009 at 5:07 am #49267rixon
MemberStrange, 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.
December 16, 2009 at 9:36 am #49268ppalias
MemberThe 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
-
AuthorPosts
- You must be logged in to reply to this topic.