If you want me to post everything, let me know... for now i'm cutting a
lot out
# bash -x /sbin/ifup ctc0
...bunch of stuff, it's reading from /etc/sysconfig/network just fine...
more stuff ...
+ CONFIG=ctc0
+ '[' -z ctc0 ']'
+ need_config ctc0
+ '[' -f ctc0 ']'
+ CONFIG=../networking/default/ctc0
+ '[' -f ../networking/default/ctc0 ']'
+ CONFIG=../networking/default/ifcfg-ctc0
+ '[' -f ../networking/default/ifcfg-ctc0 ']'
+ CONFIG=ifcfg-ctc0
+ '[' -f ifcfg-ctc0 ']'
+ '[' 0 '!=' 0 ']'
+ source_config
++ basename ifcfg-ctc0
++ sed 's/^ifcfg-//g'
+ DEVNAME=ctc0
+ basename ifcfg-ctc0
+ grep '[^g]-'
+ . ifcfg-ctc0
++ DEVICE=ctc0
++ BOOTPROTO=static
++ IPADDR=172.16.18.130
++ NETMASK=255.255.0.0
++ ONBOOT=yes
++ REMIP=172.16.18.129
+ '[' foo = fooboot -a yes = no -o yes = NO ']'
+ '[' -n '' -a '' = no -o '' = NO ']'
++ echo ctc0
++ sed 's/[0-9]*$//'
+ DEVICETYPE=ctc
++ echo ctc0
++ sed 's/:.*//g'
+ REALDEVICE=ctc0
+ echo ctc0
+ grep -q :
+ ISALIAS=no
+ '[' '' = yes ']'
+ '[' static = bootp -o static = dhcp ']'
+ '[' -x /sbin/ifup-pre-local ']'
+ OTHERSCRIPT=/etc/sysconfig/network-scripts/ifup-ctc
+ '[' -x /etc/sysconfig/network-scripts/ifup-ctc ']'
+ exec /etc/sysconfig/network-scripts/ifup-ctc ifcfg-ctc0
SIOCADDRT: File exists
okay, i don't have a networking/default directory (I have a
networking/profiles/default, but it's empty)
it's pulling NETMASK=255.255.0.0, but when I do type ifconfig it shows
netmask 255.255.255.255, and in my ifcfg-ctc0 i have NETMASK=255.255.255.128
It's not doing MTU=1500 either
SIOCADDRT: File exists? That happens if I "route add" something that's
already there
[root@tcsl root]# bash -x /etc/sysconfig/network-scripts/ifup-ctc ifcfg-ctc0
... bunch of stuff ...
+ . ifcfg-ctc0
++ DEVICE=ctc0
++ BOOTPROTO=static
++ IPADDR=172.16.18.130
++ NETMASK=255.255.0.0
++ ONBOOT=yes
++ REMIP=172.16.18.129
+ '[' '' = boot -a yes = no ']'
+ '[' -n '' ']'
+ ifconfig ctc0 172.16.18.130 pointopoint 172.16.18.129
+ timeout=0
+ ping -w 30 -c 1 172.16.18.129
+ '[' '' '!=' '' ']'
+ . /etc/sysconfig/network
++ NETWORKING=yes
++ HOSTNAME=tcsl.tcs.timeinc.com
++ GATEWAY=172.16.18.129
+ '[' 172.16.18.129 '!=' '' ']'
+ '[' '' = '' -o '' = ctc0 ']'
+ route add default gw 172.16.18.129
SIOCADDRT: File exists
+ /etc/sysconfig/network-scripts/ifup-post ifcfg-ctc0
Again, this value for NETMASK and no MTU... where is it coming up with this?
I had mentioned opts wasn't getting set, earlier:
echo "ifconfig ${DEVICE} ${IPADDR} ${opts} pointopoint
${REMIP}">/tmp/ctc.log
in the script yielded
ifconfig ctc0 172.16.18.130 pointopoint 172.16.18.129
I'm all ears,
Daniel
[EMAIL PROTECTED] wrote:
>Daniel,
>
>Ok, it's time to get down and dirty. Do this:
>bash -x /sbin/ifup ctc0
>and pick through the output. You should see the information from the
>ifcfg-ctc0 file being read. At the bottom, you'll see this:
>+ exec /etc/sysconfig/network-scripts/ifup-ctc ifcfg-ctc0
>
>Then, do this:
>bash -x /etc/sysconfig/network-scripts/ifup-ctc ifcfg-ctc0
>and see what comes out. Again, you should see the information from the
>ifcfg-ctc0 file being read, and then the ifconfig command being issued:
>+ opts= mtu 1500
>+ ifconfig ctc0 192.168.0.20 mtu 1500 pointopoint 192.168.0.10
>
>Interestingly, there seems to be a small bug in the ifup-ctc script:
>while ! ping -w 30 -c ${REMIP} &>/dev/null; do
>
>This specifies an incorrect syntax for the ping command, which fails, which
>causes an error message that the ctc0 interface didn't come up. That part
>can be ignored.
>
>Mark Post
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Friday, February 01, 2002 10:54 AM
>To: [EMAIL PROTECTED]
>Subject: Re: CTC - linux newbie - should be an easy one
>
>
>Still no luck. ifcfg-ctc file is now:
>
>DEVICE=ctc0
>BOOTPROTO=static
>IPADDR=172.16.18.130
>NETMASK=255.255.255.128
>ONBOOT=yes
>REMIP=172.16.18.129
>GATEWAY=172.16.18.129
>MTU=1500
>
>network was whittled down back to the three lines...
>
>on reboot ifconfig ctc0 still shows that netmask is 255.255.255.255 and
>mtu is 32767.
>
>
>oh well,
>Daniel
>
>[EMAIL PROTECTED] wrote:
>
>
>>Daniel,
>>
>>Ah, I missed something. You need a "REMIP" value in your ifcfg-ctc0 file:
>>REMIP=192.168.0.10
>>This is the IP address of the "other end" of your CTC link. Here's _my_
>>complete file:
>>DEVICE=ctc0
>>BOOTPROTO=static
>>IPADDR=192.168.0.20
>>REMIP=192.168.0.10
>>GATEWAY=192.168.0.10
>>ONBOOT=yes
>>MTU=1500
>>
>>I don't know if Peter Bishop's suggestion to change BOOTPROTO to static is
>>necessary, but since we both have it in our files, it isn't going to hurt.
>>
>>You should remove the additional stuff you put in /etc/sysconfig/network.
>>
>>Mark Post
>>
>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, January 31, 2002 3:07 PM
>>To: [EMAIL PROTECTED]
>>Subject: Re: CTC - linux newbie - should be an easy one
>>
>>
>>I tried renaming the file, and that wasn't enough for things to work
>>correctly. On reboot MTU is 32767 and netmask 255.255.255.255 for ctc0
>>
>>ifup-ctc is executing to the end (route add default gw ${GATEWAY} is
>>being performed), so that seems okay.
>>
>>Two noteworthies:
>>earlier in the script, the ifconfig line is called with ${opts} being
>>empty, instead of "mtu 1500" or something.
>>$NETWORK also seems to be empty during execution
>>
>>here's some informational stuff
>># cat /etc/modules.conf
>>alias parport_lowlevel parport_pc
>>alias ctc0 ctc
>>(parport was there from the beginning, just added the alias ctc0)
>>
>>#cat /etc/sysconfig/network
>>NETWORKING=yes
>>HOSTNAME=tcsl.tcs.timeinc.com
>>GATEWAY=172.16.18.129
>>NETMASK=255.255.255.128
>>MTU=1500
>>NETWORK=172.16.18.129
>>(this used to be just the top three, but I keep on throwing more stuff
>>in here in hopes that something'll catch)
>>
>># cat /etc/sysconfig/networking/ifcfg-ctc0
>>DEVICE=ctc0
>>IPADDR=172.16.18.130
>>NETMASK=255.255.255.128
>>ONBOOT=yes
>>GATEWAY=172.16.18.129
>>USERCTL=no
>>MTU=1500
>>BOOTPROTO=none
>>NETWORK=172.16.18.129
>>(in the beginning the file didn't exist, i keep throwing in stuff hoping
>>something'll catch)
>>
>>
>>RH 7.2, LPAR installation.
>>I used to have at least the netmask part correct on reboot, but haven't
>>ever had the mtu to work correctly.
>>But now neither of them are working.
>>
>>
>>See anything glaring?
>>Thanks,
>>Daniel
>>
>>
>>[EMAIL PROTECTED] wrote:
>>
>>
>>>Daniel,
>>>
>>>I believe that if you rename ifcfg-ctc to ifcfg-ctc0 that things will
>>>
>start
>
>>>happening for you. Those files are created for each interface, not a
>>>
>class
>
>>>of interfaces.
>>>
>>>Mark Post
>>>
>>>-----Original Message-----
>>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>>Sent: Thursday, January 31, 2002 10:05 AM
>>>To: [EMAIL PROTECTED]
>>>Subject: CTC - linux newbie - should be an easy one
>>>
>>>
>>>I really hate to ask, because I had it working before, but after a fresh
>>>reinstall I couldn't get it working again.
>>>RH 7.2 on an LPAR. Everytime I reboot I have to
>>>
>>>ifconfig ctc0 mtu 1500 netmask 255.255.255.128
>>>and
>>>route add default gw blah.blah.blah.blah
>>>
>>>(and vary tcpip on the gateway lpar)
>>>
>>>I'd like to avoid doing this, and am not about to hardcode values in the
>>>network-scripts. I've added alias ctc0 ctc
>>>to my modules.conf so now it reads:
>>>alias parport_lowlevel parport_pc
>>>alias ctc0 ctc
>>>
>>>
>>>I've also created /etc/sysconfig/networking/ifcfg-ctc and threw in some
>>>values (which didn't do much)
>>>
>>>in /etc/sysconfig/network I have NETWORKING, HOSTNAME, and GATEWAY set
>>>correctly.
>>>
>>>I've been tinkering with this for some time and it's just not working.
>>>Previously I had gotten the configuration files to the point where
>>>rebooting would get the netmask and default gateway correct (not MTU),
>>>but I didn't make backups of config files I changed before I
>>>reinstalled, and now I can't re-figure out what to do where. What am I
>>>doing wrong?
>>>
>>>
>>>Thanks,
>>>Daniel
>>>