Can't connect to internet using D-Link 2500U

rudm

New Member


Messages: 8

I have D-Link 2500U in Bridge mode, FreeBSD 7.3 and trying to establish connection with internet.

ppp.conf
Code:
default:
  set log Phase tun command 
  set ifaddr 0 0
 
wstream:
  set device PPPoE:vr0 
  set authname login
  set authkey pass
  set dial
  set login
  add default HISADDR


resolv.conf
Code:
nameserver provider dns1
nameserver provider dns2


if config shows that htere a re no default route, but when I try to add route, BSD says:
Code:
route add 192.168.1.1 default
route: writing to routing socket: Network is unreachable
add host 192.168.1.1 gateway default: Network is unreachable


when I try ppp -ddial I recieve:
Code:
Warning: attempt to net_addr_domain(netgraph) after domainfinalize()

when I switch off/on router It shows arp conflict
Code:
bsd kernel: arp: mac-адрес is using my IP address 192.168.1.1 on vr0

I guess it's because of the same IP for router ant vr0(interface where routrer is pluged in) but in handbook written that I shall assign router IP to net interface to which my router is plugged in, so I don't know what to do.

I have dynamic IP address, and recieve IP and host configuration from provider - how can I declare it to BSD? I thougth that it would be enough just set router in routing mode and it recieve all settings from provider and then send it to FreeBSD but it didn't work for me.

I will be very grateful for any help from you guys.
 
OP
R

rudm

New Member


Messages: 8

At first, I had
Code:
hostame="bsd"
ppp_enable="YES"
ppp_mode="ddial"
ppp_profile="wstream" 
ifconfig_vr0="192.168.1.1 netmask 255.255.255.0"


Then, after arp conflict I deleted all, excluding
Code:
hostname="bsd"
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 10,108
Messages: 35,583

Please post the output of # ifconfig -a.
 
OP
R

rudm

New Member


Messages: 8

Thank you for answering and sorry for such a long silencw - I could manage to set up internet for my FreeBSD. But now i hae other problem - I'm trying to make simple router but windows 7 client can't connect to BSD and I don't know where to lok, because I've already done all I could imagine
here is my rc.conf
Code:
#Machine name
hostname="bsd.myhome.local"

#This machine is a network gateway
gateway_enable="YES"

#DSL Modem in router mode
defaultrouter="192.168.1.1"

#interface connected to router D-Link ADSL 2500U
ifconfig_vr0="192.168.1.2 netmask 255.255.255.0"

#interface connected to local network
ifconfig_vr1="192.168.2.1 netmask 255.255.255.0"

#Enable NAT
natd_enable="YES"

#NAT Interface
natd_interface="vr0"

#Enable SSH for remote login
sshd_enable="YES"


my resolv.conf
Code:
nameserver 192.168.1.1 #ADSL Router
nameserver 195.46.116.1 #Provider DNS1
nameserver 192.46.95.1 #Provider DNS2


ifconfig -a
Code:
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2808<VLAN_MTU,WOL_UCAST,WOL_MAGIC>
ether: 00:26:5a:70:71:7f
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (100BaseTX <full-duplex>)
status: active

vr1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2808<VLAN_MTU,WOL_UCAST,WOL_MAGIC>
ether: 00:19:5b:70:4a:11
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
media: Ethernet autoselect (100BaseTX <full-duplex>)
status: active

plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
inet6 fe80::1%lo0 preficlen 64 scoped 0x4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000


netstat -rn
Code:
Internet:    
Destination    Gateway           Flags  Refs    Use  Netif  Expire
default        192.168.1.1       UGS    0       0    vr0 
127.0.0.1      127.0.0.1         UH     0       0    lo0
192.168.1.9/24 link#1            UC     0       0    vr0
192.168.1.1    00:24:01:5c:3e:a8 UHLW   2       6    vr0    103
192.168.2.0/24 link#2            UC     0       0    vr1

Internet6:
Destination      Gateway           Flags  Netif 
 Expire
::1              ::1               UHL    lo0
fe80::1%lo0/64   f80::1%lo0        U      lo0
fe80::1%lo0      link#4            UHL    lo0
ff01:4::/32      fe80::1%lo0       UC     lo0
ff02::%lo0/32    fe80::1%lo0       UC     lo0


I assigned 192.168.2.3 netmask 255.255.255.0 Gateway 192.168.2.1 DNS 192.168.2.1 to Windows
7 There is ping between both FreeBSD interfaces, internet and ADSL router, but there is no ping between FreeBSD and Windows 7
 
Top