Сервер Red Hat Linux 7.3
Сетевые настройки сервера elis.it.ru
Файл настройки /etc/sysconfig/network
[root@elis root]# less /etc/sysconfig/network NETWORKING=yes HOSTNAME=elis.it.ru GATEWAY=172.18.94.250 IPX=yes IPXINTERNALNETNUM=0 IPXINTERNALNODENUM=0 IPXAUTOPRIMARY=off IPXAUTOFRAME=offФайл настройки /etc/sysconfig/network-scripts/ifcfg-eth0
[root@elis root]# less /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=172.18.94.1 NETMASK=255.255.255.0 NETWORK=172.18.94.0 BROADCAST=172.18.94.255 IPXACTIVE_802_3=yes IPXPRIMARY_802_3=yes IPXNETNUM_802_3=9412 IPXTARGETNETNUM=9202 IPXROUTENODE=306D809C6F
Скрипт поднятия протокола IPX (Novell NetWare) /etc/sysconfig/network-scripts/ifup-ipx
[root@elis root]# less /etc/sysconfig/network-scripts/ifup-ipx #!/bin/bash # configures IPX on $1 if appropriate PATH=/sbin:/usr/sbin:/bin:/usr/bin if [ "$1" = "" ]; then echo $"usage: $0" exit 1 fi if [ ! -x /sbin/ipx_interface ] ; then # cannot configure IPX with non-existant utilities exit 0 fi . /etc/sysconfig/network case $IPX in yes|true) ;; *) exit 0 ;; esac cd /etc/sysconfig/network-scripts . network-functions CONFIG=$1 [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG source_config for frametype in 802.2 802.3 ETHERII SNAP ; do framename=$(echo $frametype | sed 's/\./_/') eval ACT=\$IPXACTIVE_$framename case $ACT in yes|true) eval PRIM=\$IPXPRIMARY_$framename case $PRIM in yes|true) primary=-p ;; *) primary= ;; esac eval NUM=\$IPXNETNUM_$framename /sbin/ipx_interface add $primary $1 $frametype $NUM /sbin/ipx_route add $IPXTARGETNETNUM $NUM $IPXROUTENODE ;; esac done exit 0 [root@elis root]#
slist - Lists available NetWare Servers
[root@elis /root]# slist Known NetWare File Servers Network Node Address -------------------------------------------------------------------------- COMPAQ 4273BD0E 000000000001 ALFA 00A00001 000000000001 GAMMA 33282170 000000000001 DELTA 000D0001 000000000001 WIT 0000F777 000000000001 PROFEX3 0E874EAB 000000000001 PROFEX 00043453 000000000001 MTPSERV 000001F1 000000000001 BETA 02FA05DF 000000000001 OTO 00000071 000000000001 MSP 35B4B885 000000000001 TETTA 00040002 000000000001 UNIVAC 00F10865 000000000001
ipx_route - add or delete IPX route
[root@elis root]# ipx_route add 9202 9412 00306D809C6F
[root@elis root]# less /proc/net/ipx_route Network Router_Net Router_Node 4273BD0E 00009412 00306D809C6F 00009202 00009412 00306D809C6F 00009412 Directly Connected
Скрипт монтирования (подключения) дисков Nowell NetWare
#!/bin/bash # rc=0 server=DELTA #while true; do # бесконечный цикл ipx_interface add -p eth0 802.3 0x00009202 2> /dev/null # поднять IPX ipx_configure --auto_interface=off --auto_primary=on sleep 1 ncpmount -S $server -U p1.it -P 11111 /mnt/ncp 2> /dev/null rc=$? if [ $rc -eq 0 ]; then echo Сервер $server монтирован cp z_proch.out z_proch.old ./zserv.exe -s 25000 # rc=$? # [ $rc -eq 0 ] && break # нормальный выход else echo Сервер $server не найден fi sleep 1 # ipx_interface delall 2> /dev/null sleep 1 # ncpumount /mnt/ncp 2> /dev/null sleep 1 #done sleep 2 ncpumount /mnt/ncp 2> /dev/null sleep 2 ipx_interface delall 2> /dev/null
Обновленный скрипт монтирования (подключения) дисков Nowell NetWare
#!/bin/bash # rc=0 server2=BETA server=DELTA ZSERV=/usr/local/bin/zserv.exe #while true; do # бесконечный цикл ipx_interface add eth0 802.3 0x00009412 2> /dev/null # поднять IPX /sbin/ipx_configure --auto_interface=off --auto_primary=on sleep 1 ncpmount -S $server2 -U p1.it -P 11111 /mnt/ncp2 2> /dev/null ncpmount -S $server -U p1.it -P 11111 /mnt/ncp 2> /dev/null rc=$? if [ $rc -eq 0 ]; then echo Сервера $server2 и $server монтированы ! є+T++T+ $server2 г $server =?+LгT?+++- cp z_proch.out z_proch.old $ZSERV -s 25000 # rc=$? # [ $rc -eq 0 ] && break # нормальный выход else echo Сервера $server2 и $server не найдены ! є+T++T+ $server2 г $server ++ ++?-++- fi sleep 1 # ipx_interface delall 2> /dev/null sleep 1 # ncpumount /mnt/ncp 2> /dev/null sleep 1 #done # sleep 2 # ncpumount /mnt/ncp 2> /dev/null # sleep 2 # ipx_interface delall 2> /dev/null
Скрипт отмонтирования (размонтирования) дисков Nowell NetWare
#!/bin/bash # ncpumount /mnt/ncp ncpumount /mnt/ncp2 sleep 1 ipx_interface delall
ifconfig - configure a network interface
[root@elis /root]# ifconfig eth0 Link encap:Ethernet HWaddr 00:50:DA:D8:14:ED inet addr:172.18.94.1 Bcast:172.18.94.255 Mask:255.255.255.0 IPX/Ethernet 802.3 addr:00009412:0050DAD814ED UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6111810 errors:3029 dropped:0 overruns:0 frame:4583 TX packets:4998926 errors:0 dropped:0 overruns:0 carrier:0 collisions:32322 txqueuelen:100 Interrupt:12 Base address:0xe400 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:91132 errors:0 dropped:0 overruns:0 frame:0 TX packets:91132 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0
netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
[root@elis /root]# netstat Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 elis:25003 elis:32867 ESTABLISHED tcp 0 0 elis:25000 elis:32866 ESTABLISHED tcp 0 0 elis:25000 elis:32818 ESTABLISHED tcp 0 0 elis:netbios-ssn fbo4.it.ru:1046 ESTABLISHED tcp 0 20 elis:ssh fbo14:1042 ESTABLISHED tcp 0 0 elis:32934 sbyt:25000 ESTABLISHED tcp 0 0 elis:25000 svi:32770 ESTABLISHED tcp 0 0 elis:25000 172.18.11.5:radius ESTABLISHED tcp 0 0 elis:25000 fbo:1024 ESTABLISHED tcp 0 0 elis:32778 grossb:25000 ESTABLISHED tcp 1 0 elis:32849 elis:25000 CLOSE_WAIT tcp 0 0 elis:32866 elis:25000 ESTABLISHED tcp 0 0 elis:32818 elis:25000 ESTABLISHED tcp 0 0 elis:25000 usp:61000 ESTABLISHED tcp 0 0 elis:32867 elis:25003 ESTABLISHED tcp 0 0 elis:25000 kassa.it.ru:1033 ESTABLISHED tcp 0 0 elis:32955 kassa.it.ru:25000 ESTABLISHED tcp 0 0 elis:25000 sipelis:1033 ESTABLISHED tcp 0 0 elis:32958 sipelis:25000 ESTABLISHED tcp 0 0 elis:25000 sbyt:1255 ESTABLISHED tcp 0 0 elis:25000 cro65.it.ru:1822 ESTABLISHED tcp 0 0 elis:25001 peu18.it.ru:1030 ESTABLISHED Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node Path unix 12 [ ] DGRAM 908 /dev/log unix 2 [ ] DGRAM 4487 unix 2 [ ] DGRAM 3194 unix 2 [ ] DGRAM 2105 unix 2 [ ] DGRAM 2074 unix 2 [ ] DGRAM 1375 unix 2 [ ] DGRAM 1095 unix 2 [ ] DGRAM 1039 unix 2 [ ] DGRAM 1016 unix 2 [ ] DGRAM 954 unix 2 [ ] DGRAM 917 unix 2 [ ] STREAM CONNECTED 614 Active IPX sockets Proto Recv-Q Send-Q Local Address Foreign Address State IPX 0 0 12940000:3B54 -
tcpdump - dump traffic on a network
[root@elis /root]# tcpdump ip multicast Kernel filter, protocol ALL, TURBO mode (575 frames), datagram packet socket tcpdump: listening on all devices 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55 15:11:45.809414 eth0 M finbuh2.it.ru.svrloc > 224.0.1.22.svrloc: udp 55
exports - NFS file systems being exported (for Kernel based NFS)
[root@elis /root]# less /etc/exports /usr 172.18.94.4(rw) /data 172.18.94.5(rw) 172.18.94.7(rw) 172.18.157.2(rw,anonuid=505,anongid=505 172.18.84.5(rw) 172.18.209.60(rw) 172.18.93.62(ro) 172.18.93.40(ro) \ 172.18.93.4(rw,anonuid=505,anongid=505) 172.18.93.24(ro) 172.18.94.4(rw) \ 172.18.93.25(ro) 172.18.93.11(ro) 172.18.93.36(ro) 172.18.34.101(ro) \ 172.18.94.27(ro) 172.18.93.5(ro) 172.18.94.7(ro) 172.18.94.1(ro) \ 172.18.157.40(ro,anonuid=505,anongid=505) \ 172.18.157.3(ro,anonuid=505,anongid=505) \ 172.18.94.6(ro) /usr/rh62 172.18.94.6(ro) 172.18.157.2(ro) 172.18.34.101(ro) /tmp/bill 172.18.94.7(rw,all_squash,anonuid=505,anongid=505)
================== grossb ==================
[root@grossb nfs]# less /etc/exports # /data/task 172.18.94.32(ro) \ 172.18.157.46(ro,anonuid=555,anongid=555) \ 172.18.157.47(ro,anonuid=555,anongid=555) \ 172.18.157.48(ro,anonuid=555,anongid=555) \ 172.18.157.49(ro,anonuid=555,anongid=555) \ 172.18.209.80(ro) /data/tasksrv 172.18.94.32(ro)
[root@grossb nfs]# less /proc/fs/nfs/exports # Version 1.1 # Path Client(Flags) # IPs /data/task oidelekt.it.ru(ro,root_squash,sync,wdelay) # 172.18.157.46 /data/task sklad1.it.ru(ro,root_squash,sync,wdelay) # 172.18.157.47 /data/task sklad2.it.ru(ro,root_squash,sync,wdelay) # 172.18.157.48 /data/task omkugt.it.ru(ro,root_squash,sync,wdelay) # 172.18.157.49 /data/task opz80.it.ru(ro,root_squash,sync,wdelay) # 172.18.209.80 /data/tasksrv grossb2(ro,root_squash,sync,wdelay) # 172.18.94.32 /data/task grossb2(ro,root_squash,sync,wdelay) # 172.18.94.32
================== grossb ==================
Монтирование по nfs файловой системы с 172.18.94.26 к каталогу /mnt/nfs
[root@grossb nfs]#mount -t nfs 172.18.94.26:/ /mnt/nfs
Отмонтирование файловой системы от каталога /mnt/nfs
[root@grossb nfs]#umount /mnt/nfs