Koozali.org: home of the SME Server

Newbie question about DNS/IP/MAC stuff

Jason2006

Newbie question about DNS/IP/MAC stuff
« on: September 11, 2006, 04:47:59 AM »
Hey there,

I'm a complete newbie with networking as a whole and I'm having some issues setting things up. Here's a breakdown of what I have on my network.

D-Link wireless router/ADSL modem
(Acting as Gateway, modem, DHCP server)

OSX client
(connected by Wireless to router/modem)

SME Server
(headless & keyboardless, connect by 10BaseT cable to router/modem, DHCP off, gateway set to router ip)

Everything seems to be set up so it should all work but I'm having difficulties resolving the SME hosted domain names. Here's the story.

Things I could do from the start
log into server manager using IP eg. http://10.1.1.200/server-manager
log in via ssh using ip eg. ssh -l root 10.1.1.200
access the internet from SME server eg. installing stuff using yum
ping SME & internet domains from SME (logged in via ssh) eg. ping www.google.com (ok), ping www.test.local (ok)

Things I couldn't do from the start
log into server manager using name eg. http://testserver.test.local/server-manager (or any other eg. test.local, www.test.local etc.)
log in via ssh using domain eg. ssh -l root testserver.test.local
ping SME domains from my mac eg. ping www.google.com (ok), ping www.test.local (not ok)

After playing about a bit I had a look at my modem/router settings and set the secondary DNS on the modem to my SME Box to see what would happen. Low and behold, it then pinged www.test.local. I set it back to the original dns and it still pinged www.test.local. I can also use any hostname to access the server manager eg mail.test.local/server-manager which seems wierd. The virtual accounts however don't work under either circumstance.

This morning I was flicking through an old linux networking book I had and tried an 'arp -a' both from my mac and remotely logged into SME. From within SME it throws back the MAC address and IP of my router and my macintosh but directly from my macintosh only brings up the SME machine. The MAC address it throws back though has only a single zero at the front.

I tried registering the SME MAC address and IP as a static address on my router but it said it was invalid. Thought it might have dropped the first zero so replaced the 0 with 00 and still invalid.

Had to go to work shortly after so haven't had a chance to play any further yet. I was remembering in the manual that it was suggested that I let SME act as the DHCP server. I'm not sure how this will go with my wireless arrangement though as I'm new to the whole networking thing. Hopefully I will try this and it will just work :)

While it seems like I haven't really tried much to get it working, the information I have given is extremely condensed. I have spent hours trawling the forums and documentation and tried what seems like a million different things. I'm new the the macintosh also and have tried a whole bunch of stuff like appletalk settings and other stuff to get it working. That multiplied by the many iterations of the miriad of possible setting have resulted in probably 20 hours of solid playing just over the last few days.

Any suggestions would be appreciated.

Thanks heaps in advance,

Jason :(

ps. is there a way I can log into my SME box and run the setup console to change the settings??? As I said, the box is running headless and keyboardless under my kitchen bench so it would be nice if I didn't have to pull the monitor and keyboard in to change things :)

Jason2006

Newbie question about DNS/IP/MAC stuff
« Reply #1 on: September 11, 2006, 05:08:20 AM »
Oh yeah and when I 'arp - a' from the SME machine my router and mac are on eth0 and when I 'arp -a' from the macintosh the SME box comes up as eth1.

Does that seems right ???

Jason ;)

fern

Re: Newbie question about DNS/IP/MAC stuff
« Reply #2 on: September 11, 2006, 07:32:09 AM »
Jason2006

> SME Server connect by 10BaseT cable to router/modem, DHCP off,
> gateway set to router ip

Is your sme configured for gateway server mode or server only mode ?
I'd say to set it to server only mode, assuming your router is also providing firewall services


> is there a way I can log into my SME box and run the setup console to change the settings???

Use Putty & ssh to the box

Jason2006

Newbie question about DNS/IP/MAC stuff
« Reply #3 on: September 11, 2006, 08:31:31 AM »
Thanx Fern,

Yeah I've got it set on Server Only mode already and yes my router/modem is providing gateway and firewall services. When I said 'gateway set to router ip' I meant that I'd set SME to use the router IP as the gateway.

