Rabu, 02 Juli 2003

Two FreeBSD Interfaces on the Same Subnet

I'm testing a new Intel PRO 1000 MT gigabit NIC on a FreeBSD 5.0 REL box. The box already has a separate NIC with a 192.168.1.x address. I wanted the gigabit NIC to also have a 192.168.1.x address. However, when bringing up a second interface on the same subnet as an existing interface, you have to tell FreeBSD which interface to use for broadcasts. In other words, the second interface can't have the default netmask for the subnet. This was confirmed in this helpful post.


To bring up the first (primary) interface:


ifconfig ed1 192.168.1.100 netmask 255.255.255.0 up


To bring up the second interface:


ifconfig em0 192.168.1.101 netmask 255.255.255.255 up


Now both work properly.

0 komentar:

Posting Komentar