# /31 support for fxp driver



## m4rtin (Oct 31, 2011)

I have a following Intel PCI NIC in my FreeBSD 8.0 machine:


```
fxp0@pci0:5:0:0:	class=0x020000 card=0x00408086 chip=0x12298086 rev=0x0c hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter'
    class      = network
    subclass   = ethernet
```

As you can see, it uses _fxp_ driver:


```
[root@ ~]# ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
	ether 00:02:b3:27:b3:d5
	inet 10.10.10.1 netmask 0xfffffffe broadcast 10.10.10.1
	media: Ethernet 100baseTX <full-duplex>
	status: active
[root@ ~]#
```

Does _fxp_ driver support /31 address range? As much I have tested, I can apply it with ifconfig, but I'm unable to establish actual network connectivity :OO Example below:


```
[root@ ~]# ifconfig fxp0 10.10.10.0 netmask 255.255.255.254
[root@ ~]# ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
	ether 00:02:b3:27:b3:d5
	inet 10.10.10.0 netmask 0xfffffffe broadcast 10.10.10.1
	media: Ethernet 100baseTX <full-duplex>
	status: active
[root@ ~]# ping -c4 10.10.10.1
PING 10.10.10.1 (10.10.10.1): 56 data bytes

--- 10.10.10.1 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss
[root@ ~]#
```

Or does /31 support depend on network driver at all?


----------



## ecazamir (Oct 31, 2011)

Is there any special reason why you can't use /30 subnet mask?


----------



## SirDice (Oct 31, 2011)

m4rtin said:
			
		

> Does _fxp_ driver support /31 address range?


No, it's not a point-to-point interface.

Keep in mind that there's also a network address (all zeros) and a broadcast address (all ones). That means you need at least 4 addresses and thus a /30.


----------



## m4rtin (Oct 31, 2011)

*ecazamir*, *SirDice*:

It's connected to Cisco router where interface has /31 address range configured. Unfortunately I can not change this. For example Cisco and Juniper equipment support /31 without any issues. There is even an official RFC for this: http://www.ietf.org/rfc/rfc3021.txt

In addition, my other machine with OpenSUSE(2.6.31.5) supports /31 without problems. Does this depend on FreeBSD kernel or particular drivers? :OOO


----------



## oops (Oct 31, 2011)

r226402?


----------



## m4rtin (Oct 31, 2011)

oops said:
			
		

> r226402?



Thanks! So /31 support is included to kernel. However, as I understand, one possibility to get /31 support is to wait for _FreeBSD 9.0_? What are the other possibilities to get this upgrade to my _FreeBSD 8.0_ machine?


----------



## RusDyr (Nov 7, 2011)

It's already in base, as I understood, so you might just update world.


----------



## SirDice (Nov 7, 2011)

Keep in mind that 8.0 is not supported anymore.

http://www.freebsd.org/security/#sup


----------



## Ikinoki (Dec 21, 2013)

Sorry for the necro-posting.

For FreeBSD 8 prior to fix you can do the following trick:
`#ifconfig fxp0 inet 10.0.0.1 10.0.0.2 netmask 255.255.255.254 broadcast 255.255.255.255`
And your p-to-p /31 link will work


----------