I'm working from a macintosh/OSX client so I can just use the normal terminal. I think I have to log in with admin rather than root to access the config. I'll try it when I get home.

Unfortunately I am new to both Linux and OSX. I normally work in XP but I'm doing some web development stuff that I will be hosting on a Linux server and I wanted a Windows/OSX cross browser development environment and to try to replicate as much as I could the deployment environment.

I should probably try to set up the Windows client to see if I isolate properly where the issue is ie. the server, client or router. It may be an OSX issue and I'm tackling the debugging from totally the wrong end. I would have thought however that the DNS should resolve on any client, but maybe that's just wishful thinking.

At the moment I have
Code: [Select]
                  internet
                       |
OSX client <~~~~~~~~>router<---------->SME Server


OSX client to router is wireless, router to SME is 10BaseT

OSX = IP 10.1.1.2 established dynamically
Router = IP 10.1.1.1 set I suppose statically as this is my DHCP server
SME Server = IP 10.1.1.200 set (statically???) by me in SME configuration

The 10.1.1.1 - 10.1.1.256 range is a D-Link standard

Not sure if I can maybe leave the IP blank in the SME config? Will SME box be picked up by DHCP on the router????

Things I'm gonna try are

- Turn off DHCP on router and on on SME box(Not sure how this will go with my wireless)
- See if I can get the router to pick up the SME box by leaving the static IP on the SME box blank

:P

Jason2006

Newbie question about DNS/IP/MAC stuff
« Reply #4 on: September 11, 2006, 02:43:53 PM »
Mmmmm, turning off DHCP on router and on on SME box was a disaster. Unfortunately SME seems to also need a static address when setting up.

This is a cut and paste from my terminal

(this one is from SME)
[root@testserver ~]# arp -a
? (10.1.1.2) at 00:17:9A:0B:64:9E [ether] on eth0  --> this is my Mac
? (10.1.1.1) at 00:17:9A:1D:C9:D7 [ether] on eth0  --> this is my router

(thi one is from my Mac)
[Jason-Keenans-Computer:~] jason% arp -a
mygateway1.ar7 (10.1.1.1) at 0:17:9a:1d:c9:d7 on en1 [ethernet]  --> router
? (10.1.1.4) at 0:10:dc:1f:73:65 on en1 [ethernet]  --> SME Box
? (10.255.255.255) at ff:ff:ff:ff:ff:ff on en1 [ethernet]  --> I assume this is my ISP????

As you can see i this case only the router resolves and only when coming from my Mac client.

This is what I get when I change the dns setting in the router and set the secondary dns as 10.1.1.4 (SME Box)

[Jason-Keenans-Computer:~] jason% arp -a
mygateway1.ar7 (10.1.1.1) at 0:17:9a:1d:c9:d7 on en1 [ethernet]
testserver.test.local (10.1.1.4) at 0:10:dc:1f:73:65 on en1 [ethernet]
? (10.255.255.255) at ff:ff:ff:ff:ff:ff on en1 [ethernet]

..but this is what I get when I ping

[Jason-Keenans-Computer:~] jason% ping testserver.test.local
ping: cannot resolve testserver.test.local: Unknown host

I'm getting really tired :(

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Newbie question about DNS/IP/MAC stuff
« Reply #5 on: September 12, 2006, 01:54:22 AM »
Jason2006

> Things I could do from the start
> log into server manager using IP eg. http://10.1.1.200/server-manager
> Things I couldn't do from the start
> log into server manager using name eg http://testserver.test.local/server-manager


Sounds like a DNS issue.
I assume your router is acting as DNS server, if so then you need to specify that in the sme "configure this server" screens.
Otherwise reconfigure the whole system to have sme be the DNS server.
...

Jason2006

Newbie question about DNS/IP/MAC stuff
« Reply #6 on: September 12, 2006, 04:14:58 AM »
Hey Ray,

Mmmm, I'm really learning as I go. I have a D-link DSL-G604T modem/router that has firewall and does have dns settings which, when I change the secondary to the IP of my SME box gives the...

[Jason-Keenans-Computer:~] jason% arp -a
mygateway1.ar7 (10.1.1.1) at 0:17:9a:1d:c9:d7 on en1 [ethernet]
testserver.test.local (10.1.1.4) at 0:10:dc:1f:73:65 on en1 [ethernet]
? (10.255.255.255) at ff:ff:ff:ff:ff:ff on en1 [ethernet]

