# Hy all



## Superxp (Oct 11, 2011)

Good evening I have a problem.
I have two IP and two physical network cards 78.96.xx.10 and 78.96.xx.11
Internet provider allocates IPs via DHCP, try to make balancing the traffic
example for website ip 10, ip 11 mysql
but I have next error
1)I tried the alias did not work
2)I try to set both network cards but gave the following error 

```
arp: '78.96.xx.1 Gateway' is on vr0 but got reply from 00-0a-5e-19=xx=xx on rl0
```




"Sory for translate used google translate "


----------



## bbzz (Oct 12, 2011)

ARP packet is broadcasted to both of your NICs (eg. NICs are connected to same switch/vlan). MAC address for default gateway which is reachable on one NIC appears now on another.
This may or may not happen because your IP addresses belong to the same subnet, but my bet is they are.
This may not be a problem in itself, if you have reachability (message can be disabled in kernel, I forgot how it goes).


----------



## SirDice (Oct 12, 2011)

Save yourself a lot of headaches and don't put two networkcards on the same subnet on the same machine.


----------



## phoenix (Oct 13, 2011)

You want to read the lagg(4) man page for how to do this correctly.  

Note:  if you get your IPs via DHCP, lagg won't work.


----------



## ecazamir (Oct 13, 2011)

You don't need two physical interfaces unless the bandwidth required is exceeding one cards' bandwidth. 
Using the same subnet on two physical interfaces is not a great idea, FreeBSD is using only one route per destination (eg: route to 78.96.xx.0/24), so a single interface will be used for the outgoing packets (pf can be used to adjust this behaviour, but this is another matter)
Using a single physical interface with multiple addresses will be the best scenario for your needs.
I think you can keep your configuration and get rid of those "arp: '78.96.xx.1 Gateway' is on vr0 but got reply from 00-0a-5e-19=xx=xx on rl0" messages using one of the following tunables:
/etc/sysctl.conf

```
net.inet.ip.same_prefix_carp_only=0
net.link.ether.inet.log_arp_wrong_iface=0
```
To enable the modified parameters use

```
/etc/rc.d/sysctl start
```
For a non-persistent test use 
	
	



```
sysctl net.link.ether.inet.log_arp_wrong_iface=0
```


----------



## Superxp (Oct 14, 2011)

There's a small problem.
I like to put 2 IPs on the same network card so it's dhcp on mac
I will try tonight can you succeed
Thank you for your time and kindness offered


----------

