<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: hostname wierdness after CIPE deployed
From: jim cromie <jcromie,AT,divsol,DOT,com>
Date: Mon, 18 Feb 2002 07:11:20 +0100

< @divsol.com="">< @inka.de="">< @divsol.com="">
Ive had mostly success in deploying CIPE 1.4.5 between 2 RH-7.2 boxes,
except for
hostname reported upon boot is different than specd in 
/etc/sysconfig/network

Following is a cheesy little bash script, and the cipe-setup-report it 
produces.
hopefully the script gives reliable info, allowing more precise inferences,
and with chunky enough output for easy skip-scrolling.

#!/bin/bash
# cipeinfo for use on RH 7.2

for host in $* ; do

echo
# want bash function thru ssh ??
ssh $host << echo="" cipeinfo="" output="" for="" '="" hostname="" #="" 
results="" here="" are="" wierd="" grep="" cipe="" service="" network="" 
status="" 192.168="" ip="" addr="" |="" cipcb="" netstat="" -r="" ps="" 
-efw="" ciped="" lsof="" egrep="" -v="" udp="" #tail="" -100="" eocmd="" 
done="" ok="" -="" invoke="" note="" arg="" and="" different="" in="" 
[root@harpo="" roo="" harpo="" harpo.dmz="" groucho="" groucho.dmz="" 
harpo.vnet="" options="" cipe_debug="15" configured="" device="" lo="" 
cipcb0="" cipcb1="" eth0="" eth1="" irlan0="" ppp0="" currently="" active="" 
192.168.10.1="" groucho.jimc.earth="" groucho.privnet="" 192.168.10.2="" 
harpo.jimc.earth="" harpo.privnet="" 192.168.100.1="" groucho.vnet="" 
192.168.100.2="" 192.168.1.1="" 192.168.1.2="" 192.168.1.0="" .dmz="" 
192.168.10.0="" .privnet="" 192.168.100.0="" .vnet="" ="">< 
,noarp,notrailers,up=""> mtu 1442 qdisc pfifo_fast 
qlen 100
inet 192.168.10.2 peer 192.168.10.1/32 scope global cipcb0
9: cipcb1: < ,noarp,notrailers,up=""> mtu 1442 qdisc pfifo_fast 
qlen 100
inet 192.168.100.2 peer 192.168.100.1/32 scope global cipcb1
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
groucho.vnet * 255.255.255.255 UH 40 0 0 cipcb1
groucho.jimc.ea * 255.255.255.255 UH 40 0 0 cipcb0
10.0.0.0 * 255.255.255.0 U 40 0 0 eth0
10.0.0.0 * 255.255.255.0 U 40 0 0 eth1
192.168.1.0 * 255.255.255.0 U 40 0 0 eth0
192.168.1.0 * 255.255.255.0 U 40 0 0 eth1
127.0.0.0 * 255.0.0.0 U 40 0 0 lo
default cisco 0.0.0.0 UG 40 0 0 eth1
default cisco 0.0.0.0 UG 40 0 0 eth0
root 11147 1 0 16:58 ? 00:00:00 /usr/sbin/ciped-cb me 0.0.0.0 6060 peer 
groucho.dmz 6060 ipaddr harpo.privnet ptpadd
root 11264 1 0 16:58 ? 00:00:00 /usr/sbin/ciped-cb me 0.0.0.0 6061 peer 
bang.wha.la 6061 ipaddr harpo.vnet ptpaddr g
root 11966 11884 0 17:37 ? 00:00:00 grep ciped
ciped-cb 11147 root 1u IPv4 317675 UDP harpo.dmz:6060
ciped-cb 11264 root 1u IPv4 317783 UDP 10.0.0.6:6061

cipeinfo output for harpo.vnet

options cipcb cipe_debug=15
Configured devices:
lo cipcb0 cipcb1 eth0 eth1 irlan0 ppp0
Currently active devices:
lo cipcb0 eth0 eth1 cipcb1
192.168.10.1 groucho.jimc.earth groucho.privnet groucho
192.168.10.2 harpo.jimc.earth harpo.privnet harpo
192.168.100.1 groucho.vnet
192.168.100.2 harpo.vnet
192.168.1.1 groucho.dmz
192.168.1.2 harpo.dmz
192.168.1.0 .dmz
192.168.10.0 .privnet
192.168.100.0 .vnet
2: cipcb0: < ,noarp,notrailers,up=""> mtu 1442 qdisc pfifo_fast 
qlen 100
inet 192.168.10.2 peer 192.168.10.1/32 scope global cipcb0
9: cipcb1: < ,noarp,notrailers,up=""> mtu 1442 qdisc pfifo_fast 
qlen 100
inet 192.168.100.2 peer 192.168.100.1/32 scope global cipcb1
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
groucho.vnet * 255.255.255.255 UH 40 0 0 cipcb1
groucho.jimc.ea * 255.255.255.255 UH 40 0 0 cipcb0
10.0.0.0 * 255.255.255.0 U 40 0 0 eth0
10.0.0.0 * 255.255.255.0 U 40 0 0 eth1
192.168.1.0 * 255.255.255.0 U 40 0 0 eth0
192.168.1.0 * 255.255.255.0 U 40 0 0 eth1
127.0.0.0 * 255.0.0.0 U 40 0 0 lo
default cisco 0.0.0.0 UG 40 0 0 eth1
default cisco 0.0.0.0 UG 40 0 0 eth0
root 11147 1 0 16:58 ? 00:00:00 /usr/sbin/ciped-cb me 0.0.0.0 6060 peer 
groucho.dmz 6060 ipaddr harpo.privnet ptpadd
root 11264 1 0 16:58 ? 00:00:00 /usr/sbin/ciped-cb me 0.0.0.0 6061 peer 
bang.wha.la 6061 ipaddr harpo.vnet ptpaddr g
root 12059 11977 0 17:37 ? 00:00:00 grep ciped
ciped-cb 11147 root 1u IPv4 317675 UDP harpo.dmz:6060
ciped-cb 11264 root 1u IPv4 317783 UDP 10.0.0.6:6061

cipeinfo output for groucho.vnet

#options cipcb cipe_debug=0
Configured devices:
lo cipcb0 cipcb1 eth0 irlan0
Currently active devices:
lo cipcb0 eth0 cipcb1
192.168.10.1 groucho.jimc.earth groucho.privnet groucho
192.168.10.2 harpo.jimc.earth harpo.privnet harpo
192.168.100.1 groucho.vnet
192.168.100.2 harpo.vnet
192.168.1.1 groucho.dmz
192.168.1.2 harpo.dmz
2: cipcb0: < ,noarp,notrailers,up=""> mtu 1442 qdisc pfifo_fast 
qlen 100
inet 192.168.10.1 peer 192.168.10.2/32 scope global cipcb0
9: cipcb1: < ,noarp,notrailers,up=""> mtu 1442 qdisc pfifo_fast 
qlen 100
inet 192.168.100.1 peer 192.168.100.2/32 scope global cipcb1
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
harpo.vnet * 255.255.255.255 UH 40 0 0 cipcb1
harpo.jimc.eart * 255.255.255.255 UH 40 0 0 cipcb0
10.0.0.0 * 255.255.255.0 U 40 0 0 eth0
192.168.1.0 * 255.255.255.0 U 40 0 0 eth0
127.0.0.0 * 255.0.0.0 U 40 0 0 lo
default cisco 0.0.0.0 UG 40 0 0 eth0
root 9126 1 0 16:57 ? 00:00:00 /usr/sbin/ciped-cb me 0.0.0.0 6060 peer 
harpo.dmz 6060 ipaddr groucho.privnet ptpadd
root 9236 1 0 16:57 ? 00:00:00 /usr/sbin/ciped-cb me 0.0.0.0 6061 peer 
cisco 6061 ipaddr groucho.vnet ptpaddr harpo
root 10013 9923 1 17:38 ? 00:00:00 grep ciped
ciped-cb 9126 root 1u IPv4 26892 UDP groucho.dmz:6060
ciped-cb 9236 root 1u IPv4 26974 UDP 10.0.0.3:6061

cipeinfo output for groucho.vnet

#options cipcb cipe_debug=0
Configured devices:
lo cipcb0 cipcb1 eth0 irlan0
Currently active devices:
lo cipcb0 eth0 cipcb1
192.168.10.1 groucho.jimc.earth groucho.privnet groucho
192.168.10.2 harpo.jimc.earth harpo.privnet harpo
192.168.100.1 groucho.vnet
192.168.100.2 harpo.vnet
192.168.1.1 groucho.dmz
192.168.1.2 harpo.dmz
2: cipcb0: < ,noarp,notrailers,up=""> mtu 1442 qdisc pfifo_fast 
qlen 100
inet 192.168.10.1 peer 192.168.10.2/32 scope global cipcb0
9: cipcb1: < ,noarp,notrailers,up=""> mtu 1442 qdisc pfifo_fast 
qlen 100
inet 192.168.100.1 peer 192.168.100.2/32 scope global cipcb1
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
harpo.vnet * 255.255.255.255 UH 40 0 0 cipcb1
harpo.jimc.eart * 255.255.255.255 UH 40 0 0 cipcb0
10.0.0.0 * 255.255.255.0 U 40 0 0 eth0
192.168.1.0 * 255.255.255.0 U 40 0 0 eth0
127.0.0.0 * 255.0.0.0 U 40 0 0 lo
default cisco 0.0.0.0 UG 40 0 0 eth0
root 9126 1 0 16:57 ? 00:00:00 /usr/sbin/ciped-cb me 0.0.0.0 6060 peer 
harpo.dmz 6060 ipaddr groucho.privnet ptpadd
root 9236 1 0 16:57 ? 00:00:00 /usr/sbin/ciped-cb me 0.0.0.0 6061 peer 
cisco 6061 ipaddr groucho.vnet ptpaddr harpo
root 10109 10021 0 17:38 ? 00:00:00 grep ciped
ciped-cb 9126 root 1u IPv4 26892 UDP groucho.dmz:6060
ciped-cb 9236 root 1u IPv4 26974 UDP 10.0.0.3:6061

NOTES

Im assuming a somewhat unfriendly LAN, tho cisco router/fw is

OBSERVATIONS

reboots reliably pick up wrong name - ie harpo.vnet, rather than 
harpo.jimc.earth

related to RH network setup - arguably belongs in (repetetive) listing above
[root@harpo root]# grep R= /etc/sysconfig/network-scripts/ifcfg-cipcb?
/etc/sysconfig/network-scripts/ifcfg-cipcb0:PEER=groucho.dmz:6060
/etc/sysconfig/network-scripts/ifcfg-cipcb0:IPADDR=harpo.privnet
/etc/sysconfig/network-scripts/ifcfg-cipcb0:PTPADDR=groucho.privnet
/etc/sysconfig/network-scripts/ifcfg-cipcb1:PEER=example.com:6061
/etc/sysconfig/network-scripts/ifcfg-cipcb1:IPADDR=harpo.vnet
/etc/sysconfig/network-scripts/ifcfg-cipcb1:PTPADDR=groucho.vnet

harpo boots init 5, gnome-dm, as std with 7.2. on a couple of sessions, 
xdm (whatever)
bounced, resetting from harpo.jimc.earth (it somehow appeared) to 
harpo.vnet.

xhost, ssh keys seem newly inquisitive (passphrases/passwords) after 
adding new hostnames

OK, Qs

? why am I not keeping my hostname
/etc/sysconfig/network:HOSTNAME=harpo.jimc.earth
note that it appears in netstat -r output
? isnt 1st name assigned to address in /etc/hosts the Canonical name for 
that addr
/etc/hosts format is: IP Cname altnames*
the 'Cname' is in netstat -r listing of route over cipcb0
? any other 1-liner tips
? OT

Whacked Qs

? why dont my subnet IP-names ( .dmz .privnet .vnet ) work the same

this one works !

[root@harpo root]# ping -b .dmz
WARNING: pinging broadcast address
PING .dmz (192.168.1.0) from 192.168.1.2 : 56(84) bytes of data.
64 bytes from harpo.dmz (192.168.1.2): icmp_seq=0 ttl=255 time=178 usec
64 bytes from groucho.dmz (192.168.1.1): icmp_seq=0 ttl=255 time=876 
usec (DUP!)
64 bytes from harpo.dmz (192.168.1.2): icmp_seq=1 ttl=255 time=68 usec
64 bytes from groucho.dmz (192.168.1.1): icmp_seq=1 ttl=255 time=581 
usec (DUP!)
--- .dmz ping statistics ---
2 packets transmitted, 2 packets received, +2 duplicates, 0% packet loss
round-trip min/avg/max/mdev = 0.068/0.425/0.876/0.323 ms

but rest dont !

[root@harpo root]# ping .privnet
PING .privnet (192.168.10.0) from 10.0.0.6 : 56(84) bytes of data.
--- .privnet ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss

[root@harpo root]# ping .vnet
PING .vnet (192.168.100.0) from 10.0.0.6 : 56(84) bytes of data.
--- .vnet ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

[root@harpo root]# ping -b .vnet
PING .vnet (192.168.100.0) from 10.0.0.6 : 56(84) bytes of data.
--- .vnet ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss

? is there semantic room for enhancement to allow specifying subnet-names
as well as hostnames in /etc/hosts, possibly including /24 subnet notation.
really a resolver question i suppose.

Ok, put a fork in me...

tia
jimc

.





<< | Thread Index | >> ]    [ << | Date Index | >> ]