...result for a bit but won't ping. After a while even that dies.

From looking at the documentation it seems that setting the DNS on the SME box is for when DNS requests aren't getting past my firewall, which they are. When I'm logged into the SME box I can ping all of my SME sites as well as external sites and have had no problem with using YUM, just can't do it from my OSX box. I'm in server-only mode too and I don't remember there being any question in the configuration about setting a dns, just the gateway address.

It seems like there is a problem with the router passing the DNS requests internally as opposed to accessing external DNS servers. I might try turning off all of the router firewall stuff to see if that does anything. I will also look at upgrading the firmware on the router/modem just in case there is an issue there. I haven't tried using a direct 10BaseT connection yet. I'm not sure if there may be some sort of issue with the wireless system but I can't think what that might be. I'll try it with my windows box too to see if it's a wierd Macintosh thing.

I'm determined to get it working but I'm coming to the conclusion that there is something there that is just not going to work for me. I'll keep trying.

Jason ;)

Jason2006

Newbie question about DNS/IP/MAC stuff
« Reply #7 on: September 12, 2006, 08:01:23 AM »
Ok, because I have no idea what I'm doing I don't really understand port forwarding, but it would seem that I have to forward the ports I'm using on SME in my router. Not sure if that will do anything.

There is a note in the D-Link documentation that mentions something about having to use the local ip address for accessing local machines but I think that might be in the case that you don't have a DNS server on your intranet.

We'll see

Jason :)

Jason2006

Newbie question about DNS/IP/MAC stuff
« Reply #8 on: September 13, 2006, 02:47:04 AM »
Ok an update. I hooked up my windows machine and it is working with SME nicely. It must be an OSX issue. I've setup what I think I need to but it's still not working.

At least I've located the point of the problem. There is still a wierd hangover of the domain when I arp -a so I may need to figure out how I can clear that before I do anything.

I'll make sure I put up a proper how-to when I get it up and running.

Jason :)

Offline raem

  • *
  • 3,972
  • +4/-0
Newbie question about DNS/IP/MAC stuff
« Reply #9 on: September 13, 2006, 10:19:15 AM »
Jason2006

Try connecting your Mac OSX box directly via cable to the sme server. If it works OK then that rules out OSX/sme compatibility/config issues etc.

It would then suggest the issue is with your wireless router and how you have configured the network.
...

Jason2006

Newbie question about DNS/IP/MAC stuff
« Reply #10 on: September 14, 2006, 02:31:40 AM »
You're not going to believe this. Near the end I'd actually set everything up right. The last problem that I figured out by accident was that using .local made my Mac look for the domain on localhost.

I also set the secondary DNS in the DHCP section of my router config to the ip of my SME box. On the mac I also set the DNS in the TCP/IP section to my router ip followed by my SME ip. They had to be in that order so the router resolves it's own name and then goes out to my SME box to resolve it's own name. I suppose its not imperative that the router name is resolved but it seems neater that way.

Now everything is working. I'll continue to have a play around and I'll put together a how-to for people of little brain like m'self  ;-)

It's a bit slow to find the sites at the moment so I might see if setting SME as my primary DNS in the DHCP section speeds things up.

[JasonsImac:~] jason% arp -a
mygateway1.ar7 (10.1.1.1) at 0:17:9a:1d:c9:d7 on en1 [ethernet]
testserver.test.loc (10.1.1.4) at 0:10:dc:1f:73:65 on en1 [ethernet]
? (10.255.255.255) at ff:ff:ff:ff:ff:ff on en1 [ethernet]

...which looks the same as before but now it pings

I'm not sure if this is the optimal way to set things up but it's working which, at the moment, is all that matters. Any suggestions would be appreciated.

Thanks to everyone so far.

Jason  :-D

Janm

Newbie question about DNS/IP/MAC stuff
« Reply #11 on: September 14, 2006, 10:28:12 PM »
Jason:
If i were you i would try from start
put sme direct to internet modem and make it server gateway
2 nic and then a switch to second  nic and then connect 1 pc at a time
and try from that
Janm