[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenBSD with ADSLNation X-Modem



On Fri, May 07, 2004 at 04:20:53PM +0100, Loz wrote:
> Hi,
> 
> I recently acquired broadband of the ADSL variety, and decided to buy 
> the ADSLNation X-Modem <http://www.adslnation.com/> to connect to it. 
> The X-Modem is a single-port ethernet modem, but does this groovy thing 
> of forwarding the ip address direct onto the machine connected to it, 
> appearing almost completely transparent to the outside world. Brilliant, 
> since I didn't want a usb modem, or an internal pci modem, but didn't 
> really want to shell out for a router, and allows me to present my 
> OpenBSD box to the outside world, as a firewall and gateway.
> 
> However, I am running into trouble. The X-Modem works fine on my windows 
> laptop, I plug it in, my laptop gains ip address perfectly, and I can 
> connect to the internet, no trouble.
> 
> There is documented problems with this and OpenBSD, due to the TCP-IP 
> Stack (details can be found here: 
> http://www.adslnation.com/phpapps/phpBB2/viewtopic.php?t=231), the basic 
> gist is that you need to cut the /etc/dhclient.conf file down to:
> 
> request subnet-mask, broadcast-address;
> require subnet-mask; 
> 
> and then modify /etc/netstart so that the /etc/mygate part says:
> 
> # /etc/mygate, if it exists, contains the name of my gateway host
> # that name must be in /etc/hosts.
> if [ -f /etc/mygate ]; then
>         route delete default > /dev/null 2>&1
>         route -n add default -iface `cat /etc/mygate`
> fi 
> 
> then stick your ip address in the /etc/mygate file.
> 
> Other people on the forum report success with that solution, but I'm 
> still running into trouble.
> 
> When connected to my OpenBSD box, I can ping the modem from the internal 
> network, and direct from the OpenBSD machine, but I cannot ping any ip 
> address outside on the internet, either from the internal network or the 
> OpenBSD box.
> 
> When I refresh the ip address, I get the following:
> 
> $ sudo dhclient fxp0
> Internet Software Consortium DHCP Client 2.0pl5-OpenBSD
> Listening on BPF/fxp0/00:08:c7:77:ea:fd
> Sending on   BPF/fxp0/00:08:c7:77:ea:fd
> Sending on   Socket/fallback/fallback-net
> ifconfig: SIOCDIFADDR: Can't assign requested address
> DHCPDISCOVER on fxp0 to 255.255.255.255 port 67 interval 3
> DHCPOFFER from 10.0.0.2
> DHCPREQUEST on fxp0 to 255.255.255.255 port 67
> DHCPACK from 10.0.0.2
> New Network Number: 82.xxx.xxx.0
> New Broadcast Address: 255.255.255.255
> bound to 82.xxx.xxx.96 -- renewal in 56 seconds.
> 
> And a routing table shows:
> 
> $ route show
> Routing tables
> 
> Internet:
> Destination      Gateway            Flags
> 10.1.1.0         link#3             U
> wintermute       127.0.0.1          UGH
> 10.13.0.0        link#2             U
> 10.13.0.102      0:80:c8:b1:3c:d1   UH
> 82.xxx.xxx.0      link#1             U
> 82.xxx.xxx.96     127.0.0.1          UGH
> 127.0.0.0        127.0.0.1          UG
> localhost        127.0.0.1          UH
> 224.0.0.0        127.0.0.1          U
> 
> 
> Can anyone shed any light on what I'm doing wrong, if anything?
> 
> (If you require any more information, please ask)
> 

This should be fixed in -current. See
http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/dhclient/dhclient-script?rev=1.6&content-type=text/x-cvsweb-markup

With this patch no other changes should be necessary. Just run dhclient
and you should get a routing table looking like this:
Destination        Gateway            Flags
default            link#1             UC
...
82.xxx.xxx.96      127.0.0.1          UGHS
...

Btw. telling that the whole internet is directly connected to this link is
insane. It is by far better to have a look at pppoe(8) and do real
bridging or switch the ADSL Router to bidirectional NAT mode.

-- 
:wq Claudio



Visit your host, monkey.org