Basic Solaris static routing


 
Thread Tools Search this Thread
Operating Systems Solaris Basic Solaris static routing
# 1  
Old 03-25-2008
Basic Solaris static routing

Hi All, SmilieSmilie

I have scoured the web and can't find this anywhere.

What I am trying to do is set up a static route through an available gateway on a server, and then test connectivity through TELNET.

I have done this on AIX (I already had this procedure).
On AIX I would use SMIT. In this example I had the following info.

Destination IP: 167.210.153.38
Default Gateway: 130.103.18.1
Net Mask: 255.255.254.0
Network Interface: 130.103.19.158

So using SMIT I created this command, which could be run via cmd line:

chdev -l inet0 -a route=net, -hopcount, 0, -netmask, 255.255.254.0, -if, en0,,,,167.210.153.38, 130.103,18.1


then after the static route is set up:

# telnet 167.210.153.38

would give a response to prove it worked.

* * * * *


Now, I just have to do the same thing on a number of Solaris boxes.

I assume the best approach would be to add a line to /etc/gateways, something like:

net 167.210.153.38/255.255.254.0 gateway 130.103.19.158 metric 0 passive



Since I have no SMIT or interface tool I can use, I am pretty much limited to having to figure out exactly where everything is supposed to be first shot.

Does anyone know how to this?

Thanks much

Last edited by jeffpas; 03-25-2008 at 12:39 PM..
# 2  
Old 03-25-2008
I am not sure how exactly to get the available gateway information on Solaris.
For example if I do this on Solaris:

# netstat -in

I get:

Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
lo0 8232 127.0.0.0 127.0.0.1 57935224 0 57935224 0 0 0
fjgi0 1500 159.202.145.128 159.202.145.244 28530586 0 3954426 0 0 0
fjgi4 1500 192.168.40.0 192.168.40.55 15371263 0 9248059 0 1657923 0
hme0 1500 130.103.18.0 130.103.19.190 5747738 0 8868158 0 0 0


Whereas on AIX, if I do netstat -in, I would get:

Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 6e.c.50.1.f0.4 5273447 0 3880490 0 0
en0 1500 130.103.18 130.103.19.234 5273447 0 3880490 0 0
en1 1500 link#3 6e.c.50.1.f0.5 8294404 0 6688212 0 0
en1 1500 192.168.145 192.168.145.129 8294404 0 6688212 0 0
en1 1500 159.202.145 159.202.145.237 8294404 0 6688212 0 0
en1 1500 159.202.145 159.202.145.252 8294404 0 6688212 0 0
lo0 16896 link#1 5431023 0 5437550 0 0
lo0 16896 127 127.0.0.1 5431023 0 5437550 0 0
lo0 16896 ::1 5431023 0 5437550 0 0


