|
setting up b2b machines on Solaris
Ok, setting up back to back machines should be simple, right? So mostly so, but sometimes I do everything right and some f-ing ethernet cable is busted and has me questioning which file i forgot to change. So here you go:
- edit /etc/nsswitch.conf to have 'hosts' and 'ipnodes' look for 'files' before DNS/NIS/etc.
- make up some fake IP addresses and hostnames - say 10.x.x.y (client-b2b) and 10.x.x.y+1 (server-b2b), add those to /etc/hosts and /etc/inet/ipnodes on both the client and server
- add a line to /etc/netmasks (with the above fake IPs, '10.x.x.0 255.255.255.0' would work)
- create a /etc/hostname.[interface name][interface number] -- for me, i'm using a v20z and it has a dual port internal bge interface, so i create /etc/hostname.bge1 (since /etc/hostname.bge0 already exists), and fill it with the b2b machine name ("server-b2b" or "client-b2b" in this example)
- Hook up your cable, Reboot both machines
Now let's check the client:
client# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet a.b.c.d netmask ffffff00 broadcast a.b.c.255
ether f:f:f:f:f:f
bge1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 10.x.x.y netmask ffffff00 broadcast 10.x.x.255
ether f:f:f:f:f:f
client#
Note, that if bge1 isn't 'RUNNING' then something is probably wrong.
Now, let's make sure it worked:
client# traceroute server-b2b
traceroute: Warning: Multiple interfaces found; using 10.x.x.y @ bge1
traceroute to server-b2b (10.x.x.y+1), 30 hops max, 40 byte packets
1 server-b2b (10.x.x.y+1) 0.822 ms 0.323 ms 0.244 ms
client#
client# netstat -rn | grep 10.x.x.0
10.x.x.0 10.x.x.y U 1 1 bge1
client#
Woo wee! and yes the 10.x.x.y, a.b.c.d, and ether addresses are all totally bogus.
(2006-01-26 15:24:37.0/2005-04-08 16:32:16.0)
Permalink
Trackback: http://blogs.sun.com/erickustarz/en_US/entry/setting_up_b2b_machines
|