Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Sep 2008 19:18:04 -0500
From:      Derek Ragona <derek@computinginnovations.com>
To:        "Andy Smith" <a.smith@ukgrid.net>, <freebsd-questions@freebsd.org>
Subject:   Re: 2 logical interfaces in same subnet, problems...
Message-ID:  <6.0.0.22.2.20080915191426.024b0128@mail.computinginnovations.com>
In-Reply-To: <041601c91751$6d518a60$6600a8c0@computer>
References:  <041601c91751$6d518a60$6600a8c0@computer>

next in thread | previous in thread | raw e-mail | index | archive | help
At 11:38 AM 9/15/2008, Andy Smith wrote:
>Hi,
>
>   I would like to configure a second sub/cloned interface on a FreeBSD 
> 5.3 system. I have read various bits
>and pieces on the subject but I cannot ping (from another server) the 
>second IP which I have configured.
>The steps I took to achieve this are:
>
>kldload if_vlan
>ifconfig
>ifconfig fxp0.1 create
>
># then add the IP to fxp0.1
>
># after which my interfaces look something like:
>
>fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         options=8<VLAN_MTU>
>         inet 10.10.10.1 netmask 0xffffff00 broadcast 10.10.10.255
>         inet6 fe80::203:47ff:fe71:21e7%fxp0 prefixlen 64 scopeid 0x1
>         ether 00:03:47:71:21:e7
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
>fxp0.1: flags=8842<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         inet6 fe80::203:47ff:fe71:21e7%fxp0.1 prefixlen 64 scopeid 0x8
>         inet 10.10.10.2 netmask 0xffffffff broadcast 10.10.10.255
>         ether 00:03:47:71:21:e7
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
>         vlan: 1 parent interface: fxp0
>
> >From this server itself I can ping the second IP 10.10.10.2, but from 
> other systems I can only ping 10.10.10.1.
>Im most familiar with Solaris and this type of config works no probs with 
>Solaris, is there something else I
>have to configure on FreeBSD? For example I found it wouldnt let me use 
>the normal subnet and I then read
>that for a second IP on the same subnet it should be set to -1
>
>Any ideas? thanks for any help,
>
>Andy.

Andy,

You are doing this the wrong way for FreeBSD.  The method you used I've 
seen in Redhat.

Just add a line like this to /etc/rc.conf:
ifconfig_fxp0_alias1="10.10.10.2 netmask 0xffffffff"

You can also do it at the command line:
ifconfig fxp0 alias 10.10.10.2 netmask 0xffffffff

You don't need anything else.  No kernel mods.  You will just have another 
IP stack running on your NIC.

         -Derek

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.0.22.2.20080915191426.024b0128>