|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
#######
#
# E-scripts on installing a local net at home.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
# (find-eev-quick-intro)
# http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/anggsmil.e>
# or at <http://angg.twu.net/e/anggsmil.e.html>.
# See also <http://angg.twu.net/emacs.html>,
# <http://angg.twu.net/.emacs[.html]>,
# <http://angg.twu.net/.zshrc[.html]>,
# <http://angg.twu.net/escripts.html>,
# and <http://angg.twu.net/>.
#
#######
######
#
# angg, 99jul02
#
######
cd $MODULES
insmod 8390.o
insmod ne.o
ifconfig eth0 10.0.0.1
ifconfig
route add -net 10.0.0.0
route
cd $MODULES
insmod nfs.o
mount /patna
ifconfig eth0 down
ifconfig
route
# Pra updatear a minha pagina eu rodo, do angg,
cd $PAGE/out
~/EXPECT/anonftp patna 'cd TCL/PAGE/out' 'mput *.html' 'quit'
# (find-fline "/home/root/bin/conecta")
# (find-fline "/etc/
cd /etc/
ln -sf /home/root/bin/conecta rc2.d/S99conecta
ln -sf /home/root/bin/conecta rc3.d/S99conecta
lynx $S/http/www.debian.org/~elphick/manuals.html/network-administrator/ch-tcpip.html#s3.3
# (find-fline "/etc/exports")
/etc/init.d/nfs-server restart
O patna tem um adaptador de rede realtek 8029 pci (que é um o quê?)
# (find-k2file "Documentation/Configure.help" "Realtek")
# (find-k2file "Documentation/Configure.help" "NE2000")
# (find-k2file "drivers/net/ne.c" "8029")
# (find-k2file "drivers/net/ne2k-pci.c" "8029")
# (find-k2file "drivers/pci/pci.c" "8029")
# (find-k2file "include/linux/pci.h" "8029")
# (find-k2file "drivers/net/Config.in" "CONFIG_NE2K_PCI")
# (find-k2file "drivers/net/Makefile" "CONFIG_NE2K_PCI")
# (find-k2file "drivers/net/Space.c")
"CONFIG_NE2K_PCI")
# (find-k2file "kernel/sched.c")
#######
#
# Rede entre o angg e o smil, 98oct22
#
#######
cd /b1/etc
tar -cvzf ~/b1etc.tgz
diff -qrs /etc /b1/etc > ~/o
perl -nle '/Only in (\/b1\/etc.*): (.*)/ && print "$1/$2";
/Files (.*) and (.*) differ/ && print $2;' < ~/o
# Arquivos importantes que mudam entre as duas instalações
# (por causa das coisas de rede):
A=(
etc/default/rcS
etc/hosts
etc/init.d/network
etc/initrunlvl
etc/networks
etc/resolv.conf
etc/timezone
)
for a in $A; do mycat /$a /b1/$a; done
# Outros caras, esses sem graça:
#
etc/inetd.conf
etc/inittab
etc/inittab.real
etc/ppp/options
etc/fstab
etc/group
------> /etc/hosts
127.0.0.1 localhost
0.0.0.0 angg angg.nowhere
------> /b1/etc/hosts
127.0.0.1 localhost
10.0.3.1 angg.dez.com.br angg
------> /etc/init.d/network
#! /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
------> /b1/etc/init.d/network
#! /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=10.0.3.1
NETMASK=255.255.255.0
NETWORK=10.0.3.0
BROADCAST=10.0.3.255
GATEWAY=
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
2
------> /etc/initrunlvl
cat: /etc/initrunlvl: No such file or directory
------> /b1/etc/initrunlvl
q 5
------> /etc/networks
loopback 127.0.0.0
localnet 0.0.0.0
------> /b1/etc/networks
localnet 10.0.3.0
------> /etc/resolv.conf
search .
nameserver 200.240.18.1
------> /b1/etc/resolv.conf
search dez.com.br
------> /etc/timezone
America/Sao_Paulo
------> /b1/etc/timezone
Brazil/East
setopt +v
#######
#
# isapnp
#
#######
# grep -v '^#' ~/ne2000pnp.conf
insmod $MODULES/8390.o
ifconfig eth0 down
rmmod ne
#
isapnp - <<'---'
(READPORT 0x0203)
(ISOLATE)
(IDENTIFY *)
(CONFIGURE RTL8019/1662106 (LD 0
(IO 0 (BASE 0x0220))
(INT 0 (IRQ 10 (MODE +E)))
(ACT Y)
))
(WAITFORKEY)
---
#
insmod $MODULES/ne.o io=0x220 irq=10
#######
#
# angg stuff
#
#######
cd $MODULES
isapnp ~/ne2000pnp.conf
insmod 8390.o
insmod ne.o io=0x220 irq=10
IPADDR=10.0.3.1
NETMASK=255.255.255.0
NETWORK=10.0.3.0
BROADCAST=10.0.3.255
GATEWAY=
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
#######
#
# smil stuff
#
#######
IPADDR=10.0.3.2
NETMASK=255.255.255.0
NETWORK=10.0.3.0
BROADCAST=10.0.3.255
GATEWAY=
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
# Beleza! Olha o que eu consegui no angg. (Será?)
/home/root(root)# tcpdump -a
tcpdump: listening on eth0
23:42:43.344247 arp who-has 10.0.3.2 tell 10.0.3.1
1 packets received by filter
0 packets dropped by kernel
# Não, isso ainda não é muito; ninguém ainda responde pings, mas a luz
# amarela da placa pisca e a contagem de pacotes em /proc/net/dev
# aumentava no smil. No angg não, é curioso.
# (find-fline "/usr/doc/HOWTO/NET-3-HOWTO.gz")
# (find-fline "/usr/doc/HOWTO/NET-3-HOWTO.gz" 449)
# (find-fline "/usr/doc/HOWTO/Ethernet-HOWTO.gz")
# (find-fline "/usr/doc/HOWTO/Ethernet-HOWTO.gz" "A software configuration error is")
# (find-fline "/usr/doc/HOWTO/Ethernet-HOWTO.gz" "errs, drop, fifo")
# (find-fline "/usr/doc/HOWTO/Ethernet-HOWTO.gz" "SOCK_PACKET")
# (find-fline "/usr/doc/HOWTO/Ethernet-HOWTO.gz" "loopback.c")
# (find-fline "/usr/doc/HOWTO/Ethernet-HOWTO.gz" 3922)
# (find-fline "/usr/doc/HOWTO/Ethernet-HOWTO.gz" "(ping-pong")
# (find-fline "/usr/doc/HOWTO/NET-3-HOWTO.gz")
# (find-k2file "drivers/net/")
# (find-k2file ".files.chS.used")
# (find-k2file "net/")
# (find-k2file "net/core/dev.c")
# (find-k2file "net/ipv4/arp.c")
# (find-fline "~/rfcs/826.txt")
# (find-fline "~/rfcs/1122.txt")
# (find-fline "~/rfcs/")
# (find-fline "/usr/doc/HOWTO/mini/Proxy-ARP-Subnet.gz")
tr -d \\r < /cdrom/inet/rfc/rfc8xx/826.txt > ~/rfcs/826.txt
tr -d \\r < /cdrom/inet/rfc/rfc11xx/rfc1122.txt > ~/rfcs/1122.txt
arp
bootp
dhcp
drivers/net/net_init.c
O endereço standard é 0x300, mas esse o mcd está usando.
gzip -cd /usr/doc/HOWTO/Ethernet-HOWTO.gz | agrep -in drop
# Local Variables:
# coding: utf-8-unix
# End: