LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 09-15-2008, 06:50 PM   #1
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 36
How to configure /etc/networks and /etc/netmasks when subnetting


Hi.

I have a private network which actually is a 192.168.0.0/24. I decided to subnet the private 192.168.0.0/16 addresses using 3 bits, so I'll end up with:
192.168.0.0/19
192.168.32.0/19
192.168.64.0/19
192.168.96.0/19
192.168.128.0/19
192.168.160.0/19
192.168.192.0/19
192.168.224.0/19

The question now is: what should I put into /etc/networks and /etc/netmasks? Is it sufficient to just put 192.168 into /etc/networks and 255.255.224.0 into /etc/netmasks?

Thank you guys,
Enrico.
 
Old 09-16-2008, 02:26 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
This is all handled by routers. The /etc/networks and /etc/netmasks files are very data, and almost never used. Do you see a need for them?

See man 5 networks netmasks
 
Old 09-16-2008, 03:16 AM   #3
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Original Poster
Rep: Reputation: 36
Quote:
This is all handled by routers. The /etc/networks and /etc/netmasks files are very data, and almost never used. Do you see a need for them?
Thank you Mr. C.

I don't see much use to them but I was following the official Solaris documentation and I had this doubt because it seemed a mandatory configuration.

By the way, speaking about routers, I suppose I should reconfigure the router from 192.168.0.1/24 to 192.168.0.1/19, right?

And the last question is about reconfiguring the Solaris DHCP server. I already have a macro for the network 192.168.0.0 and now I'm thinking about how to partition IP numbers in order to give, for example, an IP number in a specific subnet to a predefined subset of clients. If I'm not misled, the only way to do this kind of things (with just one DHCP server) would be filtering by MAC address (which doesn't seem a clever solution to me...) Maybe I should isolate the specific subset of clients so that they could see only one of several DHCP servers, and in this case I would need a certain number of additional routers. Any other ideas? I don't know how this kind of things is handled in the real world.

Thank you for your help,
Enrico.
 
Old 09-16-2008, 12:55 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Right, you'll want to configure your perimeter router to place all packets destined for your 192.168.0.1/19 on the wire. What other routers downstream do after that is their business. No if you only have one router, then you really aren't subnetting, and just have a single /19 address space.

To assign static IPs via DHCP (static leases), you need to create an assignment on the DHCP server per-MAC/IP pair. This is a good solution when you want permanent IP addresses for things like printers, and want the advantage of DNS and other IP settings to be automatic. No need generally to do this for random clients.

If you've subnetted, your DHCP server, depending upon its location, may be able to provide the correct IP ranges for each subnet. Create the proper network clauses in the DHCP server.
 
Old 09-17-2008, 04:13 AM   #5
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Original Poster
Rep: Reputation: 36
Thank you Mr. C.

Yes, nowadays I just have one router. The reason I wanted to subnet is that I must establish a VPN tunnel with a SOHO WatchGuard router with another office. Only a subset of the machines should be able to see the other network, so I thought about using a /19 address space and, for example, configure the trusted network of the WatchGuard as, for example, 192.168.96.x/19. Clients with IP in 192.168.{0,32,64,128,160,192,224} then should not be able to connect to the VPN. Even if I'm not really subnetting because I just have one router (the ISP router...), it should be sufficient for this to work, at least it's what I'm hoping.

Quote:
If you've subnetted, your DHCP server, depending upon its location, may be able to provide the correct IP ranges for each subnet. Create the proper network clauses in the DHCP server.
I'll check the documentation another time, thanks. In this network I just have 1 DHCP server, which is connected via a switch to the other machines and to the router, I haven't other locations to put it.

Thanks again,
Enrico
 
Old 09-17-2008, 10:08 AM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Or you can use vlans.
 
Old 09-22-2008, 06:12 AM   #7
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Original Poster
Rep: Reputation: 36
Quote:
If you've subnetted, your DHCP server, depending upon its location, may be able to provide the correct IP ranges for each subnet.
Thanks for all the information you provided, Mr. C.

Can you please elaborate your quoted statement? I've been reading Solaris 10 documentation but, surely because of my lack of knowledge, I found no hint about such a configuration.

Thanks again,
Enrico.
 
Old 09-23-2008, 01:17 AM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Sure. A sub-netted network generally implies internal router's are used, one per (sub-)network, to divide a larger network address space. If the DHCP server is running on the routing station, it can listen on all interfaces and provide configuration information for those networks by using the appropriate subnet statements within the DHCP configuration file.

If the DHCP server is not on the routing station, it can still provide configuration information to any of the networks, but requires a DHCP relay to do so (DHCP broadcasts, like all broadcast packets, do not cross routers).
 
Old 09-23-2008, 04:34 AM   #9
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Original Poster
Rep: Reputation: 36
Thank you Mr. C.

With your information I indeed identified the documentation I needed.

Bye,
Enrico
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to configure one card for two networks? dansawyer Linux - Networking 6 08-21-2006 10:10 PM
Is there a guide teaching me how to configure /etc/networks/interface? hkl8324 Debian 2 10-22-2005 04:00 PM
Configure Two Networks RatonCrispiN Linux - Networking 3 08-24-2005 12:37 PM
how to configure Private & Public Networks naresh Linux - Hardware 0 11-18-2004 12:49 AM
eth1 and loopback netmasks addresses match HELP Belize Linux - Networking 8 10-05-2003 12:37 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration