Page 1 of 1

DHCP and MAC Problem

Posted: 17. May 2008, 00:15
by esanmartin
Hi, in the network of my work, they have a static dhcp with the mac address of the ethernet interfaces, so when i try to configure the bridge interfaces, that receive the same ip that the eth interfaces...

Well, i don't know how to solve this problem, i have to give another mac to the bridge interface? what can i do?

regards and thanx for this software, it's really cool ;)

Posted: 20. May 2008, 21:13
by esanmartin
i follow this guide: http://www.virtualbox.org/wiki/Advanced ... king_Linux

and the result is that i can do ping to the host (Ubuntu 8.04) from the guest host (winXP) but i can't see the internet from XP.

Here are the configurations that i do:

First, i run 2 scripts:

the bridge script,

Code: Select all

#!/bin/bash
# set PATH for the case we are called via sudo or su root

#PATH=/sbin:/usr/bin:/bin:/usr/bin

# create a tap
tunctl -t tap1 -u enrique
ip link set up dev tap1

# create the bridge
brctl addbr br0
brctl addif br0 tap1

# set the IP address and routing
ip link set up dev br0
ip addr add 10.1.1.1/24 dev br0
ip route add 10.1.1.0/24 dev br0
the nat script,

Code: Select all

#!/bin/bash

INTIF="br0"
EXTIF="eth1"
echo 1 > /proc/sys/net/ipv4/ip_forward

# clear existing iptable rules, set a default policy
iptables -P INPUT ACCEPT
iptables -F INPUT 
iptables -P OUTPUT ACCEPT
iptables -F OUTPUT 
iptables -P FORWARD DROP
iptables -F FORWARD 
iptables -t nat -F

# set forwarding and nat rules
iptables -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

#Setting will be do with

# clear existing iptable rules, set a default policy
iptables -P INPUT ACCEPT
iptables -F INPUT 
iptables -P OUTPUT ACCEPT
iptables -F OUTPUT 
iptables -P FORWARD DROP
iptables -F FORWARD 
iptables -t nat -F

# disable forwarding
echo 0 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/ip_dynaddr
then i configure the network interfaces in the XP with:
ip: 10.1.1.2/24
gateway: 10.1.1.1

the result of $ ifconfig in the ubuntu 8.04 is:
br0 Link encap:Ethernet direcciónHW 00:ff:14:3b:1f:e7
dirección inet6: 2001:db8::/64 Alcance:Global
dirección inet6: fe80::2ff:14ff:fe3b:1fe7/64 Alcance:Vínculo
ARRIBA DIFUSIÓN CORRIENDO MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
colisiones:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:376 (376.0 B)

eth1 Link encap:Ethernet direcciónHW 00:1c:c0:1c:41:0a
inet dirección:10.3.9.34 Difusión:10.3.9.127 Máscara:255.255.255.128
dirección inet6: fe80::21c:c0ff:fe1c:410a/64 Alcance:Vínculo
ARRIBA DIFUSIÓN CORRIENDO MULTICAST MTU:1500 Metric:1
RX packets:102 errors:0 dropped:0 overruns:0 frame:0
TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
colisiones:0 txqueuelen:100
RX bytes:12469 (12.1 KB) TX bytes:7947 (7.7 KB)
Memoria:d0380000-d03a0000

lo Link encap:Bucle local
inet dirección:127.0.0.1 Máscara:255.0.0.0
dirección inet6: ::1/128 Alcance:Anfitrión
ARRIBA LOOPBACK CORRIENDO MTU:16436 Metric:1
RX packets:1968 errors:0 dropped:0 overruns:0 frame:0
TX packets:1968 errors:0 dropped:0 overruns:0 carrier:0
colisiones:0 txqueuelen:0
RX bytes:98400 (96.0 KB) TX bytes:98400 (96.0 KB)

tap1 Link encap:Ethernet direcciónHW 00:ff:14:3b:1f:e7
dirección inet6: fe80::2ff:14ff:fe3b:1fe7/64 Alcance:Vínculo
ARRIBA DIFUSIÓN CORRIENDO MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:3 overruns:0 carrier:0
colisiones:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
so, where i can find info of how i configure the ubuntu host to that the winXP can see the internet?

Regards... :)

ESMW