Where I imagine I can see en0 having 130.103.18.1 as an available gateway. (I don't have this problem on AIX, because I can just get it out of SMIT)

Is there anywhere where anyone has ever written this down?
Surely if Solaris proves to be a real pain, there will be less of them in our future.


Thanks for any help.

Last edited by jeffpas; 03-25-2008 at 12:39 PM..
# 3  
Old 03-25-2008
for routes use the file /etc/inet/routes... view routes with:

"netstat -rn"

hth,
DN2
# 4  
Old 03-25-2008
DukeNuke,

This file is blank on my Solaris box.
I am unclear as to what you mean.
Do you mean use /etc/inet/routes in place of /etc/gateways?

Is there a writeup on this procedure anywhere in cyberspace as to how to do it?

Surely people learned this from somewhere.
# 5  
Old 03-25-2008
# 6  
Old 03-26-2008
>>>>

enter the routes in the file /etc/inet/routes like this:

net "network" "router"

example:
net 192.168.0.0/24 192.168.0.254

hth,
DN2

>>>>

I hate to enervate the point, but I still can't tell from that how one translates the output of the 'netstat -in' command to an entry for this line.

For example: (# netstat -in)

Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
lo0 8232 127.0.0.0 127.0.0.1 57935224 0 57935224 0 0 0
fjgi0 1500 159.202.145.128 159.202.145.244 28530586 0 3954426 0 0 0
fjgi4 1500 192.168.40.0 192.168.40.55 15371263 0 9248059 0 1657923 0
hme0 1500 130.103.18.0 130.103.19.190 5747738 0 8868158 0 0 0


I am guessing wildly here. If my destination address to static route TO is 167.210.153.38, then it looks to me like the available gateway I want is 130.103.18.0.
I don't see any en0 interface like there was on the AIX box, but I do recognize the 130.103.18 prefix, which I saw dozens of on the AIX side using SMIT (if I saw 130.103.20.0 for instance, that would be the available gateway I would use).

So the line I would enter would be:



net 130.103.18.1/255.255.255.0 167.210.153.38

or

net 130.103.18.1/255.255.254.0 167.210.153.38

Depending on what the network mask is.
I know that 255.255.255.0 can be expressed simply as '24':

http://www.ingate.com/files/422/fwma...n/xa11944.html

At that point I would assume a

# telnet 167.210.153.38 60000

Would respond if it worked.
But I am not sure how one gets the correct network mask needed to place in this file from the output above.

? ? ?
# 7  
Old 03-27-2008
Okay, the command is netstat -rn, not nestat -in.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris static IP changed (non DHCP)

We have 2 solaris 10 t5240 servers with static IP addresses on nxge0 I/F which were rebooted a few days back with a known good config that has been in place for years (for /etc/hosts, /etc/hostname.nxge0, /etc/netmasks, etc) They are not using dhcp. About the same time today, both of their... (7 Replies)
Discussion started by: hdatontodo
7 Replies

2. Solaris

Solaris 11 problem with static ip

I have installed Solaris 11.2 in VMware Player, networked in bridged mode. When Solaris uses DHCP everything is OK, I can reach internet, as well as other systems on my LAN. When I switch to static, I have connections to my LAN, but can not get to internet, the DNS resolution is somehow not... (2 Replies)
Discussion started by: migurus
2 Replies

3. Solaris

Solaris Routing

Hello All, Problem is that redundancy doesn't work, probably a routing issue I need to get sorted out When 172.29.11.x net is down, neither node3 nor node4 is trying 172.29.12.x network,The problem lies in network 172.29.13.x if 172.29.11.x network is down, node3/node4 should route to... (6 Replies)
Discussion started by: nadeemahmed
6 Replies

4. Solaris

solaris routing between two networks

ce0: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 2 inet 10.162.212.132 netmask ffffff00 broadcast 10.162.212.255 ether 0:14:4f:55:82:9 ce1: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 3 inet 10.231.11.232 netmask... (3 Replies)
Discussion started by: busyboy
3 Replies

5. Linux

GNUGK-How to setup static gateway to gateway routing

Dear Sir I am a newbie in the world of IP telephony. I have been working with Asterisk PBX (SIP) and Cisco Call Manager (MGCP) but now I am learning on how to work GNUGK for H.323 Gatekeeper. I am having a problem, configuring static call routing on GNUGK in the section ... (0 Replies)
Discussion started by: mfondoum
0 Replies

6. Solaris

Solaris - Assign Static IP

Hi, I have cloned a SOLARIS 8 (BLADE 150) Hard Disk and have put into other system. So, now how do I configure the NIC and assign static IP for this new machine ? (8 Replies)
Discussion started by: angshuman_ag
8 Replies

7. Solaris

ip routing in solaris

I have a SUN ultra 5 machine running Solaris 6. it has two ethernet interfaces qe0 192.168.0.111 and qe1 192.168.1.111 the two subnets are 192.168.0.111 255.255.255.0 192.168.1.111 255.255.255.0 the specified routes are add route -net 192.168.0.0 255.255.255.0 192.168.0.111 add route... (3 Replies)
Discussion started by: adol65
3 Replies

8. Solaris

Routing problem of Solaris

Hi, I got problem of Sun Solaris 8 routing. IP of SunA is 10.16.64.164, and have routing table: 10.16.64.0 10.16.64.164 U 1 19236 bge1 10.6.0.0 10.6.0.3 U 1 16534 bge0 224.0.0.0 10.6.0.3 U 1 ... (4 Replies)
Discussion started by: milo
4 Replies

9. Solaris

Setting up static ip-adresses, Solaris 10

Hello, Iam having problems getting more then one ip to work here is my setup! Hostname: nexus NIC: e000g1 (example ips) My ips 80.80.80.15 to 80.80.80.20 Defaultrouter 80.80.80.1 nameservers 80.80.80.100 and 80.80.80.200 How would i do this? Any help would be mutch appriciated!... (7 Replies)
Discussion started by: empty
7 Replies

10. IP Networking

routing problem in solaris

hi, below is the situation: my server is in 128.10.200.xxx network. i have a solaris computer running in a subnet. this computer got 2 nic card. 1 is 172.18.198.xxx , another 1 is 10.100.xxx.11 there is a machine stick with this computer, ip is 10.100.xxx.12 so, 10.100.xxx.11 and... (3 Replies)
Discussion started by: kyhah
3 Replies
Login or Register to Ask a Question