# dhcp error with xen-domU [SOLVED]

## upengan78

Hi,

I am getting this error in dom U ,

 *Quote:*   

> 
> 
> TCP cubic registered
> 
> NET: Registered protocol family 1
> ...

 

 *Quote:*   

> kernel = "/xen/centos/vmlinuz-2.6.21-xenU"
> 
> memory = 256
> 
> name = "centos.5-1.64"
> ...

 

```
file /etc/xen/xend-config.sxp

has foloowing enabled.

(network-script network-bridge)

(vif-script vif-bridge)

```

in dom0

 *Quote:*   

> ifconfig 
> 
> lo        Link encap:Local Loopback  
> 
>           inet addr:127.0.0.1  Mask:255.0.0.0
> ...

 

in dom0, net.eth0 is not enabled in any run level. if enabled then dom0 gets a dhcp ip on eth0 while domU system boots

dom0 ->

 *Quote:*   

> eth0      Link encap:Ethernet  HWaddr 00:10:18:33:34:A9  
> 
> inet addr:21x.4x.50.16 Bcast:216.47.150.255  Mask:255.255.255.0
> 
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> ...

 

 and eth0 in domU has following config then ->

ifconfig 

 *Quote:*   

> eth0      Link encap:Ethernet  HWaddr 00:16:3E:03:0B:7F  
> 
>           inet addr:172.16.150.34  Bcast:172.16.150.255  Mask:255.255.255.0
> 
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> ...

 

What could be the reason that eth0 in domU is not getting IP from actual DHCP server ? I want it like that !

ThanksLast edited by upengan78 on Mon Jun 30, 2008 4:25 pm; edited 1 time in total

----------

## Karma T. Foxx

The setup you are using now assumes you are running a dhcp server on the dom0.

Comment out dhcp = 'dhcp'

change the vif line:

vif = ['mac=00:16:3e:00:00:01,bridge=eth0']

Do this for every VM you would like to appear on the regular local network as independent machines, increment the mac address as you go. They will grab DHCP from your normal network and look like separate computers.

----------

## upengan78

Thanks Karma1 , so if my dhcp server uses MAC authentication, I have to add 00:16:3e:00:00:01 in dhcp server config for server to give an IP to the xen domain right ?

after making vif changes exactly as you suggested and commenting dhcp still does not fetch the real ip from dhcp server in my network,

ifconfig 

eth0      Link encap:Ethernet  HWaddr 00:16:3E:75:D2:81  

          inet addr:172.16.150.68  Bcast:172.16.150.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:7370 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1056309 (1.0 MiB)  TX bytes:1664 (1.6 KiB)

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

vif = ['mac=00:16:3e:00:00:01,bridge=eth0']

----------

## upengan78

 *Quote:*   

> destroying and creating domU again helped the cause and domU received an IP from DHCP

 

I did use the configuration suggested in 2nd post in this thread for networking to work  :Smile: 

----------

