Networking Forums

Networking Forums > Computer Networking > Linux Networking > dhcp for subinterfaces

Reply
Thread Tools Display Modes

dhcp for subinterfaces

 
 
jeroen
Guest
Posts: n/a

 
      10-22-2005, 08:09 PM
Hi,

I'm wondering if there is a possibility to assign an IP address via dhcp to
a subinterface (eg eth0:1).
When I configure my /etc/network/interfaces like:
iface eth1 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
network xxx.xxx.xxx.xxx
broadcast xxx.xxx.xxx.xxx
iface eth1:1 inet dhcp

I'm unable to assign an IP address to eth1:1. Even when I check the logfile
on my dhcp server, I don't see any requests. When I use a networksniffer, I
don't find anything.
However, when I tell my system to receive a dhcp address for eth1, there is
no problem.

here is what I get:

ifup eth1:1
Internet Software Consortium DHCP Client 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html

ppp0: unknown hardware address type 512
ip6tnl0: unknown hardware address type 769
sit0: unknown hardware address type 776
gre0: unknown hardware address type 778
SIOCSIFFLAGS: Cannot assign requested address
ppp0: unknown hardware address type 512
ip6tnl0: unknown hardware address type 769
sit0: unknown hardware address type 776
gre0: unknown hardware address type 778
Bind socket to interface: No such device
exiting.
Failed to bring up eth1:1.


does anyone have a clue?

regards,

Jeroen

ps: is it possible to specify a differen hwaddr for a subinterface? I guess
this is not possible, but I'm wondering if anyone was able to do that.


 
Reply With Quote
 
 
 
 
Raqueeb Hassan
Guest
Posts: n/a

 
      10-24-2005, 10:37 AM
> subinterface (eg eth0:1).

Well, for static,

cat /etc/sysconfig/network-scripts/ifcfg-eth1:1
DEVICE=eth1:1
ONBOOT=yes
IPADDR=x.x.x.x
NETMASK=255.255.255.0
NETWORK=x.x.x.x
BROADCAST=x.x.x.x
ONBOOT=yes

DHCPd, I guess, provides an IP for a single MAC address. Well, someone
can assign eth0 to be dhcp assigned and set static IPs to eth0:1,
eth0:2.

BUT, how about this one, asking dhcpcd for a lease ..

dhcpcd -t 60 -K -R -Y -N -h yourhost.com -c \
/usr/local/bin/dhcpcd-lease eth0:1



--
Raqueeb Hassan
Bangladesh

 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
moved dhcp from w2k to w2k3-clients unable to connect to dhcp server Tony Villani Windows Networking 8 04-17-2008 12:09 PM
Traffic through subinterfaces ppogoda@gmail.com Linux Networking 3 12-13-2007 03:03 PM
ip change on interface with subinterfaces. Pedros Linux Networking 3 12-27-2005 12:59 PM
Redhat 9.0 dhcp client & windows 2003 dhcp server: dynamic dns update Mads Ravn Linux Networking 0 06-29-2004 05:27 PM
SNAT with multiple mappings: subinterfaces needed? Joe Drago Linux Networking 1 06-15-2004 03:33 PM



1 2 3 4 5 6 7 8 9 10 11