# 2 NICs, both DHCP



## Seeker (Dec 26, 2012)

```
# WAN
ifconfig_em1=DHCP
# IPTV
ifconfig_em0=DHCP
```

em1 is route to the internet
em0 is part of a 10.191.168.0/22

Problem is, default getaway always gets set to em0's => 10.191.168.1

I want em1's to be a default getaway.

How do I do it?


----------



## bbzz (Dec 26, 2012)

Set first to SYNCDHCP.

If 2nd still overwrites the first, then add /etc/dhclient-enter-hooks:

```
add_new_routes() {
   return 0
}

delete_old_routes () {
    return 0
}
```

to prevent dhcp from modifying existing default route.


----------



## Seeker (Dec 26, 2012)

Yep! Thanks.
It did a trick!

But where is a SYNCDHCP documented?


----------



## kpa (Dec 26, 2012)

rc.conf(5).


----------



## Seeker (Dec 26, 2012)

Thx!
I did apropos search for SYNCDHCP, of all man pages and it returned nothing.

```
# man 5 rc.conf
```
Does have it.


----------

