Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
(although I'm running Solaris, I've posted here as I expect Solaris/LINUX is irrelevant) - more of a general network Q.
I have a PC running Solaris 10 (hostname MARKUNIX) and a laptop running WinXP (hostname MARK-LAPTOP).
Both are connected to broadband via a router. IP addresses for each are determined via DHCP (192.168.1.nn) and I do not leave either on, 24x7.
I am running Oracle on MARKUNIX and want to be able to refer to it by hostname when using Oracle tools on my laptop.
Each machine can ping each other ok by ip address and curiously the Solaris PC can ping MARK-LAPTOP (I'm not sure how it resolves that?) - importantly the laptop cannot ping MARKUNIX.
Now I could add MARKUNIX to my laptops hosts file but that would mean changing the file each time I boot up as the ip address for MARKUNIX will keep changing (DHCP).
Is there a way to refer to MARKUNIX without having to keep changing ip addresses and use DHCP? As I understand it the 192.168 address is private and is not really the 'real' ip address and as such can be manipulated(fixed?) even whilst using DHCP?
Am I right in thinking that a static ip from my broadband supplier is the ip of my connection (router) and I'll still have the same private network referencing issues?
What I've covered above pretty much is the extent of my knowledge of networking so bear that in mind please ;-)
Some dhcpd servers support setting dns information for a host, but I'm unsure how portable it is... you can also look at using dyndns typical of local product and automate the process to some degree.
Some routers will allow you to define static IP addresses assigned through DHCP. You'll still get the DNS etc. settings through DHCP but each machine will get the same IP address every time.
Many routers do DNS for the private network by using the Windows machine name (probably why MARK-LAPTOP works). On Linux you can run Samba to provide it to the router. I'm not sure about Solaris.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
My standard solution is to run a DNS server on a linux server (bind9) and bind IP addresses to names. Then I also run a DHCP server on the same linux box, and in the dhcpd.conf I use stanzas like:
By stating the MAC address I make sure that this PC always gets the correct IP address. The IP address is defined in the DNS file for this domain. There is only one place (two files) where I have to define IP address against name, and that is in the DNS files.
You could also make a shortcut to this method by defining IP addresses bound to MAC addresses in your DHCP server. Even broadband routers can do that now. Then you can either address a host by its (constant now) IP address or use an entry in the hosts file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.