• February 24, 2025, 01:03:17 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: UPDATED - Access web from DNS-323 without router (crossover cable)  (Read 4304 times)

random404

  • Level 1 Member
  • *
  • Posts: 23

A while back I created a thread (http://forums.dlink.com/index.php?topic=14904.msg87126) on this forum about connecting to the web from my DNS 323, e.g. typing in commands like 'ping google.com', 'wget google.com' when connected to the DNS 323 through telnet. Since then a few things changed so I decided to ask this question again.

I'm connected from my laptop (it's a Linux laptop) to my DNS 323 directly with an ethernet crossover cable. My laptop is connected to the internet from wireless. Doing 'ifconfig -a' on my laptop shows the following:

Quote
eth0      Link encap:Ethernet  HWaddr 00:....  
          inet addr:192.168.0.39  Bcast:192.168.0.255  Mask:255.255.255.0

And doing 'route' on my laptop shows the following:

Quote
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     2      0        0 wlan0
192.168.0.0     *               255.255.255.0   U     1      0        0 eth0
default         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0

In the LAN Settings of the DNS 323 web interface, I've set it to the following:

Static IP: 192.168.0.32
Subnet mask: 255.255.255.0
Gateway: ?
DNS1: ?
DNS2: ?

I tried setting Gateway and DNS1 to 192.168.0.39 (the IP address of my laptop), but doing a 'ping google.com' from DNS 323 telnet or a 'ping 209.85.143.104' doesn't succeed. The former gives a 'ping: bad address 'google.com'' error.

I tried setting Gateway and DNS1 to be empty, but doing a 'ping google.com' from DNS 323 telnet or a 'ping 209.85.143.104' still doesn't succeed. This time the latter gives a 'ping: sendto: Network is unreachable'.

Based on the output from the 'route' command above, if I had to guess I'd say the DNS 323 needs to be able to access 192.168.1.1, which is the gateway. However, it's on a different subnet so it's not possible unless I change other stuff. Is that correct? If so, what do I need to change?

Could anyone please advise on what I need to do to be able to connect to the internet from my DNS 323 while it is connected to my laptop? Thanks.
« Last Edit: October 17, 2011, 07:31:07 AM by random404 »
Logged

fordem

  • Level 10 Member
  • *****
  • Posts: 2168
Re: UPDATED - Access web from DNS-323 without router (crossover cable)
« Reply #1 on: October 17, 2011, 09:55:26 AM »

You'll need to turn the laptop into a router so that it routes between the 192.168.1.0 & 192.168.0.0 subnets, AND you'll need to configure DNS server & gateway entries on the DNS-323
Logged
RAID1 is for disk redundancy - NOT data backup - don't confuse the two.

OlegMZ

  • Level 2 Member
  • **
  • Posts: 50
Re: UPDATED - Access web from DNS-323 without router (crossover cable)
« Reply #2 on: October 23, 2011, 07:30:50 PM »

You'll need to turn the laptop into a router so that it routes between the 192.168.1.0 & 192.168.0.0 subnets, AND you'll need to configure DNS server & gateway entries on the DNS-323

Yep. That's right. The laptop must be configured as a router to be able to forward packets between attached networks, DNS must have default gateway = IP of LAN interface of laptop, laptop lan interface default gateway MUST BE CLEAR (only one default gateway per system!). DNS = server of your choice on both devices (use that of your ISP provider).
However there is one big problem with all this. Routing is a two way thing, which means not only your DNS must know how to reach internet (e.g. google.com), but internet must know where to send packets back.
In most cases your border router (the one which is connected to the internet) performs NAT translation between your internal IP (192.168.1.x) and public IP which your ISP assigned you (go to whatismyip.com to find out it). The problem is that in most cases consumer grade router knows about and is able to NAT ONLY directly attached network (in your case 192.168.0..x) and there is no way to tell it about 192.168.1.x network, that also needs to be translated and that to reach it packet should be sent to your laptop.
So in order this [crazy] setup to work it is also necessary to configure dynamic NAT on the laptop so all the packets sourced from DNS would have their source IP (=DNS adress) translated back and forth to laptop WAN IP.
This all means that in order to acheive the task you (i mean topicstarter) should convert your laptop into advanced multifunctional router. And must have clear understanding of how networks work.  But it looks like there is no even basic knowledge of it, sorry.
My advice is to get some router, use it as a connection to the internet, plugin the laptop and DNS-323 directly to it and get everything working without much pains.
Logged