(E-Mail Removed) (Ken Williams) wrote in
news:YclEc.27212$(E-Mail Removed):
I noticed sometimes network configuration is set in several files.
In my box, I have /etc/sysconfig/network and /etc/sysconfig/network-
scripts/ifcfg-eth0.
I never remember the right files, so when I make some changes, I often use
grep -r(ecursive) with some keywords to find which file I have to modify.
$ pwd
/etc/sysconfig
$ grep -r MASK= *
networking/ifcfg-lo:NETMASK=255.0.0.0
network-scripts/ifcfg-lo:NETMASK=255.0.0.0
network-scripts/ifup-aliases: echo default_NETMASK=$NETMASK\;;
network-scripts/ifup-aliases: NETMASK=$default_NETMASK
network-scripts/ifcfg-eth0:NETMASK=255.255.255.192
[root@gzdns-e sysconfig]# grep -r MASK= *|more
networking/ifcfg-lo:NETMASK=255.0.0.0
network-scripts/ifcfg-lo:NETMASK=255.0.0.0
network-scripts/ifup-aliases: echo default_NETMASK=$NETMASK\;;
network-scripts/ifup-aliases: NETMASK=$default_NETMASK
network-scripts/ifcfg-eth0:NETMASK=255.255.255.192
$
I hope this could help.
Ciao.
> When I bootup this is what sets up my network/eth0.
>
> # Network Block: 49.90.8.176 / 28
>
> # Add loopback
> /sbin/ifconfig lo 127.0.0.1
> /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
>
> # Ethernet Config Info
> IPADDR="49.90.8.180"
> NETMASK="255.255.255.240"
> NETWORK="49.90.8.176"
> BROADCAST="49.90.8.191"
> GATEWAY="49.90.8.177"
>
> /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask
> ${NETMASK} /sbin/route add -net ${NETWORK} netmask ${NETMASK} dev eth0
> /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1
>
> It results in this (route command output):
>
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref
> Use Iface 49.90.8.176 0.0.0.0 255.255.255.240 U 0
> 0 0 eth0 49.90.8.176 0.0.0.0 255.255.255.240 U
> 0 0 0 eth0 49.0.0.0 0.0.0.0 255.0.0.0
> U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0
> U 0 0 0 lo 0.0.0.0 69.90.8.177
> 0.0.0.0 UG 1 0 0 eth0
>
>
> What is causing the net 49.0.0.0 netmask 255.0.0.0 to be there? I
> need to remove that, I know I can do a "route del -net..." but I don't
> want it to be there to begin with at bootup. What do I have to change
> to get rid of that? Its causing all packets from any ip thats starts
> with 49. to go nowhere.
>
> This is linux 2.4.26/slackware 9.1.
>
> Thanks.